Initial import

This commit is contained in:
2021-12-02 20:18:21 +01:00
parent 522cad2ff8
commit b3f0af8c12
14 changed files with 201 additions and 286 deletions

View File

@ -7,12 +7,12 @@ export class PegasusRollDialog extends Dialog {
let html
let options = { classes: ["WotGdialog"], width: 420, height: 320, 'z-index': 99999 };
if ( rollData.mode == "skill") {
html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-skill.html', rollData);
if ( rollData.mode == "stat") {
html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-stat.html', rollData);
options.height = 320;
} else if (rollData.mode == "spec") {
html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-spec.html', rollData);
options.height = 360;
} else if (rollData.mode == "chidamage") {
html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-damage-chi.html', rollData);
options.height = 380;
} else if (rollData.mode == "technique") {
html = await renderTemplate('systems/fvtt-pegasus-rpg/templates/roll-dialog-technique.html', rollData);
options.height = 380;
@ -53,7 +53,7 @@ export class PegasusRollDialog extends Dialog {
/* -------------------------------------------- */
roll () {
PegasusUtility.rollWotG( this.rollData )
PegasusUtility.rollPegasus( this.rollData )
}
/* -------------------------------------------- */
@ -65,20 +65,14 @@ export class PegasusRollDialog extends Dialog {
}
$(function () { onLoad(); });
html.find('#negativeModifier').change((event) => {
this.rollData.negativeModifier = Number(event.currentTarget.value);
html.find('#bonusDicesLevel').change((event) => {
this.rollData.bonusDicesLevel = Number(event.currentTarget.value);
});
html.find('#positiveModifier').change((event) => {
this.rollData.positiveModifier = Number(event.currentTarget.value);
html.find('#hindranceDicesLevel').change((event) => {
this.rollData.hindranceDicesLevel = Number(event.currentTarget.value);
});
html.find('#specialtiesBonus').change((event) => {
this.rollData.specialtiesBonus = Number(event.currentTarget.value);
});
html.find('#selectedChi').change((event) => {
this.rollData.selectedChi = Number(event.currentTarget.value);
});
html.find('#bonusMalus').change((event) => {
this.rollData.bonusMalus = Number(event.currentTarget.value);
html.find('#otherDicesLevel').change((event) => {
this.rollData.otherDicesLevel = Number(event.currentTarget.value);
});
}
}