#Title[フランドール通常２]
#Text[]
#Image[]
#BackGround[]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
	#include_function ".\弾幕集.txt"
	let frame   = 0;

	@Initialize{
	SetX(GetCenterX);
	SetY(GetClipMinY + 120);
	SetLife(2000);
	SetTimer(69);
	SetDamageRate(100,0);

	LoadGraphic(imgboss62);
	SetTexture(imgboss62);
	SetGraphicRect(0,0,127,127);
	Shot(3);
	}

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

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	DeleteGraphic(imgboss62);
	}

	task Shot(level){
	let angle;
	let speed;
	loop(150){yield;}
	if(level <= 1){AroundKoteiEasy();}
	if(level >= 2){AroundKoteiHard();}
	loop{
	SetShotDirectionType(PLAYER);
	loop(100){yield;}
	speed = 2.5 - (3 - level) * 0.1;
	loop(3){
	CreateShot01(GetX,GetY,speed,-15,PURPLE03,0);
	CreateShot01(GetX,GetY,speed+0.5,0,PURPLE03,0);
	CreateShot01(GetX,GetY,speed,15,PURPLE03,0);
	speed -= 0.5;
	}
	loop(50){yield;}
	angle = rand(0,360);
	Allshot(1.8,angle,18+level * 6,RED11,0);
	Allshot(2.4,angle,18+level * 6,RED11,0);
	}
	}

}