Cat-du-fromage
Warlord
- Joined
- Nov 17, 2018
- Messages
- 183
Hi,
i have some issue trying to count the number of cities captured by a civilization using city:GetOriginalOwner()
But for some reason it count all the cities regardless if they were capture or not...
Did someone see the error?
i have some issue trying to count the number of cities captured by a civilization using city:GetOriginalOwner()
But for some reason it count all the cities regardless if they were capture or not...
Code:
function NumConquest()
local player = Players[Game.GetActivePlayer()]
local isConquest = 0
for city in player:Cities() do
if player:GetCivilizationType() == civilizationID then
if city:GetOriginalOwner() ~= civilizationID or city:IsPuppet() then
isConquest = isConquest+1
end
end
end
return isConquest
end