# Damage (Long War)

## Damage Reduction

Long War adds a new mechanic called Damage Reduction. When a unit takes damage, it is reduced by the damage reduction value. It can be seen in game as a blue shield indication next to the normal red damage indication.

Damage reduction is gained in various ways:

- Low cover gives 0.66 damage reduction.
- High cover gives 1.0 damage reduction.
- Several perks grant damage reduction.
- Mechanized units commonly have built in damage reduction of varying amounts.

Hunker Down doubles the damage reduction effect of cover, as well as the normal effect of doubling the defense it gives.

If the amount of damage a unit has is not a whole number, the damage is reduced by one of the two nearest whole numbers, based on the fraction. For example, a unit with 1.66 damage reduction has a 66% chance of the damage being reduced by 2 and a 34% chance of the damage being reduced by 1.

Shotgun-type weapons have damage reduction penetration, and will negate some of a target's damage reduction. Some items and perks are also available that grant damage reduction penetration.

Damage reduction can have several interesting effects on game play. One is that a shot against a unit may do 0 damage if the damage inflicted is reduced to 0, which can be a nasty surprise if trying to finish off a 1 HP enemy with a pistol. Once you come up against more advanced units, particularly mechanized ones, you may find yourself completely unable to damage them with lighter weapons such as carbines.

### In Detail

The steps in AbsorbDamage are:

- Unit with ShieldHP>0 (i.e. Mechtoids) has damage reduced by 50%
- Unit with ShockAbsorbantArmor perk has damage reduced by 33% if damage-dealing unit is within 4 tiles distance
- Unit with AbsorptionFields perk reduced damage based on formula fReturnDamage = fReturnDamage * (0.6 + 0.4 * Min(1, 2/fReturnDamage))
- Unit with general damage reduction stat set in DGC.ini BalanceMods has damage reduced by that amount
- Unit with IronSkin perk has damage reduced by 1.0
- Unit with HardTarget perk has damage reduced by 1.0
- Unit with DamageControl perk active has damage reduced by 1.5
- Unit with CombatStims active has damage reduced by 40%
- Units wearing Chyrssalid plating (or Chryssalids) get Melee/KSM damage reduced by 40%
- SHIVs get damage reduced based on type -- basic: 1.5, alloy, 2.5, Hover, 2.0
- MECs get damage reduced by 1.0
- If unit is poisoned, then 50% of reduced damage is restored
- Cover DR is applied:
- Only applies if unit is not flanked by attacker, unless weapon is a Needle Grenade
- Low Cover damage reduced by 0.667, OR Full Cover damage reduced by 1.0
- If Hunkered Down, then if in Low Cover damage reduced by -0.667 OR Full Cover damage reduced by 1.0
- If unit has WillToSurvive perk, damage reduced by 1.5
- If Unit has FortioresUna perk, damage reduced by 0.5
- If attacking unit has Combined Arms perk, damage increased by 1.0 -- this cannot do more than negate damage reduction from cover

- If attacking unit has armor-piercing ammo, damage increased by 1.0 -- this cannot do more than negate damage reduction from all sources above
- Any fractional damage is randomized using if(FRand() < (fReturnDamage - float(FFloor(fReturnDamage)))