Clearer "no damage penalty for wounded units" unique

This commit is contained in:
yairm210
2024-06-25 23:58:53 +03:00
parent 095c4faed6
commit d075ad0100
2 changed files with 3 additions and 0 deletions

View File

@ -243,6 +243,7 @@ object BattleDamage {
private fun getHealthDependantDamageRatio(combatant: ICombatant): Float {
return if (combatant !is MapUnitCombatant
|| combatant.unit.hasUnique(UniqueType.NoDamagePenalty, checkCivInfoUniques = true)
|| combatant.unit.hasUnique(UniqueType.NoDamagePenaltyWoundedUnits, checkCivInfoUniques = true)
) 1f
// Each 3 points of health reduces damage dealt by 1%
else 1 - (100 - combatant.getHealth()) / BattleConstants.DAMAGE_REDUCTION_WOUNDED_UNIT_RATIO_PERCENTAGE

View File

@ -407,6 +407,8 @@ enum class UniqueType(
NoDefensiveTerrainBonus("No defensive terrain bonus", UniqueTarget.Unit, UniqueTarget.Global),
NoDefensiveTerrainPenalty("No defensive terrain penalty", UniqueTarget.Unit, UniqueTarget.Global),
NoDamagePenaltyWoundedUnits("No damage penalty for wounded units", UniqueTarget.Unit, UniqueTarget.Global),
@Deprecated("As of 4.12.4", ReplaceWith("No damage penalty for wounded units"))
NoDamagePenalty("Damage is ignored when determining unit Strength", UniqueTarget.Unit, UniqueTarget.Global),
Uncapturable("Uncapturable", UniqueTarget.Unit),
// Replace with "Withdraws before melee combat <with [amount]% chance>"?