mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-10 07:16:54 +07:00
Resolved DamageUnitsPlunder's warnings for City parameter and warnings for "Aircraft" - see #6430
This commit is contained in:
parent
bc16a69bd2
commit
de1a1ee48a
@ -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
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user