mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
Fixes to adversary rolls
This commit is contained in:
parent
564dcf8932
commit
dfb2c6bd3c
9 changed files with 54 additions and 188 deletions
|
|
@ -152,45 +152,6 @@ const renderDualityButton = async event => {
|
|||
}
|
||||
};
|
||||
await target.diceRoll(config);
|
||||
|
||||
// Delete when new roll logic test done
|
||||
/* const button = event.currentTarget;
|
||||
const attributeValue = button.dataset.attribute?.toLowerCase();
|
||||
|
||||
const target = getCommandTarget();
|
||||
if (!target) return;
|
||||
|
||||
const rollModifier = attributeValue ? target.system.attributes[attributeValue].data.value : null;
|
||||
const { roll, hope, fear, advantage, disadvantage, modifiers } = await target.diceRoll({
|
||||
title: button.dataset.label,
|
||||
value: rollModifier
|
||||
});
|
||||
|
||||
const systemData = new DHDualityRoll({
|
||||
title: button.dataset.label,
|
||||
origin: target.id,
|
||||
roll: roll._formula,
|
||||
modifiers: modifiers,
|
||||
hope: hope,
|
||||
fear: fear,
|
||||
advantage: advantage,
|
||||
disadvantage: disadvantage
|
||||
});
|
||||
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const msgData = {
|
||||
type: 'dualityRoll',
|
||||
sound: CONFIG.sounds.dice,
|
||||
system: systemData,
|
||||
user: game.user.id,
|
||||
content: await foundry.applications.handlebars.renderTemplate(
|
||||
'systems/daggerheart/templates/chat/duality-roll.hbs',
|
||||
systemData
|
||||
),
|
||||
rolls: [roll]
|
||||
};
|
||||
|
||||
await cls.create(msgData); */
|
||||
};
|
||||
|
||||
Hooks.on('renderChatMessageHTML', (_, element) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue