#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["RaNGE 16 - Minoriko by Fefnir"]
#Text["Wot"]
#Image["./img/thescriptimagewoop.png"]
#System["./default_system/Default_System.txt"]
#Background["./background.txt"]

let Bgm1 = ObjSound_Create;
ObjSound_Load(Bgm1,GetCurrentScriptDirectory ~ "./sound/Bgm1.mp3");
#include".\Functions\Resources.txt"
ObjSound_SetRestartEnable(Bgm1,true);
ObjSound_SetVolumeRate(Bgm1,100);
ObjSound_SetLoopEnable(Bgm1,true);

@Initialize
{
	TPlural();
	SetPlayerLife(10);
}

@Event {

}

@MainLoop
{
	yield;
}

@Finalize
{
}


task TPlural
{
	let dir = GetCurrentScriptDirectory();
	

	PlaytestInvincibility;
	ObjSound_Play(Bgm1);
	ObjSound_SetVolumeRate(Bgm1,100);
	let obj = ObjEnemyBossScene_Create();
	ObjEnemyBossScene_Add(obj, 0, dir ~ "NonSpell1A.txt");
	ObjEnemyBossScene_Add(obj, 0, dir ~ "Spell1A.txt");
	ObjEnemyBossScene_Add(obj, 1, dir ~ "NonSpell2A.txt");
	ObjEnemyBossScene_Add(obj, 1, dir ~ "Spell2A.txt");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "NonSpell3A.txt");
	ObjEnemyBossScene_Add(obj, 2, dir ~ "Spell3A.txt");
	ObjEnemyBossScene_Add(obj, 3, dir ~ "NonSpell4A.txt");
	ObjEnemyBossScene_Add(obj, 3, dir ~ "Spell4A.txt");
	ObjEnemyBossScene_Add(obj, 4, dir ~ "Spell5A.txt");
	
	
	ObjEnemyBossScene_LoadInThread(obj);
	ObjEnemyBossScene_Regist(obj);

	while(!Obj_IsDeleted(obj))
	{
		yield;
	}

	CloseScript(GetOwnScriptID());
}