Strength bonus from capital is now part of the Palace bonuses to make it moddable

This commit is contained in:
Yair Morgenstern
2021-02-28 22:40:54 +02:00
parent 32ca9884ce
commit 7eeeee5212
2 changed files with 13 additions and 13 deletions

View File

@ -7,6 +7,7 @@
"science": 3,
"gold": 3,
"culture": 1,
"cityStrength": 2,
"cost": 1,
"uniques": ["Indicates the capital city"]
},

View File

@ -36,7 +36,6 @@ class CityCombatant(val city: CityInfo) : ICombatant {
fun getCityStrength(): Int { // Civ fanatics forum, from a modder who went through the original code
var strength = 8f
if(city.isCapital()) strength+=2f
strength += (city.population.population / 5) * 2 // Each 5 pop gives 2 defence
val cityTile = city.getCenterTile()
if (cityTile.isHill()) strength += 5
@ -63,5 +62,5 @@ class CityCombatant(val city: CityInfo) : ICombatant {
return strength.roundToInt()
}
override fun toString(): String {return city.name} // for debug
override fun toString() = city.name // for debug
}