mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
[Feature] Encounter Battlepoints (#1346)
* Added BP calculation and tooltip breakdown of BP sources * Added Modifiers * Fixed automatic battleToggles * Corrected 'NoToughies' conditional * Fixed GM-only visibility * Fixed combatant isNPC
This commit is contained in:
parent
c3cb9121af
commit
451bef4c92
21 changed files with 712 additions and 141 deletions
29
templates/ui/tooltip/battlepoints.hbs
Normal file
29
templates/ui/tooltip/battlepoints.hbs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<div class="daggerheart dh-style tooltip">
|
||||
<div class="battlepoint-categories-container">
|
||||
<h3>{{localize "Adversaries"}} ({{currentBP}}/{{maxBP}})</h3>
|
||||
{{#each categories as |category key|}}
|
||||
{{#each category as |grouping index|}}
|
||||
<div class="battlepoint-grouping-container">
|
||||
{{#if grouping.nr}}
|
||||
<label>{{key}} BP: {{concat (localize grouping.description) ' ' '('grouping.nr 'x)'}}</label>
|
||||
{{else}}
|
||||
<label class="unselected-grouping">{{key}} BP - {{localize grouping.description}}</label>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="battlepoint-toggles-container">
|
||||
<h3>{{localize "Modifiers"}}</h3>
|
||||
{{#each toggles as |toggle|}}
|
||||
<div class="battlepoint-toggle-container {{#if (and toggle.disabled (not toggle.checked))}}inactive{{/if}}">
|
||||
{{#if toggle.disabled}}
|
||||
<i class="grouping-lock fa-solid {{#if toggle.checked}}fa-lock{{else}}fa-unlock{{/if}}"></i>
|
||||
{{else}}
|
||||
<input type="checkbox" data-combat-id="{{@root.combatId}}" data-category="{{toggle.categoryKey}}" data-grouping="{{toggle.toggleKey}}" {{checked toggle.checked}} />
|
||||
{{/if}}
|
||||
<label class="unselected-grouping">{{toggle.categoryKey}} BP: {{localize toggle.description}}</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue