mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Feature] Damage-Reroll (#753)
* Added rerolls for damage dice in chat * Fixed multiple dice * Added reroll icon * Fixed new style of dialog
This commit is contained in:
parent
2aaab73699
commit
300719c116
28 changed files with 1094 additions and 167 deletions
35
templates/dialogs/rerollDialog/damage/main.hbs
Normal file
35
templates/dialogs/rerollDialog/damage/main.hbs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<div class="reroll-outer-container">
|
||||
{{#each damage}}
|
||||
<h2>{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' @key '.name')}}</h2>
|
||||
{{#each this}}
|
||||
<div class="dices-container">
|
||||
{{#each this}}
|
||||
<fieldset class="dice-outer-container">
|
||||
<legend>
|
||||
<input class="to-reroll-input" type="checkbox" data-type="{{@../../key}}" data-part="{{@../key}}" data-dice="{{@key}}" {{checked this.toReroll}} />
|
||||
<i class="fa-solid fa-dice"></i>
|
||||
<span>{{this.selectedResults}}/{{this.maxSelected}} Selected</span>
|
||||
</legend>
|
||||
|
||||
<div class="dice-container">
|
||||
{{#each this.results}}
|
||||
<div
|
||||
class="result-container {{../dice}} {{#if this.active}}selected{{/if}}"
|
||||
data-action="selectRoll" data-type="{{@../../../key}}" data-part="{{@../../key}}" data-dice="{{@../key}}" data-result="{{@key}}"
|
||||
>
|
||||
{{this.result}}
|
||||
{{#if this.active}}
|
||||
<a class="to-reroll-result" data-action="toggleResult" data-type="{{@../../../key}}" data-part="{{@../../key}}" data-dice="{{@../key}}" data-result="{{@key}}">
|
||||
<input class="to-reroll-result-input" type="checkbox" {{checked this.toReroll}} />
|
||||
<i class="fa-solid fa-dice"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</div>
|
||||
4
templates/dialogs/rerollDialog/footer.hbs
Normal file
4
templates/dialogs/rerollDialog/footer.hbs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<footer>
|
||||
<button type="button" data-action="doReroll" {{disabled disabledReroll}}>{{localize "Reroll"}} <i class="fa-solid fa-dice"></i></button>
|
||||
<button type="button" data-action="save" {{disabled saveDisabled}}>{{localize "DAGGERHEART.APPLICATIONS.RerollDialog.acceptCurrentRolls"}}</button>
|
||||
</footer>
|
||||
35
templates/dialogs/rerollDialog/main.hbs
Normal file
35
templates/dialogs/rerollDialog/main.hbs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<div class="reroll-outer-container">
|
||||
{{#each damage}}
|
||||
<h2>{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' @key '.name')}}</h2>
|
||||
{{#each this}}
|
||||
<div class="dices-container">
|
||||
{{#each this}}
|
||||
<fieldset class="dice-outer-container">
|
||||
<legend>
|
||||
<input class="to-reroll-input" type="checkbox" data-type="{{@../../key}}" data-part="{{@../key}}" data-dice="{{@key}}" {{checked this.toReroll}} />
|
||||
<i class="fa-solid fa-dice"></i>
|
||||
<span>{{this.selectedResults}}/{{this.results.length}} Selected</span>
|
||||
</legend>
|
||||
|
||||
<div class="dice-container">
|
||||
{{#each this.results}}
|
||||
<div
|
||||
class="result-container {{../dice}} {{#if this.active}}selected{{/if}}"
|
||||
data-action="selectRoll" data-type="{{@../../../key}}" data-part="{{@../../key}}" data-dice="{{@../key}}" data-result="{{@key}}"
|
||||
>
|
||||
{{this.result}}
|
||||
{{#if this.active}}
|
||||
<a class="to-reroll-result" data-action="toggleResult" data-type="{{@../../../key}}" data-part="{{@../../key}}" data-dice="{{@../key}}" data-result="{{@key}}">
|
||||
<input class="to-reroll-result-input" type="checkbox" {{checked this.toReroll}} />
|
||||
<i class="fa-solid fa-dice"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue