Skip to content

[#3011] Allow @item use in effect values, move custom _checkCondition into core shouldApplyChange - #7366

Merged
Fyorl merged 3 commits into
foundryvtt:6.0.xfrom
roth-michael:use-item-data
Aug 24, 2026
Merged

[#3011] Allow @item use in effect values, move custom _checkCondition into core shouldApplyChange#7366
Fyorl merged 3 commits into
foundryvtt:6.0.xfrom
roth-michael:use-item-data

Conversation

@roth-michael

@roth-michael roth-michael commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Closes #3011
The changes to ActiveEffect5e are self-explanatory. Other piece is that I moved the call of prepareFinalAttributes on embedded items & _prepareSpellcasting from Actor5e#prepareData into the "final" phase in Actor5e#applyActiveEffects, so that resulting values can actually be modified by final-phase AE changes.

Follow-up improvement of this (specifically, being able to use @item.uses.value) in #7368.

Comment thread module/documents/actor/actor.mjs Outdated
Comment thread module/documents/active-effect.mjs Outdated
@roth-michael
roth-michael requested a review from arbron August 24, 2026 18:03
@arbron arbron added the breaking Breaking changes label Aug 24, 2026
@arbron

arbron commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Added the breaking flag because module-provided actor types that previously had to manually call prepareFinalAttributes on their items will now be calling them twice.

@arbron
arbron requested a review from Fyorl August 24, 2026 18:12
 - Remove unnecessary find()
 - Fix indiscriminate baseData copy
 - Fix enchantment conditions not being evaluated
@Fyorl
Fyorl merged commit 52a14a6 into foundryvtt:6.0.x Aug 24, 2026
@roth-michael
roth-michael deleted the use-item-data branch August 24, 2026 22:29
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.

Allow active effects on items to use the @item variable in change values

3 participants