mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Feature/165 action save (#231)
* Roll All Save button + Merge Attack & Roll Chat message * Fix conflicts again
This commit is contained in:
parent
b7e4169079
commit
8b834036fa
18 changed files with 369 additions and 140 deletions
|
|
@ -31,13 +31,30 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="dice-roll daggerheart chat roll expanded{{#unless damage.roll}} hidden{{/unless}}" data-action="expandRoll">
|
||||
<legend class="dice-flavor">Damage</legend>
|
||||
<div class="dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{> 'systems/daggerheart/templates/chat/parts/damage-chat.hbs' damage=damage noTitle=true}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{> 'systems/daggerheart/templates/chat/parts/target-chat.hbs'}}
|
||||
{{#if hasDamage}}
|
||||
<div class="dice-roll daggerheart chat roll">
|
||||
<div class="dice-result">
|
||||
<div class="flexrow">
|
||||
<button class="duality-action duality-action-damage" data-value="{{roll.total}}"><span>Roll Damage</span></button>
|
||||
{{#if damage.roll}}
|
||||
<div class="dice-actions">
|
||||
{{!-- <button class="damage-button" data-target-hit="true" {{#if (eq targets.length 0)}}disabled{{/if}}>{{localize "DAGGERHEART.Chat.DamageRoll.DealDamageToTargets"}}</button> --}}
|
||||
<button class="damage-button">{{localize "DAGGERHEART.Chat.DamageRoll.DealDamage"}}</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="flexrow">
|
||||
<button class="duality-action duality-action-damage" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.Chat.DamageRoll.RollDamage"}}</span></button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
@ -1,29 +1,4 @@
|
|||
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
|
||||
<div class="dice-flavor">{{title}}</div>
|
||||
<div class="dice-result">
|
||||
<div class="dice-formula">{{roll.formula}}</div>
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
<section class="tooltip-part">
|
||||
{{#each roll.dice}}
|
||||
<div class="dice">
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">{{formula}}</span>
|
||||
<span class="part-total">{{total}}</span>
|
||||
</header>
|
||||
<ol class="dice-rolls">
|
||||
{{#each results}}
|
||||
<li class="roll die {{../denomination}} min">{{result}}</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
{{/each}}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dice-total">{{roll.total}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{> 'systems/daggerheart/templates/chat/parts/damage-chat.hbs' damage=this}}
|
||||
{{> 'systems/daggerheart/templates/chat/parts/target-chat.hbs'}}
|
||||
<div class="dice-roll daggerheart chat roll">
|
||||
<div class="dice-result">
|
||||
|
|
|
|||
|
|
@ -94,12 +94,26 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="dice-roll daggerheart chat roll expanded{{#unless damage.roll}} hidden{{/unless}}" data-action="expandRoll">
|
||||
<legend class="dice-flavor">Damage</legend>
|
||||
<div class="dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{> 'systems/daggerheart/templates/chat/parts/damage-chat.hbs' damage=damage noTitle=true}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{> 'systems/daggerheart/templates/chat/parts/target-chat.hbs'}}
|
||||
<div class="dice-roll daggerheart chat roll">
|
||||
<div class="dice-result">
|
||||
<div class="dice-actions{{#unless (or hasDamage hasHealing)}} duality-alone{{/unless}}">
|
||||
{{#if hasDamage}}
|
||||
{{#if damage.roll}}
|
||||
<button class="duality-action damage-button" data-target-hit="true" data-value="{{roll.total}}"><span>Deal Damage</span></button>
|
||||
{{else}}
|
||||
<button class="duality-action duality-action-damage" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.Chat.AttackRoll.RollDamage"}}</span></button>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if hasHealing}}
|
||||
<button class="duality-action duality-action-healing" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.Chat.AttackRoll.RollHealing"}}</span></button>
|
||||
|
|
|
|||
27
templates/chat/parts/damage-chat.hbs
Normal file
27
templates/chat/parts/damage-chat.hbs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
|
||||
{{#unless noTitle}}<div class="dice-flavor">{{damage.title}}</div>{{/unless}}
|
||||
<div class="dice-result">
|
||||
<div class="dice-formula">{{damage.roll.formula}}</div>
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
<section class="tooltip-part">
|
||||
{{#each damage.roll.dice}}
|
||||
<div class="dice">
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">{{formula}}</span>
|
||||
<span class="part-total">{{total}}</span>
|
||||
</header>
|
||||
<ol class="dice-rolls">
|
||||
{{#each results}}
|
||||
<li class="roll die {{../dice}} min">{{result}}</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="duality-result">Total: {{damage.roll.total}}</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dice-total">{{damage.roll.total}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,22 +1,29 @@
|
|||
{{#if (gt targets.length 0)}}
|
||||
{{#if (gt currentTargets.length 0)}}
|
||||
<fieldset class="dice-roll daggerheart chat roll expanded" data-action="expandRoll">
|
||||
<legend class="dice-flavor">Targets</legend>
|
||||
<div class="dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
<div class="target-selection">
|
||||
<label class="button-target-selection{{#if @root.targetSelection}} target-selected{{/if}}" data-target-hit="true">{{localize "DAGGERHEART.Chat.DamageRoll.HitTarget"}}</label>
|
||||
<label class="button-target-selection{{#unless @root.targetSelection}} target-selected{{/unless}}">{{localize "DAGGERHEART.Chat.DamageRoll.SelectedTarget"}}</label>
|
||||
</div>
|
||||
{{#if (and hasSave @root.targetSelection @root.hasHitTarget)}}
|
||||
<button class="inner-button inner-button-right roll-all-save-button">Roll All <i class="fa-solid fa-shield"></i></button>
|
||||
{{/if}}
|
||||
<div class="target-section">
|
||||
{{#each targets as |target|}}
|
||||
{{#each currentTargets as |target|}}
|
||||
<div class="dice-total target-container {{#if target.hit}}hit{{else}}{{#if (not ../total.alternate)}}miss{{/if}}{{/if}}" data-token="{{target.id}}">
|
||||
<img src="{{target.img}}" />
|
||||
<div class="target-inner-container">
|
||||
{{#if ../directDamage}}
|
||||
{{#if (or ../directDamage (not @root.targetSelection))}}
|
||||
<div data-perm-id="{{target.actorId}}"><span>{{target.name}}</span></div>
|
||||
{{else}}
|
||||
{{#if target.hit}}{{localize "Hit"}}{{else}}{{#if (not ../total.alternate)}}{{localize "Miss"}}{{else}}?{{/if}}{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if ../hasSave}}
|
||||
<button class="target-save-container{{#if target.saved.result includeZero=true}} is-rolled{{/if}}"{{#unless target.hit}} style="visibility: hidden;"{{/unless}} data-perm-id="{{target.actorId}}">
|
||||
{{#if (and ../hasSave target.hit @root.targetSelection)}}
|
||||
<button class="target-save-container{{#if target.saved.result includeZero=true}} is-rolled{{/if}}" data-perm-id="{{target.actorId}}">
|
||||
{{!-- {{target.saved.result}} --}}
|
||||
<i class="fa-solid {{#if target.saved.result includeZero=true}}{{#if target.saved.success}}fa-check{{else}}fa-xmark{{/if}}{{else}}fa-shield{{/if}}">
|
||||
</i>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue