#e[Stage]
#Title[[Vbn̗lȂ]
#Text[[Vbn̗lȂ
SRႤ񂾂Ȃꂪ

Ȃ݂ɁARϋvXyȂ̂
Kobeˁ]
#Player[FREE]
#BackGround[User()]
#ScriptVersion[2]

script_stage_main{

	let Current = GetCurrentScriptDirectory;

	#include_function ".\INCLUDE\STAGE_INI.dms"

	CompileEnemyFromFile(Current ~ "[Vbn.dnh");

	let BGM = Current ~ "BGM.mp3";
	PlayMusic(BGM);

	@Initialize{
		LoadCommonData;
		if(GetCommonData("CHECK") != "OK"){
			SetCommonData("SPELL_GET", 0);
			SetCommonData("SPELL_HISTORY", 0);
			SetCommonData("CHECK", "OK");
			SetCommonData("SPELL_BONUS_CHECK", false);
			SaveCommonData;
		}
		SetCommonData("X", 0);
		SetCommonData("Y", 0);
		SetRateScoreSystemEnable(false);
		SetDefaultStatusVisible(true);
		SPELL_BONUS_CHECK;
		Main;
	}

	@MainLoop{
		yield;
	}

	@BackGround{
	}

	@Finalize{
		SetCommonData("SPELL_BONUS_CHECK", false);
		SaveCommonData;
		FadeOutMusic(BGM, 25);
	}

	task Main{
		yield;
		CreateEnemyFromFile(Current ~ "[Vbn.dnh", 0, 0, 0, 0, 0);
		while(GetEnemyNum){ yield; }
		loop(40){
			Create_Object_Maple_Diffusion(GetCommonData("X"), GetCommonData("Y"));
		}
		STI;
		loop(300){ yield; }
		ClearStage;
	}

}