#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["Kasumi Boss Fight"]
#Background["./background.txt"]
#Text["by Bubsy Bobcat"]

let music = ObjSound_Create;
ObjSound_Load(music, GetCurrentScriptDirectory~"/sfx/bgm.mp3");
ObjSound_SetLoopEnable(music,true);
let imgBoss = GetCurrentScriptDirectory ~ "img/midboss.png";

@Event{

}


@Initialize{
	TPlural;
}

@MainLoop{
    yield;
}

task TPlural{
	SetPlayerLife(99);
	ObjSound_Play(music);
	ObjSound_SetVolumeRate(music,100);
	loop(20){yield;}
    let dir=GetCurrentScriptDirectory();
    let obj=ObjEnemyBossScene_Create();
	ObjEnemyBossScene_Add(obj,0,GetCurrentScriptDirectory~"./NS1.txt");
	ObjEnemyBossScene_Add(obj,0,GetCurrentScriptDirectory~"./S1.txt");
	ObjEnemyBossScene_Add(obj,1,GetCurrentScriptDirectory~"./NS2.txt");
	ObjEnemyBossScene_Add(obj,1,GetCurrentScriptDirectory~"./S2.txt");
	ObjEnemyBossScene_Add(obj,2,GetCurrentScriptDirectory~"./NS3.txt");
	ObjEnemyBossScene_Add(obj,2,GetCurrentScriptDirectory~"./S3.txt");
	ObjEnemyBossScene_Add(obj,3,GetCurrentScriptDirectory~"./NS4.txt");
	ObjEnemyBossScene_Add(obj,3,GetCurrentScriptDirectory~"./S4.txt");
	ObjEnemyBossScene_Add(obj,3,GetCurrentScriptDirectory~"./kasumi_die.txt");
    ObjEnemyBossScene_LoadInThread(obj);
    ObjEnemyBossScene_Regist(obj);
    while(!Obj_IsDeleted(obj)){
        yield;
    }
    CloseScript(GetOwnScriptID());
}