Skip to content

[#6154] Add new Region Behavior type for condition AE application#6822

Merged
arbron merged 2 commits into
6.0.xfrom
region/apply-effect
Jun 10, 2026
Merged

[#6154] Add new Region Behavior type for condition AE application#6822
arbron merged 2 commits into
6.0.xfrom
region/apply-effect

Conversation

@arbron

@arbron arbron commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Adds a new Region Behavior that behaves the same as core's Apply Active Effect behavior but with some extra conditions that are evaluated before applying the effect. Tokens can be filtered by disposition, size, and creature type.

Apply Effect Behavior

Closes #6154

@Zanderaf

Copy link
Copy Markdown
Contributor

Any chance for more nuanced filtering as well? Such as by creature subtype (Wood-Elf, Orc, Goblin, etc)?

@roth-michael

Copy link
Copy Markdown
Contributor

Any chance for more nuanced filtering as well? Such as by creature subtype (Wood-Elf, Orc, Goblin, etc)?

Based on

// TODO: Add FiltersField for arbitrary conditions once https://github.com/foundryvtt/dnd5e/issues/6672 is done

in the code: yeah, eventually.

@guldelox

Copy link
Copy Markdown

Would this be able to handle something like Sorcerer's Careful Spell metamagic, that lets them designate specific creatures to be unaffected by an AoE?

@arbron arbron changed the base branch from 5.3.x to 6.0.x June 2, 2026 17:49
Adds a new Region Behavior that behaves the same as core's Apply
Active Effect behavior but with some extra conditions that are
evaluated before applying the effect. Tokens can be filtered by
disposition, size, and creature type.

Closes #6154
@arbron arbron force-pushed the region/apply-effect branch from ade1639 to 25a0ece Compare June 2, 2026 18:07

@Fyorl Fyorl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need an analogue to the core ApplyActiveEffectRegionBehaviorType's _onUpdate? This fires if the behaviour is updated such that tokens already inside the region need to be re-evaluated as to whether the region's criteria still apply to them.

We would factor out the effect creation and effect deletion marshalling from their respective methods so they can be called from _onUpdate.

Comment thread module/data/region-behavior/apply-active-effect.mjs Outdated
Comment thread module/data/region-behavior/apply-active-effect.mjs Outdated
Comment thread module/data/region-behavior/apply-active-effect.mjs Outdated
Comment thread module/data/region-behavior/apply-active-effect.mjs Outdated
@arbron arbron requested a review from Fyorl June 10, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add system-specific Apply Effect region behavior which can conditionally apply effects

5 participants