Modify Skills again

This commit is contained in:
2022-07-31 19:32:54 +02:00
parent b0d5f441ee
commit 4b0831c427
9 changed files with 117 additions and 62 deletions

View File

@ -5,7 +5,7 @@ export class CrucibleRollDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData) {
let options = { classes: ["CrucibleDialog"], width: 420, height: 280, 'z-index': 99999 };
let options = { classes: ["CrucibleDialog"], width: 540, height: 340, 'z-index': 99999 };
let html = await renderTemplate('systems/fvtt-crucible-rpg/templates/roll-dialog-generic.html', rollData);
return new CrucibleRollDialog(actor, rollData, html, options);
@ -58,21 +58,11 @@ export class CrucibleRollDialog extends Dialog {
}
$(function () { onLoad(); });
html.find('#none-clicked').change((event) => {
this.rollData.advantage = "none"
this.refreshDialog()
html.find('#advantage').change((event) => {
this.rollData.advantage = event.currentTarget.value
})
html.find('#advantage-clicked').change((event) => {
this.rollData.advantage = "advantage"
this.refreshDialog()
})
html.find('#disadvantage-clicked').change((event) => {
this.rollData.advantage = "disadvantage"
this.refreshDialog()
})
html.find('#roll-with-advantage-clicked').change((event) => {
this.rollData.rollAdvantage = !this.rollData.rollAdvantage
this.refreshDialog()
html.find('#rollAdvantage').change((event) => {
this.rollData.rollAdvantage = event.currentTarget.value
})
html.find('#featDieName').change((event) => {
this.rollData.featDieName = event.currentTarget.value