#東方弾幕風
#Title[No.105 心壊「ブレイク・オブ・マインド-Easy-」]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

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


	let name    = "心壊「ブレイク・オブ・マインド-Easy-」";

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

	@Initialize{
	CutIn(YOUMU,name,"",0,0,0,0);
	SetX(GetCenterX);
	SetY(GetClipMinY + 120);
	SetLife(750);
	SetTimer(100);
	SetScore(6000000 + spellbonus * 3);
	SetDamageRate(17,0);
	SetInvincibility(300);

	LoadGraphic(imgboss62);
	SetTexture(imgboss62);
	SetGraphicRect(0,0,127,127);
	Shot(100,0,30,12,5);
	Shot(150,10,30,12,10);
	Shot(200,0,30,12,15);
	Shot(250,10,30,12,20);
	}

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

	yield;
	}

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	DeleteGraphic(imgboss62);
	MasicPointAddSpellCard;
	loop(90 + scorebonus * 3){
	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(firstwait,angle,wait,way,n){
	let angle;
	let angleA;
	loop(firstwait){yield;}
	loop{
	angle = 0;
	loop(360 / wait){
	loop(wait){yield;}
	loop(9){CreateShot02(GetX,GetY,2,angle,0,0,RED02,0);angle+=40;}
	}
	angle = n;
	let angleA = angle;
	loop(way){
	CreateShotA(1,GetX,GetY,0);
	SetShotDataA(1,0,1,angleA,0,0,2,GREEN02);
	SetShotDataA(1,30,NULL,NULL,0.9,0.2,3,GREEN02);
	CreateShotA(2,0,0,10);
	SetShotDataA(2,0,1,angleA-90,0,0,2,ORANGE23);
	CreateShotA(3,0,0,10);
	SetShotDataA(3,0,1,angleA+90,0,0,2,ORANGE23);
	AddShot(30,1,2,0);
	AddShot(30,1,3,0);
	CreateShotA(2,0,0,10);
	SetShotDataA(2,0,1,angleA-90,0,0,2,AQUA23);
	CreateShotA(3,0,0,10);
	SetShotDataA(3,0,1,angleA+90,0,0,2,AQUA23);
	AddShot(50,1,2,0);
	AddShot(50,1,3,0);
	CreateShotA(2,0,0,10);
	SetShotDataA(2,0,1,angleA-90,0,0,2,ORANGE23);
	CreateShotA(3,0,0,10);
	SetShotDataA(3,0,1,angleA+90,0,0,2,ORANGE23);
	AddShot(70,1,2,0);
	AddShot(70,1,3,0);
	CreateShotA(2,0,0,10);
	SetShotDataA(2,0,1,angleA-90,0,0,2,AQUA23);
	CreateShotA(3,0,0,10);
	SetShotDataA(3,0,1,angleA+90,0,0,2,AQUA23);
	AddShot(90,1,2,0);
	AddShot(90,1,3,0);
	SetShotKillTime(1,300);
	FireShot(1);
	angleA -= 30;
	}
	}
	}

}