chore: old unique deprecation

This commit is contained in:
yairm210 2025-01-29 13:25:14 +02:00
parent 49d92f0806
commit 2c7282ac34
2 changed files with 3 additions and 11 deletions

View File

@ -224,15 +224,7 @@ object BattleDamage {
val modifiers = getGeneralModifiers(defender, attacker, CombatAction.Defend, tileToAttackFrom)
val tile = defender.getTile()
if (defender is MapUnitCombatant) {
if (defender.unit.isEmbarked()) {
// embarked units get no defensive modifiers apart from this unique
if (defender.unit.hasUnique(UniqueType.DefenceBonusWhenEmbarked, checkCivInfoUniques = true))
modifiers["Embarked"] = BattleConstants.EMBARKED_DEFENCE_BONUS
return modifiers
}
if (defender is MapUnitCombatant && !defender.unit.isEmbarked()) { // Embarked units get no terrain defensive bonuses
val tileDefenceBonus = tile.getDefensiveBonus(unit = defender.unit)
if (!defender.unit.hasUnique(UniqueType.NoDefensiveTerrainBonus, checkCivInfoUniques = true) && tileDefenceBonus > 0

View File

@ -434,8 +434,6 @@ enum class UniqueType(
HealAdjacentUnits("All adjacent units heal [amount] HP when healing", UniqueTarget.Unit),
// Vision
@Deprecated("As of 4.14.6", ReplaceWith("[+100]% Strength <when defending> <when [Embarked]>"))
DefenceBonusWhenEmbarked("Defense bonus when embarked", UniqueTarget.Unit, UniqueTarget.Global),
NoSight("No Sight", UniqueTarget.Unit),
CanSeeOverObstacles("Can see over obstacles", UniqueTarget.Unit),
@ -966,6 +964,8 @@ enum class UniqueType(
///////////////////////////////////////////// region 99 DEPRECATED AND REMOVED /////////////////////////////////////////////
@Deprecated("As of 4.14.6", ReplaceWith("[+100]% Strength <when defending> <when [Embarked]>"), DeprecationLevel.ERROR)
DefenceBonusWhenEmbarked("Defense bonus when embarked", UniqueTarget.Unit, UniqueTarget.Global),
@Deprecated("As of 4.13.18", ReplaceWith("Only available <when [victoryType] Victory is enabled>"), DeprecationLevel.ERROR)
HiddenWithoutVictoryType("Hidden when [victoryType] Victory is disabled", UniqueTarget.Building, UniqueTarget.Unit, flags = UniqueFlag.setOfHiddenToUsers),
@Deprecated("As of 4.13.18", ReplaceWith("Only available <when religion is enabled>"), DeprecationLevel.ERROR)