Skip to content

Commit

Permalink
fix: Fixes a dice roll bug @marvin9257 found. (Basically, it sometime…
Browse files Browse the repository at this point in the history
…s double-counted the difficulty.)

Hopefully it doesn't break some other usecase...
  • Loading branch information
xdy committed Nov 6, 2020
1 parent 3b49b93 commit 0e50dff
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/module/utils/TwodsixRolls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@ export class TwodsixRolls {
difficultyString += ` (${difficulty.target}+)`;
}

if (game.settings.get('twodsix', 'difficultiesAsTargetNumber')) {
if (!game.settings.get('twodsix', 'difficultiesAsTargetNumber') && !showEffect) {
if (difficulty.mod !== 0) {
rollParts.push("" + difficulty.mod);
}
} else {
rollParts.push("" + difficulty.mod);
}

flavorParts.unshift(difficultyString);

flavorParts.unshift(game.i18n.localize("TWODSIX.Rolls.Rolling") + ":");
Expand Down Expand Up @@ -227,12 +226,10 @@ export class TwodsixRolls {
}
}

if (game.settings.get('twodsix', 'difficultiesAsTargetNumber')) {
if (!game.settings.get('twodsix', 'difficultiesAsTargetNumber') && !showEffect) {
if (difficulty.mod !== 0) {
rollParts.push("" + difficulty.mod);
}
} else {
rollParts.push("" + difficulty.mod);
}

flavorParts.push(label);
Expand Down

0 comments on commit 0e50dff

Please sign in to comment.