script_enemy_main{
	#include_function"script\Yui\CharacterRect.txt"
let boss = "script\Yui\Img\yui.png";

	@Initialize{
		SetLife( 1 );
		DeleteEnemyShotToItem( ALL );
		CollectItems;
		SetDamageRate( 0, 0 );
		CreateEventFromScript( "talk" );

		LoadGraphic(imgBoss);
	}
	@MainLoop{
		if(!OnEvent()){AddLife(-GetLife);}
		yield;
		SetMovePosition02(GetCenterX, GetClipMinX+120, 1);
	}
	@DrawLoop{
	if(GetSpeedX()<0){SetGraphicRect(GraphicRectLeft[0],GraphicRectLeft[1],GraphicRectLeft[2],GraphicRectLeft[3]);}
	else if(GetSpeedX()>0){SetGraphicRect(GraphicRectRight[0],GraphicRectRight[1],GraphicRectRight[2],GraphicRectRight[3]);}
	else {SetGraphicRect(GraphicRectCenter[0],GraphicRectCenter[1],GraphicRectCenter[2],GraphicRectCenter[3]);}
	SetAlpha(255);
	SetGraphicExpansion(GraphicScale,GraphicScale);
	SetColor(255,255,255);
	SetGraphicAngle(0,0,0);
	SetTexture(imgBoss);	
	DrawGraphic(GetX(),GetY());
}

	@Finalize{
	}
}





script_event talk{
let defeat = GetCurrentScriptDirectory~"Img\talk\defeat.png";
let defeath = GetCurrentScriptDirectory~"Img\talk\defeatH.png";
let normal = GetCurrentScriptDirectory~"Img\talk\Marisa.png";
let oh = GetCurrentScriptDirectory~"Img\talk\Marisa9.png";
let eh = GetCurrentScriptDirectory~"Img\talk\Marisa8.png";
let happy = GetCurrentScriptDirectory~"Img\talk\Marisa3.png";
let uu = GetCurrentScriptDirectory~"Img\talk\Marisa6.png";
let seria = GetCurrentScriptDirectory~"Img\talk\Marisa4.png";
	
@Initialize{
LoadGraphic(defeat);
LoadGraphic(defeath);
LoadGraphic(normal);
LoadGraphic(happy);
LoadGraphic(eh);
LoadGraphic(oh);
LoadGraphic(seria);
LoadGraphic(uu);
}

@MainLoop{
SetChar(RIGHT, defeat);
SetGraphicRect(RIGHT, 0, 0, 210, 320);
MoveChar(RIGHT, FRONT);
TextOutA("\c[WHITE]Sob");
TextOutA("\c[WHITE]Eres muy buena.");
MoveChar(RIGHT, BACK);

SetChar(LEFT, happy);
SetGraphicRect(LEFT, 0, 0, 192, 320);
MoveChar(LEFT, FRONT);
TextOutA("\c[YELLOW]Que esperabas!");
TextOutA("\c[YELLOW]si te has enfrentado a la poderosa \nbruja. Marisa Kirisame!");
MoveChar(LEFT, BACK);

SetChar(RIGHT, defeath);
SetGraphicRect(RIGHT, 0, 0, 210, 320);
MoveChar(RIGHT, FRONT);
TextOutA("\c[WHITE]Pero supongo que me he divertido");
SetChar(LEFT, eh);
SetGraphicRect(LEFT, 0, 0, 192, 320);
MoveChar(RIGHT, BACK);

MoveChar(LEFT, FRONT);
TextOutA("\c[YELLOW]Te divierte el hecho de que te he dado una paliza?");
SetChar(LEFT, uu);
SetGraphicRect(LEFT, 0, 0, 192, 320);
TextOutA("\c[YELLOW]supongo que si eres algo rara despues \nde todo");







 End;
 }

@Finalize{
PlaySE("script\Yui\SE\death.wav");
DeleteGraphic(defeat);
DeleteGraphic(normal);
DeleteGraphic(happy);
DeleteGraphic(eh);
DeleteGraphic(oh);
DeleteGraphic(seria);
DeleteGraphic(uu);
DeleteGraphic(defeath);
 }
}