mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-12 08:49:22 +07:00
Strength bonus from capital is now part of the Palace bonuses to make it moddable
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
"science": 3,
|
||||
"gold": 3,
|
||||
"culture": 1,
|
||||
"cityStrength": 2,
|
||||
"cost": 1,
|
||||
"uniques": ["Indicates the capital city"]
|
||||
},
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user