Correction sur usage BA sur un jet impair au D20
This commit is contained in:
@@ -209,7 +209,7 @@ export class MournbladeUtility {
|
||||
static createArrayOptionList(min, max) {
|
||||
let options = [];
|
||||
for (let i = min; i <= max; i++) {
|
||||
options.push({key:`${i}`, label:`${i}`});
|
||||
options.push({ key: `${i}`, label: `${i}` });
|
||||
}
|
||||
return options;
|
||||
}
|
||||
@@ -298,7 +298,11 @@ export class MournbladeUtility {
|
||||
}
|
||||
}
|
||||
}
|
||||
this.computeQualityResult(rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static computeQualityResult(rollData) {
|
||||
//console.log("Result : ", rollData)
|
||||
if (rollData.difficulte > 0 && !rollData.isDramatique) {
|
||||
rollData.isSuccess = (rollData.finalResult >= rollData.difficulte)
|
||||
@@ -517,7 +521,7 @@ export class MournbladeUtility {
|
||||
}
|
||||
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-mournblade/templates/chat-degats-result.html`, rollData)
|
||||
content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-mournblade/templates/chat-degats-result.html`, rollData)
|
||||
}, rollData)
|
||||
|
||||
}
|
||||
@@ -568,17 +572,17 @@ export class MournbladeUtility {
|
||||
|
||||
rollData.finalResult += rollData.bonusRoll.total
|
||||
|
||||
this.computeResult(rollData)
|
||||
this.computeQualityResult(rollData)
|
||||
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-mournblade/templates/chat-generic-result.html`, rollData)
|
||||
content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-mournblade/templates/chat-generic-result.html`, rollData)
|
||||
}, rollData)
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getUsers(filter) {
|
||||
return game.users.filter(filter).map(user => user.data._id);
|
||||
return game.users.filter(filter).map(user => user._id);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -766,7 +770,7 @@ export class MournbladeUtility {
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
let actor = MournbladeUtility.getActorFromRollData(rollData)
|
||||
if (rollData.competence) {
|
||||
let nbPred = rollData.competence.data.predilections.filter(pred => !pred.used).length
|
||||
let nbPred = rollData.competence.system.predilections.filter(pred => !pred.used).length
|
||||
return (!rollData.isReroll && rollData.competence && nbPred > 0)
|
||||
}
|
||||
return false
|
||||
@@ -776,7 +780,7 @@ export class MournbladeUtility {
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
let actor = MournbladeUtility.getActorFromRollData(rollData)
|
||||
if (rollData.competence) {
|
||||
return rollData.competence.data.doublebonus
|
||||
return rollData.competence.system.doublebonus
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user