Game.GetGameTurn (Civ5 API)
This page is a part of the Lua and UI Reference (Civ5).
This function is a member of Game. This is a static method, invoke it with a dot. |
Usage
PlayerID Game.GetGameTurn()
Returned Value
- No description available.
Source code samples
Redundant occurences have been removed.
CityStateDiploPopup.lua (G&K)
DLC/Expansion/UI/InGame/Popups/CityStateDiploPopup.lua
0507
|
local iTurnsCommitted = (pPlayer:GetTurnLastPledgedProtectionByMajor(iActivePlayer) + 10) - Game.GetGameTurn(); --antonjs: todo: xml |
0521
|
local iTurnsUntilRecovered = (iLastTurnPledgeBroken + 20) - Game.GetGameTurn(); --antonjs: todo: xml |
CityStateStatusHelper.lua (G&K)
DLC/Expansion/UI/CityStateStatusHelper.lua
0477
|
local iTurnsRemaining = pMinor:GetQuestTurnsRemaining(iMajor, eType, Game.GetGameTurn() - 1); -- add 1 since began on CS's turn (1 before), and avoids "0 turns remaining" |
CivsAlive.lua - DLC_01 DLC
DLC/DLC_01/Scenarios/Mongol Scenario/CivsAlive.lua
0007
|
local iTurnsRemaining = 100 - Game.GetGameTurn(); |
ReplayViewer.lua
UI/InGame/Popups/ReplayViewer.lua
1250
|
local finalTurn = Game.GetGameTurn(); |
TopPanel.lua
UI/InGame/TopPanel.lua
0205
|
local turn = Locale.ConvertTextKey("TXT_KEY_TP_TURN_COUNTER", Game.GetGameTurn()); |
TurnsRemaining.lua - DLC_02 DLC
DLC/DLC_02/Scenarios/NewWorldScenario/TurnsRemaining.lua
0311
|
local iGameTurn = Game.GetGameTurn(); |
TurnsRemaining.lua - DLC_04 DLC
DLC/DLC_04/Scenarios/1066Scenario/TurnsRemaining.lua
0006
|
local iTurnsRemaining = 70 - Game.GetGameTurn(); |
0235
|
local iTemp = math.floor(Game.GetGameTurn() / iValue); |
0236
|
if (Game.GetGameTurn() > 0 and Game.GetGameTurn()< 51 and iTemp * iValue == Game.GetGameTurn()) then |
TurnsRemaining.lua (G&K)
DLC/Expansion/Scenarios/FallOfRomeScenario/TurnsRemaining.lua
0014
|
local iTurnsRemaining = g_iGameTurnLength - Game.GetGameTurn(); |
TurnsRemaining.lua (G&K)
DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua
0081
|
local iTurnsRemaining = 200 - Game.GetGameTurn(); |
0146
|
local iTurn = Game.GetGameTurn(); |
TurnsRemaining.lua (G&K)
DLC/Expansion/Scenarios/SteampunkScenario/TurnsRemaining.lua
0089
|
local strStatus = Locale.Lookup("TXT_KEY_STEAMPUNK_SCENARIO_TURNS_REMAINING", GetNumTokensOwned(iActivePlayer), GetNumTokensUnlocked(Game.GetGameTurn() - 1)); --antonjs: consider: keep var for last turn updated |
0419
|
LuaEvents.ScenarioPlayerStatusChanged(tCopy, Game.GetGameTurn(), Game.GetGameTurnYear(), giPlayerAboutToWin, giTurnsControlHeld); |
0454
|
LuaEvents.ScenarioPlayerStatusChanged(tCopy, Game.GetGameTurn(), Game.GetGameTurnYear(), -1, 0); |
0485
|
if (IsTokenUnlocked(sToken, Game.GetGameTurn() - 1)) then |
0795
|
LuaEvents.ScenarioPlayerStatusChanged(tPlayerStatusCopy, Game.GetGameTurn() - 1, Game.GetGameTurnYear() - 1, giPlayerAboutToWin, giTurnsControlHeld); --antonjs: todo: save and load the turn and year |
TutorialChecks.lua
Tutorial/TutorialChecks.lua
0082
|
if (Game.GetGameTurn() > 0) then |
0236
|
if (Game.GetGameTurn() > 100) then |
0240
|
if (Game.GetGameTurn() < 25) then |
0496
|
if (Game.GetGameTurn() > 50 or player:GetNumMilitaryUnits() >= 2) then |
0629
|
if (Game.GetGameTurn() >= 100) then |
0719
|
if (Game.GetGameTurn() - mostRecentLastMoveTurn >= 3) then |
0966
|
if (Game.GetGameTurn() >= 150) then |
1980
|
if (Game.GetGameTurn() >= 20) then |
2617
|
if (Game.GetGameTurn() - Game.GetStartTurn() > 10) then |
TutorialEngine.lua
Tutorial/TutorialEngine.lua
0291
|
local gameTurn = Game.GetGameTurn(); |
WonderPopup.lua
UI/InGame/Popups/WonderPopup.lua
0026
|
if(Game == nil or Game.GetGameTurn() <= Game.GetStartTurn()) then |
The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.