mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
DamageDialog handlebars improvement
This commit is contained in:
parent
21daa7f3c0
commit
6273394db8
2 changed files with 51 additions and 33 deletions
|
|
@ -17,6 +17,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
.section-header {
|
||||
font-size: var(--font-size-20);
|
||||
color: light-dark(@dark, @beige);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bonuses {
|
||||
gap: 4px;
|
||||
.critical-chip {
|
||||
|
|
|
|||
|
|
@ -15,14 +15,53 @@
|
|||
{{/each}}
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if @root.damageFormula}}
|
||||
{{> formula @root.damageFormula path="damageFormula"}}
|
||||
{{#with @root.damageFormula}}
|
||||
<div class="damage-formula">
|
||||
<span class="damage-resource"><b>{{localize "DAGGERHEART.GENERAL.formula"}}:</b> {{roll.formula}}</span>
|
||||
<span class="damage-details">
|
||||
{{#with (lookup @root.config.GENERAL.healingTypes applyTo)}}
|
||||
{{localize label}}
|
||||
{{/with}}
|
||||
{{#if damageTypes}}
|
||||
{{#each damageTypes as | type | }}
|
||||
{{#with (lookup @root.config.GENERAL.damageTypes type)}}
|
||||
<i class="fa-solid {{icon}}"></i>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="bonuses form-group flexrow">
|
||||
<input type="text" value="{{extraFormula}}" name="damageFormula.extraFormula" placeholder="{{localize "DAGGERHEART.GENERAL.situationalBonus"}}">
|
||||
<button class="critical-chip" data-action="toggleCritical">
|
||||
<span><i class="{{#if @root.isCritical}}fa-solid{{else}}fa-regular{{/if}} fa-circle"></i></span>
|
||||
<span class="label">{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span>
|
||||
</button>
|
||||
</div>
|
||||
{{/with}}
|
||||
{{/if}}
|
||||
|
||||
{{#each @root.resourceFormulas}}
|
||||
{{> formula path=(concat "resourceFormulas." @key)}}
|
||||
{{/each}}
|
||||
<div class="flexcol">
|
||||
{{#unless (empty @root.resourceFormulas)}}
|
||||
<div class="section-header">{{localize "Resource Drain"}}</div>
|
||||
{{/unless}}
|
||||
|
||||
{{#each @root.resourceFormulas}}
|
||||
<div class="damage-formula">
|
||||
<span class="damage-resource"><b>{{localize "DAGGERHEART.GENERAL.formula"}}:</b> {{roll.formula}}</span>
|
||||
<span class="damage-details">
|
||||
{{#with (lookup @root.config.GENERAL.healingTypes applyTo)}}
|
||||
{{localize label}}
|
||||
{{/with}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="bonuses form-group flexrow">
|
||||
<input type="text" value="{{extraFormula}}" name={{concat "resourceFormulas." @key ".extraFormula"}} placeholder="{{localize "DAGGERHEART.GENERAL.situationalBonus"}}">
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
{{#if damageOptions.groupAttack}}
|
||||
<fieldset class="group-attack-container">
|
||||
|
|
@ -68,31 +107,4 @@
|
|||
<span class="label">{{localize "DAGGERHEART.GENERAL.roll"}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{#*inline "formula"}}
|
||||
<div class="damage-formula">
|
||||
<span class="damage-resource"><b>{{localize "DAGGERHEART.GENERAL.formula"}}:</b> {{roll.formula}}</span>
|
||||
<span class="damage-details">
|
||||
{{#with (lookup @root.config.GENERAL.healingTypes applyTo)}}
|
||||
{{localize label}}
|
||||
{{/with}}
|
||||
{{#unless @root.hasHealing}}
|
||||
{{#if damageTypes}}
|
||||
{{#each damageTypes as | type | }}
|
||||
{{#with (lookup @root.config.GENERAL.damageTypes type)}}
|
||||
<i class="fa-solid {{icon}}"></i>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="bonuses form-group flexrow">
|
||||
<input type="text" value="{{extraFormula}}" name={{concat path ".extraFormula"}} placeholder="{{localize "DAGGERHEART.GENERAL.situationalBonus"}}">
|
||||
<button class="critical-chip" data-action="toggleCritical">
|
||||
<span><i class="{{#if @root.isCritical}}fa-solid{{else}}fa-regular{{/if}} fa-circle"></i></span>
|
||||
<span class="label">{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span>
|
||||
</button>
|
||||
</div>
|
||||
{{/inline}}
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue