#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("conversation", true);
        SetLife(1);
        SetTimer(60);
        SetInvincibility(10000);
	SetDamageRate(100,0);
	CreateEventFromScript("conversation");
	LoadGraphic(imageFile);
        InitializeAction;
	SetAction(ACT_MOVE, 60);
	CreateEnemyFromScript("Youmu", GetClipMinX+60, GetClipMinY-50, 0, 0, 0);
    }

@MainLoop{
	if(GetCommonDataDefault("conversation", false)==true){
	if(GetEventStep==1){
	SetCommonData("boom", true);
	CreateEnemyFromScript("Youmu2", ((GetCenterX+GetClipMinX)/2), GetClipMinY+120, 0, 0, 0);
	}
	if(GetEventStep==5){
	AddLife(-GetEnemyLife);
	}
	
	}
yield;
}
   



@DrawLoop{
DrawBoss(imageFile);
}


}



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

@MainLoop{
SetChar(LEFT, reimu); 
SetChar(RIGHT, yuyu);                
SetGraphicRect(LEFT, 0, 0, 200, 300);  
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
SetGraphicRect(RIGHT, 0, 0, 200, 300);
TextOutA("\c[BLUE]Fufufu.");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED](Is this going to be a running gag?)"); 
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
TextOutA("\c[BLUE]Youmu, take a break.");
TextOutA("\c[BLUE]I'll handle her, for now.");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
SetChar(LEFT, youmu);
TextOutA("\c[GREEN]Let's see...");
Select("\c[GREEN]Do what Lady Yuyuko says", "\c[GREEN]Do what Lady Yuyuko says");
TextOutA("\c[GREEN]As you wish. Be careful.");
SetStep(1);
Wait(1);
SetStep(0);
Wait(74);
SetChar(LEFT, reimu);
TextOutA("\c[RED]..."); 
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
TextOutA("\c[BLUE]Now, shall we get started?");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED](What was the point of that, exactly?)"); 
MoveChar(LEFT, BACK);                                      
MoveChar(RIGHT, FRONT);
TextOutA("\c[BLUE]Round 2, start!");

SetStep(5);
End;  
}


@Finalize{

}
}


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


	@Initialize {
	InitializeAction;
	SetAction(ACT_MOVE, 120);
	SetMovePosition02((GetCenterX+GetClipMinX)/2, 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{
	if(GetCommonDataDefault("boom", false)==true){ VanishEnemy; }
	yield;
	}
	}
	
	

}


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


	@Initialize {
	InitializeAction;
	SetAction(ACT_MOVE, 120);
	SetMovePosition02(GetClipMinX-50, GetClipMinY-30, 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);
	VanishEnemy;
	}
	
	

}







