Add initiative rolls
This commit is contained in:
@@ -63,9 +63,14 @@ export default class OathHammerMiracleDialog {
|
||||
rejectClose: false,
|
||||
buttons: [{
|
||||
label: game.i18n.localize("OATHHAMMER.Dialog.InvokeMiracle"),
|
||||
callback: (_ev, btn) => Object.fromEntries(
|
||||
[...btn.form.elements].filter(e => e.name).map(e => [e.name, e.value])
|
||||
),
|
||||
callback: (_ev, btn) => {
|
||||
const out = {}
|
||||
for (const el of btn.form.elements) {
|
||||
if (!el.name) continue
|
||||
out[el.name] = el.type === "checkbox" ? String(el.checked) : el.value
|
||||
}
|
||||
return out
|
||||
},
|
||||
}],
|
||||
})
|
||||
|
||||
@@ -78,6 +83,7 @@ export default class OathHammerMiracleDialog {
|
||||
isRitual,
|
||||
bonus: parseInt(result.bonus) || 0,
|
||||
visibility: result.visibility ?? game.settings.get("core", "rollMode"),
|
||||
explodeOn5: result.explodeOn5 === "true",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user