diff --git a/core/src/com/unciv/logic/map/MapUnit.kt b/core/src/com/unciv/logic/map/MapUnit.kt index b436521064..84b0df12f5 100644 --- a/core/src/com/unciv/logic/map/MapUnit.kt +++ b/core/src/com/unciv/logic/map/MapUnit.kt @@ -302,11 +302,13 @@ class MapUnit { if (isEmbarked()) 2 else baseUnit.movement - movement += getMatchingUniques(UniqueType.Movement, StateForConditionals(civInfo = civInfo, unit = this)) + movement += (getMatchingUniques(UniqueType.Movement, StateForConditionals(civInfo = civInfo, unit = this)) + + civInfo.getMatchingUniques(UniqueType.Movement, StateForConditionals(civInfo = civInfo, unit = this))) .sumOf { it.params[0].toInt() } // Deprecated since 3.17.5 - for (unique in civInfo.getMatchingUniques(UniqueType.MovementUnits)) + for (unique in civInfo.getMatchingUniques(UniqueType.MovementUnits) + + getMatchingUniques(UniqueType.MovementUnits)) if (matchesFilter(unique.params[1])) movement += unique.params[0].toInt() @@ -335,12 +337,14 @@ class MapUnit { private fun getVisibilityRange(): Int { var visibilityRange = 2 - if (isEmbarked() && !hasUnique("Normal vision when embarked")) { + if (isEmbarked() && !hasUnique(UniqueType.NormalVisionWhenEmbarked) + && !civInfo.hasUnique(UniqueType.NormalVisionWhenEmbarked)) { return 1 } - visibilityRange += getMatchingUniques(UniqueType.Sight, StateForConditionals(civInfo = civInfo, unit = this)) - .sumOf { it.params[0].toInt() } + visibilityRange += (getMatchingUniques(UniqueType.Sight, StateForConditionals(civInfo = civInfo, unit = this)) + + civInfo.getMatchingUniques(UniqueType.Sight, StateForConditionals(civInfo = civInfo, unit = this)) + ).sumOf { it.params[0].toInt() } // Deprecated since 3.17.5 for (unique in getMatchingUniques(UniqueType.SightUnits)) @@ -1098,7 +1102,8 @@ class MapUnit { pressureAdded *= unique.params[0].toPercent() // - for (unique in getMatchingUniques(UniqueType.SpreadReligionStrength, StateForConditionals(civInfo = civInfo, unit = this))) + for (unique in getMatchingUniques(UniqueType.SpreadReligionStrength, StateForConditionals(civInfo = civInfo, unit = this)) + + civInfo.getMatchingUniques(UniqueType.SpreadReligionStrength, StateForConditionals(civInfo = civInfo, unit = this))) pressureAdded *= unique.params[0].toPercent() return pressureAdded.toInt() diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index d132cc115e..72210480a5 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -167,6 +167,7 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget) { SpreadReligionStrength("[amount]% Spread Religion Strength", UniqueTarget.Unit, UniqueTarget.Global), MayFoundReligion("May found a religion", UniqueTarget.Unit), MayEnhanceReligion("May enhance a religion", UniqueTarget.Unit), + NormalVisionWhenEmbarked("Normal vision when embarked", UniqueTarget.Unit, UniqueTarget.Global), @Deprecated("As of 3.17.5", ReplaceWith("[amount] Movement "), DeprecationLevel.WARNING) MovementUnits("+[amount] Movement for all [mapUnitFilter] units", UniqueTarget.Global),