mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
fix additional dr options
This commit is contained in:
parent
e9abdbc523
commit
1908e74b3e
3 changed files with 21 additions and 6 deletions
|
|
@ -395,7 +395,12 @@ export class DualityRoll extends D20Roll {
|
|||
|
||||
static async buildEvaluate(roll, config = {}, message = {}) {
|
||||
if (config.evaluate !== false) await roll.evaluate();
|
||||
const advantageState = this.hasAdvantage ? true : this.hasDisadvantage ? false : null;
|
||||
const advantageState =
|
||||
config.advantage == this.ADV_MODE.ADVANTAGE
|
||||
? true
|
||||
: config.advantage == this.ADV_MODE.DISADVANTAGE
|
||||
? false
|
||||
: null;
|
||||
setDiceSoNiceForDualityRoll(roll, advantageState);
|
||||
this.postEvaluate(roll, config);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,9 +128,9 @@ export const setDiceSoNiceForDualityRoll = (rollResult, advantageState) => {
|
|||
rollResult.dice[1].options = { appearance: diceSoNicePresets.fear }; //diceSoNicePresets.fear;
|
||||
if (rollResult.dice[2]) {
|
||||
if (advantageState === true) {
|
||||
rollResult.dice[2].options.appearance = diceSoNicePresets.advantage;
|
||||
rollResult.dice[2].options = { appearance: diceSoNicePresets.advantage };
|
||||
} else if (advantageState === false) {
|
||||
rollResult.dice[2].options.appearance = diceSoNicePresets.disadvantage;
|
||||
rollResult.dice[2].options = { appearance: diceSoNicePresets.disadvantage };
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue