script_enemy_main
{
	let frame=-200;
	let angle=0;
	let anglec=0;
	let radius=75;
	let move_count=0;
	let time=30;
	#include_function ".\sakuyaanim.txt";
	#include_function ".\spellcard.txt";
task attack
{
	ascent(i in 0..45)
	{
	ascent(j in 0..4)
	{
	PlaySE(GetCurrentScriptDirectory~"sound\Shot1.wav");
	CreateShotA(1, GetX+75*cos(GetAngleToPlayer+i*8+j*90), GetY+75*sin(GetAngleToPlayer+i*8+j*90), 20);
	SetShotDataA(1, 0, 0, GetAngleToPlayer+i*16+180+j*90, 0, 0, 0, 216);
	SetShotDataA(1, 60, NULL, NULL, 0, 0.01, 1, 216);
	SetShotDataA(1, 80, NULL, NULL, 0, 0.02, 3, 216);
	FireShot(1);
	}
	yield;
	}
	loop(10){yield;}
	loop(50)
	{
	PlaySE(GetCurrentScriptDirectory~"sound\BulletWave.wav");
	yield;
	}
	SetMovePosition02(rand(GetPlayerX-50, GetPlayerX+50), rand(50, 120), time);
	loop(time){yield;}
	time-=2;
	attack;
}
	@Initialize
	{
		SetInvincibility(100);
		SetLife(2000);
		SetDamageRate(70,70);
		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==-50)
	{
		attack;
	}
}
	
	@Finalize
	{
	}
	
	@DrawLoop
	{
	anim2;
	}
}