Skip to content

Commit 7a36e91

Browse files
authored
Merge pull request #760 from C7-Game/twrner/industrious-metropolis-shield
Award the bonus shield to an industrial civ metropolis
2 parents 8f87f6e + 060be40 commit 7a36e91

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

C7Engine/C7GameData/Tile.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,16 @@ private int baseProductionYield(Player player) {
336336
yield = 1;
337337

338338
// There is a size bonus for larger cities.
339-
if (cityAtTile.residents.Count >= 7 && cityAtTile.residents.Count < 13) {
339+
if (cityAtTile.residents.Count > EngineStorage.gameData.rules.MaximumLevel1CitySize
340+
&& cityAtTile.residents.Count <= EngineStorage.gameData.rules.MaximumLevel2CitySize) {
340341
yield += 1;
341-
} else if (cityAtTile.residents.Count >= 13) {
342+
} else if (cityAtTile.residents.Count > EngineStorage.gameData.rules.MaximumLevel2CitySize) {
342343
yield += 2;
343344

344-
// TODO: +1 more for industrial civs.
345+
// Industrious civs get +1 production in metropolises
346+
if (cityAtTile.owner.civilization.traits.Contains(Civilization.Trait.Industrious)) {
347+
yield += 1;
348+
}
345349
}
346350
}
347351

@@ -378,9 +382,9 @@ private int baseCommerceYield(Player player) {
378382
// See https://wiki.civforum.de/wiki/Stadtfeldertrag_(Civ3)
379383
if (HasCity) {
380384
int regularCityYield;
381-
if (cityAtTile.residents.Count < 7) {
385+
if (cityAtTile.residents.Count <= EngineStorage.gameData.rules.MaximumLevel1CitySize) {
382386
regularCityYield = 1;
383-
} else if (cityAtTile.residents.Count < 13) {
387+
} else if (cityAtTile.residents.Count <= EngineStorage.gameData.rules.MaximumLevel2CitySize) {
384388
regularCityYield = 2;
385389
} else {
386390
regularCityYield = 3;

0 commit comments

Comments
 (0)