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

script_enemy_main {
    let ImgBoss = GetCurrentScriptDirectory~"sprite.png";
	let reimu = "reimu.png";
let marisa = "marisa.png";
let rumia = "rumia.png";
	let bgm = GetCurrentScriptDirectory~"bgm3.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);
 }
 frame++;
if(GetEventStep == 2) { 
PlayMusic(bgm);
	}
	}
       

    

    @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, 128, 0, 256, 256);           
MoveChar(LEFT, FRONT);                                      
MoveChar(RIGHT, BACK);
TextOutA("\c[RED] It's you again.");
SetChar(RIGHT, secant); 
SetGraphicRect(RIGHT, 0, 0, 240, 290);
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);                          
TextOutA("...");           
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
SetGraphicRect(LEFT, 1, 1, 128, 270);                           
TextOutA("\c[RED] You don't say much, do you?");   
DeleteName(LEFT);                 
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);                           
TextOutA("\c[BLUE] Awaiting instructions.");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] What was that person's name? Lan?"); 
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);
DeleteName(RIGHT);
SetNameFromText(RIGHT,TEXT_WHITE,"Kyuu","Zetta Stupid Team");
TextOutA("\c[WHITE] No, it's Kyuu. \n \n I'm Secant's operator, remember? \n \n We're back. \n And we won't lose this time! \n Secant has some more spells.");
MoveChar(RIGHT, BACK);                          
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] He's still just a robot. \n They aren't good at danmaku.");
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);
DeleteName(RIGHT);
TextOutA("\c[WHITE] You're... \n Telling the truth. \n That's my power, detecting the truth \n and lies. \nHe might not be good at it, but he'll \ndo his best.");
MoveChar(RIGHT, BACK);                          
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] Whatever, let's just scrap this thing.");
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);
TextOutA("\c[BLUE] Insult Detected. \n Constructing Response. \n \n  ...");
SetStep(2);
TextOutA("\c[BLUE] Gueh. Prepare Yourself!");
End;           //This ends the event. REMEMBER ME!
SetStep(1);
}

 @Finalize{
  
 }
}
