#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["Cirno - Easy"]
#System["./system/system.txt"]
#Background["./background.txt"]
#Text["By Bubsy Bobcat [r] When I say Easy, I mean EASY!"]

let objBoss;
let objScene = GetEnemyBossSceneObjectID;

let music = ObjSound_Create;
ObjSound_Load(music, GetCurrentScriptDirectory~"/bgm.mp3");
ObjSound_SetLoopEnable(music, true);

@Event{

}

@Loading{
	LoadScript(GetCurrentScriptDirectory~"./Death.txt");
	LoadScript(GetCurrentScriptDirectory~"./NS1_E.txt");
	LoadScript(GetCurrentScriptDirectory~"./NS2_E.txt");
	LoadScript(GetCurrentScriptDirectory~"./NS3_E.txt");
	LoadScript(GetCurrentScriptDirectory~"./NS4_E.txt");
	LoadScript(GetCurrentScriptDirectory~"./S1_E.txt");
	LoadScript(GetCurrentScriptDirectory~"./S2_E.txt");
	LoadScript(GetCurrentScriptDirectory~"./S3_E.txt");
	LoadScript(GetCurrentScriptDirectory~"./S4_E.txt");
}

@Initialize{
	TPlural;
}

@MainLoop{
	SetPlayerLife(10);
    yield;
}

task TPlural{
	ObjSound_Play(music);
	ObjSound_SetVolumeRate(music, 75);
    let obj = ObjEnemyBossScene_Create();
	ObjEnemyBossScene_Add(obj,0,GetCurrentScriptDirectory~"./NS1_E.txt");
	ObjEnemyBossScene_Add(obj,0,GetCurrentScriptDirectory~"./S1_E.txt");
	ObjEnemyBossScene_Add(obj,1,GetCurrentScriptDirectory~"./NS2_E.txt");
	ObjEnemyBossScene_Add(obj,1,GetCurrentScriptDirectory~"./S2_E.txt");
	ObjEnemyBossScene_Add(obj,2,GetCurrentScriptDirectory~"./NS3_E.txt");
	ObjEnemyBossScene_Add(obj,2,GetCurrentScriptDirectory~"./S3_E.txt");
	ObjEnemyBossScene_Add(obj,3,GetCurrentScriptDirectory~"./NS4_E.txt");
	ObjEnemyBossScene_Add(obj,3,GetCurrentScriptDirectory~"./S4_E.txt");
	ObjEnemyBossScene_Add(obj,3,GetCurrentScriptDirectory~"./Death.txt");
    ObjEnemyBossScene_LoadInThread(obj);
    ObjEnemyBossScene_Regist(obj);
    while(!Obj_IsDeleted(obj)){
        yield;
    }
    CloseScript(GetOwnScriptID());
}