#TouhouDanmakufu
#Title[The conversation. Durr.]
#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 frame = -120;
let bgm = GetCurrentScriptDirectory~"bgm.mp3";
    @Initialize {
        SetLife(10);
        SetTimer(60);
        SetInvincibility(180);
	SetDamageRate(100,0);
        SetMovePosition02(GetCenterX, GetClipMinY + 120, 120);
        

        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] Who's there?");
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] Um...");   
DeleteName(LEFT);                 
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);                           
SetNameFromText(RIGHT,TEXT_PURPLE,"Secant","Zetta Stupid Team");
TextOutA("\c[BLUE] Large amounts of very strong magic \n detected.");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] What is THAT? A robot with hair?"); 
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);
DeleteName(RIGHT);
SetNameFromText(RIGHT,TEXT_WHITE,"Kyuu","Zetta Stupid Team");
TextOutA("\c[WHITE] Is this thing on? \n \n ... \n I'm Secant's operator. \n You seem to be in the way, \n And absolutely loaded on magic. \n Secant, take that person down!");
MoveChar(RIGHT, BACK);                          
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] Um, okay. Let's make this quick.");
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);
DeleteName(RIGHT);
TextOutA("\c[BLUE] Accept Query: Make this Quick? \n \n ... \n \n Query Accepted.");
End;           //This ends the event. REMEMBER ME!
SetStep(1);
}

 @Finalize{
  
 }
}
