Calculations
Calculations
Battle calculations can get pretty complex. They can and will also change a lot during development.
Attack Damage
Attack damage is specifically damage done as a result of an attack or ability. It makes up a majority of damage done, but does not include things like Fall Damage or Collision Damage. As of this writing, the current attack damage formulation we are using consists of the following factors.
To simplify this, we’ll call the attacking unit [Attacker] and we’ll call the defending unit, or target [Target].
There are currently five (5) factors taken into account when an attack is first targeted. The initial calculated damage is dependent on the formula used by the ability or attack and the attributes of both [Attacker] and [Target]. This damage is called [Raw Damage] and is displayed in the Battle Log inside of brackets next to the actual damage value.
They are listed below, in order of calculation.
Elemental Affinity
The first modifier is Elemental Affinity which is based on [Attacker] Elemental Resistance* for the element in question. If it’s non-elemental damage, this step is ignored.
*Elemental Affinity is a stat that is based on Elemental Resistance for a specific element. So long as the value is positive, i.e. you have > 0% Elemental Resistance, that value becomes your Elemental Affinity for that element.
Weather Modifier
This is another elemental-based modifier. If the damage is non-elemental, this step is skipped. Depending on the type and intensity of the current weather effects, [Raw Damage] can be raised or lowered depending on the element.
Elemental Resistance
If the damage is non-elemental, this is skipped. For this modifier, we take the [Target] Elemental Resistance value and use this to modify [Raw Damage].
Position Modifier
This is a two-part process. First we measure [Attacker] height versus [Target] height, then we measure if the attack is coming from the Side, Back, or Front. Some abilities/attacks don’t count these values, so this step can be skipped if that’s the case. Also, the [Target] can be immune to one or both positional based modifiers. Whatever the case, both the Height and Directional values are combined and that becomes the Position Modifier.
((FRONT/BACK/SIDE) + (ABOVE/SAME/BELOW) - 1.0)
Terrain Modifier
If the ability or attack does not take terrain into account, or the [Target] is immune to terrain effects, this step is skipped. All terrain has an attack modifier and an accuracy modifier. For this step, we use the attack modifier value. We take the sum of the [Attacker] block/tile and the [Target] block/tile. This value is clamped between -0.9 and 2. This value modifies the [Raw Damage]
Passive Modifier
This last modifier is sort of a catch all for any ultra specific bonuses, usually based on passives, that come into play if the conditions are right.
Pre-Attack
Before the attack is launched, the [Raw Damage] is calculated. Below is an example of how the [Raw Damage] can change with each modifier.
[S]Raw Damage: 13.6216 (Start)
[1]Raw Damage: 14.1522 [Immune?] false (EleAff) 0.0390
[2]Raw Damage: 14.1522 [Immune?] false (Weather) 0.0000
[3]Raw Damage: 10.2741 [Immune?] false (EleRes) 0.2740
[4]Raw Damage: 11.3015 [Immune?] false (Position) 0.1000
[5]Raw Damage: 10.8495 [Immune?] false (Terrain) -0.0400
[6]Raw Damage: 10.8495 [Immune?] false (Passive) 0.0000
[F]Raw Damage: 10.8495 (End)
Post-Attack
After the attack is launched several things can happen. In most cases, the results can be a [Hit] or a [Miss]. If the attack is a [Hit], it can also be a [Graze] [Critical].
$Graze = Damage * 0.5$
$Critical = Damage * 1.5$
The [Target] can also mitigate damage if they have a shield equipped. Shields have a % Chance to Block and a % Damage Reduction. Upon a successful block, the damage reduction kicks in.
Grazes and Critical Hits can also be blocked, in which case the damage value is calculated and then that value is reduced by the damage reduction of the shield.
Critical Hit
[S]Base Dam. : 10.8495
[C]Crit. Dam.: 16.2743 1.500
Graze Hit
[S]Base Dam. : 10.8495
[G]Graze Dam.: 5.4248 0.500
Hit + Block
[S]Base Dam. : 10.8495
[B]Block Dam.: 9.7645 -0.100
Critical Hit + Block
[S]Base Dam. : 10.8495
[C]Crit. Dam.: 16.2743 1.500
[B]Block Dam.: 14.6468 -0.100
Graze Hit + Block
[S]Base Dam. : 10.8495
[G]Graze Dam.: 5.4248 0.500
[B]Block Dam.: 4.8823 -0.100