[BUG] DiceSoNice fix (#312)

* Fixed DiceSoNice integration again

* PR fixes

* Improved with tertiary
This commit is contained in:
WBHarry 2025-07-10 13:28:51 +02:00 committed by GitHub
parent b3e7c6b9b2
commit 70239ec06a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 15 deletions

View file

@ -126,12 +126,10 @@ export const setDiceSoNiceForDualityRoll = (rollResult, advantageState) => {
const diceSoNicePresets = getDiceSoNicePresets();
rollResult.dice[0].options = { appearance: diceSoNicePresets.hope };
rollResult.dice[1].options = { appearance: diceSoNicePresets.fear }; //diceSoNicePresets.fear;
if (rollResult.dice[2]) {
if (advantageState === true) {
rollResult.dice[2].options = { appearance: diceSoNicePresets.advantage };
} else if (advantageState === false) {
rollResult.dice[2].options = { appearance: diceSoNicePresets.disadvantage };
}
if (rollResult.dice[2] && advantageState) {
rollResult.dice[2].options = {
appearance: advantageState === 1 ? diceSoNicePresets.advantage : diceSoNicePresets.disadvantage
};
}
};