mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 21:21:08 +01:00
[Feature] Allow Dice Reroll in ChatMessage (#395)
* Troubleshooting Created test button in 'duality-roll.hbs' and functionality in chatLog.mjs * Updated functionality dialog recheck. * Update duality-roll.hbs testing toggle on specific areas so only tooltip is triggered. Rest of CSS functionality not affected. * Redoing Dice Reroll functionality Attempting something new * The rise of NaNs Resolved Dice Parsing Errors, now dealing with parsing errors from system values. * Forcing string evaluation for testing * Fixed rerolling of duality dice * Fixed message.rolls not being updated * Added support for d20 rolls * PR fixes --------- Co-authored-by: Nikhil Nagarajan <potter.nikhil@gmail.com>
This commit is contained in:
parent
2721dfe417
commit
6301e575e3
13 changed files with 593 additions and 490 deletions
|
|
@ -12,16 +12,13 @@
|
|||
<span class="part-total">{{total}}</span>
|
||||
</header>
|
||||
<div class="flexrow">
|
||||
<ol class="dice-rolls">
|
||||
{{#each results}}
|
||||
<li class="roll die {{../dice}}{{#if discarded}} discarded{{/if}} min">{{result}}</li>
|
||||
{{/each}}
|
||||
<ol class="dice-rolls rerollable">
|
||||
<button type="checkbox" class="reroll-button" data-die-index="0" data-tooltip="{{localize "DAGGERHEART.GENERAL.reroll"}}">
|
||||
{{#each results as |result index|}}
|
||||
<li class="roll die {{../dice}}{{#if discarded}} discarded{{/if}} min">{{result.result}}</li>
|
||||
{{/each}}
|
||||
</button>
|
||||
</ol>
|
||||
{{#if (eq index 0)}}
|
||||
<div class="attack-roll-advantage-container">
|
||||
{{#if (eq ../roll.advantage.type 1)}}{{localize "DAGGERHEART.GENERAL.Advantage.full"}}{{/if}}{{#if (eq ../roll.advantage.type -1)}}{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue