dnd5e
dnd5e copied to clipboard
Sense Upgrade change Effects not stacking if sense has existing value greater than upgrade
Foundry: 12.327 D&D: 3.2.1
I suspect this applies to things that are not senses as well, however I have not tested that broadly.
If the following effect is applied to an actor with no senses, or a sense (darkvision in this case) less that 30 it creates the effect correctly, setting it to 60.
const effectData = {
changes: [
{
key: "system.attributes.senses.darkvision",
mode: CONST.ACTIVE_EFFECT_MODES.UPGRADE,
value: "30",
priority: 20,
},
{
key: "system.attributes.senses.darkvision",
mode: CONST.ACTIVE_EFFECT_MODES.ADD,
value: "30",
priority: 40,
},
],
disabled: false,
name: "Darkvision example",
};
await actor.createEmbeddedDocuments("ActiveEffect", [effectData]);
If the sense is set to the value of the upgrade change or greater then it does not apply correctly, setting the value to 30.
I think priority is simply an unimplemented field currently. This may belong in the core repo with a more system-agnostic description.