#搶曽抏枊晽
#Title[No.002 昘塉乽韫偺攡塉-Lunatic-乿]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
	#include_function ".\抏枊廤.txt"
	let name    = "昘塉乽韫偺攡塉-Lunatic-乿";
	let frame   = 0;

	//弶婜埵抲
	let xini    =GetCenterX;
	let yini    =GetClipMinY + 120;

	@Initialize{
	CutIn(YOUMU,name,"",0,0,0,0);
	SetX(xini);
	SetY(yini);
	SetLife(1000);
	SetTimer(29);
	SetScore(2500000 + spellbonus);
	SetDamageRate(45,10);

	LoadGraphic(imgboss1);
	SetTexture(imgboss1);
	SetGraphicRect(0,0,128,128);
	Shot();
	}

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

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	DeleteGraphic(imgboss1);
	MasicPointAddSpellCard;
	loop(12 + scorebonus){
	let x = rand(GetX-32,GetX+32);
	let y = rand(GetY-32,GetY+32);
	CreateItem(ITEM_SCORE,x,y);
	}
	}


	task Shot(){
	let angle = rand(70,110);
	loop(50){yield;}
	RainShot(3,3.7,85,BLUE23,0);
	loop{
	loop(30){yield;}
	Allshot(2,angle,18,BLUE01,20);
	}
	}

	task Move(){
	loop{
	yield;
	}
	}

}