script_enemy_main
{
        let csd     = GetCurrentScriptDirectory;
	let speed = GetSpeed;
	let angle = GetAngle;
	let num = GetArgument;
	let imgEnemy;
	if(num==1)
	{
		imgEnemy=csd~"..\lib\fairy_red.png";
	}
	if(num==2)
	{
		imgEnemy=csd~"..\lib\fairy_blue.png";
	}
	let SelectedDifficult=GetCommonDataDefault("SELECTEDDIFFICULT","Normal");

    @Initialize {
        SetLife(10);
        SetDamageRate(100,100);
	SetTexture(imgEnemy);
	Initialize_Fairy(0);
	Tmain;
	}

    @MainLoop {
	SetCollisionA(GetX(),GetY(),32);
        SetCollisionB(GetX(),GetY(),8);
	yield;
    }

        @DrawLoop {
		SetColor(ZakoColor[0],ZakoColor[1],ZakoColor[2]);
		DrawFairy(imgEnemy);

	}

        @Finalize
        {
		FinalizeItemSet(1);
		alternative(GetCommonDataDefault("SELECTEDDIFFICULT","None"))
		case("Moderate")
		{

		}
		case("Extream")
		{

		}
		case("Apocalypse")
		{

		}
        } 

task Tmain
{
yield;
OutDamageRateZero;
AutoErazeTime(900);
GetDamege;
move;

alternative(GetCommonDataDefault("SELECTEDDIFFICULT","None"))
case("Moderate")
{
shotM;
}
case("Extream")
{
shotE;
}
case("Apocalypse")
{
shotA;
}

}

task move
{
loop(60)
{
	SetSpeed(3.0);
	SetAngle(GetAngleToPlayer);
yield;
}
}

task shotM
{
wait(15);
loop(3)
{
CreateShot01(GetX,GetY,5,GetAngleToPlayer,9,5);
wait(45);
}
}
///////////////////////////////////////////////////////////
task shotE
{
wait(15);
loop(10)
{
CreateShot01(GetX,GetY,4,GetAngleToPlayer,9,5);
wait(15);
}
}
///////////////////////////////////////////////////////////
task shotA
{
wait(15);
loop(10)
{
ascent(let i in -1..2)
{
CreateShot01(GetX,GetY,5,GetAngleToPlayer+i*15,9,5);
}
wait(15);
}
}

#include_function ".\..\txt/StageEnemydata.txt"
#include_function ".\..\lib\lib_anime_fairy.txt"
}

#include_script ".\..\txt/EnemyShotData.txt"