script_enemy_main{

let SEshots5=("script\SoundEffects\shots5.wav");
let GRfamiliar=("\script\Images\OtherEffects\SpellCircle1a.png");

let scale=0;

let usespell=0;
let frame=0;
let time=0;
let miny=GetClipMinY; let maxy=GetClipMaxY; let minx=GetClipMinX; let maxx=GetClipMaxX;
let cx=GetCenterX; let cy=GetCenterY;

SetAngle(GetAngleToPlayer+rand(-20,20));
SetSpeed(0.8);

@Initialize{
	LoadGraphic("\script\Images\OtherEffects\SpellCircle1a.png");
	LoadSE("script\SoundEffects\shots5.wav");

	SetScore(1);
	SetLife(100);
	MagicCircle(false);
}
	
@MainLoop{

if(GetX<=minx-20 || GetX>=maxx+20 || GetY<=miny-20 || GetY>=maxy+20 && time>=60){ VanishEnemy; }

if(time%15==0 && time>=15){
let angle=GetAngleToPlayer;
	loop(5){
	CreateShot02(GetX,GetY,0,angle,0.03,2,133,0);
	angle+=360/5;
	}
PlaySE(SEshots5);
}

if(scale<1){ scale+=0.1; }

time++;
frame++;

}

@DrawLoop{
	SetGraphicScale(0.25*scale,0.25*scale);
	SetTexture(GRfamiliar);
	SetGraphicAngle(0,0,time*2);
	SetColor(0,0,255);
	SetRenderState(ALPHA);
	SetAlpha(255);
	SetGraphicRect(0,0,200,200);
	DrawGraphic(GetX,GetY);
}

@Finalize{
}

}