#東方弾幕風[Player]
#ScriptVersion[2]
#Menu[伊吹萃香]
#Text[]
#Image[]
#Replayname[kari]

script_player_main{

#include_function".\lib\include_std.txt"
#include_function".\p01\include_p01.txt"

let flag_miss;

@Initialize{
	//初期設定

	SetSpeed(0,0);
	SetRebirthFrame(-1);
	SetRebirthFrameReduction(0);
	SetItemCollectLine(00);
	SetGrazeCircle(45);
	SetInitialBombCount(2);
	SetAutoEffect(false);
	LoadPlayerShotData(GetCurrentScriptDirectory() ~ "p01\p01_shotdata.txt");

	flag_miss = false;
	p01_once_CreateCharacter();
	initialize_PRIBA_TaskStick();
	initialize_PRIBA_TaskLRMoveStatus(2, 6);
	MainRoutine();
}

@MainLoop{

	yield;


	//当り判定の設定
	if(!p01_IsGameOver){
		SetIntersectionCircle(GetPlayerX(), GetPlayerY(), 2);
	}

}

@SpellCard{
	
	AddBomb(1);
	if(flag_miss){
		p01_MissRoutine();
		flag_miss = false;
	}

}

@DrawLoop{
	if(!p01_IsGameOver){
		p01_draw_DrawCharacter();
	}
}

@Missed{
	flag_miss = true;
	CallSpellCard();
}

@Finalize{
}

task MainRoutine(){
	loop(70){yield;}
	once_p01_CheckSphereParameter();
	once_p01_CheckSphereCrash();
	once_p01_RecoveryRoutine();
	p01_StartRoutine();
}

}//end script




