mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Update module/dice/dhRoll.mjs
Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
parent
e473928830
commit
3fcb7af1c8
1 changed files with 9 additions and 11 deletions
|
|
@ -194,9 +194,9 @@ export default class DHRoll extends Roll {
|
||||||
getBonus(path, label) {
|
getBonus(path, label) {
|
||||||
const modifiers = [];
|
const modifiers = [];
|
||||||
for (const effect of Object.values(this.options.bonusEffects)) {
|
for (const effect of Object.values(this.options.bonusEffects)) {
|
||||||
if (effect.selected) {
|
if (!effect.selected) continue;
|
||||||
for (const change of effect.changes) {
|
for (const change of effect.changes) {
|
||||||
if (change.key.includes(path)) {
|
if (!change.key.includes(path)) continue;
|
||||||
const changeValue = game.system.api.documents.DhActiveEffect.getChangeValue(
|
const changeValue = game.system.api.documents.DhActiveEffect.getChangeValue(
|
||||||
this.data,
|
this.data,
|
||||||
change,
|
change,
|
||||||
|
|
@ -205,8 +205,6 @@ export default class DHRoll extends Roll {
|
||||||
modifiers.push({ label: label, value: changeValue });
|
modifiers.push({ label: label, value: changeValue });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return modifiers;
|
return modifiers;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue