Damage Formula

Damage Formula

Last updated: 16 November 2024

Located at BattleUnitModel::GiveAttackDamage.

Multipliers

Static Multipliers

  • A: Sin Resistances. Let $x$ be the current multiplier. Then, $$A(x) = \begin{cases} -0.5\ &\text{if }x < 0\\ \frac{x-1}{2}\ &\text{if } 0 \le x < 1\\ x-1\ &\text{if } x \ge 1. \end{cases}$$ For example, $A(50\%) = -0.25$ and $A(200\%) = +1$.
  • B: Damage Type Resistances. Similar to (A). Stagger changes this value to $+1$, with $+0.5$ more per Stagger Threshold broken (Stagger+ and Stagger++).
  • C: Offense-Defense Advantage. Let $x$ be Attacker’s Offense Level - Enemies Defense Level. Then, the bonus is $$C(x) = \frac{x}{|x| + 25}.$$ This value may be negative.
  • D: Each parry round in a Clash gives (+0.03) Bonus. (Max 99 stacks. After that the Clash draws)
  • E: Criticals. This is located at BuffDetail::GetCriticalDamageRatio. On a critical hit, determine the following:
    • E1: Base Rate. $E_1 = 0.2$.
    • E2: Static Critical Modifiers. This includes BuffDetail::GetCriticalDamageRatioAdder, DungeonAbilityDetail::GetCriticalDamageRatioAdder (if in a Dungeon). This modifiers must modify under the precise name GetCriticalDamageRatioAdder. The following is an exhaustive list of the non-dungeon (Refraction Railway or Starlight buff) cases.
      1. BL Meursault’s Swordplay of the Homeland (SwordPlayOfTheHomeland) and Remembrance (SwordPlayOfTheMemorial).
      2. E.G.O Gift Ragged Bamboo Hat (9719 - 97192).
      3. Pride-drenched Rose (8180) passive Superiority (856902). The cases where the script calling CriticalDmgUp (or its many variations) only implements GetAttackDmgMultiplier and hence are not in this category (see G). Examples of such cases not in the category include Jia Xichun S2 Crimson Phoenix (40000102) Coin 4, Ryoushuu’s TS4 Blind Obsession Corrosion (2040621) Coin 1, Butler Ryoushuu UT4 S3 Receiving Arts 2: S.Y.N.C. (1040803) Coin 2 and Kurokumo Rodion UT4 S3 (and Counter) Sky-clearing Cut (1090203 and 1090205) On Use effect.
    • E3: Static Critical Mult Modifiers. This is via the function GetCriticalDamageRatioResultMultiplier. The following is an exhaustive list of the cases.
      1. Peccatulum Superbiae?? (8374)’s Passive Sin Resistance (837401). Notably, this is not how the E.G.O Gift Clear Mirror, Calm Water (9070) works. They are finally combined, $$E = (E_1 + E_2)\cdot\mathrm{max}(E_3 + 1, 0).$$
  • F: Observation Levels. This calls GetTakeAttackHpDamageBonus. This has no impact in Refraction Railway (and DungeonId = 3), and always returns 0. You gain Observation Level at 1, 3, 6, 10 and 15 kills. Only direct kills count, and deaths due to e.g. bleed does not. This (should) always return 0. This may not be a bug, a different intention is noted at Util::GetExtraAttackDamageRateByObsevationLevel, but this function is not being used.

Dynamic Multipliers

  • G: Anything from Passives/Skills effect
  • H: Buffs (e.g. Fragile, Protection). (Blunt Fragility and Fragility counts differently)

Final Damage

Computation of Final Damage

Let the Sum of Static Multiplier $M_s = A + B + C + D + E + F$. Let the Sum of Dynamic Multiplier $ M_d= G + H$.

Final Damage is computed as the sum of three quantities. $$\begin{equation} \text{Coin Roll} \cdot (\mathrm{max}(1 + M_s, 0))\cdot (1 + M_d) \end{equation}$$

There are two types of Additive Bonuses: Attack Adder and Attack HP Adder. For example, Chef Ryoushuu Skill 3 I Can Cook Anything (1040403) [On Use] skill is an Attack Adder while TingTang Hong Lu Skill 2 Shank (1060302) Coin 1 skill is an Attack HP Adder. $$\begin{equation} \text{Attack Adder}\cdot (1 + \mathrm{max}(A + B + C, 0))\end{equation}$$

Sometimes, like Seven Outis Skill 3 Exploit the Gap (1110403) Coin 3 [On Hit] Skill, it specifies the type of damage. This means that it takes into account the Damage Type/Sin Type resistances. $$\begin{equation} \text{Attack HP Adder} \end{equation}$$

Attack Adder and Attack HP Adders are integers rounded down.

Minimum Damage

  • If Final Damage is smaller than $1$, it will be $1$.
  • If Final Damage is less than $0.05 \cdot \text{Coin Roll}$, it will instead be set to $0.05 \cdot \text{Coin Roll}$.

Further Notes

  1. The Final Damage is rounded down to an integer.
  2. All Floating Point Values are 32 Bits.
  3. Final Damage may be further modified. For example, in Sinclair’s Lifetime Stew. This ensures that when attacking your allies, you heal them instead.
  4. For every 3 Offense Level the participant has over their opponent, they gain 1 Clash Power. (This has no bearing on damage.)
  5. When you use a defense skill, you set your Defense Level to the Offense Level of the defense skill. Check SkillModel::IsDefense. (Every unit has a Defense Level and every skill an Offense Level.)
  6. Each skill has a resonance index. To compute the index:
    1. The “normal” resonance is the number of skills to the left of it of the same affinity.
    2. The absolute resonance is the number of skills adjacent to it (including itself) with the same affinity. If this is less than 3, the absolute resonance will instead be 0.
    3. The resonance index is the maximum of these two values. The following table describes the Offense Level increase of the skill due to the resonance index.
    4. The table is obtained from
Resonance Index 0 1 2~3 4~5 6~7 8~9 10 11+
OL Boost 0 1 3 5 7 9 11 13