CvGame
- Declared in
- CvGame.h, line 51
The game in progress. There is only one, and GC.getGame() returns it.
- Turns:
CvGame::doTurnruns once every player has finished a turn: it runs each team's and each tile's turn, checks whether anyone has won and moves the turn number on.CvGame::getGameTurngives the turn number. - The player at this computer:
CvGame::getActivePlayergives that human player's ID. - Random numbers:
CvGame::getJonRandNumgives a random number from 0 up to one less than its first parameter. Use it for anything that changes the game, so every computer in a multiplayer game draws the same numbers.CvGame::getAsyncRandNumis for things only one player sees. - The map is a separate object:
GC.getMap()returns it, aCvMap, and each of its tiles is aCvPlot. - Everything else game-wide is in objects the game owns:
| For | Function | Class |
|---|---|---|
| trades between players | CvGame::GetGameDeals |
CvGameDeals |
| religions founded in the game | CvGame::GetGameReligions |
CvGameReligions |
| great works | CvGame::GetGameCulture |
CvGameCulture |
| the World Congress | CvGame::GetGameLeagues |
CvGameLeagues |
| trade routes | CvGame::GetGameTrade |
CvGameTrade |
Functions
- ActivateObserverSlot()
- addDestroyedCityName(const CvString &)
- addGreatPersonBornName(const CvString &)
- addPlayer(PlayerTypes, LeaderHeadTypes, CivilizationTypes)
- addReplayMessage(ReplayMessageTypes, PlayerTypes, const CvString &, int, int)
- allUnitAIProcessed() const
- AnyoneHasAnyNaturalWonder() const
- AnyoneHasAnyReligion() const
- AnyoneHasAnyWonder() const
- AnyoneHasBelief(BeliefTypes) const
- AnyoneHasBuilding(BuildingTypes) const
- AnyoneHasBuildingClass(BuildingClassTypes) const
- AnyoneHasIdeology(PolicyBranchTypes) const
- AnyoneHasNaturalWonder(FeatureTypes) const
- AnyoneHasPantheon() const
- AnyoneHasPolicy(PolicyTypes) const
- AnyoneHasPolicyBranch(PolicyBranchTypes) const
- AnyoneHasProject(ProjectTypes) const
- AnyoneHasReachedEra(EraTypes) const
- AnyoneHasReligion(ReligionTypes) const
- AnyoneHasTech(TechTypes) const
- AnyoneHasTenet(PolicyTypes) const
- AnyoneHasUnit(UnitTypes) const
- AnyoneHasUnitClass(UnitClassTypes) const
- AnyoneHasWonder(BuildingTypes) const
- AnyoneIsInEra(EraTypes) const
- areNoVictoriesValid() const
- assignStartingPlots()
- BuildCannotPerformActionHelpText(CvString *, const char *, const char *, const char *, int) const
- BuildProdModHelpText(CvString *, const char *, int, const char *) const
- calculateOptionsChecksum()
- calculateSyncChecksum()
- canDoControl(ControlTypes)
- canHandleAction(int, CvPlot *, bool)
- CanMoveActivePlayerToObserver()
- CanOpenCityScreen(PlayerTypes, CvCity *)
- canTrainNukes() const
- changeAIAutoPlay(int)
- changeMaxTurns(int)
- changeNoNukesCount(int)
- changeNukesExploded(int)
- changeNumCities(int)
- changeNumGameTurnActive(int, const std::string &)
- ChangeNumVictoryVotesTallied(int, bool)
- ChangeNumVotesForTeam(TeamTypes, int)
- changePlotExtraCost(int, int, int)
- changeTotalPopulation(int)
- changeTurnSlice(int)
- ChangeUnitedNationsCountdown(int)
- CheckGenerateArchaeology()
- CheckPlayerTurnDeactivate()
- circumnavigationAvailable() const
- CityPurchase(CvCity *, UnitTypes, BuildingTypes, ProjectTypes, YieldTypes)
- cityPushOrder(CvCity *, OrderTypes, int, bool, bool, bool)
- clearReplayMessageMap()
- countCivPlayersAlive() const
- countCivPlayersEverAlive() const
- countCivTeamsAlive() const
- countCivTeamsEverAlive() const
- countHumanPlayersAlive() const
- countHumanPlayersEverAlive() const
- countKnownTechNumTeams(TechTypes)
- countMajorCivsAlive() const
- countMajorCivsEverAlive() const
- countNumHumanGameTurnActive()
- countSeqHumanTurnsUntilPlayerTurn(PlayerTypes) const
- countTotalCivPower()
- countTotalNukeUnits()
- CvGame() not a hook point
- cycleCities(bool, bool)
- cyclePlotUnits(CvPlot *, bool, bool, int)
- cycleUnits(bool, bool, bool)
- DoCacheMapScoreMod()
- doControl(ControlTypes)
- DoFromUIDiploEvent(FromUIDiploEventTypes, PlayerTypes, int, int)
- DoGameStarted()
- DoInitDiploVictory()
- DoMinorBullyGold(PlayerTypes, PlayerTypes)
- DoMinorBullyUnit(PlayerTypes, PlayerTypes)
- DoMinorBuyout(PlayerTypes, PlayerTypes)
- DoMinorGiftGold(PlayerTypes, int)
- DoMinorGiftTileImprovement(PlayerTypes, PlayerTypes, int, int)
- DoMinorPledgeProtection(PlayerTypes, PlayerTypes, bool, bool)
- DoPlaceTeamInVictoryCompetition(VictoryTypes, TeamTypes)
- DoResearchAgreementNotification(TeamTypes, TeamTypes)
- DoTestConquestVictory()
- doTurn()
- DoUpdateCachedWorldReligionTechProgress()
- doUpdateCacheOnTurn()
- DoUpdateDiploVictory()
- DoUpdateIndustrialRoute()
- DoUpdateTotalReligionTechCost()
- endTurnTimerReset()
- endTurnTimerSemaphoreDecrement()
- endTurnTimerSemaphoreIncrement()
- GetAction(int, bool, bool, bool)
- getActiveCivilizationType()
- getActivePlayer() const
- getActiveTeam()
- getAdjustedLandPercent(VictoryTypes) const
- getAdjustedPopulationPercent(VictoryTypes) const
- GetAdvisorCounsel()
- GetAdvisorRecommender()
- getAIAutoPlay()
- getAsyncRandNum(int, const char *)
- GetBarbarianCampImprovementType()
- GetBarbarianReleaseTurn() const not a hook point
- GetBestGreatPeoplePlayer()
- getBestLandUnit()
- getBestLandUnitCombat()
- GetBestPoliciesPlayer()
- GetBestWondersPlayer()
- getBuildingClassCreatedCount(BuildingClassTypes)
- GetCachedWorldReligionTechProgress() const
- getCalendar() const
- GetCivilizationPlayer(CivilizationTypes) const
- GetCombatPrediction(const CvUnit *, const CvUnit *)
- GetCompetitiveSpawnUnitType(PlayerTypes, bool, bool, bool)
- GetCsGiftSpawnUnitType(PlayerTypes, bool)
- getCurrentEra() const
- GetDealDuration()
- getDefaultEstimateEndTurn() const
- GetDiploResponse(const char *, const char *, const Localization::String &, const Localization::String &)
- getDllGuid() const
- getElapsedGameTurns() const
- getEndTurnMessagesReceived(int)
- getEstimateEndTurn() const
- GetFaithCost(CvUnitEntry *) const
- getFOW()
- GetGameCulture()
- GetGameDeals()
- GetGameLeagues()
- GetGameReligions()
- getGameSpeedInfo() const
- getGameSpeedType() const
- getGameState()
- GetGameTrade()
- getGameTurn()
- getGameTurnYear()
- getHandicapInfo() const
- getHandicapType() const
- getHotPbemBetweenTurns() const
- getImprovementUpgradeTime(ImprovementTypes, const CvPlot *) const
- getImprovementUpgradeTimeMod(ImprovementTypes, const CvPlot *) const
- GetIndustrialRoute() const
- getInitialTime()
- getInitLand() const
- getInitPopulation() const
- getInitTech() const
- getInitWonders() const
- getJonRand()
- getJonRandNum(int, const char *)
- getJonRandNumVA(int, const char *, ...) not a hook point
- getMapRand()
- getMapRandNum(int, const char *)
- GetMapScoreMod() const
- getMaxCityElimination() const
- getMaxPopulation() const
- getMaxTurnLen()
- getMaxTurns() const
- getMinutesPlayed() const
- getName()
- GetNextAvailableVictoryCompetitionRank(VictoryTypes) const
- getNoNukesCount() const
- getNukesExploded() const
- getNumAdvancedStartPoints() const
- GetNumArchaeologySites() const
- getNumCities() const
- getNumCivCities() const
- getNumGameTurnActive()
- GetNumHiddenArchaeologySites() const
- getNumHumanPlayers()
- getNumHumansInHumanWars(PlayerTypes)
- GetNumMinorCivsEver()
- getNumReplayMessages() const
- getNumSequentialHumans(PlayerTypes)
- GetNumVictoryVotesExpected() const
- GetNumVictoryVotesTallied() const
- GetNumVotesForTeam(TeamTypes) const
- getPausePlayer()
- getPbemTurnSent() const
- GetPeaceDuration()
- getPitbossTurnTime() const
- getPlayerRank(PlayerTypes)
- getPlayerScore(PlayerTypes)
- getPlotExtraCost(int, int) const
- getPlotExtraYield(int, int, YieldTypes) const
- getPlotUnit(CvPlot *, int)
- getPlotUnits(CvPlot *, std::vector<CvUnit *> &)
- GetPreviousVoteCast(TeamTypes) const
- getProductionPerPopulation(HurryTypes)
- getProjectCreatedCount(ProjectTypes)
- GetRandomSpawnUnitType(PlayerTypes, bool, bool)
- GetRandomUniqueUnitType(bool, bool, bool, bool)
- getRankPlayer(int)
- getRankTeam(int)
- GetReligionTech() const
- getReplayMessage(uint) const
- GetResearchAgreementCost(PlayerTypes, PlayerTypes)
- GetResearchLeftToReligionTech(TeamTypes)
- GetResearchLeftToTech(TeamTypes, TechTypes)
- GetSettlerSiteEvaluator()
- getStartEra() const
- getStartEraInfo() const
- GetStartPositioner()
- GetStartSiteEvaluator()
- getStartTurn() const
- getStartYear() const
- GetTacticalAnalysisMap()
- getTargetScore() const
- getTeamRank(TeamTypes)
- getTeamScore(TeamTypes) const
- getTeamVictoryRank(VictoryTypes, int) const
- getTotalPopulation() const
- GetTotalReligionTechCost() const
- GetTurnsBetweenMinorCivElections()
- getTurnSlice() const
- GetTurnsUntilMinorCivElection()
- GetTurnTimerData(float &, float &)
- getTurnYear(int)
- getUnitClassCreatedCount(UnitClassTypes)
- getUnitCreatedCount(UnitTypes)
- GetUnitedNationsCountdown() const
- GetVariableCitySizeFromPopulation(unsigned int)
- getVictory() const
- GetVoteCast(TeamTypes) const
- GetVotesNeededForDiploVictory() const
- getWinner() const
- GetWinningTurn() const
- GetWorldMilitaryStrengthAverage(PlayerTypes, bool, bool)
- goldenAgeLength() const
- handleAction(int)
- HasAdvisorMessageBeenSeen(const char *)
- hasTurnTimerExpired(PlayerTypes)
- incrementBuildingClassCreatedCount(BuildingClassTypes)
- incrementElapsedGameTurns()
- incrementEndTurnMessagesReceived(int)
- incrementGameTurn()
- incrementProjectCreatedCount(ProjectTypes, int)
- incrementUnitClassCreatedCount(UnitClassTypes)
- incrementUnitCreatedCount(UnitTypes)
- init(HandicapTypes)
- init2()
- initDiplomacy()
- initFreeState(CvGameInitialItemsOverrides &)
- initFreeUnits(CvGameInitialItemsOverrides &)
- InitMap(CvGameInitialItemsOverrides &)
- InitPlayers()
- initScoreCalculation()
- IsAction(int, bool, bool, bool)
- IsArchaeologyTriggered() const
- isBuildingClassMaxedOut(BuildingClassTypes, int)
- isBuildingEverActive(BuildingTypes) const
- isCircumnavigated() const
- IsCityScreenBlocked()
- isCivEverActive(CivilizationTypes) const
- IsCombatWarned() const
- isDebugMode() const
- isDestroyedCityName(CvString &) const
- IsEndGameTechResearched() const
- IsEverAttackedTutorial() const
- IsEverRightClickMoved() const
- isFinalInitialized() const
- IsForceEndingTurn() const
- isGameMultiPlayer() const
- isGreatPersonBorn(CvString &) const
- isHotSeat() const
- isInAdvancedStart() const
- isLeaderEverActive(LeaderHeadTypes) const
- isMPOption(MultiplayerOptionTypes) const
- isNetworkMultiPlayer() const
- isNoNukes() const
- isNukesValid() const
- isOption(GameOptionTypes) const
- isOption(const char *) const
- isPaused()
- isPbem() const
- isPitboss() const
- isPlayerOptionsSent() const
- isProjectMaxedOut(ProjectTypes, int)
- isReallyNetworkMultiPlayer() const
- IsResolutionPassed(ResolutionTypes, int) const
- isScoreDirty() const
- isSimultaneousTeamTurns() const
- isSpecialUnitValid(SpecialUnitTypes)
- IsStaticTutorialActive() const
- isTeamGame() const
- isUnitClassMaxedOut(UnitClassTypes, int)
- IsUnitedNationsActive()
- isUnitEverActive(UnitTypes) const
- isVictoryAvailable(VictoryTypes) const
- isVictoryValid(VictoryTypes) const
- IsWaitingForBlockingInput() const not a hook point
- LogGameState(bool)
- makeCircumnavigated()
- makeNukesValid(bool)
- makeSpecialUnitValid(SpecialUnitTypes)
- mouseoverUnit(CvUnit *, bool)
- NetMessageStaticsReset()
- PopulateDigSite(CvPlot &, EraTypes, GreatWorkArtifactClass)
- Read(FDataStream &)
- ReadSupportingClassData(FDataStream &) not a hook point
- regenerateMap()
- removeGreatPersonBornName(const CvString &)
- removePlotExtraCost(int, int)
- removePlotExtraYield(int, int)
- reset(HandicapTypes, bool)
- resetTurnTimer(bool)
- ReviveActivePlayer()
- saveReplay()
- selectAll(CvPlot *)
- selectedCitiesGameNetMessage(int, int, int, int, bool, bool, bool, bool)
- selectGroup(CvUnit *, bool, bool, bool)
- selectionListGameNetMessage(int, int, int, int, int, bool, bool)
- selectionListIgnoreBuildingDefense()
- selectionListMove(CvPlot *, bool)
- SelectSettler()
- selectUnit(CvUnit *, bool, bool, bool)
- sendPlayerOptions(bool)
- setActivePlayer(PlayerTypes, bool, bool)
- SetAdvisorMessageHasBeenSeen(const char *, bool)
- setAIAutoPlay(int, PlayerTypes)
- SetBarbarianReleaseTurn(int)
- SetBestGreatPeoplePlayer(PlayerTypes, int)
- setBestLandUnit(UnitTypes)
- SetBestPoliciesPlayer(PlayerTypes, int)
- SetBestWondersPlayer(PlayerTypes, int)
- SetCombatWarned(bool)
- setDebugMode(bool)
- setDefaultEstimateEndTurn(int)
- SetEndGameTechResearched(bool)
- setEstimateEndTurn(int)
- SetEverAttackedTutorial(bool)
- SetEverRightClickMoved(bool)
- setFinalInitialized(bool)
- SetForceEndingTurn(bool)
- setFOW(bool)
- setGameState(GameStateTypes)
- setGameTurn(int)
- setHandicapType(HandicapTypes)
- setHotPbemBetweenTurns(bool)
- setInitialItems(CvGameInitialItemsOverrides &)
- setInitialTime(unsigned int)
- SetLastTurnAICivsProcessed()
- setMaxCityElimination(int)
- setMaxTurns(int)
- setMPOption(MultiplayerOptionTypes, bool)
- setName(const char *)
- setNumAdvancedStartPoints(int)
- SetNumVictoryVotesExpected(int)
- SetNumVictoryVotesTallied(int, bool)
- SetNumVotesForTeam(TeamTypes, int)
- setOption(GameOptionTypes, bool)
- setOption(const char *, bool)
- setPausePlayer(PlayerTypes)
- setPbemTurnSent(bool)
- setPitbossTurnTime(int)
- setPlayerRank(PlayerTypes, int)
- setPlayerScore(PlayerTypes, int)
- setPlotExtraYield(int, int, YieldTypes, int)
- SetPreviousVoteCast(TeamTypes, TeamTypes)
- setRankPlayer(int, PlayerTypes)
- setRankTeam(int, TeamTypes)
- SetReligionTech(TechTypes)
- setScoreDirty(bool)
- setStartTurn(int)
- setStartYear(int)
- SetStaticTutorialActive(bool)
- setTargetScore(int)
- setTeamRank(TeamTypes, int)
- setTeamScore(TeamTypes, int)
- setTeamVictoryRank(VictoryTypes, int, TeamTypes)
- setTurnSlice(int)
- SetUnitedNationsCountdown(int)
- setVictoryValid(VictoryTypes, bool)
- SetVoteCast(TeamTypes, TeamTypes, bool)
- SetVotesNeededForDiploVictory(int)
- SetWaitingForBlockingInput(PlayerTypes) not a hook point
- setWinner(TeamTypes, VictoryTypes)
- SetWinningTurn(int)
- showEndGameSequence()
- SpawnArchaeologySitesHistorically()
- testAlive()
- testExtendedGame()
- testVictory()
- testVictory(VictoryTypes, TeamTypes, bool *) const
- toggleDebugMode()
- TriggerArchaeologySiteCreation(bool)
- TunerEverConnected() const
- TurnTimerSync(float, float)
- uninit()
- unitIsMoving()
- update()
- updateCitySight(bool)
- updateDebugModeCache()
- updateMoves()
- UpdatePlayers()
- updateScore(bool)
- updateSelectionList()
- updateTestEndTurn()
- updateTimers()
- updateWar()
- victoryDelay(VictoryTypes) const
- Write(FDataStream &) const
- writeReplay(FDataStream &)
- WriteSupportingClassData(FDataStream &) not a hook point
- ~CvGame() not a hook point