mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-19 08:20:30 +01:00
Added flavor for DualityRollEnrichment
This commit is contained in:
parent
b9334447de
commit
25fc663caa
4 changed files with 24 additions and 17 deletions
|
|
@ -187,12 +187,14 @@ Hooks.on('renderHandlebarsApplication', (_, element) => {
|
|||
|
||||
Hooks.on('chatMessage', (_, message) => {
|
||||
if (message.startsWith('/dr')) {
|
||||
const rollCommand = rollCommandToJSON(message.replace(/\/dr\s?/, ''));
|
||||
if (!rollCommand) {
|
||||
const result = rollCommandToJSON(message.replace(/\/dr\s?/, ''));
|
||||
if (!result) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.dualityParsing'));
|
||||
return false;
|
||||
}
|
||||
|
||||
const { result: rollCommand, flavor } = result;
|
||||
|
||||
const reaction = rollCommand.reaction;
|
||||
const traitValue = rollCommand.trait?.toLowerCase();
|
||||
const advantage = rollCommand.advantage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue