#Title[敀楡捠忢侾]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
	#include_function ".\抏枊廤.txt"
	let frame   = 0;

	@Initialize{
	SetX(GetCenterX);
	SetY(GetClipMinY + 120);
	SetLife(4000);
	SetTimer(69);
	SetDamageRate(150,15);

	LoadGraphic(imgboss61);
	SetTexture(imgboss61);
	SetGraphicRect(0,0,127,127);
	Shot(2);
	}

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

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	DeleteGraphic(imgboss61);
	}

	task Shot(level){
	let angle;
	loop(120){yield;}
	loop{
	angle = 90 + rand(-10,10);
	loop(5 + level){
	loop(40 + level * 4){yield;}
	Allshot(2,angle,level * 3 + 10,BLUE05,0);
	Allshot(2,angle+2,level * 3 + 10,BLUE04,0);
	Allshot(2,angle+4,level * 3 + 10,BLUE04,0);
	Allshot(2,angle+6,level * 3 + 10,BLUE02,0);
	Allshot(2,angle+8,level * 3 + 10,BLUE03,0);
	if(level >= 2){
	Allshot(2,angle-2,level * 3 + 10,BLUE05,0);
	Allshot(2,angle-4,level * 3 + 10,BLUE05,0);
	}
	angle += 13;
	}
	SetMovePosition02(GetPlayerX + rand(-20,20),rand(32,128),60);
	loop(80){yield;}
	}
	}

}