Gestions des tentatives #510
@ -84,7 +84,7 @@ export class RdDResolutionTable {
|
||||
/* -------------------------------------------- */
|
||||
static async roll(caracValue, finalLevel, rollData = {}){
|
||||
let chances = this.computeChances(caracValue, finalLevel);
|
||||
this._updateChancesWithBonus(chances, rollData.bonus);
|
||||
this._updateChancesWithBonus(chances, rollData.bonus, finalLevel);
|
||||
this._updateChancesFactor(chances, rollData.diviseurSignificative);
|
||||
chances.showDice = rollData.showDice;
|
||||
chances.rollMode = rollData.rollMode;
|
||||
@ -121,8 +121,8 @@ export class RdDResolutionTable {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static _updateChancesWithBonus(chances, bonus) {
|
||||
if (bonus) {
|
||||
static _updateChancesWithBonus(chances, bonus, finalLevel) {
|
||||
if (bonus && finalLevel>-11) {
|
||||
let newScore = Number(chances.score) + bonus;
|
||||
mergeObject(chances, this._computeCell(null, newScore), { overwrite: true });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user