diff --git a/src/module/chat.js b/src/module/chat.js index 15835ea..41e656e 100644 --- a/src/module/chat.js +++ b/src/module/chat.js @@ -29,6 +29,12 @@ export const addChatMessageContextOptions = function(html, options) { /* -------------------------------------------- */ export const addChatMessageButtons = function(msg, html, data) { + // Hide blind rolls + let blindable = html.find('.blindable'); + if (msg.data.blind && !game.user.isGM && blindable && blindable.data('blind') === true) { + blindable.replaceWith("
???
"); + } + // Buttons let roll = html.find('.damage-roll'); if (roll.length > 0) { let total = roll.find('.dice-total'); diff --git a/src/module/dice.js b/src/module/dice.js index 936e4e4..10d7316 100644 --- a/src/module/dice.js +++ b/src/module/dice.js @@ -76,8 +76,8 @@ export class OseDice { rollMode = form ? form.rollMode.value : rollMode; // Force blind roll (ability formulas) - if (data.blindroll) { - rollMode = "blindroll"; + if (data.roll.blindroll) { + rollMode = game.user.isGM ? "selfroll" : "blindroll"; } if (["gmroll", "blindroll"].includes(rollMode)) diff --git a/src/templates/chat/roll-result.html b/src/templates/chat/roll-result.html index d31c4dc..03c579d 100644 --- a/src/templates/chat/roll-result.html +++ b/src/templates/chat/roll-result.html @@ -8,11 +8,13 @@
{{/if}} - {{#if result.details}}
{{{result.details}}}
{{/if}} - {{#if result.isFailure}}
{{localize 'OSE.Failure'}} ({{result.target}}) -
{{/if}} - {{#if result.isSuccess}}
{{localize 'OSE.Success'}} - ({{result.target}})
{{/if}} - {{#if rollOSE}}
{{{rollOSE}}}
{{/if}} +
+ {{#if result.details}}
{{{result.details}}}
{{/if}} + {{#if result.isFailure}}
{{localize 'OSE.Failure'}} ({{result.target}}) +
{{/if}} + {{#if result.isSuccess}}
{{localize 'OSE.Success'}} + ({{result.target}})
{{/if}} + {{#if rollOSE}}
{{{rollOSE}}}
{{/if}} +
\ No newline at end of file