Player.GetNumCities (Civ5 API)

From Civilization Modding Wiki
Jump to: navigation, search

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


Function.png This function is a member of Player.

This is an instance method, invoke it with a colon.


Usage

int Player:GetNumCities()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

CityBannerManager.lua

UI/InGame/CityBannerManager.lua
1247
for cityIndex = 0, player:GetNumCities() - 1, 1


CityView.lua

UI/InGame/CityView/CityView.lua
0709
if (pPlayer:GetNumCities() <= 1) then


CivsAlive.lua - DLC_01 DLC

DLC/DLC_01/Scenarios/Mongol Scenario/CivsAlive.lua
0073
if (Players[playerID]:GetNumCities() == 0) then


HappinessInfo.lua

UI/InGame/Popups/HappinessInfo.lua
0190
local iExtraHappinessPerCity = pPlayer:GetExtraHappinessPerCity() * pPlayer:GetNumCities();
0405
local iNumNormalCities = pPlayer:GetNumCities() - iNumOccupiedCities;
0587
if( pPlayer:GetNumCities() > 0 ) then


InGame.lua

UI/InGame/InGame.lua
0811
if (UI.CanSelectionListFound() and player:GetNumCities() > 0) then


SocialPolicyPopup.lua

UI/InGame/Popups/SocialPolicyPopup.lua
0223
local playerHas1City = player:GetNumCities() > 0;


TopPanel.lua

UI/InGame/TopPanel.lua
0013
if (pPlayer:GetNumCities() > 0) then


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua
0315
for cityIndex = 0, pPlayer:GetNumCities() - 1, 1 do
1123
if (pPlayer:IsAlive() and pPlayer:GetNumCities() == 0) then


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/SteampunkScenario/TurnsRemaining.lua
0516
if (not pPlayer:IsMinorCiv() and pPlayer:GetNumCities() == 1) then


TutorialChecks.lua

Tutorial/TutorialChecks.lua
0305
if (player:GetNumCities() > 1) then
0512
if (player:GetNumMilitaryUnits() <= player:GetNumCities()) then
0625
if (player:GetNumCities() == 0) then
1304
if (player:GetNumCities() > 3) then
1322
if (iNumWorkers > player:GetNumCities()) then
1596
if (player:GetNumCities() <= 0) then
3316
if (player:GetNumCities() > 0) 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.