#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["Ultra-Plural"]

@Initialize{TPlural();}
@MainLoop{yield;}
@Finalize{}

task TPlural{
	let path;
	let path2;
	let dir = GetCurrentScriptDirectory();
	let obj = ObjEnemyBossScene_Create();
	
	if(GetPlayerID == "Reimu Hakurei A"){path = dir ~ "./Script/Miyako00R.txt";	path2 = dir ~ "./Script/Miyako00EndR.txt";}
	if(GetPlayerID == "Reimu Hakurei B"){path = dir ~ "./Script/Miyako00R.txt";	path2 = dir ~ "./Script/Miyako00EndR.txt";}
	if(GetPlayerID == "Reimu Hakurei C"){path = dir ~ "./Script/Miyako00R.txt";	path2 = dir ~ "./Script/Miyako00EndR.txt";}
	if(GetPlayerID == "Marisa Kirisame A"){path = dir ~ "./Script/Miyako00M.txt";	path2 = dir ~ "./Script/Miyako00EndM.txt";}
	if(GetPlayerID == "Marisa Kirisame B"){path = dir ~ "./Script/Miyako00M.txt";	path2 = dir ~ "./Script/Miyako00EndM.txt";}
	if(GetPlayerID == "Marisa Kirisame C"){path = dir ~ "./Script/Miyako00M.txt";	path2 = dir ~ "./Script/Miyako00EndM.txt";}

	ObjEnemyBossScene_Add(obj, 0, path);
	ObjEnemyBossScene_Add(obj, 0, dir ~ "./Script/UltraMiyakoNonSpell01.txt");
	ObjEnemyBossScene_Add(obj, 0, dir ~ "./Script/UltraMiyakoSpell01.txt");
	ObjEnemyBossScene_Add(obj, 1, dir ~ "./Script/UltraMiyakoNonSpell02.txt");
	ObjEnemyBossScene_Add(obj, 1, dir ~ "./Script/UltraMiyakoSpell02.txt");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "./Script/UltraMiyakoNonSpell03.txt");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "./Script/UltraMiyakoSpell03.txt");
	ObjEnemyBossScene_Add(obj, 3, dir ~ "./Script/UltraMiyakoNonSpell04.txt");
	ObjEnemyBossScene_Add(obj, 3, dir ~ "./Script/UltraMiyakoSpell04.txt");
	ObjEnemyBossScene_Add(obj, 4, dir ~ "./Script/UltraMiyakoNonSpell05.txt");
	ObjEnemyBossScene_Add(obj, 4, dir ~ "./Script/UltraMiyakoSpell05.txt");
	ObjEnemyBossScene_Add(obj, 5, dir ~ "./Script/UltraMiyakoNonSpell06.txt");
	ObjEnemyBossScene_Add(obj, 5, dir ~ "./Script/UltraMiyakoSpell06.txt");
	ObjEnemyBossScene_Add(obj, 6, dir ~ "./Script/UltraMiyakoNonSpell07.txt");
	ObjEnemyBossScene_Add(obj, 6, dir ~ "./Script/UltraMiyakoSpell07.txt");
	ObjEnemyBossScene_Add(obj, 7, dir ~ "./Script/UltraMiyakoNonSpell08.txt");
	ObjEnemyBossScene_Add(obj, 7, dir ~ "./Script/UltraMiyakoSpell08.txt");	
	ObjEnemyBossScene_Add(obj, 8, dir ~ "./Script/UltraMiyakoNonSpell09.txt");
	ObjEnemyBossScene_Add(obj, 8, dir ~ "./Script/UltraMiyakoSpell09.txt");
	ObjEnemyBossScene_Add(obj, 9, dir ~ "./Script/UltraMiyakoSpell10.txt");
	ObjEnemyBossScene_Add(obj, 10, path2);
	ObjEnemyBossScene_LoadInThread(obj);
	while(GetCommonData("Boss",0) == 0){yield;}
	DeleteCommonData("Boss");
	ObjEnemyBossScene_Regist(obj);
	while(!Obj_IsDeleted(obj)){yield;}
	CloseScript(GetOwnScriptID());}