[#6641] Allow standalone AE documents to be linked to activities#6800
Open
arbron wants to merge 5 commits into
Open
[#6641] Allow standalone AE documents to be linked to activities#6800arbron wants to merge 5 commits into
arbron wants to merge 5 commits into
Conversation
Adds a new `uuid` field to applied effects data on activities which allows the effect to be retrieved from a compendium rather than from the item. This is breaking change for `Activity#applicableEffects`, which now returns the effect profiles rather than the effects themselves. A new method `getApplicableEffects` has been added that retrieves the actual effect documents and is async so it can get them from the compendium. Closes #6641
9d144d4 to
ab17bb2
Compare
Fyorl
requested changes
Jun 22, 2026
- Adds support for remote enchantments in `EnchantActivity` - Activity sheets now define what AE types they support - Removed separate enchantment template in favor of sharing the standard activity effects list template - Reworked `EffectApplicationElement` to not use `async` in the `connectedCallback` - Fixed application of effect start time
Fyorl
requested changes
Jun 22, 2026
Fyorl
left a comment
Contributor
There was a problem hiding this comment.
enchant-enchantment.hsb now orphaned I think.
| } | ||
|
|
||
| // Enable an existing effect on the target if it originated from this effect | ||
| const existingEffect = actor.effects.find(e => e.origin === origin.uuid); |
Contributor
There was a problem hiding this comment.
Since the origin for remote effects is the item, I think multiple remote effects on one item would collide here.
| * Type of active effects that can be added to applied effects. | ||
| * @type {string} | ||
| */ | ||
| static SUPPORTED_EFFECT_TYPE = "base"; |
Contributor
There was a problem hiding this comment.
This is going to bite us when we inevitably want to allow for multiple AE types.
| const level = this.relevantLevel; | ||
| return this.effects | ||
| .filter(e => e.effect && ((e.level.min ?? -Infinity) <= level) && (level <= (e.level.max ?? Infinity))); | ||
| return this.applicableEffects; |
Contributor
There was a problem hiding this comment.
We don't filter for existing effects in applicableEffects anymore so we need to check internal uses of availableEnchantments and do the filtering there now I suppose.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a new
uuidfield to applied effects data on activities which allows the effect to be retrieved from a compendium rather than from the item.This is breaking change for
Activity#applicableEffects, which now returns the effect profiles rather than the effects themselves. A new methodgetApplicableEffectshas been added that retrieves the actual effect documents and is async so it can get them from the compendium.Closes #6641