CvGame::getJonRandNum(int, const char *)
- Defined in
- CvGame.cpp, line 9259
- Class
- CvGame
- Hook name
CivHooks::CvGame_getJonRandNum
Hooks
static bool BeforeCvGame_getJonRandNum(CvGame* self, int iNum, const char* pszLog, int& result);static void AfterCvGame_getJonRandNum(CvGame* self, int iNum, const char* pszLog, int& result);static int ReplaceCvGame_getJonRandNum(int (*original)(CvGame*, int, const char*), CvGame* self, int iNum, const char* pszLog);CivRegisterBefore<CivHooks::CvGame_getJonRandNum>(host, &BeforeCvGame_getJonRandNum);CivRegisterAfter<CivHooks::CvGame_getJonRandNum>(host, &AfterCvGame_getJonRandNum);CivRegisterReplace<CivHooks::CvGame_getJonRandNum>(host, &ReplaceCvGame_getJonRandNum);
Code
9257/// Get a synchronous random number in the range of 0...iNum-19258/// Allows for logging.9259int CvGame::getJonRandNum(int iNum, const char* pszLog)9260{9261#if defined(MOD_BUGFIX_RANDOM)9262 if (iNum > 0)9263 return m_jonRand.get(iNum, pszLog);92649265 return -(int)m_jonRand.get(-iNum, pszLog);9266#else9267 return m_jonRand.get(iNum, pszLog);9268#endif9269}
Calls
Called by
147 functions in 32 files
- CvBarbarians::DoCampActivationNotice(CvPlot *)
- CvBarbarians::DoCamps()
- CvBarbarians::DoSpawnBarbarianUnit(CvPlot *, bool, bool)
- CvBarbarians::GetRandomBarbarianUnitType(CvPlot *, UnitAITypes)
- CvCity::DoPickResourceDemanded(bool)
- CvCity::DoSeedResourceDemandedCountdown()
- CvCity::GetAirStrikeDefenseDamage(const CvUnit *, bool) const
- CvCity::GetNextBuyablePlot()
- CvCity::doMeltdown()
- CvCity::rangeCombatDamage(const CvUnit *, CvCity *, bool) const
- CvCityAI::AI_chooseProduction(bool)
- CvCityStrategyAI::ChooseProduction(bool, BuildingTypes, UnitTypes)
- CvDiplomacyAI::DoAngryBefriendedEnemy(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::DoAngryDenouncedFriend(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::DoContactMinorCivs()
- CvDiplomacyAI::DoDemandMade(PlayerTypes)
- CvDiplomacyAI::DoEmbassyExchange(PlayerTypes, DiploStatementTypes &, CvDeal *)
- CvDiplomacyAI::DoFYIBefriendedHumanEnemy(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::DoFYIBefriendedHumanFriend(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::DoFYIDenouncedHumanEnemy(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::DoFYIDenouncedHumanFriend(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::DoFromUIDiploEvent(PlayerTypes, FromUIDiploEventTypes, int, int)
- CvDiplomacyAI::DoHappyBefriendedFriend(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::DoHappyDenouncedEnemy(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::DoHappySamePolicyTree(PlayerTypes, DiploStatementTypes &)
- CvDiplomacyAI::DoOpenBordersExchange(PlayerTypes, DiploStatementTypes &, CvDeal *)
- CvDiplomacyAI::DoUpdateDemands()
- CvDiplomacyAI::DoWarmongerStatement(PlayerTypes, DiploStatementTypes &)
- CvDiplomacyAI::DoWeDislikedTheirProposal(PlayerTypes, DiploStatementTypes &)
- CvDiplomacyAI::DoWeLikedTheirProposal(PlayerTypes, DiploStatementTypes &)
- CvDiplomacyAI::GetCoopWarScore(PlayerTypes, PlayerTypes, bool)
- CvDiplomacyAI::GetDenounceWeight(PlayerTypes, bool)
- CvDiplomacyAI::GetRandomPersonalityWeight(int) const
- CvDiplomacyAI::IsDenounceFriendAcceptable(PlayerTypes)
- CvDiplomacyAI::IsDoFAcceptable(PlayerTypes)
- CvDiplomacyAI::IsDontSettleAcceptable(PlayerTypes) const
- CvDllGame::GetJonRandNum(int, const char *)
- EconomicAIHelpers::IsTestStrategy_FoundCity(EconomicAIStrategyTypes, CvPlayer *)
- CvEspionageAI::AttemptCoups()
- CvPlayerEspionage::AttemptCoup(uint)
- CvPlayerEspionage::GetNextSpyName(CvEspionageSpy *)
- CvPlayerEspionage::Init(CvPlayer *)
- CvPlayerEspionage::ProcessSpy(uint)
- CvPlayerEspionage::UncoverIntrigue(uint)
- pickSpyName(CvCivilizationInfo *, CvEspionageSpy *)
- CvFlavorManager::GetAdjustedValue(int, int, int, int)
- CalculateDigSiteWeight(int, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0> &, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0> &)
- CvGame::GetCompetitiveSpawnUnitType(PlayerTypes, bool, bool, bool)
- CvGame::GetCsGiftSpawnUnitType(PlayerTypes, bool)
- CvGame::GetRandomSpawnUnitType(PlayerTypes, bool, bool)
- CvGame::GetRandomUniqueUnitType(bool, bool, bool, bool)
- CvGame::SpawnArchaeologySitesHistorically()
- CvGame::getJonRandNumVA(int, const char *, ...)
- CvGame::init(HandicapTypes)
- CvGame::setInitialItems(CvGameInitialItemsOverrides &)
- CvGame::testVictory()
- GetRandomMajorPlayer()
- GetRandomPlayer()
- CvGameQueries::GetLeastAdvancedUnitClassNobodyHas(bool)
- CvGrandStrategyAI::DoTurn()
- CvHomelandAI::ExecuteAircraftMoves()
- CvHomelandAI::FindPatrolTarget(CvUnit *)
- CvMap::DoPlaceNaturalWonders()
- CvMap::getRandomResourceQuantity(ResourceTypes)
- CvMap::syncRandPlot(int, int, int, int)
- CvMilitaryAI::FindBestAttackTarget(AIOperationTypes, PlayerTypes, int *)
- CvMilitaryAI::UpdateOperations()
- CvMinorCivAI::DoAddStartingResources(CvPlot *)
- CvMinorCivAI::DoBuyout(PlayerTypes, bool)
- CvMinorCivAI::DoElection()
- CvMinorCivAI::DoFirstContactWithMajor(TeamTypes, bool)
- CvMinorCivAI::DoPickPersonality()
- CvMinorCivAI::DoSeedUnitSpawnCounter(PlayerTypes, bool)
- CvMinorCivAI::DoTeamDeclaredWarOnMe(TeamTypes)
- CvMinorCivAI::DoTestSeedGlobalQuestCountdown(bool)
- CvMinorCivAI::DoTestSeedQuestCountdownForPlayer(PlayerTypes, bool)
- CvMinorCivAI::DoTestStartGlobalQuest()
- CvMinorCivAI::DoTestStartPersonalQuest(PlayerTypes)
- CvMinorCivAI::GetBestCityStateTarget(PlayerTypes)
- CvMinorCivAI::GetBestGreatPersonForQuest(PlayerTypes)
- CvMinorCivAI::GetBestPlayerToFind(PlayerTypes)
- CvMinorCivAI::GetBestWonderForQuest(PlayerTypes)
- CvMinorCivAI::GetGoodTechPlayerDoesntHave(PlayerTypes, int) const
- CvMinorCivAI::GetNearbyResourceForQuest(PlayerTypes)
- CvPlayer::DoCivilianReturnLogic(bool, PlayerTypes, int)
- CvPlayer::DoDeficit()
- CvPlayer::DoGreatPeopleSpawnTurn()
- CvPlayer::DoResetUprisingCounter(bool)
- CvPlayer::DoSeedGreatPeopleSpawnCounter()
- CvPlayer::DoSpawnGreatPerson(PlayerTypes, bool)
- CvPlayer::DoTechFromCityConquer(CvCity *)
- CvPlayer::DoUprising()
- CvPlayer::GetBorrowedCityName(CivilizationTypes) const
- CvPlayer::GetGreatPersonSpawnCity(UnitTypes)
- CvPlayer::acquireCity(CvCity *, bool, bool, bool)
- CvPlayer::addFreeUnit(UnitTypes, UnitAITypes)
- CvPlayer::disbandUnit(bool)
- CvPlayer::doGoody(CvPlot *, CvUnit *)
- CvPlayer::getCivilizationCityName(CvString &, CivilizationTypes) const
- CvPlayer::getNewCityName() const
- CvPlayer::init(PlayerTypes)
- CvPlayer::receiveGoody(CvPlot *, GoodyTypes, CvUnit *)
- CvPlayer::setCombatExperienceTimes100(int, CvUnit *)
- CvPlayer::setNavalCombatExperienceTimes100(int, CvUnit *)
- CvPlot::doImprovement()
- CvPolicyAI::ChooseNextPolicy(CvPlayer *)
- CvPolicyAI::DoChooseIdeology(CvPlayer *)
- CvUnitPromotions::ChangePromotionAfterCombat(PromotionTypes)
- CvGameReligions::CheckSpawnGreatProphet(CvPlayer &)
- CvGameReligions::GetReligionToFound(PlayerTypes)
- CvReligionAI::ChooseBonusBelief(PlayerTypes, ReligionTypes, int, int, int)
- CvReligionAI::ChooseEnhancerBelief(PlayerTypes, ReligionTypes)
- CvReligionAI::ChooseFollowerBelief(PlayerTypes, ReligionTypes)
- CvReligionAI::ChooseFounderBelief(PlayerTypes, ReligionTypes)
- CvReligionAI::ChoosePantheonBelief(PlayerTypes)
- CvReligionAI::ChooseReformationBelief(PlayerTypes, ReligionTypes)
- CvStartPositioner::RankPlayerStartOrder()
- CvTacticalAI::EstablishBarbarianPriorities()
- CvTeam::GetTeamVotingForInDiplo() const
- CvTechAI::ChooseNextTech(CvPlayer *, bool)
- CvPlayerTraits::ConvertBarbarianCamp(CvUnit *, CvPlot *)
- CvPlayerTraits::ConvertBarbarianNavalUnit(CvUnit *, UnitHandle)
- CvUnit::AI_promotionValue(PromotionTypes)
- CvUnit::CanWithdrawFromMelee(CvUnit &)
- CvUnit::DoAttrition()
- CvUnit::DoFallBackFromMelee(CvUnit &)
- CvUnit::DoWithdrawFromMelee(CvUnit &)
- CvUnit::GetAirCombatDamage(const CvUnit *, CvCity *, bool, int) const
- CvUnit::GetAirStrikeDefenseDamage(const CvUnit *, bool) const
- CvUnit::GetInterceptionDamage(const CvUnit *, bool) const
- CvUnit::GetParadropInterceptionDamage(const CvUnit *, bool) const
- CvUnit::GetRangeCombatDamage(const CvUnit *, CvCity *, bool, int) const
- CvUnit::getCombatDamage(int, int, int, bool, bool, bool) const
- CvUnit::initWithNameOffset(int, UnitTypes, int, UnitAITypes, PlayerTypes, int, int, DirectionTypes, bool, bool, int, int)
- CvUnit::pillage()
- CvUnitCombat::ApplyNuclearExplosionDamage(const CvCombatMemberEntry *, int, CvUnit *, CvPlot *, int)
- CvUnitCombat::GenerateAirCombatInfo(CvUnit &, CvUnit *, CvPlot &, CvCombatInfo *)
- CvUnitCombat::GenerateMeleeCombatInfo(CvUnit &, CvUnit *, CvPlot &, CvCombatInfo *)
- CvUnitCombat::GenerateNuclearExplosionDamage(CvPlot *, int, CvUnit *, CvCombatMemberEntry *, int *, int)
- CvUnitCombat::ParadropIntercept(CvUnit &, CvPlot &)
- CvLeague::UpdateName()
- CvLeagueAI::AllocateProposals(CvLeague *)
- CvLeagueAI::AllocateVotes(CvLeague *)
- CvWonderProductionAI::ChooseWonder(bool, bool, int &)
- CvWonderProductionAI::ChooseWonderForGreatEngineer(bool, int &, CvCity *&)
- SetupUnit(const CvWorldBuilderMap::Unit &, int, int)
- CvLuaGame::lRand(lua_State *)