diff --git a/src/module/dice.js b/src/module/dice.js index 10d7316..28a37a0 100644 --- a/src/module/dice.js +++ b/src/module/dice.js @@ -83,7 +83,10 @@ export class OseDice { if (["gmroll", "blindroll"].includes(rollMode)) chatData["whisper"] = ChatMessage.getWhisperRecipients("GM"); if (rollMode === "selfroll") chatData["whisper"] = [game.user._id]; - if (rollMode === "blindroll") chatData["blind"] = true; + if (rollMode === "blindroll") { + chatData["blind"] = true; + data.roll.blindroll = true; + } templateData.result = OseDice.digestResult(data, roll); @@ -190,10 +193,18 @@ export class OseDice { let rollMode = game.settings.get("core", "rollMode"); rollMode = form ? form.rollMode.value : rollMode; + // Force blind roll (ability formulas) + if (data.roll.blindroll) { + rollMode = game.user.isGM ? "selfroll" : "blindroll"; + } + if (["gmroll", "blindroll"].includes(rollMode)) chatData["whisper"] = ChatMessage.getWhisperRecipients("GM"); if (rollMode === "selfroll") chatData["whisper"] = [game.user._id]; - if (rollMode === "blindroll") chatData["blind"] = true; + if (rollMode === "blindroll") { + chatData["blind"] = true; + data.roll.blindroll = true; + } templateData.result = OseDice.digestAttackResult(data, roll); diff --git a/src/templates/chat/roll-attack.html b/src/templates/chat/roll-attack.html index 0bb9087..ae09e97 100644 --- a/src/templates/chat/roll-attack.html +++ b/src/templates/chat/roll-attack.html @@ -1,5 +1,5 @@
+ {{#if tokenId}}data-token-id="{{tokenId}}" {{/if}}>
@@ -16,22 +16,24 @@ vs {{result.victim}}
{{/if}} -
-
{{{result.details}}}
+
+
+
{{{result.details}}}
+
+ {{#if rollOSE}}
{{{rollOSE}}}
{{/if}} + {{#if result.isSuccess}} +
+
{{localize 'OSE.messages.InflictsDamage'}}
+
+
{{{rollDamage}}}
+ {{#if data.roll.save}} +
+ +
+ {{/if}} + {{/if}}
- {{#if rollOSE}}
{{{rollOSE}}}
{{/if}} - {{#if result.isSuccess}} -
-
{{localize 'OSE.messages.InflictsDamage'}}
-
-
{{{rollDamage}}}
- {{#if data.roll.save}} -
- -
- {{/if}} - {{/if}}
-
+
\ No newline at end of file