mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 23:40:01 +07:00
Genericized hill's "extra sight for land units" to a unique
This commit is contained in:
@ -85,7 +85,7 @@
|
||||
"defenceBonus": 0.25,
|
||||
"RGB": [105,125,72],
|
||||
"occursOn": ["Tundra","Plains","Grassland","Desert","Snow"],
|
||||
"uniques": ["Rough terrain", "+[5] Strength for cities built on this terrain"]
|
||||
"uniques": ["Rough terrain", "[+5] Strength for cities built on this terrain", "[+1] Sight for [Land] units"]
|
||||
},
|
||||
{
|
||||
"name": "Forest",
|
||||
|
@ -39,7 +39,7 @@ class CityCombatant(val city: CityInfo) : ICombatant {
|
||||
strength += (city.population.population / 5) * 2 // Each 5 pop gives 2 defence
|
||||
val cityTile = city.getCenterTile()
|
||||
for (unique in cityTile.getAllTerrains().flatMap { it.uniqueObjects })
|
||||
if (unique.placeholderText == "+[] Strength for cities built on this terrain")
|
||||
if (unique.placeholderText == "[] Strength for cities built on this terrain")
|
||||
strength += unique.params[0].toInt()
|
||||
// as tech progresses so does city strength
|
||||
val techCount = getCivInfo().gameInfo.ruleSet.technologies.count()
|
||||
|
@ -208,7 +208,9 @@ class MapUnit {
|
||||
if (isEmbarked() && civInfo.hasUnique("+1 Sight when embarked"))
|
||||
visibilityRange += 1
|
||||
val tile = getTile()
|
||||
if (tile.isHill() && type.isLandUnit()) visibilityRange += 1
|
||||
for (unique in tile.getAllTerrains().flatMap { it.uniqueObjects })
|
||||
if (unique.placeholderText == "[] Sight for [] units" && matchesFilter(unique.params[1]))
|
||||
visibilityRange += unique.params[0].toInt()
|
||||
|
||||
viewableTiles = tile.getViewableTilesList(visibilityRange)
|
||||
}
|
||||
|
Reference in New Issue
Block a user