Skip to content

Spell formulas do not use base_power and use outdated level scaling #792

Description

@Dehdao

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions