script_enemy_main
{
	let frame=-200;
	let angle=0;
	let anglec=0;
	let type=0;
	let radius=75;
	let move_count=0;
	#include_function ".\sakuyaanim.txt";
	#include_function ".\spellcard.txt";
task attack
{
	PlaySE(GetCurrentScriptDirectory~"sound\Shot1.wav");
	ascent(i in 1..3)
	{
	ascent(j in -1..2)
	{
	CreateShot01(GetX, GetY, i+1, GetAngleToPlayer+j*17.5, 221, 10);
	CreateShot01(GetX, GetY, i+1, GetAngleToPlayer+j*17.5, 221, 10);
	}
	}
	loop(30){yield;}
	attack;
}
task wave
{
	PlaySE(GetCurrentScriptDirectory~"sound\Shot1.wav");
	ascent(i in 0..3)
	{
	ascent(j in -2..3)
	{
	CreateShot01(GetX, GetY, i+1, GetAngleToPlayer+j*25+i*3, 218, 10);
	CreateShot01(GetX, GetY, i+1, GetAngleToPlayer+j*25+i*3, 218, 10);
	}
	}
	loop(30){yield;}
	waveb;
}
task waveb
{
	PlaySE(GetCurrentScriptDirectory~"sound\Shot1.wav");
	ascent(i in 0..3)
	{
	ascent(j in -2..3)
	{
	CreateShot01(GetX, GetY, i+1, GetAngleToPlayer+j*15-i*3, 218, 10);
	CreateShot01(GetX, GetY, i+1, GetAngleToPlayer+j*15-i*3, 218, 10);
	}
	}
	loop(90){yield;}
	wave;
}
	@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;
	}
	if(frame==0)
	{
		wave;
	}
	move_count++;
	if(move_count == 110)
	{
	SetMovePosition03(rand(GetPlayerX-50, GetPlayerX+50), rand(50, 120), rand(8, 10), 1.5);
	move_count=0;
	}
}
	
	@Finalize
	{
	}
	
	@DrawLoop
	{
	if(type==0)
	{
	anim2;
	}
	if(type==1)
	{
	animation2;
	}
	}
}