Allow monster spellcasting without a target #59825
Merged
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
None
Purpose of change
Spells are great! Monsters only being able to use them when they see an enemy is pretty limiting, so let's change that.
Describe the solution
Added
allow_no_target
(default false) that lets a monster to cast the spell in question even when they don't see an enemy. The spell will target the monster's own position in that case.Describe alternatives you've considered
Not doing this.
Adding some fancy targeting so they can e.g. heal up their allies at range even when left alone, but that can come later.
Testing
Added the bool to
dermatik_emergence
, spawned a poor doggo and watched it get undoggo'd without it noticing me.Additional context
Setting up as a workaround to #59753 , so no spells using it for now.
Since EOCs are only called on spells by monsters this could potentially be used for a lot of fun mapgen updating like a monster that alters its lair's layout until it gets shanked.