Skip to content

How to change the damage formula for spells so that it depends on the hero's level.

User Avatar
#2
Auto-translated
Taske3453

I want to change the Earth Shock damage formula so that it depends on the hero's level: 40 + kol*40 * ((lvl/20)**4)

However, I can't figure out how to change the formula itself, but only the buff value from the spell.

Also, there is already a spell in the game that uses the hero's level for casting - Summon Phoenix (Attack and Defense – 10+2*Hero Level)

But in the Summon Phoenix spell file, there are only values from 4 to 1. Where can I see how it works and where is this formula defined? And how can I use the hero's level value in the Chaos damage formula?

The formulas are hardcoded in the game engine, and the xdb files have a clear structure; violating this structure leads to game crashes or malfunctions of individual elements (like the bug with the instant devastating strike).

Some complex spells have additional parameters defined in DefaultStats; I remember that this applied to Hive summons and Wall of Swords (possibly Phoenix as well).
Мои мини-моды

Мод RTF

Мои NCF существа