コード例 #1
0
ファイル: Adventure.c プロジェクト: Belphemur/MiniDungeon
bool UpdateAdventure(void)
{
	if(!adventureWindowVisible)
		return false;
	
	if(IsBattleForced())
	{
		INFO_LOG("Triggering forced battle.");
		ShowBattleWindow();
		return true;
	}

#if EVENT_CHANCE_SCALING
	++ticksSinceLastEvent;
#endif
	if(updateDelay && !GetFastMode())
	{
		--updateDelay;
		return false;
	}

	bool result = ComputeRandomEvent(GetFastMode());
	LoadRandomDungeonImage();
	return result;
}
コード例 #2
0
ファイル: Adventure.c プロジェクト: BlackLamb/MiniDungeon
void UpdateAdventure(void)
{
	if(!adventureWindowVisible)
		return;
	
	if(IsBattleForced())
	{
		INFO_LOG("Triggering forced battle.");
		ShowBattleWindow();
		return;
	}

#if EVENT_CHANCE_SCALING
	++ticksSinceLastEvent;
#endif
	if(updateDelay > 0 && !GetFastMode())
	{
		--updateDelay;
		return;
	}

	ExecuteEvent(ComputeRandomEvent_inline(baseChanceOfEvent, ticksSinceLastEvent, chances, sizeof(chances), GetFastMode()));
	LoadRandomDungeonImage();
}
コード例 #3
0
ファイル: MainMenu.c プロジェクト: BlackLamb/MiniDungeon
void ForceBattle(void)
{
	PopMenu();
	ShowBattleWindow();
}