Summary
Player spell damage formulas have two problems: most spells ignore the per-spell base_power parameter entirely, and the level contribution uses the pre-patch 13.05.12657 formula instead of the current one.
Level formula
Since patch 13.05.12657 (October 2022), Tibia uses:
S = floor((sqrt(2L + 2025) + 5) / 10)
B(L) = floor((L + 1000) / S) + 50*S - 450
The server still computes level contribution as level / 5, which was the pre-patch behaviour.
base_power not applied
Each spell has a base_power value that should scale its damage relative to other spells in the same category. Most spells — particularly those going through the C++ COMBAT_FORMULA_LEVELMAGIC path — do not use this value at all. As a result, spells that should deal different amounts of damage produce near-identical output.
Affected code paths
getLevelFormula / COMBAT_FORMULA_LEVELMAGIC in C++ — hardcodes level*2 + mlvl*3, no base_power input.
- Lua callbacks (
CALLBACK_PARAM_LEVELMAGICVALUE) — receive level and maglevel but most do not factor in base_power.
Scope
Fix requires updating both the level scaling formula and ensuring every spell formula reads and applies its base_power.
Summary
Player spell damage formulas have two problems: most spells ignore the per-spell
base_powerparameter entirely, and the level contribution uses the pre-patch 13.05.12657 formula instead of the current one.Level formula
Since patch 13.05.12657 (October 2022), Tibia uses:
The server still computes level contribution as
level / 5, which was the pre-patch behaviour.base_powernot appliedEach spell has a
base_powervalue that should scale its damage relative to other spells in the same category. Most spells — particularly those going through the C++COMBAT_FORMULA_LEVELMAGICpath — do not use this value at all. As a result, spells that should deal different amounts of damage produce near-identical output.Affected code paths
getLevelFormula/COMBAT_FORMULA_LEVELMAGICin C++ — hardcodeslevel*2 + mlvl*3, nobase_powerinput.CALLBACK_PARAM_LEVELMAGICVALUE) — receivelevelandmaglevelbut most do not factor inbase_power.Scope
Fix requires updating both the level scaling formula and ensuring every spell formula reads and applies its
base_power.