#e
#Title[No.002 XJu蹂̔~J-Lunatic-v]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
	#include_function ".\eW.txt"
	let name    = "XJu蹂̔~J-Lunatic-v";
	let frame   = 0;

	//ʒu
	let xini    =GetCenterX;
	let yini    =GetClipMinY + 120;

	@Initialize{
	SetCommonData("ON_SPELL",1);
	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);
	}
	SetCommonData("ON_SPELL",0);
	}


	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;
	}
	}

}