GameEvents.DoResolveVictoryVote (Civ5 API)

From Civilization Modding Wiki
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This function is a member of GameEvents.

This is a static method, invoke it with a dot.

  • This method was added in Gods & Kings.


Usage

void GameEvents.DoResolveVictoryVote(bool preliminaryVote)


Event Type

Unknown

Parameters

preliminaryVote: No description available.


Source code samples

TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua
0391
GameEvents.DoResolveVictoryVote.Add(function(bPreliminaryVote)
0394
-- Vatican City
0396
local kiVaticanExtraVotes = 1;
0397
local iTeam = GetVaticanExtraVoteRecipient();
0398
if (iTeam ~= -1) then
0399
SetPersistentProperty("VaticanExtraVoteTeam", iTeam); -- So VictoryProgress.lua can display the last team that got extra vote
0400
Game.ChangeNumVotesForTeam(iTeam, kiVaticanExtraVotes);
0401
end
0403
return true;
0404
end)
0406
-- Get the team which receives the extra vote from Vatican City in a HRE election, or no team if there isn't one
0407
function GetVaticanExtraVoteRecipient()



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.