#TouhouDanmakufu
#Title[DO THE TALKING!]
#Text[]
#Image[]
#Player[REIMU,MARISA]
#ScriptVersion[2]


script_enemy_main{
	


let lol = 0;
let imgBoss = GetCurrentScriptDirectory~"system\momizi.png";
LoadGraphic(imgBoss);
	@Initialize{
		
		SetLife(1);
		SetTimer(999);
		//SetScore(9999999);
		
		
		
		
		//SetDurableSpellCard;
		//CutIn(KOUMA,"",cut,0,0,0,0);
		//mainTask;
		if(GetPlayerType==REIMU_A || GetPlayerType==REIMU_B){
		CreateEventFromScript("reimu");
		} else {
		CreateEventFromScript("talk");
		}
		//SetEnemyMarker(true);
		
		
	}
	@MainLoop{
		
if(OnEvent){

} else {
VanishEnemy;
}

		yield;
		
	}
	@DrawLoop{
		SetTexture(imgBoss);
		SetRenderState(ALPHA);
		SetGraphicRect(0,0,64,64);
		SetGraphicScale(1,1);
		SetGraphicAngle(0,0,0);
		DrawGraphic(GetX,GetY);
	}

	@Finalize{
	

	}




}

script_event reimu{
let csd = GetCurrentScriptDirectory~"system\";
let reimu1 = csd~"Reimu.png";
let reimu2 = csd~"Reimu2.png";
let reimu3 = csd~"Reimu3.png";
let marisa1 = csd~"Marisa.png";
let marisa2 = csd~"Marisa2.png";
let marisa3 = csd~"Marisa3.png";
let marisa4 = csd~"Marisa4.png";
let marisa5 = csd~"Marisa5.png";
let momizi = csd~"momizi2.png";
let graphic = [reimu1,reimu2,reimu3,marisa1,marisa2,marisa3,marisa4,marisa5,momizi];
@Initialize{
	LoadGraphic(reimu1);
	LoadGraphic(reimu2);
	LoadGraphic(reimu3);
	LoadGraphic(marisa1);
	LoadGraphic(marisa2);
	LoadGraphic(marisa3);
	LoadGraphic(marisa4);
	LoadGraphic(marisa5);
	LoadGraphic(momizi);

}
@MainLoop{
Wait(30);
SetChar(LEFT,reimu2);
SetGraphicRect(LEFT,0,0,191,319);
MoveChar(LEFT,FRONT);
SetChar(RIGHT,momizi);
SetGraphicRect(RIGHT,0,0,276,329);
MoveChar(LEFT,FRONT);
MoveChar(RIGHT,BACK);
TextOutA("\c[RED]Not bad.");
TextOutA("\c[RED]That probably made my day.");
MoveChar(LEFT,BACK);
MoveChar(RIGHT,FRONT);
TextOutA("\c[BLUE]You`re very strong too.");
MoveChar(LEFT,FRONT);
MoveChar(RIGHT,BACK);
TextOutA("\c[RED]Ok I'll se you around.");
End();
}
@Finalize{

}
}
script_event talk{

let csd = GetCurrentScriptDirectory~"system\";
let reimu1 = csd~"Reimu.png";
let reimu2 = csd~"Reimu2.png";
let reimu3 = csd~"Reimu3.png";
let marisa1 = csd~"Marisa.png";
let marisa2 = csd~"Marisa2.png";
let marisa3 = csd~"Marisa3.png";
let marisa4 = csd~"Marisa4.png";
let marisa5 = csd~"Marisa5.png";
let momizi = csd~"momizi2.png";
let graphic = [reimu1,reimu2,reimu3,marisa1,marisa2,marisa3,marisa4,marisa5,momizi];
@Initialize{
	LoadGraphic(reimu1);
	LoadGraphic(reimu2);
	LoadGraphic(reimu3);
	LoadGraphic(marisa1);
	LoadGraphic(marisa2);
	LoadGraphic(marisa3);
	LoadGraphic(marisa4);
	LoadGraphic(marisa5);
	LoadGraphic(momizi);

}
@MainLoop{

SetChar(LEFT,marisa4);
SetGraphicRect(LEFT,0,0,191,319);
SetChar(RIGHT,momizi);
SetGraphicRect(RIGHT,0,0,276,329);
MoveChar(LEFT,FRONT);
MoveChar(RIGHT,BACK);
SetChar(LEFT,marisa1);
TextOutA("\c[YELLOW]Oof, Am I getting weaker or \n what?");
MoveChar(LEFT,BACK);
MoveChar(RIGHT,FRONT);
TextOutA("\c[BLUE]Nah, that fairy was cheating \n and I kinda went all out.");
MoveChar(LEFT,FRONT);
MoveChar(RIGHT,BACK);
TextOutA("\c[YELLOW]Oh well, I'll come back for a game sometime.");
MoveChar(LEFT,BACK);
MoveChar(RIGHT,FRONT);
TextOutA("\c[BLUE]Alright, see you.");

End;
}
@Finalize{
ascent(i in 0..length(graphic)){
DeleteGraphic(graphic[i]);
}
}

}