mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 12:54:16 +02:00
Rename key to value
This commit is contained in:
parent
479d7e506a
commit
8a2a7e982e
1 changed files with 6 additions and 6 deletions
|
|
@ -170,10 +170,10 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
|
|||
}
|
||||
|
||||
static getChangeValue(model, change, effect) {
|
||||
let key = change.value.toString();
|
||||
let value = change.value.toString();
|
||||
let origin = null;
|
||||
if (key.toLowerCase().includes('origin.@') && effect.origin) {
|
||||
key = key.replaceAll(/origin\.@/gi, '@');
|
||||
if (value.toLowerCase().includes('origin.@') && effect.origin) {
|
||||
value = value.replaceAll(/origin\.@/gi, '@');
|
||||
try {
|
||||
const originEffect = foundry.utils.fromUuidSync(effect.origin);
|
||||
origin =
|
||||
|
|
@ -187,10 +187,10 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
|
|||
const actor = model.parent instanceof Actor ? model.parent : model;
|
||||
const item = origin ?? null;
|
||||
const stackingParsedValue = effect.system.stacking
|
||||
? Roll.replaceFormulaData(key, { stacks: effect.system.stacking.value })
|
||||
: key;
|
||||
? Roll.replaceFormulaData(value, { stacks: effect.system.stacking.value })
|
||||
: value;
|
||||
const evalValue = itemAbleRollParse(stackingParsedValue, actor, item);
|
||||
return evalValue ?? key;
|
||||
return evalValue ?? value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue