#東方弾幕風
#Title[No.124 「フラッドリミット・１３　-Lunatic-」]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

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

	let name    = "「フラッドリミット・１３　-Lunatic-」";

	//初期位置
	let xini    =GetCenterX;
	let yini    =GetCenterY;
	let count   =0;

	@Initialize{
	CutIn(YOUMU,name,"",0,0,0,0);
	SetX(GetCenterX);
	SetY(GetClipMaxY - 120);
	SetLife(1);
	SetTimer(14);
	SetScore(9000000 + spellbonus);
	SetDamageRate(0,0);

	LoadGraphic(imgboss71);
	SetTexture(imgboss71);
	SetGraphicRect(0,0,127,127);
	SetDurableSpellCard();
	Shot();
	Move();

	LoadUserShotData(GetCurrentScriptDirectory~"11-221Shot_データ.txt");
	}

	@MainLoop{
	ChackBonus;
	count++;
	yield;
	}

	@DrawLoop{
	if(count < 60){DrawGraphic(GetX,GetY);}
	}


	@Finalize{
	DeleteGraphic(imgboss73);
	MasicPointAddSpellCard;
	CreateItem("ITEM_1UP",GetX,GetY);
	SetCommonData("ON_SPELL",0);
	}

	task Move(){
	loop{
	yield;
	}
	}



	task Shot(){
	let x;
	let y;
	let ymin = 300;
	let a = 0;
	let count = 0;
	loop{
	loop(40){
	count++;
	x = rand(GetClipMinX,GetClipMaxX);
	y = rand(ymin,GetClipMaxY);
	loop(3){CreateShot01(x,y,rand(2,3),-90 + rand(-4,4),46,20);}
	loop(4 - a){yield;}
	if(count == 25){Concentration01(75 - 15 * a);}
	if(count == 40){count = 0;}
	}
	a--;
	if(a >= 4){a = 3;}
	ymin -= 50;
	if(ymin < 120){ymin = 120;}
	}
	}
}