fheroes2
fheroes2 copied to clipboard
Rework `Battle::Unit::CalculateSpellDamage()` method to use `fheroes2::getSpellDamage()` and `fheroes2::getMonsterData()` functions
Preliminary checks
- [X] I've checked that there aren't other open issues on the same topic.
Describe the problem requiring a solution
The current code contains hardcoded monsters and spells to evaluate spell damage. This is wrong as such code is not scalable for cases when we would add new monsters (or modding capabilities).
Describe the possible solution
Make use of fheroes2::getSpellDamage() and fheroes2::getMonsterData() functions
Additional info
No response
Hello, I was wondering why the fheroes2::getSpellDamage() takes into account spell caster artefacts but not spell victim artefacts. Is that part of this issue, or should a separate issue be made for that, or should we leave the defending artefact calculation in the battle::Unit::CalculateSpellDamage() function?