mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
Added action tokens and Request functionality
This commit is contained in:
parent
0f77697614
commit
0ca0ab360e
14 changed files with 340 additions and 28 deletions
22
templates/settings/variant-rules.hbs
Normal file
22
templates/settings/variant-rules.hbs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "DAGGERHEART.Settings.Menu.VariantRules.actionTokens"}}</label>
|
||||
|
||||
<div class="form-fields">
|
||||
{{formInput settingFields.schema.fields.actionTokens.fields.enabled value=settingFields._source.actionTokens.enabled}}
|
||||
{{formInput settingFields.schema.fields.actionTokens.fields.tokens value=settingFields._source.actionTokens.tokens disabled=(not settingFields._source.actionTokens.enabled)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="form-footer">
|
||||
<button data-action="reset">
|
||||
<i class="fa-solid fa-arrow-rotate-left"></i>
|
||||
<span>{{localize "Reset"}}</span>
|
||||
</button>
|
||||
<button data-action="save" >
|
||||
<i class="fa-solid fa-floppy-disk"></i>
|
||||
<span>{{localize "Save Changes"}}</span>
|
||||
</button>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
<ol class="combat-tracker plain">
|
||||
{{#each turns}}
|
||||
<li class="combatant {{ css }}" data-combatant-id="{{ id }}" data-action="activateCombatant">
|
||||
{{!-- TODO: Targets --}}
|
||||
|
||||
{{!-- Image --}}
|
||||
<img class="token-image" src="{{ img }}" alt="{{ name }}" loading="lazy">
|
||||
|
||||
|
|
@ -38,14 +36,35 @@
|
|||
|
||||
{{!-- Resource --}}
|
||||
{{#if resource includeZero=true}}
|
||||
<div class="token-resource">
|
||||
<span class="resource">{{ resource }}</span>
|
||||
</div>
|
||||
<div class="token-resource">
|
||||
<span class="resource">{{ resource }}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if ../combat.system.started}}
|
||||
<div class="token-actions">
|
||||
<button type="button" class="inline-control combatant-control icon fa-solid fa-hand" data-action="takeSpotlight" data-combatant-id="{{id}}" data-tooltip aria-label="{{ localize "DAGGERHEART.Combat.takeSpotlight" }}"></button>
|
||||
{{#if isOwner}}
|
||||
{{#if ../actionTokens.enabled}}
|
||||
<div class="action-tokens">
|
||||
{{#times ../actionTokens.tokens}}
|
||||
<button type="button" class="inline-control main icon fa-solid fa-bolt-lightning action-token {{#if (lte ../system/actionTokens this)}}used{{/if}}" data-action="setActionTokens" data-combatant-id="{{../id}}" data-token-index="{{this}}">
|
||||
</button>
|
||||
{{/times}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if @root.user.isGM}}
|
||||
<button
|
||||
type="button" class="inline-control combatant-control discrete icon fa-solid {{#if system.spotlight.requesting}}fa-hand-sparkles requesting{{else}}fa-hand{{/if}}"
|
||||
data-action="toggleSpotlight" data-combatant-id="{{id}}" data-tooltip aria-label="{{localize "DAGGERHEART.Combat.giveSpotlight"}}"
|
||||
></button>
|
||||
{{else}}
|
||||
<button
|
||||
type="button" class="inline-control combatant-control discrete icon fa-solid {{#if system.spotlight.requesting}}fa-hand-sparkles requesting{{else}}fa-hand{{/if}}"
|
||||
data-action="requestSpotlight" data-combatant-id="{{id}}" data-tooltip aria-label="{{#if system.spotlight.requesting}}{{localize "DAGGERHEART.Combat.requestingSpotlight"}}{{else}}{{localize "DAGGERHEART.Combat.requestSpotlight"}}{{/if}}"
|
||||
></button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<div class="encounter-control-fear-container">
|
||||
<img class="dice " src="../icons/svg/d12-grey.svg"/>
|
||||
<i class="fas fa-skull encounter-control-fear"></i>
|
||||
<div class="encounter-control-counter">4</div>
|
||||
<div class="encounter-control-counter">{{fear}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue