Cleanup & Reformatage
This commit is contained in:
@ -54,7 +54,7 @@ export class RdDResolutionTable {
|
||||
/* -------------------------------------------- */
|
||||
static explain(rolled) {
|
||||
let message = "<br>Jet : <strong>" + rolled.roll + "</strong> sur " + rolled.score + "% ";
|
||||
if (rolled.caracValue != null && rolled.finalLevel != null) {
|
||||
if (rolled.caracValue != undefined && rolled.finalLevel != undefined) {
|
||||
message += (rolled.diviseurSignificative > 1 ? `(1/${rolled.diviseurSignificative} de ` : "(")
|
||||
+ rolled.caracValue + " à " + Misc.toSignedString(rolled.finalLevel) + ") ";
|
||||
}
|
||||
@ -116,7 +116,7 @@ export class RdDResolutionTable {
|
||||
static _updateChancesFactor(chances, diviseur) {
|
||||
if (chances.level > -11 && diviseur && diviseur > 1) {
|
||||
let newScore = Math.floor(chances.score / diviseur);
|
||||
mergeObject(chances, this._computeCell(null, newScore), { overwrite: true });
|
||||
mergeObject(chances, this._computeCell(undefined, newScore), { overwrite: true });
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ export class RdDResolutionTable {
|
||||
static _updateChancesWithBonus(chances, bonus, finalLevel) {
|
||||
if (bonus && finalLevel>-11) {
|
||||
let newScore = Number(chances.score) + bonus;
|
||||
mergeObject(chances, this._computeCell(null, newScore), { overwrite: true });
|
||||
mergeObject(chances, this._computeCell(undefined, newScore), { overwrite: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user