Returned deprecated StrengthBonusVsCityStates to work for the usual transitional period

This commit is contained in:
Yair Morgenstern 2024-01-25 20:04:15 +02:00
parent 903963787a
commit 197ec9dc9a
3 changed files with 10 additions and 2 deletions

View File

@ -109,6 +109,12 @@ object BattleDamage {
if (strengthMalus != null) {
modifiers.add("Adjacent enemy units", strengthMalus.params[0].toInt())
}
// e.g., Mongolia - https://civilization.fandom.com/wiki/Mongolian_(Civ5)
if (enemy.getCivInfo().isCityState()
&& civInfo.hasUnique(UniqueType.StrengthBonusVsCityStates)
)
modifiers["vs [City-States]"] = 30
}
private fun addResourceLackingMalus(combatant: MapUnitCombatant, modifiers: Counter<String>) {

View File

@ -344,7 +344,7 @@ enum class UniqueType(
Strength("[relativeAmount]% Strength", UniqueTarget.Unit, UniqueTarget.Global),
StrengthNearCapital("[relativeAmount]% Strength decreasing with distance from the capital", UniqueTarget.Unit, UniqueTarget.Global),
FlankAttackBonus("[relativeAmount]% to Flank Attack bonuses", UniqueTarget.Unit, UniqueTarget.Global),
@Deprecated("as of 4.9.0",ReplaceWith("[+30]% Strength <vs [City-States]>"), DeprecationLevel.ERROR)
@Deprecated("as of 4.10.3", ReplaceWith("[+30]% Strength <vs [City-States]>"))
StrengthBonusVsCityStates("+30% Strength when fighting City-State units and cities", UniqueTarget.Global),
StrengthForAdjacentEnemies("[relativeAmount]% Strength for enemy [combatantFilter] units in adjacent [tileFilter] tiles", UniqueTarget.Unit),
StrengthWhenStacked("[relativeAmount]% Strength when stacked with [mapUnitFilter]", UniqueTarget.Unit), // candidate for conditional!

View File

@ -152,7 +152,9 @@ A filter determining a part of the population of a city. It can be any of the fo
Can be any of:
- [mapUnitFilter](#mapunitfilter), for unit combatants
- "City", "All", or [civFilter](#civfilter), for city combatants
- `City`, `All`, or [civFilter](#civfilter), for city combatants
Since mapUnitFilter contains civFilter, that means civFilter can be applied to combatantFilter for both units and cities.
## regionType