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

Spell activated EoCs are passed the target as a context val #77656

Merged
merged 6 commits into from
Nov 8, 2024

Conversation

Procyonae
Copy link
Contributor

@Procyonae Procyonae commented Nov 7, 2024

Summary

Infrastructure "Spell activated EoCs are passed the target as a context val location variable spell_location"

Purpose of change

Provides a solution for #70873 (Up to @Standing-Storm whether this should close it given this isn't what the issue is directly asking for but autoroofs are ew and should be avoided where possible and adding infra to the spell transform field feels somewhat redundant when EoCs have much more powerful transform infra)

Describe the solution

Spell activated EoCs are passed the target location as a context val location variable "spell_location" for use primarily when the target isn't a creature

Describe alternatives you've considered

This can probably be applied to more in repo spells that rely on autoroofs or spell EoCs that use less ideal ways to attempt to obtain ground targets, I'll have a look to see what I can find
Giving the context val a more obviously not manually defined name but I couldn't think of anything non clunky (I checked spell_location isn't used as a var anywhere in repo)

Testing

Tested using the included spell and the save from #70873 with expected results

Additional context

@github-actions github-actions bot added Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs Mechanics: Enchantments / Spells Enchantments and spells EOC: Effects On Condition Anything concerning Effects On Condition Mods: Xedra Evolved Anything to do with Xedra Evolved labels Nov 7, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Nov 7, 2024
@Procyonae Procyonae marked this pull request as draft November 7, 2024 18:14
@Standing-Storm
Copy link
Contributor

Will this allow running spell-based EoCs on arbitrary areas of ground (currently they throw a talker error)?

@GuardianDll GuardianDll marked this pull request as ready for review November 7, 2024 18:19
@Procyonae
Copy link
Contributor Author

Will this allow running spell-based EoCs on arbitrary areas of ground (currently they throw a talker error)?

They shouldn't be throwing an error rn, the caster should be beta talker and there only needs to be one talker for EoCs to work (unless you were running into 2ea0280 causing problems where it was being called with the nullptr talker despite not being necessarily needed)

@Standing-Storm
Copy link
Contributor

The case I'm thinking of is that right now if you're trying to apply some kind of AoE that applies an EoC to everyone in its area, right now you need to target a creature to kick the whole thing off. Will that still be true?

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Nov 7, 2024
@Procyonae
Copy link
Contributor Author

The case I'm thinking of is that right now if you're trying to apply some kind of AoE that applies an EoC to everyone in its area, right now you need to target a creature to kick the whole thing off. Will that still be true?

(Resolved in the devcord, this isn't an issue)

@Night-Pryanik Night-Pryanik merged commit 8704e24 into CleverRaven:master Nov 8, 2024
21 of 27 checks passed
@GuardianDll GuardianDll deleted the SpellEocsPassTarget branch November 10, 2024 00:48
GuardianDll added a commit to GuardianDll/Cataclysm-DDA that referenced this pull request Nov 10, 2024
Maleclypse pushed a commit that referenced this pull request Nov 17, 2024
* get rid of npctalk_var_ prefix for eoc variables

* cleanup after #77055

* deprecate more of type and context

* migrate item vars, make migration happen only once

* doc updates

* migrate u/npc/monster variables

* fix context var migration

* remove `substr( 12 )` in math parser

* move migration to a single function where possible

* no auto

* please clang

* Please clang more

* fix submap load test

* clean up after #77656

* cleanups after #77520
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` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Documentation> Design documents, internal info, guides and help. EOC: Effects On Condition Anything concerning Effects On Condition [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Mechanics: Enchantments / Spells Enchantments and spells Mods: Xedra Evolved Anything to do with Xedra Evolved Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants