Gestion de jets de competences et modificateurs associés
This commit is contained in:
@ -6,7 +6,7 @@ export class TeDeumRollDialog extends Dialog {
|
||||
static async create(actor, rollData) {
|
||||
|
||||
let options = { classes: ["tedeum-roll-dialog"], width: 540, height: 'fit-content', 'z-index': 99999 }
|
||||
let html = await renderTemplate('systems/fvtt-tedeum/templates/dialogs/roll-dialog-generic.hbs', rollData);
|
||||
let html = await renderTemplate('systems/fvtt-te-deum/templates/dialogs/roll-dialog-generic.hbs', rollData);
|
||||
return new TeDeumRollDialog(actor, rollData, html, options);
|
||||
}
|
||||
|
||||
@ -38,12 +38,12 @@ export class TeDeumRollDialog extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
roll() {
|
||||
EcrymeUtility.rollEcryme(this.rollData)
|
||||
TeDeumUtility.rollTeDeum(this.rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async refreshDialog() {
|
||||
const content = await renderTemplate("systems/fvtt-tedeum/templates/dialogs/roll-dialog-generic.hbs", this.rollData)
|
||||
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/roll-dialog-generic.hbs", this.rollData)
|
||||
this.data.content = content
|
||||
this.render(true)
|
||||
}
|
||||
@ -61,8 +61,15 @@ export class TeDeumRollDialog extends Dialog {
|
||||
this.rollData.bonusMalusPerso = Number(event.currentTarget.value)
|
||||
})
|
||||
html.find('#roll-difficulty').change((event) => {
|
||||
this.rollData.difficulty = Number(event.currentTarget.value) || 0
|
||||
this.rollData.difficulty = String(event.currentTarget.value) || "pardefaut"
|
||||
})
|
||||
|
||||
html.find('#roll-bonus-malus').change((event) => {
|
||||
this.rollData.bonusMalus = event.currentTarget.value || "0"
|
||||
})
|
||||
html.find('#roll-enable-providence').change((event) => {
|
||||
this.rollData.enableProvidence = event.currentTarget.checked
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user