Damage

Damage figures

Following are the sources that contribute to damage calculation:

Unit Stats:

  • Shield damage ratio

  • Energy damage ratio

Unit State Flags:

  • Invulnerable

  • Unkillable

Unit Attribute Flags: All Attribute Flags potentially contribute to damage calculation, because they can have weaknesses and strengths versus Damage Effects.

Damage Effects:

  • Amount

  • Random

  • Kind

  • Armor Reduction

  • Shield Bonus

Modifications:

  • Total Damage Multiplier

  • Total Damage Bonus

  • (The vital Leeched from damage dealt is calculated after everything else and could even be calculated after damage was applied).

Damage calculation

  • check if target is invulnerable ⇒ if yes exit

calculate the damage for the attacker:

  • amount from effect plus random

  • multiply by DamageMultiplier (of effect kind)

  • add DamageBonus (of effect kind).

apply the damage that the target receives:

  • TODO: go on here