Update module/dice/dhRoll.mjs

Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
WBHarry 2026-01-13 01:05:37 +01:00 committed by GitHub
parent e473928830
commit 3fcb7af1c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,17 +194,15 @@ export default class DHRoll extends Roll {
getBonus(path, label) {
const modifiers = [];
for (const effect of Object.values(this.options.bonusEffects)) {
if (effect.selected) {
for (const change of effect.changes) {
if (change.key.includes(path)) {
const changeValue = game.system.api.documents.DhActiveEffect.getChangeValue(
this.data,
change,
effect.origEffect
);
modifiers.push({ label: label, value: changeValue });
}
}
if (!effect.selected) continue;
for (const change of effect.changes) {
if (!change.key.includes(path)) continue;
const changeValue = game.system.api.documents.DhActiveEffect.getChangeValue(
this.data,
change,
effect.origEffect
);
modifiers.push({ label: label, value: changeValue });
}
}