Data\Effect\Damage

Applies damage to a unit.

Which Unit

Which unit to apply damage to.

Damage Amount

The amount of damage to deal.

Expressions

The result of each expression listed here will be evaluated and added to the damage amount. The total damage amount will then be passed through any behavior modifiers or damage responses.


See: Data/Expression.
Note that the expression's Value/DamageAmount refers to the Damage Amount of this effect.

Expressions After Behavior Modifiers

The damage value after behavior modifiers are applied will be used when evaulating this expression and the combined value will be used to further apply damage responses.

Expressions After Damage Response

The damage value after damage responses are applied will be used when evaluating this expression and the result will be added to the damage value.

Card Name

Name of the card this damage effect is associated with. Used for reporting in-game stats.

Damage Modifier Event Order

Damage modifier event flowchart
When you’ve got a bunch of different damage modifiers, it can be rather difficult to know how they’re being applied and in what order. While you can’t guarantee order execution in the same event, you can know the order in which damage modifier events are applied.
Under many circumstances, this order probably won’t matter because the arithmetic will come out the same. But once you get into conditional logic, order becomes rather more important; if you have additional modifiers that apply based on the total damage, you need to be able to know what those values will be with respect to modifier event order.

  1. Damage effect — The natural starting point, this is the value contained in the Damage effect’s Damage Amount field.
    Damage effect
  2. Damage effect : Expressions — The value of the expression(s) is then added to the damage.
  3. Behavior : Damage Modifiers — The damage from the effect is then modified by the source’s Weapon Damage Modifier or Ability Damage modifier and the target’s Weapon Damage Taken Modifier or Ability Damage Taken Modifier.
modified_value =
(value + (Scaled * stack_count)) * -- Scaled is added directly to value and multiplied
(1 + (AdditiveFactor * stack_count)) * -- Additive increases linearly with stacks
(1 + (PositiveUnifiedFactor + NegativeUnifiedFactor)) * -- Unmodified by stacks
((1 + MultiplierFactor) ^ stack_count) + -- Multiplier factors increase exponentially
(Unscaled * stack_count) -- Unscaled is unmodified by the factors

Behavior damage modifiers

  1. Damage effect : Expressions After Behavior Modifiers — The value of the expression(s) is then added to the damage.
  2. Behavior : Damage Response : Damage Modifiers — The damage is then modified by the behavior damage response modifiers if it passes the Chance check, Validators check, and it isn’t currently on Cooldown. Modifiers are calculated the same as with the Behavior Damage Modifiers above, with additional limiters for Damage Clamp Min and Max.
    Note: Attacker damage response damage modifiers are calculated before the Defender’s are calculated.
    Behavior damage response damage modifiers
  3. Damage effect : Expressions After Damage Response — The value of the expression(s) is then added to the damage.
  4. Damage Trigger — Finally, the damage value is sent to the trigger scope for either DCEI.TriggerAddUnitDamageEvent or DCEI.TriggerAddUnitCriticalDamageEvent. All data-based modifiers have been applied and your code is operating on the results.