Improved with tertiary

This commit is contained in:
WBHarry 2025-07-10 13:14:24 +02:00
parent 301a040da2
commit dfa3ee6b51
2 changed files with 6 additions and 8 deletions

View file

@ -143,6 +143,6 @@ export default class DualityRoll extends D20Roll {
label: roll.totalLabel label: roll.totalLabel
}; };
setDiceSoNiceForDualityRoll(roll, config.roll.advantage); setDiceSoNiceForDualityRoll(roll, config.roll.advantage.type);
} }
} }

View file

@ -122,16 +122,14 @@ export const getCommandTarget = () => {
return target; return target;
}; };
export const setDiceSoNiceForDualityRoll = (rollResult, advantage) => { export const setDiceSoNiceForDualityRoll = (rollResult, advantageState) => {
const diceSoNicePresets = getDiceSoNicePresets(); const diceSoNicePresets = getDiceSoNicePresets();
rollResult.dice[0].options = { appearance: diceSoNicePresets.hope }; rollResult.dice[0].options = { appearance: diceSoNicePresets.hope };
rollResult.dice[1].options = { appearance: diceSoNicePresets.fear }; //diceSoNicePresets.fear; rollResult.dice[1].options = { appearance: diceSoNicePresets.fear }; //diceSoNicePresets.fear;
if (rollResult.dice[2]) { if (rollResult.dice[2] && advantageState) {
if (advantage.type === 1) { rollResult.dice[2].options = {
rollResult.dice[2].options = { appearance: diceSoNicePresets.advantage }; appearance: advantageState === 1 ? diceSoNicePresets.advantage : diceSoNicePresets.disadvantage
} else if (advantage.type === -1) { };
rollResult.dice[2].options = { appearance: diceSoNicePresets.disadvantage };
}
} }
}; };