#東方弾幕風
#Title[No.008　氷符「フロストフリーズ　-Hard-」]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

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

	let name    = "氷符「フロストフリーズ　-Hard-」";

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

	@Initialize{
	SetCommonData("ON_SPELL",1);
	CutIn(YOUMU,name,"",0,0,0,0);
	SetX(GetCenterX);
	SetY(GetClipMinY + 120);
	SetLife(1750);
	SetTimer(29);
	SetScore(2000000 + spellbonus);
	SetDamageRate(50,10);
	SetInvincibility(120);

	LoadGraphic(imgboss1);
	SetTexture(imgboss1);
	SetGraphicRect(0,0,127,127);
	Shot();
	Move();
	}

	@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 Move(){
	loop{
	yield;
	}
	}

	task Shot(){
	function Wait(time){loop(time){yield;}}
	CirnoShotC(rand(3,5),2);
	CirnoShotE(2);
	loop{
	yield;
	}
	}
}