Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework Battle::Unit::CalculateSpellDamage() method to use fheroes2::getSpellDamage() and fheroes2::getMonsterData() functions #8708

Open
1 task done
ihhub opened this issue May 22, 2024 · 1 comment
Labels
improvement New feature, request or improvement logic Things related to game logic
Milestone

Comments

@ihhub
Copy link
Owner

ihhub commented May 22, 2024

Preliminary checks

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

@ihhub ihhub added improvement New feature, request or improvement logic Things related to game logic labels May 22, 2024
@ihhub ihhub added this to the 1.1.1 milestone May 22, 2024
@Cheerfulbull
Copy link
Contributor

Cheerfulbull commented Jun 15, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature, request or improvement logic Things related to game logic
Projects
None yet
Development

No branches or pull requests

2 participants