script_enemy_main
{
	let frame=-200;
	let type=0;
	#include_function ".\aliceanim.txt";
	#include_function ".\spellcard.txt";
task Doll
{
	type=1;
	loop(7)
	{
	CreateEnemyFromScript("Doll", GetX, GetY, 0, 0, [GetPlayerX, GetPlayerY]);
	loop(15){yield;}
	}
	PlaySE(GetCurrentScriptDirectory~"sound\BulletWave.wav");
	ascent(i in 0..60)
	{
	CreateShot01(GetX, GetY, 5, GetAngleToPlayer+i*6, 7, 10);
	}
	type=0;
	loop(90){yield;}
	Doll;
}
	
	@Initialize
	{
		SetInvincibility(100);
		SetLife(2000);
		SetDamageRate(70,30);
		SetMovePosition02(GetCenterX,120,20);
		LoadUserShotData(GetCurrentScriptDirectory~"supershot.txt");

		timer;
		SetCommonData("timercount", 1800);
	}
	
	@MainLoop
	{
		SetCollisionA(GetX(),GetY(),24);
		SetCollisionB(GetX(),GetY(),24);
		frame++;
		yield;
	if(frame==0)
	{
		Doll;
	}
}
	
	@Finalize
	{
	}
	
	@DrawLoop
	{
	if(type==0){anim2;}else{animation;}
	}
}

script_enemy Doll {
	#include_function ".\dollanim.txt";
	let frame=0;
	let angle=GetAngleToPlayer;
	@Initialize
	{
	SetLife(200);
}
	@MainLoop
	{
	yield;
	if(frame==0)
	{
	SetMovePosition02(GetArgument[0], GetArgument[1], 90);
	}
	frame++;
	angle+=5;
	if(frame%15==0)
	{
	PlaySE(GetCurrentScriptDirectory~"sound\Shot1.wav");
	ascent(i in 0..4)
	{
	CreateShot01(GetX, GetY, 3, angle+i*90, 2, 10);
	}
	}
	if(frame==90){VanishEnemy;}
}
	@DrawLoop
	{
	anim2;
}

}