// HbM Pool Roll - prompts for pool size and threshold, then rolls a d6 pool. const result = await Dialog.prompt({ title: 'Rzut puli d6', content: `
`, label: 'Rzuć', callback: (html) => { const fd = new foundry.applications.ux.FormDataExtended(html.querySelector('form')).object; return { pool: Number(fd.pool), threshold: Number(fd.threshold) }; }, }); if (!result) return; const formula = `${result.pool}d6cs>=${result.threshold}`; const roll = await new Roll(formula).evaluate(); await roll.toMessage({ flavor: `Pula d6 (TS ${result.threshold})` });