script_enemy_main{

let character="Setsuko";
let outfit=1;
outfit=(128*outfit)-128;
let damagerate=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;
let GRboss=("\script\Images\CharacterSprites\Setsuko.png");

@Initialize{
	LoadGraphic(GRboss);

	SetColor(255,160,200);
	Concentration01(90);
	SetColor(255,255,255);
	SetLife(10000);
	MagicCircle(false);
	SetInvincibility(120);

	SetX(GetCommonData("Boss1X"));
	SetY(GetCommonData("Boss1Y"));
	SetMovePosition02(cx-100,cy-100,60);
}
	
@MainLoop{

SetCollisionB(GetX,GetY,16);


SetMovePosition03(cx-GetCommonData("NewX"),miny+GetCommonData("NewY"),3,1.5);

time++;
frame++;

if(GetCommonDataDefault("UseSpell1",0)!=0){ usespell=GetCommonData("UseSpell1"); SetCommonData("UseSpell1",0); }
if(usespell>0){ usespell--; }
if(usespell<0){ usespell++; }
if(usespell!=0){ SetMovePosition01(GetX,GetY,0); }

SetCommonData("Boss1X",GetX); SetCommonData("Boss1Y",GetY);
}

@DrawLoop{
	SetGraphicScale(1,1);
	SetTexture(GRboss);
	SetGraphicAngle(0,0,0);
	SetColor(255,255,255);
	SetRenderState(ALPHA);

	if(usespell>=1){ SetGraphicRect(384,outfit,512,outfit+128); }
	if(usespell<=-1){ SetGraphicRect(512,outfit,640,outfit+128); }

	if(usespell==0){
		if(GetSpeedX<=0.5 && GetSpeedX>=-0.5){ SetGraphicRect(0,outfit,128,outfit+128); }
		else if(GetSpeedX<-0.5){ SetGraphicRect(128,outfit,256,outfit+128); }
		else if(GetSpeedX>0.5){ SetGraphicRect(256,outfit,384,outfit+128); }
	}
	if(GetLife>0 || GetCommonData("Difficulty")<4){ DrawGraphic(GetX,GetY); }
}

@Finalize{
	if(GetCommonData("Difficulty")<4){ CreateEnemyFromFile("script\Functions\dispel.txt",GetX,GetY,0,0,"Setsuko"); }
}

}