Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions C7Engine/C7GameData/Tile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,16 @@ private int baseProductionYield(Player player) {
yield = 1;

// There is a size bonus for larger cities.
if (cityAtTile.residents.Count >= 7 && cityAtTile.residents.Count < 13) {
if (cityAtTile.residents.Count > EngineStorage.gameData.rules.MaximumLevel1CitySize
&& cityAtTile.residents.Count <= EngineStorage.gameData.rules.MaximumLevel2CitySize) {
yield += 1;
} else if (cityAtTile.residents.Count >= 13) {
} else if (cityAtTile.residents.Count > EngineStorage.gameData.rules.MaximumLevel2CitySize) {
yield += 2;

// TODO: +1 more for industrial civs.
// Industrious civs get +1 production in metropolises
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right way to implement tile yield bonuses for civ traits. I think that for future moddability, we should implement it similarly to the tileModifier fields in the Government and Building classes. This approach will make it easier to separate this logic in user scripts later. However, it will likely require refactoring civ traits from an enum to a class.

if (cityAtTile.owner.civilization.traits.Contains(Civilization.Trait.Industrious)) {
yield += 1;
}
}
}

Expand Down Expand Up @@ -378,9 +382,9 @@ private int baseCommerceYield(Player player) {
// See https://wiki.civforum.de/wiki/Stadtfeldertrag_(Civ3)
if (HasCity) {
int regularCityYield;
if (cityAtTile.residents.Count < 7) {
if (cityAtTile.residents.Count <= EngineStorage.gameData.rules.MaximumLevel1CitySize) {
regularCityYield = 1;
} else if (cityAtTile.residents.Count < 13) {
} else if (cityAtTile.residents.Count <= EngineStorage.gameData.rules.MaximumLevel2CitySize) {
regularCityYield = 2;
} else {
regularCityYield = 3;
Expand Down