#TouhouDanmakufu
#Title[Boss convo.]
#Text[sfsd~]
#Player[FREE]
#ScriptVersion[2]
#BackGround[User(.\stgbg.png, 0, 0)]

script_enemy_main {
   	let imageFile = GetCurrentScriptDirectory~"sprites/yuyuko.png";
	let bgm = GetCurrentScriptDirectory~"mu\bgm.mp3";
	#include_function ".\DATA\lib_Anime_Yuyuko.dnh";
    @Initialize {
	
	SetCommonData("lastattack", false);
	SetCommonData("conversation", true);
        SetLife(1);
        SetTimer(60);
        SetInvincibility(10000);
	SetDamageRate(100,0);
	CreateEventFromScript("conversation");
	LoadGraphic(imageFile);
        InitializeAction;
	SetAction(ACT_MOVE, 60);
	
    }

@MainLoop{
	if(GetCommonDataDefault("conversation", false)==true){
	if(GetEventStep==1){
	
	CreateEnemyFromScript("Youmu", GetCenterX-50, GetClipMinY-50, 0, 0, 0);
	}
	if(GetEventStep==2){
	SetMovePosition02(GetCenterX+50, GetClipMinY-120, 90);
	SetAction(ACT_MOVE, 90);
	}
	if(GetEventStep==5){
	AddLife(-GetEnemyLife);
	}
	
	}
yield;
}
   



@DrawLoop{
DrawBoss(imageFile);
}


}



script_event conversation{
let reimu =GetCurrentScriptDirectory ~ ("sprites\reimu.png");
let reimuwtf =GetCurrentScriptDirectory ~ ("sprites\reimuwtf.png");
let yuyuded =GetCurrentScriptDirectory~ ("sprites\CutDead.png");
let yuyu =GetCurrentScriptDirectory~ ("sprites\Cut.png");
let youmu =GetCurrentScriptDirectory~ ("sprites\CutY.png");
@Initialize{
  LoadGraphic(reimu);
  LoadGraphic(yuyu);
	LoadGraphic(reimuwtf);
  LoadGraphic(yuyuded);
	  LoadGraphic(youmu);
	
	
 }

@MainLoop{
SetChar(LEFT, reimu); 
SetChar(RIGHT, yuyuded);                
SetGraphicRect(LEFT, 0, 0, 200, 300);  
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
SetGraphicRect(RIGHT, 0, 0, 200, 300);
TextOutA("\c[BLUE]Ow.");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED]I've defeated you, I win, lalalalala..."); 
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
TextOutA("\c[BLUE]Oh dear...");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED]...lalalalalalalala..."); 
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
SetChar(RIGHT, yuyu);
TextOutA("\c[BLUE](Youmu?)");
SetStep(1);
Wait(1);
SetStep(0);
Wait(74);
SetChar(LEFT, youmu);
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[GREEN](I'm here.)");
SetChar(RIGHT, yuyu);
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
TextOutA("\c[BLUE](You can try your new attack.\nI'll go back...)");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[GREEN](Alright.)");
SetStep(2);
Wait(1);
SetStep(0);
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
SetChar(LEFT, reimu);
SetChar(RIGHT, youmu);
TextOutA("\c[RED]...lalala. That was fun.\nNow, stop your-");
SetChar(LEFT, reimuwtf);
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
TextOutA("\c[GREEN]...");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED]..."); 
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
TextOutA("\c[GREEN]My mistress has already left.");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED]I noticed."); 
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
TextOutA("\c[GREEN]Right. (Uh...)");
TextOutA("\c[GREEN]For defeating my mistress,\nyou will pay!");
TextOutA("\c[GREEN](That sounded stupid.)");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED]But I don't get any donations.");
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
TextOutA("\c[GREEN]...");
TextOutA("\c[GREEN](I'll just use the card...)");

SetStep(5);
End;  
}


@Finalize{

}
}


script_enemy Youmu{
	
	
	
	#include_function ".\Youmuinclude.txt"


	@Initialize {
	InitializeAction;
	SetAction(ACT_MOVE, 120);
	SetMovePosition02(GetCenterX-50, GetClipMinY + 120, 60);
	LoadSE(shot);
	LoadSE(shot2);
	LoadSE(slash);
	LoadSE(shot3);
	LoadGraphic(imageFile);
	LoadGraphic(Cut);
	SetLife(150000);
	SetInvincibility(45555555);
	SetDamageRateEx(35, 25, 175, 10);
	animation;
	}

	task animation{
	wait(60);
	SetAction(ACT_STAND, 600000);
	loop{
	SetCommonData("YoumuX", GetX);
	SetCommonData("YoumuY", GetY);
	
	yield;
	}
	}
	
	

}

