Actor sheet v1

This commit is contained in:
2022-12-30 22:27:38 +01:00
parent 83119a2b82
commit 580b044c77
13 changed files with 313 additions and 874 deletions

View File

@@ -5,8 +5,8 @@ export class DarkStarsRollDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData) {
let options = { classes: ["DarkStarsDialog"], width: 540, height: 340, 'z-index': 99999 };
let html = await renderTemplate('systems/fvtt-dark-stars/templates/roll-dialog-generic.hbs', rollData);
let options = { classes: ["DarkStarsDialog"], width: 320, height: 'fit-content', 'z-index': 99999 };
let html = await renderTemplate('systems/fvtt-dark-stars/templates/apps/roll-dialog-generic.hbs', rollData);
return new DarkStarsRollDialog(actor, rollData, html, options);
}
@@ -58,26 +58,8 @@ export class DarkStarsRollDialog extends Dialog {
}
$(function () { onLoad(); });
html.find('#advantage').change((event) => {
this.rollData.advantage = event.currentTarget.value
})
html.find('#disadvantage').change((event) => {
this.rollData.disadvantage = event.currentTarget.value
})
html.find('#rollAdvantage').change((event) => {
this.rollData.rollAdvantage = event.currentTarget.value
})
html.find('#useshield').change((event) => {
this.rollData.useshield = event.currentTarget.checked
})
html.find('#hasCover').change((event) => {
this.rollData.hasCover = event.currentTarget.value
})
html.find('#situational').change((event) => {
this.rollData.situational = event.currentTarget.value
})
html.find('#distanceBonusDice').change((event) => {
this.rollData.distanceBonusDice = Number(event.currentTarget.value)
html.find('#bonusMalus').change((event) => {
this.rollData.bonusMalus = Number(event.currentTarget.value)
})
}