Hi, I'm trying to make an event where how many units you have will grant you bonus food in every non-coastal cities, but culture in every coastal cities.
However, I'm unsure what minWaterSize is in the function of City:IsCoastal(int minWaterSize)
Could anyone help clarify what that is?
Code:
function nextturn(iPlayer)
local pPlayer = Players[iPlayer]
local units = 0
for pUnit in pPlayer:Units() do
units = units + 1
end
foodcost(pPlayer, units)
end
function foodcost(pPlayer, units)
for pCity in pPlayer:Cities() do
if not pCity:IsCoastal() then
pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_FOOD_ADDER"], units)
elseif pCity:IsCoastal() then
pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_CULTURE_ADDER"], units)
end
end
end
GameEvents.PlayerDoTurn.Add(nextturn)
However, I'm unsure what minWaterSize is in the function of City:IsCoastal(int minWaterSize)
Could anyone help clarify what that is?