Fixed DiceSoNice integration again

This commit is contained in:
WBHarry 2025-07-10 02:16:42 +02:00
parent b3e7c6b9b2
commit 09f5fbcc28
4 changed files with 24 additions and 9 deletions

View file

@ -1,5 +1,6 @@
import D20RollDialog from '../applications/dialogs/d20RollDialog.mjs';
import D20Roll from './d20Roll.mjs';
import { setDiceSoNiceForDualityRoll } from '../helpers/utils.mjs';
export default class DualityRoll extends D20Roll {
_advantageFaces = 6;
@ -80,7 +81,6 @@ export default class DualityRoll extends D20Roll {
}
static getHooks(hooks) {
return [...(hooks ?? []), 'Duality'];
}
@ -142,5 +142,13 @@ export default class DualityRoll extends D20Roll {
total: roll.dHope.total + roll.dFear.total,
label: roll.totalLabel
};
const advantageState =
config.roll.advantage == this.ADV_MODE.ADVANTAGE
? true
: config.roll.advantage == this.ADV_MODE.DISADVANTAGE
? false
: null;
setDiceSoNiceForDualityRoll(roll, advantageState);
}
}