#TouhouDanmakufu
#Title[Boss convo.]
#Text[Nyan~]
#Player[FREE]
#ScriptVersion[2]


script_enemy_main {
    let ImgBoss = GetCurrentScriptDirectory~"nimono.png";
	let reimu = "reimu.png";
let marisa = "marisa.png";
let rumia = "rumia.png";
	let bgm = GetCurrentScriptDirectory~"BGM.mp3";
    let frame = -120;

    @Initialize {
        SetLife(10);
        SetTimer(60);
        SetInvincibility(180);
	SetDamageRate(100,0);
        SetMovePosition02(GetCenterX, GetClipMinY + 120, 120);
        LoadMusic(bgm);

        LoadGraphic(ImgBoss);
        SetTexture(ImgBoss);
        SetGraphicRect(0, 0, 128, 128);
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 16);

CreateEventFromScript("conversation");
if(GetEventStep == 1) { 
AddLife(-GetLife);
PlayMusic(bgm);
 }
 frame++;
if(GetEventStep == 2) { 
CreateEnemyFromFile(GetCurrentScriptDirectory~"Secant1Z.txt", GetCommonData("secx"), GetCommonData("secy"), 0, 0, 0);

	}
	}
       

    

    @DrawLoop {
 
                DrawGraphic(GetX,GetY);
    }

    @Finalize {
        DeleteGraphic(ImgBoss);
    }




}

script_event conversation{
let reimu =GetCurrentScriptDirectory ~ ("\reimu.png");
let secant =GetCurrentScriptDirectory~ ("\cutin2.png");

@Initialize{
  LoadGraphic(reimu);
  LoadGraphic(secant);
	
 }

@MainLoop{
SetChar(LEFT, reimu);                 
SetGraphicRect(LEFT, 0, 0, 128, 270);           
MoveChar(LEFT, FRONT);                                      
MoveChar(RIGHT, BACK);
TextOutA("\c[RED] What is this place? Oh well, better \n stop and-");
SetChar(RIGHT, secant); 
SetGraphicRect(RIGHT, 0, 0, 280, 310);
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);                          
TextOutA("Hmm? Who're you?");    
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
SetGraphicRect(LEFT, 1, 1, 128, 270);                           
TextOutA("\c[RED] Er, hi. What are you and why do you \n have a yo-yo?");   
DeleteName(LEFT);                 
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK); 
SetNameFromText(RIGHT,TEXT_BLUE,"Nimono","Resident Miyoa");                          
TextOutA("\c[BLUE] I'm a miyoa. Don't ask. \n So, want to play?");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] No thanks, I just need to know where-"); 
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);
DeleteName(RIGHT);
TextOutA("\c[BLUE] Oh, I insist.");
TextOutA("\c[BLUE] I'll bring my robot too!");
SetStep(2);
Wait(1);
SetStep(30);
MoveChar(RIGHT, BACK);   
TextOutA("\c[PURPLE] Author's Note: I suggest you shoot the robot during nonspells! \n During spells, shoot the large enemy.");
MoveChar(RIGHT, FRONT); 
TextOutA("\c[BLUE] Did you hear something?");
MoveChar(RIGHT, BACK);                          
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] It sounded like...");
TextOutA("\c[RED] wait what");
TextOutA("\c[RED] I just need directions!");
Wait(1);
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);

TextOutC(31, "\c[BLUE] Well, EARN THEM!");
SetStep(1);
End;           //This ends the event. REMEMBER ME!

}

 @Finalize{
  
 }
}
