mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 13:11:08 +01:00
/fr now supports type=X, where X is Hope or Fear, if not supplied, defaults to Hope
This commit is contained in:
parent
bfd8031ecf
commit
265e35b680
4 changed files with 49 additions and 13 deletions
|
|
@ -34,14 +34,15 @@ export const renderFateButton = async event => {
|
|||
{
|
||||
target,
|
||||
title: button.dataset.title,
|
||||
label: button.dataset.label
|
||||
label: button.dataset.label,
|
||||
fateType
|
||||
},
|
||||
event
|
||||
);
|
||||
};
|
||||
|
||||
export const enrichedFateRoll = async (
|
||||
{ target, title, label },
|
||||
{ target, title, label, fateType },
|
||||
event
|
||||
) => {
|
||||
const config = {
|
||||
|
|
@ -50,14 +51,15 @@ export const enrichedFateRoll = async (
|
|||
roll: {
|
||||
label: label,
|
||||
},
|
||||
hasRoll: true
|
||||
hasRoll: true,
|
||||
fateType: fateType
|
||||
};
|
||||
|
||||
if (target) {
|
||||
await target.diceRoll(config);
|
||||
} else {
|
||||
// For no target, call FateRoll directly with basic data
|
||||
config.data = { experiences: {}, traits: {} };
|
||||
config.data = { experiences: {}, traits: {}, fateType: fateType };
|
||||
config.source = { actor: null };
|
||||
await CONFIG.Dice.daggerheart.FateRoll.build(config);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue