#TouhouDanmakufu
#Title[boss 1 convo 1.]
#Text[Nyan~]
#Player[FREE]
#ScriptVersion[2]
#BackGround[]

script_enemy_main {
   	let  Enemy = GetCurrentScriptDirectory~"img\sprites\mima.png";
	
    @Initialize {
	SetCommonData("conversation", true);
        SetLife(1);
        SetInvincibility(10000);
	SetDamageRate(100,0);
       	SetX(GetClipMinX-100);
	SetY(GetClipMinY-100);
	CreateEventFromScript("conversation");
	LoadGraphic(Enemy);
       
    }

@MainLoop{
	if(GetCommonDataDefault("conversation", false)==true){
	if(GetEventStep==1){AddLife(-GetEnemyLife);}

if(GetEventStep==2){SetMovePosition02(GetCenterX, GetClipMinY+120, 80);}



	}
yield;
}
   



@DrawLoop{

SetAlpha(255);
SetGraphicScale(1,1);
SetColor(255,255,255);
SetGraphicAngle(0,0,0);
SetTexture(Enemy);
SetGraphicRect(44,34,87,95);
DrawGraphic(GetX,GetY);

}


}



script_event conversation{
let Yuyukosmile =GetCurrentScriptDirectory ~ ("img\cut\Yuyuko.png");
let Yuyukoneutral =GetCurrentScriptDirectory ~ ("img\cut\Yuyuko2.png");
let Yuyukoserious =GetCurrentScriptDirectory ~ ("img\cut\Yuyuko3.png");

let bgm = GetCurrentScriptDirectory~"bgm\mima.mp3";

let Mimaneutral =GetCurrentScriptDirectory~ ("img\cut\Mima.png");
let Mimasmile =GetCurrentScriptDirectory~ ("img\cut\Mima2.png");

@Initialize{
  LoadGraphic(Yuyukosmile);
  LoadGraphic(Yuyukoneutral);
  LoadGraphic(Yuyukoserious);
  LoadGraphic(Mimaneutral);
	LoadGraphic(Mimasmile);	

	LoadMusic(bgm);
 }

@MainLoop{
SetChar(LEFT, Yuyukoneutral);                 
SetGraphicRect(LEFT, 0, 0, 190, 312);           
MoveChar(LEFT, FRONT);                                      
MoveChar(RIGHT, BACK);

TextOutA("\c[PURPLE]This place...\nIt is full of demoniac power...");
SetChar(LEFT, Yuyukoserious);  

TextOutA("\c[PURPLE]It isn't part of Hakugyokurou.\nI wonder if...");

SetChar(RIGHT, Mimaneutral); 
SetGraphicRect(RIGHT, 0, 0, 190, 312);
MoveChar(LEFT, BACK);
DeleteName(LEFT);
MoveChar(RIGHT, FRONT);                          

SetStep(2);//set movement	
Wait(1);
SetStep(22);//set normality of movement

SetNameFromText(RIGHT,TEXT_BLUE,"Mima","Banished Demon");   
TextOutA("\c[BLUE]Freeze.\nThis is Makai,the land of demons.\nYou don't belong here.");

MoveChar(RIGHT, BACK);  
DeleteName(RIGHT);                               
MoveChar(LEFT, FRONT);  
SetChar(LEFT, Yuyukosmile);  
TextOutA("\c[PURPLE]Makai?Yukari already talked about this place...and the oni too."); 


SetChar(RIGHT, Mimasmile);                   
MoveChar(RIGHT, FRONT);                        
MoveChar(LEFT, BACK);                    
TextOutA("\c[BLUE]Ahem. Excuse me for interrupting,but...");

SetChar(RIGHT, Mimaneutral); 
TextOutA("\c[BLUE]I have to check your identity.\nFor security purposes.\nSince that flying boat pierced Makai's sky,\nthe number of tourist never cease to   increase.\nAnd some people sneak in without       permission.");

MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
SetChar(LEFT, Yuyukosmile);  
TextOutA("\c[PURPLE]Oh,that's a true problem. \nI know that too,ghosts entering in \nHakugyokurou to escape from the \njudgment...\nQuite a sad thing."); 
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);
TextOutA("\c[BLUE]Indeed.\nSo,what is your buisness here?");

SetChar(LEFT, Yuyukoneutral);  
MoveChar(RIGHT, BACK);                        
MoveChar(LEFT, FRONT);  
TextOutA("\c[PURPLE]Well,I felt a strange energy,and I     tried to follow it, \nBut I'm really bad at these things.\nSo I got lost.\nCould you...");


SetChar(RIGHT, Mimasmile);                   
MoveChar(RIGHT, FRONT);                        
MoveChar(LEFT, BACK);                    
TextOutA("\c[BLUE]Help you?Why not...");

SetChar(RIGHT, Mimaneutral); 
TextOutA("\c[BLUE]But I have only one thing to request...");
 

Wait(60);
PlayMusic(bgm);
SetChar(RIGHT, Mimasmile); 
TextOutA("\c[BLUE]A danmaku battle.Here and now.");

MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
SetChar(LEFT, Yuyukosmile); 
SetChar(RIGHT, Mimaneutral); 
TextOutA("\c[PURPLE]It's fine, I wasn't planning to get outof this place without seeing... \n...the forbidden danmaku that is \nconcealed in the land of pandemonium!"); 

SetChar(RIGHT, Mimasmile);                   
MoveChar(RIGHT, FRONT);                        
MoveChar(LEFT, BACK);   
TextOutA("\c[BLUE]Excellent,let's get started!");

SetStep(1);
End;  
}


@Finalize{

}
}
