Fix localization of critical failure and success

This commit is contained in:
José Lozano
2025-07-03 00:22:39 +02:00
parent fc508bc8ac
commit bfcfeb9a04
2 changed files with 10 additions and 10 deletions
+8 -9
View File
@@ -319,23 +319,22 @@ export class DGPercentileRoll extends DGRoll {
let resultString = "";
let styleOverride = "";
if (this.isCritical) {
resultString = `${game.i18n.localize("DG.Roll.Critical")} `;
}
if (this.isSuccess) {
resultString += `${game.i18n.localize("DG.Roll.Success")}`;
if (this.isCritical) {
resultString = `${resultString.toUpperCase()}!`;
resultString = `${game.i18n.localize("DG.Roll.CriticalSuccess")}`;
resultString = `${resultString.toUpperCase()}`;
styleOverride = "color: green";
} else {
resultString = `${game.i18n.localize("DG.Roll.Success")}`;
}
} else {
resultString += `${game.i18n.localize("DG.Roll.Failure")}`;
if (this.isCritical) {
resultString = `${resultString.toUpperCase()}!`;
resultString = `${game.i18n.localize("DG.Roll.CriticalFailure")}`;
resultString = `${resultString.toUpperCase()}`;
styleOverride = "color: red";
} else {
resultString = `${game.i18n.localize("DG.Roll.Failure")}`;
}
}