🪄 This appendix sums up in a semi-visual way the main formulas related to the fight mechanics in Wakfu.
You will find there the formulas for flat resistance < > % resistance conversion, damage, heal and armor calculations, AP / MP removals based on Force of Will, MP / AP losses based on lock / dodge, HPs, Effective Hit Points (EHP) and Effective Masteries (EM).
📖 These formulas are presented along with definitions, examples, special cases, explanations of some mechanics, notions and concepts. This overview may help you to better understand the various mechanics from Wakfu, and to better grasp the foundations on which WakfuCalc is based.
🧠 More details about these formulas can be found in the following parts in this page. Additionnally, some advanced special cases are gathered in a 🔎 separate page.
There is only one option for this appendix.
Formulas shown in this calc tab are written in mathematical notation to be more visually agreeable. This notation cannot be copy-pasted, so I added an option to also display them in classic text format that you can copy-paste as needed.
📝 Click on the cell dotted with blue lines next to "Display formulas in a copy-pasteable format?", and write "Yes".
🟩 Formulas written in a copy-pasteable format are marked with a light green cell on their left.
In the following parts, I will introduce you to a number of formulas, definitions, rules and special cases on various fight mechanics. Topics unrelated to fight strategy (like XP or loot) will be omitted from this page and from the calc, since it is not the focus of WakfuCalc.
You obviously do not need to know all of this to use the calc, but it can help you to improve your understanding of the game, or to understand how calculations are done "under the hood".
It will not be possible to tackle everything or to talk about every single special case in the game, but the overview of Wakfu formulas should nonetheless be fairly complete and detailed!
⚠️ In order to properly use these formulas, make sure your follow the rules of operations priority: first, calculations between brackets. Multiplications and division are done before additions and subtractions.
% Resistance = [1 - 0.8^(flat Resistance / 100)] rounded down
Resistance reduces incoming damage.
🛡️ The effective flat resistance is the sum of:
🛡️🔥💧🍃🌪️ The elemental resistance corresponding to the elem of the received spell (or the lowest elemental resistance for Stasis damage)
🛡️💥 Critical resistance IF the spell is a critical hit
🛡️🔄 Rear resistance IF the attacker is behind the target's back
In game, only the elemental resistance of your enemies is displayed. The % resistance displayed thus only accounts for elemental resistance. For damage calculation, this value will effectively be increased or reduced by critical and rear resistance, if their conditions are met.
🛑 % resistance limited to 90% since the 1.68 update (save for some rare exceptions). Flat resistance is not capped, but the % resistance that results from converting flat resistance will not go over 90%.
⚔️❌🛡️ Some damage types (non-reducible, %, or fixed) ignore resistance.
⚔️❌🛡️🔄 Some damage types (position-agnostic) ignore rear resistance.
➖🛡️🛑 Resistance removals that players can inflict are usually limited to -200.
Flat resistance = [100 × (log(1 - (% Resistance / 100))) / (log(0.8))] rounded up
(((Spell base value × (1 + (Sum of relevant masteries / 100)) × Rear/side damage bonus × Critical multiplier × (1 + (Sum of Damage Inflicted bonus / 100)) × (1 - (relevant % Resistance / 100))) + fixed Damage) - Barrier) × Block coefficient
Sum of relevant masteries
🔥💧🍃🌪️☀️🟣 Elemental mastery corresponding to the elem of the spell (or highest elemental mastery for Light / Stasis damage)
🪓🏹 Melee mastery if the target is 1 or 2 cells away from the caster, OR distance mastery if the target is 3 cells away or more
💢 Berserk mastery if the caster has 50% or less of their max HP
🔄 Rear mastery if the caster is looking at the target's back
💥 Critical mastery if the spell is a critical hit
🔄 Rear/side damage bonus
1 if the target is facing you ; 1.1 if the target is showing you their side ; 1.25 if the target is showing you their back
💥 Critical multiplier
1 if the spell is not a critical hit ; when it is a critical hit, the base value of the spell and/or the amount of state levels that are applied are multiplied by 1.25
➕🗡️ Sum of Damage Inflicted bonus
Damage Inflicted (DI) % are added to conditional Damage Inflicted (% DI at a distance for example).
🛡️ Relevant % Resistance
See "Resistances" part above.
🛡️ Block coefficient
1 if the hit is not blocked ; 0.8 if the hit is blocked ; 0.68 if the hit is blocked and you have Blocking Expert sublimation.
➕ Some spells read "+X% additional/extra damage" (example: Iop's Devastate, based on caster's remaining MPs). It might be a spell base value multiplier, and not DI. But it may as well be regular DI.
🛡️ Some states reduce "% Damage received". It is a multiplier applied to the value of damage after fixed damage but before barrier. This terminology is not standardized, and "Damage Received" may sometimes refer to % DI.
🟰 Some damage types / armor removals are not index-linked to mastery, rather they are either fixed (in absolute value or in %), or indexed to the level of a state, and as such they ignore some terms of the formula.
❌🔄 Some damage types are position-agnostic, they ignore all factors relative to orientation (rear/side damage bonus, rear mastery, rear resistance, etc).
❌💥 Some spells cannot be critical hits, and as such they ignore both the critical multiplier and critical mastery.
➖🗡️ If regular DI % are below -50% (or -100% with Theory of Matter), they are first set to -50% (or -100%), and only then are they added to conditional DI %. Some DI sources (like Bubourg Power from the Bubourg family) can override this limit and even nullify your conditional % DI.
⚫🟰 Some damage types are "Neutral"-element-typed, they are % damage and as such they ignore resistance.
❌🛡️ Some damage types (notably non-reducible or some indirect) cannot be blocked.
Indirect damage are "damage that are not directly inflicted by a spell or a weapon".
Example: poison states, traps or glyphs inflict indirect-type damage.
⚠️ Definition and behaviour of indirect damage are loose and far from fully standardized, it changes on a case-by-case basis. It is important to test what works and what does not work for a given spell, and not to infer the behaviour of an indirect damage spell from the behaviour of another indirect damage spell.
The general formula is mostly the same as direct damage, with some differences:
🕛 Damage calculation is based on characteristics at the time of the damage proc (and not based on characteristics at the time the poison / trap / glyph spell was used, for instance).
❌🔄 Most indirect damage spells ignore anything related to orientation: the rear/side damage bonus is ignored, rear mastery is not added to the sum of masteries, and rear resistance is not added to the sum of flat resistances.
❌💥 Some of them take critical mastery when they are applied with a critical hit, others do not.
➕🗡️ Indirect Damage % are added to the sum of relevant % Damage Inflicted.
❌🛡️💚 Usually, they cannot be blocked or reduced by barrier, and they may penetrate armor. Moreover, some indirect spells may bypass mob invulnerabilities.
Spell base value × (1 + (Sum of relevant masteries / 100)) × Critical multiplier × (1 + ((Sum of caster's Heals Performed bonus + Sum of target's Heals Received bonus) / 100)) × (1 – (Heal Resistance / 100)) × (1 – (Incurable value / 100))
Sum of relevant masteries
🔥💧🍃🌪️☀️🟣 Elemental mastery corresponding to the elem of the spell (or highest elemental mastery for Light / Stasis heals)
🪓🏹 Melee mastery if the target is 1 or 2 cells away from the caster, OR distance mastery if the target is 3 cells away or more
💢 Berserk mastery if the caster has 50% or less of their max HP
💥 Critical mastery if the spell is a critical hit
💙 Healing mastery
💥 Critical multiplier
1 if the spell is not a critical hit ; when it is a critical hit, the base value of the spell and/or the amount of state levels that are applied are multiplied by 1.25
➕💙 Sum of Heals Performed bonus
Heals Performed % are added to conditional Heals Performed (% Heals Performed at a distance for example).
💔 % Heal Resistance
See "Heal Resistance" part below.
➕ Some spells read "+X% (heals)" (example: Pandawa's Milk Wave, based on the level of the Dizzy state). It is a spell base value multiplier - and not Heals Performed %. But it may as well be regular % Heals Performed %.
🕛 For indirect heals (that apply a heal over time state for instance), calculation is based on characteristics at the time of the heal proc (and not based on characteristics at the time the heal spell was used, for instance).
❌💙 For Health Steal calculations, Heals Performed % and Heals Received %, as well as healing mastery are ignored.
🟰 Some heal / Health Steal / Armor Steal are not index-linked to mastery, rather they are either fixed (in absolute value or in %), or indexed to the level of a state, and as such they ignore some terms of the formula.
New Heal Resistance = [((Value of the heal received by the target / target's max HP) × 20) + potential earlier Heal Resistance]
Since the 1.79 update, the Heal Resistance calculation is no longer rounded down. The value of the Heal Resistance can be decimal, but only the integer part is displayed in-game, and only the integer part reduces incoming heal values. For instance, whether you have exactly 2%, or 2.36%, or 2.99% will reduce incoming heals by 2% anyway, and will just display 2% Heal Resistance. But if you have 2.99% Heal Resistance, a very small heal will be enough to increase it to 3%.
All kinds of heals (including Health Steal) are affected by Heal Resistance.
Spell base value × Critical multiplier × (1 + (Sum of caster's Armor bonus + Sum of target's Armor received bonus / 100)) × (1 – (Crumbly value / 100))
💥 Critical multiplier
1 if the spell is not a critical hit ; when it is a critical hit, the base value of the spell and/or the amount of state levels that are applied are multiplied by 1.25
💚↔️ % Armor given only works for armors cast on allies, and not on yourself. % Armor received works no matter who cast the spell.
💥 Some spells cannot be critical hits, and as such they ignore the critical multiplier.
🛑💚 A target can only have up to 50% of their max HP as armor (100% of their max HPs for summons).
FoW Factor (FF) = [(1 + (Caster Force of Will / 100)) – (Target Force of Will / 100)] ; if FF < 0, FF = 0 ; if FF > 2, FF = 2
Effective removal = Base removal value of the spell × 0.5 × FF
Decimal part of the result = % chance to round the removal up to the nearest integer
Example: a 2.40 removal corresponds to 40% chance to remove 3 AP/MP (rounding up), and (1 - 40%) = 60% chance to remove 2 AP/MP (rounding down).
➕⚡ The target gains 10 FoW per AP / MP removed until the end of their next turn (or for 2 turns for mobs from Stasis 5 on).
❌⚡ Some spells (like Transcendence) remove MAX AP/MP. Those spells bypass the FoW calculations, they always remove the stated amount of AP/MP, and they do not trigger the FoW gain on the target.
The formula above calculates MP / AP losses inflicted to a target level 100 or more by one or more locker(s) when this target dodges them.
For a target whose level is below 100, the formula is adjusted and MP / AP losses are decreased (I don't know the details).
Lock value of adjacent opponents (L) = La + Lb / 2 + Lc / 3 + Ld / 4
[La, Lb, Lc and Ld are the Lock values of opponents who are adjacent to the target, sorted by decreasing Lock order]
X = (7 / 3) × (L – Dodge) / (L + Dodge) ; if L < 0, L = 0 ; if Dodge < 0, Dodge = 0
Y = [((X + 1) × 4) – Orientation factor] rounded down to the nearest integer
Orientation factor = {2 if all the locking opponents are showing their back to the target ; 1 if at least one of the locking opponents is showing their side to the target ; 0 if at least one of the locking opponents is facing the target}
MP loss = [Y / 2] rounded up
AP loss = [Y / 2] rounded down
🛑 MP & AP losses for a target level 100 or more who dodges locker(s) are limited to 4 & 4.
Total HP = (50 + (Level × 10) + sum of flat HP bonus) × (1 + (sum of % HP bonus / 100))
🤍🟰❤️✖️🛡️✖️🛡️ EHP result from converting defensive characteristics (res %, block %, Blocking Expert subli) into HPs.
For instance, a character who has 30 000 HPs, 80% res and 100% block is as tanky as a character who has 187 500 HPs, 0% res and 0% block.
A way to put it is that this character has 187 500 EHP.
EHP = (HP x 10000) / ((100 - Resistance %) x (100 - (1 - Block coefficient) x % Block))
🛡️ Block coefficient
0.8 (classic case) ; or 0.68 (character with the Blocking Expert sublimation)
Check the ❤️ Tankiness comparison tool for more details on the EHP concept.
EM result from converting some multipliers (% Damage Inflicted OR % Heals Performed, potential Stasis Characteristics % Damage / Heals for mobs) into masteries.
For instance, a mob who has 4000 masteries, 50% Damage Inflicted and Heals Performed, and 130% Damage and Heals thanks to Stasis Characteristics hits and heals as much as a mob who has 7895 masteries, 0% Damage Inflicted and Heals Performed and no Stasis Characteristics Damage and Heals bonus.
A way to put it is that this mob has 7895 EM.
There are 3 types of EM: regular EM, EMcrit and EM average. Regular EM gauge the power of non-critical spells, EMcrit, the power of critical spells, and EM average are an average of these 2 metrics, weighted by the CH %. This last metrics is the one that best measures the actual power of a build.
It is more relevant/accurate than "total mastery", since it also includes the Damage Inflicted % / Heals Performed % and the CH %.
Thus, EM can be used to quantify the power of a build and to compare builds with different masteries, % Damage Inflicted or % Heals Performed, and % CH values.
EM = (((Sum of relevant masteries + 100) × (Sum of relevant % Damage Inflicted or Heals Performed + 100) × % Damage and Heal linked to Stasis Characteristics) / 10 000) - 100
EMcrit = ((((Sum of relevant masteries including critical mastery + 100) × (Sum of relevant % Damage Inflicted or Heals Performed including critical % DI or % HP + 100) × % Damage and Heal linked to Stasis Characteristics) / 10 000) × 1.25) - 100
EM average = EM + ((EMcrit - EM) × % CH)
Sum of relevant masteries
For regular EM, make sure to exclude critical mastery from the sum of relevant masteries, or conversely, make sure to include it for EMcrit.
Also, relevant masteries differ between damage spells and healing spells.
Check the Damage and Heals formulas above to have more details on relevant masteries for each case to calculate your Damage EM or your Heal EM.
Sum of relevant % Damage Inflicted or % Heals Performed
For regular EM, make sure to exclude potential critical % Damage Inflicted or critical % Heals Performed (or to include the non-critical ones), and conversely for EMcrit, make sure to include potential critical % Damage Inflicted or critical % Heals Performed (and to exclude the non-critical ones, such as those from the Courage sublimation).
Take your % Damage Inflicted if you want to know your Damage EM, or your % Heals Performed if you want to know your Heal EM.
% Damage Inflicted or % Heals Performed are added to conditional % Damage Inflicted or Heals Performed (% Damage Inflicted / % Heals Performed at a distance for example).
% Damage and Heal linked to Stasis Characteristics
Please note that if you want to calculate the EM of a character (and not a mob's), the % Damage and Heals linked to Stasis Characteristics will necessarily be equal to 100% (since your own damage / heals are not affected by the stasis level of the contents)