#TouhouDanmakufu
#Title[Marisa gtfo midboss speech!]
#Text[Nyan~]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
    let ImgBoss = GetCurrentScriptDirectory~"MarisaSprites.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(marisa);
        LoadGraphic(ImgBoss);
        SetTexture(ImgBoss);
        SetGraphicRect(1, 1, 64, 70);
    }

    @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 marisa=GetCurrentScriptDirectory ~ ("marisa.png");
let marisasweat = GetCurrentScriptDirectory ~ ("MariSweatdrop.png");
let secant =GetCurrentScriptDirectory~ ("\cutin2.png");

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

@MainLoop{
SetChar(LEFT, reimu);                 
SetGraphicRect(LEFT, 128, 0, 256, 256);           
MoveChar(LEFT, FRONT);                                      
MoveChar(RIGHT, BACK);
TextOutA("\c[RED] Oh look, it's the magician.");
SetChar(RIGHT, marisa); 
SetGraphicRect(RIGHT, 0, 0, 128, 257);
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
SetNameFromText(RIGHT,TEXT_WHITE,"Marisa Kirisame","Ordinary Magician");                         
TextOutA("\c[WHITE] Ordinary magician to you!");           
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
SetGraphicRect(LEFT, 1, 1, 128, 270);                           
TextOutA("\c[RED] Sorry, sorry.");   
DeleteName(LEFT);                 
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);                           
TextOutA("\c[WHITE] Who're you and why are you here?");
MoveChar(RIGHT, BACK);                           
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] I'm from....Kansas?"); 
MoveChar(RIGHT, FRONT);                           
MoveChar(LEFT, BACK);
DeleteName(RIGHT);
SetChar(RIGHT, marisasweat);
SetGraphicRect(RIGHT, 0, 0, 128, 270);
TextOutA("\c[WHITE] Whatever, ze. Reimu's lazing around, \n so I want the spotlight, damnit!");
End;           //This ends the event. REMEMBER ME!
SetStep(1);
}

 @Finalize{
  
 }
}
