fix language display and attribute roll bug

This commit is contained in:
IrkTheImp 2025-07-27 14:43:16 -05:00
parent c81c1941a4
commit 6a1bd56fe8
2 changed files with 9 additions and 7 deletions

View file

@ -53,12 +53,14 @@ export const getCommandTarget = () => {
};
export const setDiceSoNiceForDualityRoll = async (rollResult, advantageState, hopeFaces, fearFaces, advantageFaces) => {
const diceSoNicePresets = await getDiceSoNicePresets(hopeFaces, fearFaces, advantageFaces, advantageFaces);
rollResult.dice[0].options = diceSoNicePresets.hope;
rollResult.dice[1].options = diceSoNicePresets.fear;
if (rollResult.dice[2] && advantageState) {
rollResult.dice[2].options =
advantageState === 1 ? diceSoNicePresets.advantage : diceSoNicePresets.disadvantage;
if (game.modules.get('dice-so-nice')?.active) {
const diceSoNicePresets = await getDiceSoNicePresets(hopeFaces, fearFaces, advantageFaces, advantageFaces);
rollResult.dice[0].options = diceSoNicePresets.hope;
rollResult.dice[1].options = diceSoNicePresets.fear;
if (rollResult.dice[2] && advantageState) {
rollResult.dice[2].options =
advantageState === 1 ? diceSoNicePresets.advantage : diceSoNicePresets.disadvantage;
}
}
};