Exemple #1
0
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;
}
Exemple #2
0
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();
}