#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(4000);
	SetTimer(69);
	SetDamageRate(120,12);

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

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

	yield;
	}

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	DeleteGraphic(imgboss);
	}

	task Shot(){
	SetShotDirectionType(PLAYER);
	let speed;
	loop(120){yield;}
	loop{
	loop(50){yield;}
	speed = 2;
	loop(5){
	Allshot(speed,0,20,RED11,0);
	Allshot(speed,3,20,RED11,0);
	Allshot(speed,6,20,RED11,0);
	Allshot(speed,9,20,RED11,0);
	speed += 0.7}
	}
	}

	task Move(){
	loop{
	loop(90){yield;}
	SetMovePosition02(GetPlayerX + rand(-20,20),rand(32,128),90);
	}
	}

}