private int DetermineMaximumSettlementSize() { int baseFoodLevel = DetermineBaseFoodLevel(); ////baseFoodLevel = IsCityEnchantmentFamineActive ? baseFoodLevel / 2 : baseFoodLevel; /////baseFoodLevel = SettlementHasGranary ? baseFoodLevel + 2 : baseFoodLevel; /////baseFoodLevel = SettlementHasFarmersMarket ? baseFoodLevel + 3 : baseFoodLevel; baseFoodLevel += TerrainHelper.GetMineralFoodModifierFromTerrain(Location); //baseFoodLevel += NumberOfSharedWildGameTiles; return(baseFoodLevel > MAXIMUM_POPULATION_CAP ? MAXIMUM_POPULATION_CAP : baseFoodLevel); }
private int DetermineFoodProductionPerTurn() { float farmingRate = _buildings.BuildingHasBeenBuilt("Animists Guild") ? 3 : _race.FarmingRate; float fromFarmers = TotalFarmers * farmingRate; int fromForestersGuild = _buildings.BuildingHasBeenBuilt("Foresters Guild") ? 2 : 0; float foodProductionPerTurn = fromFarmers + fromForestersGuild; //foodProductionPerTurn = IsCityEnchantmentFamineActive ? foodProductionPerTurn / 2 : foodProductionPerTurn; int baseFoodLevel = DetermineBaseFoodLevel(); if (foodProductionPerTurn > baseFoodLevel) { int excess = ((int)foodProductionPerTurn - baseFoodLevel) / 2; foodProductionPerTurn = baseFoodLevel + excess; } foodProductionPerTurn = _buildings.BuildingHasBeenBuilt("Granary") ? foodProductionPerTurn + 2 : foodProductionPerTurn; foodProductionPerTurn = _buildings.BuildingHasBeenBuilt("Farmers Market") ? foodProductionPerTurn + 3 : foodProductionPerTurn; foodProductionPerTurn += TerrainHelper.GetMineralFoodModifierFromTerrain(Location); //foodProductionPerTurn += NumberOfSharedWildGameTiles; return((int)foodProductionPerTurn); }