#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#System["./cirno_system/Cirno_System.txt"]
#Title["Great Fairy Wars ~ Psycho Team"]
#Text[""]
#Player["./player/gt_Cirno/CirnoA.txt"]
#Background["./background.txt"]

#include".\Resources.txt"

let music = ObjSound_Create;
ObjSound_Load(music,CSD ~ "./se/bgm1.ogg");
ObjSound_SetLoopEnable(music,true);

let music1 = ObjSound_Create;
ObjSound_Load(music1,CSD ~ "./se/bgm2.ogg");
ObjSound_SetLoopEnable(music1,true);

@Initialize{
	TPlural;
	SetPlayerLife(9999);
	SetPlayerSpell(2);
	SetPauseScriptPath(CSD ~ "./cirno_system/Cirno_Pause.txt");
	SetEndSceneScriptPath(CSD ~ "./cirno_system/Cirno_EndScene.txt");
	SetReplaySaveSceneScriptPath(CSD ~ "./cirno_system/Cirno_ReplaySaveScene.txt");
}

@Event{
	alternative(GetEventType)
	case(EV_USER+1){
		ObjSound_SetVolumeRate(music,0);
		ObjSound_Stop(music);
		ObjSound_Play(music1);
		ObjSound_SetVolumeRate(music1,100);
	}	
}

@MainLoop{
	yield;
}

task TPlural
{
	let CSD=GetCurrentScriptDirectory();

	wait(20);
	ObjSound_Play(music);
	ObjSound_SetVolumeRate(music,100);
	let obj=ObjEnemyBossScene_Create();
	
	ObjEnemyBossScene_Add(obj,0,CSD~"n1.txt");
	ObjEnemyBossScene_Add(obj,0,CSD~"s1.txt");
	ObjEnemyBossScene_Add(obj,1,CSD~"n2.txt");
	ObjEnemyBossScene_Add(obj,1,CSD~"s2.txt");
	ObjEnemyBossScene_Add(obj,2,CSD~"n3.txt");
	ObjEnemyBossScene_Add(obj,2,CSD~"s3.txt");
	ObjEnemyBossScene_Add(obj,3,CSD~"n4.txt");
	ObjEnemyBossScene_Add(obj,3,CSD~"s4.txt");
	ObjEnemyBossScene_Add(obj,4,CSD~"n5.txt");
	ObjEnemyBossScene_Add(obj,4,CSD~"s5.txt");
	ObjEnemyBossScene_Add(obj,5,CSD~"n6.txt");
	ObjEnemyBossScene_Add(obj,5,CSD~"s6.txt");
	ObjEnemyBossScene_Add(obj,6,CSD~"n7.txt");
	ObjEnemyBossScene_Add(obj,6,CSD~"s7.txt");
	ObjEnemyBossScene_Add(obj,7,CSD~"n8.txt");
	ObjEnemyBossScene_Add(obj,7,CSD~"s8.txt");
	ObjEnemyBossScene_Add(obj,8,CSD~"n9.txt");
	ObjEnemyBossScene_Add(obj,8,CSD~"s9.txt");
	ObjEnemyBossScene_Add(obj,9,CSD~"n10.txt");
	ObjEnemyBossScene_Add(obj,9,CSD~"s10.txt");
	ObjEnemyBossScene_Add(obj,9,CSD~"epi.txt");
	
	ObjEnemyBossScene_LoadInThread(obj);
	ObjEnemyBossScene_Regist(obj);
	while(!Obj_IsDeleted(obj))
	{
		yield;
	}
	CloseScript(GetOwnScriptID());
}


