mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 13:11:08 +01:00
Updated DiceSoNice for Duality Rolls
This commit is contained in:
parent
233a3a5407
commit
d81c28ed09
4 changed files with 69 additions and 48 deletions
|
|
@ -11,7 +11,7 @@ import DhpPlayers from './module/ui/players.mjs';
|
|||
import DhpRuler from './module/ui/ruler.mjs';
|
||||
import DhpTokenRuler from './module/ui/tokenRuler.mjs';
|
||||
import { dualityRollEnricher, getDualityMessage } from './module/enrichers/DualityRollEnricher.mjs';
|
||||
import { getCommandTarget, rollCommandToJSON } from './module/helpers/utils.mjs';
|
||||
import { getCommandTarget, rollCommandToJSON, setDiceSoNiceForDualityRoll } from './module/helpers/utils.mjs';
|
||||
import { abilities } from './module/config/actorConfig.mjs';
|
||||
|
||||
globalThis.SYSTEM = SYSTEM;
|
||||
|
|
@ -213,6 +213,13 @@ Hooks.on('chatMessage', (_, message) => {
|
|||
const attributeRoll = `${attribute?.data?.value ? `${attribute.data.value > 0 ? `+${attribute.data.value}` : `${attribute.data.value}`}` : ''}`;
|
||||
const roll = new Roll(`${hopeAndFearRoll}${advantageRoll}${attributeRoll}`);
|
||||
await roll.evaluate();
|
||||
|
||||
setDiceSoNiceForDualityRoll(
|
||||
roll,
|
||||
rollCommand.advantage && !rollCommand.disadvantage,
|
||||
rollCommand.disadvantage && !rollCommand.advantage
|
||||
);
|
||||
|
||||
resolve({
|
||||
roll,
|
||||
attribute: attribute
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue