#東方弾幕風
#Title[美鈴通常]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
	#include_function ".\弾幕集.txt"

	@Initialize{
	SetX(GetCenterX + 100);
	SetY(GetClipMinY - 32);
	SetLife(4700);
	SetTimer(39);
	SetDamageRate(200,30);

	LoadGraphic(imgboss31);
	SetTexture(imgboss31);
	SetGraphicRect(0,0,127,127);
	Shot(3);
	}

	@MainLoop{
	ChackBonus;
	SetCollisionA(GetX,GetY,24);
	SetCollisionB(GetX,GetY,24);
	yield;
	}

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	MasicPointAddNormal(3.5);
	DeleteGraphic(imgboss31);
	}

	task Shot(level){
	function Wait(time){loop(time){yield;}}
	let y1 = 170;
	let y2 = 60;
	let x1 = GetCenterX - 160;
	let x2 = GetCenterX + 160;
	loop{
	SetMovePosition02(GetCenterX,y1,40);
	Wait(60);
	loop(10 + level * 15){CreateShot02(GetX,GetY,0,rand(-50,230),rand(0.001,0.02),2,BLUE31,10);}
	Wait(30);
	loop(10 + level * 15){CreateShot02(GetX,GetY,0,rand(-50,230),rand(0.001,0.02),2,BLUE31,10);}
	Wait(30);
	SetMovePosition02(x1,y2,40);
	Wait(60);
	Allshot(0.8,rand(-6,6),(level+1) * 30,RED04,15);
	if(level >= 2){Allshot(1.2,rand(-6,6),(level+1) * 25,RED04,15);}
	Wait(30);
	SetMovePosition02(GetCenterX,y1,40);
	Wait(60);
	Allshot(0.8,rand(-6,6),(level+1) * 30,RED04,15);
	if(level >= 2){Allshot(1.2,rand(-6,6),(level+1) * 25,RED04,15);}
	Wait(30);
	SetMovePosition02(x2,y2,40);
	Wait(60);
	loop(10 + level * 15){CreateShot02(GetX,GetY,0,rand(-50,230),rand(0.001,0.02),2,BLUE31,10);}
	Wait(30);
	loop(10 + level * 15){CreateShot02(GetX,GetY,0,rand(-50,230),rand(0.001,0.02),2,BLUE31,10);}
	Wait(30);
	}
	}
}