script_enemy_main
{
	let frame=-200;
	#include_function ".\aliceanim.txt";
	#include_function ".\spellcard.txt";
task Doll
{
	CreateEnemyFromScript("Doll", GetX, GetY, 0, 0, [GetPlayerX, GetPlayerY]);
	CreateEnemyFromScript("Dollb", GetX, GetY, 0, 0, [GetX+50*cos(GetAngleToPlayer-150), GetY+50*sin(GetAngleToPlayer-150)]);
	CreateEnemyFromScript("Dollb", GetX, GetY, 0, 0, [GetX+50*cos(GetAngleToPlayer+150), GetY+50*sin(GetAngleToPlayer+150)]);
	loop(15){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
	{
	anim2;
	}
}

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

}
script_enemy Dollb {
	#include_function ".\dollanim.txt";
	let frame=0;
	let angle=0;
	@Initialize
	{
	SetLife(200);
}
	@MainLoop
	{
	yield;
	if(frame==0)
	{
	SetMovePosition02(GetArgument[0], GetArgument[1], 100);
	}
	frame++;
	if(frame==100)
	{
	PlaySE(GetCurrentScriptDirectory~"sound\Shot1.wav");
	ascent(i in 0..12)
	{
	CreateShot01(GetX, GetY, 3, atan2(GetEnemyY-GetY, GetEnemyX-GetX)+i*30, 7, 10);
	}
	VanishEnemy;
	}
}
	@DrawLoop
	{
	anim2;
}

}