#194 : Saisie manuelle du résultat

This commit is contained in:
2021-06-28 20:19:02 +02:00
parent e9f6d5f4b9
commit 52fff9e79e
4 changed files with 20 additions and 5 deletions

View File

@ -61,7 +61,9 @@ export class RdDRoll extends Dialog {
encTotal: actor.getEncTotal(),
ajustementAstrologique: actor.ajustementAstrologique(),
surprise: actor.getSurprise(false),
canClose: true
canClose: true,
isGM: game.user.isGM,
forceDiceResult: -1
};
mergeObject(rollData, defaultRollData, { recursive: true, overwrite: false });
@ -189,6 +191,9 @@ export class RdDRoll extends Dialog {
this.rollData.diffConditions = Misc.toInt(event.currentTarget.value); // Update the selected bonus/malus
this.updateRollResult();
});
html.find('#force-dice-result').change((event) => {
this.rollData.forceDiceResult = Misc.toInt(event.currentTarget.value);
});
html.find('#carac').change((event) => {
let caracKey = event.currentTarget.value;
this.rollData.selectedCarac = this.rollData.carac[caracKey]; // Update the selectedCarac