diff --git a/android/assets/jsons/Civ V - Gods & Kings/Policies.json b/android/assets/jsons/Civ V - Gods & Kings/Policies.json index 03f19304db..fb7e07fcf6 100644 --- a/android/assets/jsons/Civ V - Gods & Kings/Policies.json +++ b/android/assets/jsons/Civ V - Gods & Kings/Policies.json @@ -599,7 +599,6 @@ "uniques": [ "[+25]% Strength ", "May buy [Great General] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) ", - "May buy [Great Admiral] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) " ] } ] diff --git a/core/src/com/unciv/models/ruleset/RulesetValidator.kt b/core/src/com/unciv/models/ruleset/RulesetValidator.kt index 40a72353c7..70ff3619df 100644 --- a/core/src/com/unciv/models/ruleset/RulesetValidator.kt +++ b/core/src/com/unciv/models/ruleset/RulesetValidator.kt @@ -455,10 +455,14 @@ class RulesetValidator(val ruleset: Ruleset) { val typeComplianceErrors = unique.type.getComplianceErrors(unique, ruleset) for (complianceError in typeComplianceErrors) { - if (complianceError.errorSeverity == severityToReport) - rulesetErrors += "$name's unique \"${unique.text}\" contains parameter ${complianceError.parameterName}," + + // TODO: Make this Error eventually, this is Not Good + if (complianceError.errorSeverity <= severityToReport) + rulesetErrors.add(RulesetError("$name's unique \"${unique.text}\" contains parameter ${complianceError.parameterName}," + " which does not fit parameter type" + - " ${complianceError.acceptableParameterTypes.joinToString(" or ") { it.parameterName }} !" + " ${complianceError.acceptableParameterTypes.joinToString(" or ") { it.parameterName }} !", + RulesetErrorSeverity.Warning + ) + ) } for (conditional in unique.conditionals) { diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt index f687dbdda1..03effd0b53 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt @@ -78,6 +78,8 @@ enum class UniqueParameterType( if ('{' in parameterText) // "{filter} {filter}" for and logic return parameterText.filterCompositeLogic({ getErrorSeverity(it, ruleset) }) { a, b -> maxOf(a, b) } if (parameterText in knownValues) return null + if (ruleset.unitPromotions.values.any { it.hasUnique(parameterText) }) + return null return BaseUnitFilter.getErrorSeverity(parameterText, ruleset) } override fun getTranslationWriterStringsForOutput() = knownValues diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index a5295bda30..10d1dff0ea 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -389,7 +389,7 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: NoMovementToPillage("No movement cost to pillage", UniqueTarget.Unit, UniqueTarget.Global), CanMoveAfterAttacking("Can move after attacking", UniqueTarget.Unit), - TransferMovement("Transfer Movement to [unit]", UniqueTarget.Unit), + TransferMovement("Transfer Movement to [mapUnitFilter]", UniqueTarget.Unit), MoveImmediatelyOnceBought("Can move immediately once bought", UniqueTarget.Unit), MayParadrop("May Paradrop up to [amount] tiles from inside friendly territory", UniqueTarget.Unit), diff --git a/docs/Modders/uniques.md b/docs/Modders/uniques.md index c2d637e817..17140fc429 100644 --- a/docs/Modders/uniques.md +++ b/docs/Modders/uniques.md @@ -1080,8 +1080,8 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl ??? example "Can move after attacking" Applicable to: Unit -??? example "Transfer Movement to [unit]" - Example: "Transfer Movement to [Musketman]" +??? example "Transfer Movement to [mapUnitFilter]" + Example: "Transfer Movement to [Wounded]" Applicable to: Unit