From de1a1ee48a7c6ee0ed341b452adb7b9a81c7e10b Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 19 Apr 2022 14:24:01 +0300 Subject: [PATCH] Resolved DamageUnitsPlunder's warnings for City parameter and warnings for "Aircraft" - see #6430 --- core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt | 2 +- core/src/com/unciv/models/ruleset/unique/UniqueType.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt index b2fd142feb..6793e3457a 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt @@ -7,7 +7,6 @@ import com.unciv.models.ruleset.Ruleset import com.unciv.models.ruleset.RulesetCache import com.unciv.models.ruleset.VictoryType import com.unciv.models.ruleset.tile.ResourceType -import com.unciv.models.ruleset.tile.TerrainType import com.unciv.models.stats.Stat import com.unciv.models.translations.TranslationFileWriter // for Kdoc only @@ -106,6 +105,7 @@ enum class UniqueParameterType( UniqueType.UniqueComplianceErrorSeverity? { if (parameterText in knownValues) return null if (ruleset.unitTypes.containsKey(parameterText)) return null + if (ruleset.unitTypes.values.any { it.uniques.contains(parameterText) }) return null return UniqueType.UniqueComplianceErrorSeverity.WarningOnly } diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index fcce6d981e..56da3220ff 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -463,7 +463,7 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: UnitUpgradeCost("[amount]% Gold cost of upgrading", UniqueTarget.Unit, UniqueTarget.Global), GreatPersonEarnedFaster("[greatPerson] is earned [amount]% faster", UniqueTarget.Unit, UniqueTarget.Global), - DamageUnitsPlunder("Earn [amount]% of the damage done to [mapUnitFilter] units as [plunderableStat]", UniqueTarget.Unit, UniqueTarget.Global), + DamageUnitsPlunder("Earn [amount]% of the damage done to [combatantFilter] units as [plunderableStat]", UniqueTarget.Unit, UniqueTarget.Global), CaptureCityPlunder("Upon capturing a city, receive [amount] times its [stat] production as [plunderableStat] immediately", UniqueTarget.Unit, UniqueTarget.Global), KillUnitPlunder("Earn [amount]% of killed [mapUnitFilter] unit's [costOrStrength] as [plunderableStat]", UniqueTarget.Unit, UniqueTarget.Global), KillUnitPlunderNearCity("Earn [amount]% of [mapUnitFilter] unit's [costOrStrength] as [plunderableStat] when killed within 4 tiles of a city following this religion", UniqueTarget.FollowerBelief),