#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(0);
	}

	@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{
	loop(7){
	angle = GetAngleToPlayer;
	loop(50){yield;}
	if(level >= 1){Allshot(3,angle,level * 8 + 24,WHITE31,0);}
	Allshot(2.7,angle,level * 8 + 24,WHITE31,0);
	if(level >= 2){Allshot(2.4,angle,level * 8 + 24,AQUA31,0);}
	Allshot(2.1,angle,level * 8 + 24,AQUA31,0);
	if(level >= 1){Allshot(1.8,angle,level * 8 + 24,BLUE31,0);}
	Allshot(1.4,angle,level * 8 + 24,BLUE31,0);
	Allshot(1.2,angle,level * 8 + 24,PURPLE31,0);
	Allshot(1,angle,level * 8 + 24,PURPLE31,0);
	}
	SetMovePosition02(GetPlayerX + rand(-20,20),rand(32,128),50);
	}
	}

}