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

JSON load order issue with monster death_function and spells #75332

Closed
RenechCDDA opened this issue Jul 30, 2024 · 0 comments · Fixed by #75410
Closed

JSON load order issue with monster death_function and spells #75332

RenechCDDA opened this issue Jul 30, 2024 · 0 comments · Fixed by #75410
Labels
Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Mechanics: Enchantments / Spells Enchantments and spells Monsters Monsters both friendly and unfriendly. (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@RenechCDDA
Copy link
Member

Describe the bug

#74678

quickling shadow does not fire any spell on death. Investigation shows that is because has_effect is never set to true

if( type->mdeath_effect.has_effect ) {

because the spell is considered invalid

has_effect = sp.is_valid();

Renaming monster_spells.json to amonster_spells.json works around this.

Attach save file

For reproduction's sake:
Xeddd-trimmed.tar.gz

Steps to reproduce

load save, kill quickling shadow next to you. Hold tab or use debug menu or whatever.

Expected behavior

The death spells should fire on death, regardless of how the json files are named

Screenshots

No response

Versions and configuration

aa5d1b1

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Mechanics: Enchantments / Spells Enchantments and spells Monsters Monsters both friendly and unfriendly. (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant