#Title[チルノ中ボス通常Ｅ]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

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

	let frame   = 0;

	@Initialize{
	SetX(GetCenterX + 120);
	SetY(GetClipMaxY + 32);
	SetLife(1500);
	SetTimer(29);
	SetDamageRate(100,15);

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

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

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	DeleteGraphic(imgboss1);
	MasicPointAddNormal(2);
	loop(12 + scorebonus){
	let x = rand(GetX-32,GetX+32);
	let y = rand(GetY-32,GetY+32);
	CreateItem(ITEM_SCORE,x,y);}


	}

	task Shot(){
	let angle = GetAngleToPlayer;
	loop(80){yield;}
	loop{
	loop(3){
	angle = GetAngleToPlayer;
	CirnoShotA(angle,0);
	loop(70){yield;}
	}
	loop(4){
	loop(3){
	angle = GetAngleToPlayer;
	Allshot(3,angle,12,BLUE01,0);
	loop(15){yield;}
	}
	}
	}
	}

	task Move(){
	let y1 = 120;
	SetMovePosition02(GetCenterX,y1,60);
	loop{yield;}

	}

}