mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-08 05:38:10 +02:00
Some fixes
This commit is contained in:
parent
bbbf3fa51d
commit
a923edfa76
2 changed files with 4 additions and 3 deletions
|
|
@ -160,7 +160,8 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
||||||
*/
|
*/
|
||||||
getRollData(options = {}) {
|
getRollData(options = {}) {
|
||||||
const actorRollData = this.actor?.getRollData() ?? {};
|
const actorRollData = this.actor?.getRollData() ?? {};
|
||||||
const data = { ...actorRollData, item: { ...this } };
|
const data = Object.assign(actorRollData, {});
|
||||||
|
data.item = Object.assign(this, {});
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,11 +185,11 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
|
||||||
|
|
||||||
// Get the actor and item documents. Note that actor roll data is inclusive of system roll data
|
// Get the actor and item documents. Note that actor roll data is inclusive of system roll data
|
||||||
const actor = model.parent instanceof Actor ? model.parent : model;
|
const actor = model.parent instanceof Actor ? model.parent : model;
|
||||||
const item = origin ?? null;
|
const item = origin ?? effect.parent;
|
||||||
const stackingParsedValue = effect.system.stacking
|
const stackingParsedValue = effect.system.stacking
|
||||||
? Roll.replaceFormulaData(value, { stacks: effect.system.stacking.value })
|
? Roll.replaceFormulaData(value, { stacks: effect.system.stacking.value })
|
||||||
: value;
|
: value;
|
||||||
const evalValue = itemAbleRollParse(stackingParsedValue, actor, item);
|
const evalValue = this.effectSafeEval(itemAbleRollParse(stackingParsedValue, actor, item));
|
||||||
return evalValue ?? value;
|
return evalValue ?? value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue