[Magiclysm] Dispel Magic and Disjunction affect summoned items and auras now #71321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Mods "[Magiclysm] Dispel Magic and Disjunction affect summoned items and auras now"
Purpose of change
Previously, Dispel Magic and Disjunction only affected magic that was applied as an effect. But thanks to Event EoCs, they can affect auras made with spawn_item now too.
Describe the solution
Go through and make two Event EoCs that check for the effects added by Dispel Magic and Disjunction that remove all spawned items. Dispel Magic only works on spells of Difficulty 6 or lower and no attunements, Disjunction works on everything, the same behavior as effects.
Describe alternatives you've considered
Testing
Made a technomancer with Mage Armor (Difficulty 5) and Mage Blade (Difficulty 7). Spawned in a mi-go nethermancer and it casts Dispel Magic and dispelled my armor but not my blade. Debug-killed it, recast Mage Armor, and spawned in a feral radiation mage and it cast Disjunction and dispelled everything.
Additional context
It'll be nice when monsters can have enchantments and we can represent enemy mages' protective buffs as effects, which you will then be able to dispel.