#東方弾幕風[Stage]
#Title[凍花異変]
#Text[]
#Image[]
#BGM[]
#Player[
.\date\player\cirnoA\cirnoA.txt,
.\date\player\cirnoB\cirnoB.txt]
#ScriptVersion[2]

script_stage_main{
	//ロード
	LoadCommonData();
	#include_function".\date\localdata.txt"
	SetCommonData("AnotherMode",0);
	SetCommonData("ResultTime",0);

    	task StageTask{
		SaveCommonData();
		stage1;
	}

	@Initialize{
		SetRenderFrame(false);
		StageTask;
		ExpertEx(false,0,3);
	}

	@MainLoop(){
		
                //if(OnEvent()==true){break;};//イベント中は敵の動きを停止する
		BG+=BGP;//背景スピード
		alternative(Stage)
		case(11){
			if(BG==512){BG=0;}
			if(OnBomb==false){SetCommonData("Spell_Back",0);}//スペル終了時暗転解除
			timer += 0.01;//だんだん夕方に
		}
		case(21){
			if(BG==512){BG=0;}
			if(OnBomb==false){SetCommonData("Spell_Back",0);}//スペル終了時暗転解除
			timer += 0.05;//だんだん夜に
		}
		case(22){
			BGAngle+=0.5;
		}
		case(31){
			if(BG==1024){BG=0;}
			if(OnBomb==false){SetCommonData("Spell_Back",0);}//スペル終了時暗転解除
		}
		case(32){
			if(BG==512){BG=0;}
			BG+=0.1;
		}
		yield;
	}

	@Finalize{
		Delete_A;
	}

	@BackGround{
		let Spell = GetCommonData("SpellCade");
		if(Spell == false && GetCommonDataDefault("33",0) == 1){Stage = 33;}
		if(Spell == false && GetCommonDataDefault("34",0) == 1){Stage = 34;}
		alternative(Stage)
		case(11){BG01;}
                case(21){BG02a;}
		case(22){BGBoss1;}
                case(23){BG03(0,0,0);}
                case(31){BG03(0,0,0);}
                case(33){BG03(00,00,20);}
                case(34){BG03(50,50,50);}
		case(32){BGBoss2;}
	}

}
#include_script".\date\lib\Event.txt"
