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

Allow monster spellcasting without a target #59825

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

Venera3
Copy link
Member

@Venera3 Venera3 commented Aug 2, 2022

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.

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs labels Aug 2, 2022
@Venera3 Venera3 added Monsters Monsters both friendly and unfriendly. Mechanics: Enchantments / Spells Enchantments and spells labels Aug 2, 2022
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Aug 2, 2022
@MNG-cataclysm
Copy link
Contributor

Couldn't this be used with the Triffid Heart? Over time, it could spawn additional root chambers and spawn more monsters.

@Venera3
Copy link
Member Author

Venera3 commented Aug 3, 2022

Sure, with the pretty big caveat that it would require you to come back into the bubble for it to pop.

@dseguin dseguin merged commit 02f5a27 into CleverRaven:master Aug 17, 2022
@Venera3 Venera3 deleted the spell_no_target branch August 21, 2022 12:45
Hirmuolio pushed a commit to Hirmuolio/Cataclysm-DDA that referenced this pull request Aug 27, 2022
Co-authored-by: Venera3 <Venera3@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Mechanics: Enchantments / Spells Enchantments and spells Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants