#東方弾幕風
#Title[No.055　想起「ベットレイ・フレンズ　-Hard-」]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{

#include_function ".\弾幕集.txt"
	let name    = "想起「ベットレイ・フレンズ　-Hard-」";
	let frame   = 0;

	//初期位置
	let xini    =GetCenterX;
	let yini    =GetClipMinY + 120;

	@Initialize{
	SetCommonData("ON_SPELL",1);
	CutIn(YOUMU,name,"",0,0,0,0);
	SetLife(1);
	SetTimer(41);
	SetScore(450000 + spellbonus);
	SetDamageRate(0,0);
	SetDurableSpellCard();

	LoadGraphic(imgboss42);
	SetTexture(imgboss42);
	SetGraphicRect(0,0,63,63);

	Shot(2);
	yield;
	SetMovePosition03(xini,yini,5,10);
	}

	@MainLoop{
	ChackBonus;


	yield;
	}

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	DeleteGraphic(imgboss42);
	MasicPointAddSpellCard;
	loop(30 + scorebonus){
	let x = GetX + rand(-32,32);
	let y = GetY + rand(-32,32);
	CreateItem(ITEM_SCORE,x,y);
	}
	SetCommonData("ON_SPELL",0);
	}

	task A(wait,way,level){
	let angle = 0;
	loop{
	loop(2){	
	loop(way){ReflectShot(GetPlayerX + 64 * cos(angle),GetPlayerY + 64 * sin(angle),1.2,angle,2+level,true,true,true,true,BLUE31,0);
	if(level >= 2){ReflectShot(GetPlayerX + 128 * cos(angle),GetPlayerY + 128 * sin(angle),1.2,angle+10,2+level,true,true,true,true,BLUE31,0);}
	angle += 360 / way;}
	loop(5){yield;}}
	loop(wait){yield;}
	angle -= 5;
	}
	}

	task Shot(level){
	loop(120){yield;}
	A(120,18,level);
	loop{
	yield;
	}
	}
}