mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Feature/112 items use action datamodel (#194)
* Fix action for items * Cost & Range #1 * remove log * actions * Split methods * Roll classes * Begin damage * g * Actions * before main merge * Fix d20RollDialog costs check * Fix submit on close * Add uses in action dialog * Adversary Attack * 166 - Damage Reduction (#180) * Temp * Fixed Stress Reductions * Changed from index based to object * Fixed stress resources management for DamageReduction * Fix Adversary attack multiplier * Auto add Attack action to newly created weapon * Few fixes * 164 - Add Hope/Fear formula * 163 - Actor Sub Datas (#182) * Added rules/bonuses for all classes and subclasses * More * Add Save * Fix delete action button --------- Co-authored-by: WBHarry <williambjrklund@gmail.com> Co-authored-by: WBHarry <89362246+WBHarry@users.noreply.github.com>
This commit is contained in:
parent
1135669d0b
commit
3593f44612
77 changed files with 3707 additions and 1828 deletions
|
|
@ -20,21 +20,33 @@
|
|||
{{formField fields.name value=source.name label="Name" name="name"}}
|
||||
{{formField fields.img value=source.img label="Icon" name="img"}}
|
||||
{{formField fields.actionType value=source.actionType label="Type" name="actionType" localize=true}}
|
||||
{{formField fields.chatDisplay value=source.chatDisplay name="chatDisplay"}}
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="identity">
|
||||
<div>Description</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formInput fields.description value=source.description name="description" }}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{#if fields.roll}}{{> 'systems/daggerheart/templates/views/actionTypes/roll.hbs' fields=fields.roll.fields source=source.roll}}{{/if}}
|
||||
</div>
|
||||
<div class="tab {{this.tabs.config.cssClass}}" data-group="primary" data-tab="config">
|
||||
{{#unless isNPC}}
|
||||
{{> 'systems/daggerheart/templates/views/actionTypes/uses.hbs' fields=fields.uses.fields source=source.uses}}
|
||||
{{> 'systems/daggerheart/templates/views/actionTypes/cost.hbs' fields=fields.cost.element.fields source=source.cost}}
|
||||
{{/unless}}
|
||||
{{#if fields.target}}{{> 'systems/daggerheart/templates/views/actionTypes/range-target.hbs' fields=(object range=fields.range target=fields.target.fields) source=(object target=source.target range=source.range)}}{{/if}}
|
||||
</div>
|
||||
<div class="tab {{this.tabs.effect.cssClass}}" data-group="primary" data-tab="effect">
|
||||
{{#if fields.roll}}{{> 'systems/daggerheart/templates/views/actionTypes/roll.hbs' fields=fields.roll.fields source=source.roll}}{{/if}}
|
||||
{{#if fields.save}}{{> 'systems/daggerheart/templates/views/actionTypes/save.hbs' fields=fields.save.fields source=source.save}}{{/if}}
|
||||
{{#if fields.damage}}{{> 'systems/daggerheart/templates/views/actionTypes/damage.hbs' fields=fields.damage.fields.parts.element.fields source=source.damage}}{{/if}}
|
||||
{{#if fields.healing}}{{> 'systems/daggerheart/templates/views/actionTypes/healing.hbs' fields=fields.healing.fields source=source.healing}}{{/if}}
|
||||
{{#if fields.resource}}{{> 'systems/daggerheart/templates/views/actionTypes/resource.hbs' fields=fields.resource.fields source=source.resource}}{{/if}}
|
||||
{{#if fields.documentUUID}}{{> 'systems/daggerheart/templates/views/actionTypes/uuid.hbs' fields=fields.documentUUID source=source.documentUUID}}{{/if}}
|
||||
{{#if fields.effects}}{{> 'systems/daggerheart/templates/views/actionTypes/effect.hbs'}}{{/if}}
|
||||
{{#if fields.effects}}{{> 'systems/daggerheart/templates/views/actionTypes/effect.hbs' fields=fields.effects.element.fields source=source.effects}}{{/if}}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
{{#each source as |cost index|}}
|
||||
<fieldset>
|
||||
<div class="multi-display">
|
||||
{{formField ../fields.type label="Resource" value=cost.type name=(concat "cost." index ".type") localize=true}}
|
||||
{{formField ../fields.type choices=(@root.disableOption index ../fields.type.choices ../source) label="Resource" value=cost.type name=(concat "cost." index ".type") localize=true}}
|
||||
{{formField ../fields.value label="Value" value=cost.value name=(concat "cost." index ".value")}}
|
||||
</div>
|
||||
<div class="multi-display">
|
||||
|
|
|
|||
|
|
@ -4,33 +4,72 @@
|
|||
<div>Damage</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
<div class="fas fa-plus icon-button" data-action="addDamage"></div>
|
||||
{{#if @root.hasBaseDamage}}
|
||||
<div>
|
||||
{{!-- <input type="checkbox" data-action="addBaseDamage"{{#if @root.hasBaseDamage}} checked{{/if}}> --}}
|
||||
{{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" }}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#unless @root.isNPC}}
|
||||
<div class="fas fa-plus icon-button" data-action="addDamage"></div>
|
||||
{{#if @root.hasBaseDamage}}
|
||||
<div>
|
||||
{{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" }}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{#each source.parts as |dmg index|}}
|
||||
{{#with (@root.getRealIndex index) as | realIndex |}}
|
||||
<fieldset{{#if dmg.base}} disabled{{/if}}>
|
||||
{{#unless dmg.base}}
|
||||
{{formField ../../fields.custom.fields.enabled value=dmg.custom.enabled name=(concat "damage.parts." realIndex ".custom.enabled")}}
|
||||
{{/unless}}
|
||||
{{#if dmg.custom.enabled}}
|
||||
{{formField ../../fields.custom.fields.formula value=dmg.custom.formula name=(concat "damage.parts." realIndex ".custom.formula") localize=true}}
|
||||
{{#if @root.isNPC}}
|
||||
{{formField ../fields.value.fields.custom.fields.enabled value=dmg.value.custom.enabled name=(concat ../path "damage.parts." index ".value.custom.enabled")}}
|
||||
<input type="hidden" name="{{../path}}damage.parts.{{index}}.value.multiplier" value="{{dmg.value.multiplier}}">
|
||||
{{#if dmg.value.custom.enabled}}
|
||||
{{formField ../fields.value.fields.custom.fields.formula value=dmg.value.custom.formula name=(concat ../path "damage.parts." index ".value.custom.formula") localize=true}}
|
||||
{{else}}
|
||||
<div class="multi-display">
|
||||
{{formField ../../fields.multiplier value=dmg.multiplier name=(concat "damage.parts." realIndex ".multiplier") localize=true}}
|
||||
{{formField ../../fields.dice value=dmg.dice name=(concat "damage.parts." realIndex ".dice")}}
|
||||
{{formField ../../fields.bonus value=dmg.bonus name=(concat "damage.parts." realIndex ".bonus") localize=true}}
|
||||
{{formField ../fields.value.fields.flatMultiplier value=dmg.value.flatMultiplier name=(concat ../path "damage.parts." index ".value.flatMultiplier") label="Multiplier" }}
|
||||
{{formField ../fields.value.fields.dice value=dmg.value.dice name=(concat ../path "damage.parts." index ".value.dice")}}
|
||||
{{formField ../fields.value.fields.bonus value=dmg.value.bonus name=(concat ../path "damage.parts." index ".value.bonus") localize=true}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}}
|
||||
<input type="hidden" name="damage.parts.{{realIndex}}.base" value="{{dmg.base}}">
|
||||
{{#unless dmg.base}}<div class="fas fa-trash" data-action="removeDamage" data-index="{{realIndex}}"></div>{{/unless}}
|
||||
</fieldset>
|
||||
{{/with}}
|
||||
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}}
|
||||
{{else}}
|
||||
{{#with (@root.getRealIndex index) as | realIndex |}}
|
||||
<fieldset{{#if dmg.base}} disabled{{/if}}>
|
||||
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}}
|
||||
{{formField ../../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." realIndex ".resultBased") localize=true}}
|
||||
{{/if}}
|
||||
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}}
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div>With Hope</div>
|
||||
</legend>
|
||||
{{> formula fields=../../fields.value.fields type=../../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div>With Fear</div>
|
||||
</legend>
|
||||
{{> formula fields=../../fields.valueAlt.fields type=../../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" realIndex=realIndex}}
|
||||
</fieldset>
|
||||
{{else}}
|
||||
{{> formula fields=../../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
||||
{{/if}}
|
||||
{{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}}
|
||||
<input type="hidden" name="damage.parts.{{realIndex}}.base" value="{{dmg.base}}">
|
||||
{{#unless dmg.base}}<div class="fas fa-trash" data-action="removeDamage" data-index="{{realIndex}}"></div>{{/unless}}
|
||||
</fieldset>
|
||||
{{/with}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
{{#*inline "formula"}}
|
||||
{{#unless dmg.base}}
|
||||
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "damage.parts." realIndex "." target ".custom.enabled")}}
|
||||
{{/unless}}
|
||||
{{#if source.custom.enabled}}
|
||||
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat "damage.parts." realIndex "." target ".custom.formula") localize=true}}
|
||||
{{else}}
|
||||
<div class="multi-display">
|
||||
{{formField fields.multiplier value=source.multiplier name=(concat "damage.parts." realIndex "." target ".multiplier") localize=true}}
|
||||
{{#if (eq source.multiplier 'flat')}}{{formField fields.flatMultiplier value=source.flatMultiplier name=(concat "damage.parts." realIndex ".flatMultiplier") }}{{/if}}
|
||||
{{formField fields.dice value=source.dice name=(concat "damage.parts." realIndex "." target ".dice")}}
|
||||
{{formField fields.bonus value=source.bonus name=(concat "damage.parts." realIndex "." target ".bonus") localize=true}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/inline}}
|
||||
|
|
@ -4,15 +4,31 @@
|
|||
</legend>
|
||||
<div class="action-category-data open" data-key="effects">
|
||||
<div class="fas fa-plus icon-button" data-action="addEffect"></div>
|
||||
{{#each @root.effects as | effect index | }}
|
||||
{{!-- {{#each @root.effects as | effect index | }}
|
||||
<fieldset>
|
||||
{{!-- <div class="multi-display"> --}}
|
||||
<div class="multi-display">
|
||||
<div class="form-group">
|
||||
<img src="{{img}}">
|
||||
<label data-action="editEffect">{{name}}</label>
|
||||
<div class="fas fa-trash" data-action="removeEffect" data-index="{{index}}"></div>
|
||||
</div>
|
||||
{{!-- </div> --}}
|
||||
{{formfield }}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/each}} --}}
|
||||
{{#each source as | effect index |}}
|
||||
<fieldset data-effect-id="{{effect._id}}">
|
||||
<div class="multi-display">
|
||||
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
||||
<div class="form-group" data-action="editEffect">
|
||||
<img src="{{img}}">
|
||||
<label>{{name}}</label>
|
||||
<div class="fas fa-trash" data-action="removeEffect" data-index="{{index}}"></div>
|
||||
</div>
|
||||
{{/with}}
|
||||
<input type="hidden" name="effects.{{index}}._id" value="{{effect._id}}">
|
||||
{{formField ../fields.onSave value=effect.onSave name=(concat "effects." index ".onSave")}}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,16 +6,38 @@
|
|||
<div class="action-category-data open">
|
||||
<fieldset>
|
||||
{{formField fields.type value=source.type name="healing.type" localize=true}}
|
||||
<div class="multi-display">
|
||||
{{formField fields.value.fields.custom.fields.enabled value=source.value.custom.enabled name="healing.value.custom.enabled"}}
|
||||
{{#if source.value.custom.enabled}}
|
||||
{{formField fields.value.fields.custom.fields.formula value=source.value.custom.formula name="healing.value.custom.formula" localize=true}}
|
||||
{{else}}
|
||||
{{formField fields.value.fields.multiplier value=source.value.multiplier name="healing.value.multiplier" localize=true}}
|
||||
{{formField fields.value.fields.dice value=source.value.dice name="healing.value.dice"}}
|
||||
{{formField fields.value.fields.bonus value=source.value.bonus name="healing.value.bonus" localize=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (and (not @root.isNPC) @root.hasRoll)}}
|
||||
{{formField fields.resultBased value=source.resultBased name="healing.resultBased" localize=true}}
|
||||
{{/if}}
|
||||
{{#if (and (not @root.isNPC) @root.hasRoll source.resultBased)}}
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div>With Hope</div>
|
||||
</legend>
|
||||
{{> formula fields=fields.value.fields source=source.value target="value"}}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div>With Fear</div>
|
||||
</legend>
|
||||
{{> formula fields=fields.valueAlt.fields source=source.valueAlt target="valueAlt"}}
|
||||
</fieldset>
|
||||
{{else}}
|
||||
{{> formula fields=fields.value.fields source=source.value target="value"}}
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
{{#*inline "formula"}}
|
||||
<div class="multi-display">
|
||||
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "healing." target ".custom.enabled")}}
|
||||
{{#if source.custom.enabled}}
|
||||
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat "healing." target ".custom.formula") localize=true}}
|
||||
{{else}}
|
||||
{{formField fields.multiplier value=source.multiplier name=(concat "healing." target ".multiplier") localize=true}}
|
||||
{{formField fields.dice value=source.dice name=(concat "healing." target ".dice")}}
|
||||
{{formField fields.bonus value=source.bonus name=(concat "healing." target ".bonus") localize=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
|
@ -3,11 +3,16 @@
|
|||
<div>Range{{#if fields.target}} & Target{{/if}}</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formField fields.range value=source.range label="Range" name="range" localize=true}}
|
||||
{{formField fields.range value=source.range label="Range" name=(concat path "range") localize=true}}
|
||||
</div>
|
||||
{{#if fields.target}}
|
||||
<div class="action-category-data open">
|
||||
{{formField fields.target.type value=source.target.type label="Target" name="target.type" localize=true}}
|
||||
<div class="multi-display">
|
||||
{{#if (and source.target.type (not (eq source.target.type 'self')))}}
|
||||
{{ formField fields.target.amount value=source.target.amount label="Amount" name=(concat path "target.amount") }}
|
||||
{{/if}}
|
||||
{{ formField fields.target.type value=source.target.type label="Target" name=(concat path "target.type") localize=true }}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
|
|
@ -3,8 +3,12 @@
|
|||
<div>Roll</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formField fields.type label="Type" name="roll.type" value=source.type localize=true}}
|
||||
{{formField fields.trait label="Trait" name="roll.trait" value=source.trait localize=true}}
|
||||
{{formField fields.difficulty label="Difficulty" name="roll.difficulty" value=source.difficulty}}
|
||||
{{#if @root.isNPC}}
|
||||
{{formField fields.bonus label="Bonus" name="roll.bonus" value=source.bonus}}
|
||||
{{else}}
|
||||
{{formField fields.type label="Type" name="roll.type" value=source.type localize=true}}
|
||||
{{formField fields.trait label="Trait" name="roll.trait" value=source.trait localize=true disabled=(not source.type)}}
|
||||
{{formField fields.difficulty label="Difficulty" name="roll.difficulty" value=source.difficulty disabled=(not source.type)}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</fieldset>
|
||||
10
templates/views/actionTypes/save.hbs
Normal file
10
templates/views/actionTypes/save.hbs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="roll">
|
||||
<div>Save</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formField fields.trait label="Trait" name="save.trait" value=source.trait localize=true}}
|
||||
{{formField fields.difficulty label="Difficulty" name="save.difficulty" value=source.difficulty disabled=(not source.trait)}}
|
||||
{{formField fields.damageMod label="Damage on Save" name="save.damageMod" value=source.damageMod localize=true disabled=(not source.trait)}}
|
||||
</div>
|
||||
</fieldset>
|
||||
24
templates/views/costSelection.hbs
Normal file
24
templates/views/costSelection.hbs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<div>
|
||||
{{#if uses}}
|
||||
<div class="form-group">
|
||||
<div class="form-fields">
|
||||
<label for="uses.enabled">Uses: {{uses.value}}/{{uses.max}}</label>
|
||||
<input name="uses.enabled" type="checkbox"{{#if uses.enabled}} checked{{/if}}>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#each costs as | cost index |}}
|
||||
<div class="form-group">
|
||||
<div class="form-fields">
|
||||
<label for="{{type}}">{{type}}: {{total}}</label>
|
||||
<input name="costs.{{index}}.enabled" type="checkbox"{{#if enabled}} checked{{/if}}>
|
||||
{{#if scalable}}
|
||||
<input type="range" value="{{scale}}" min="1" max="10" step="{{step}}" name="costs.{{index}}.scale">
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{!-- <footer>
|
||||
<button data-action="sendCost"{{#unless canUse}} disabled{{/unless}}>Accept</button>
|
||||
</footer> --}}
|
||||
</div>
|
||||
76
templates/views/damageReduction.hbs
Normal file
76
templates/views/damageReduction.hbs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<div class="damage-reduction-container">
|
||||
<div class="section-container padded">
|
||||
<div class="resources-container">
|
||||
<div class="resource-container">
|
||||
<h4 class="armor-title">{{localize "DAGGERHEART.DamageReduction.ArmorMarks"}}</h4>
|
||||
<div class="markers-subtitle">{{armorMarks}}/{{armorScore}}</div>
|
||||
</div>
|
||||
{{#if this.stress}}
|
||||
<div class="resource-container">
|
||||
<h4 class="armor-title">{{localize "DAGGERHEART.DamageReduction.Stress"}}</h4>
|
||||
<div class="markers-subtitle">{{this.stress.value}}/{{this.stress.maxTotal}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-container">
|
||||
<h4 class="mark-selection divider">
|
||||
<div class="mark-selection-inner">
|
||||
{{#each marks.armor}}
|
||||
<div
|
||||
class="mark-container {{#if this.selected}}selected{{/if}}"
|
||||
data-action="setMarks" data-key="{{@key}}" data-type="armor"
|
||||
>
|
||||
<i class="fa-solid fa-shield"></i>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="mark-selection-inner">
|
||||
{{#each marks.stress}}
|
||||
<div
|
||||
class="mark-container {{#if this.selected}}selected{{/if}} {{#if (not @root.basicMarksUsed)}}inactive{{/if}}"
|
||||
{{#if @root.basicMarksUsed}}data-action="setMarks"{{/if}} data-key="{{@key}}" data-type="stress" data-tooltip="{{#if @root.basicMarksUsed}}{{localize "DAGGERHEART.DamageReduction.ArmorWithStress"}}{{else}}{{localize "DAGGERHEART.DamageReduction.UnncessaryStress"}}{{/if}}"
|
||||
>
|
||||
<i class="fa-solid fa-bolt"></i>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</h4>
|
||||
<div class="markers-subtitle bold">{{localize "DAGGERHEART.DamageReduction.UsedMarks"}}</div>
|
||||
</div>
|
||||
|
||||
<div class="resources-container">
|
||||
<div class="resource-container">
|
||||
<h4 class="armor-title">{{localize "DAGGERHEART.DamageReduction.StressReduction"}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#each availableStressReductions}}
|
||||
<div class="section-container">
|
||||
<h4 class="stress-reduction-container divider">
|
||||
<div class="stress-reduction {{#if (eq this.from @root.currentDamage)}}active{{/if}} {{#if this.selected}}selected{{/if}}" data-action="useStressReduction" data-reduction="{{@key}}">
|
||||
{{this.from}}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
{{this.to}}
|
||||
<div class="stress-reduction-cost">
|
||||
{{this.cost}}
|
||||
<i class="fa-solid fa-bolt"></i>
|
||||
</div>
|
||||
</div>
|
||||
</h4>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
<footer class="padded">
|
||||
<button type="button" data-action="takeDamage">
|
||||
{{localize "Take"}}
|
||||
<div class="damage-value {{#if this.reducedDamage}}reduced-value{{/if}}">{{this.damage}}</div>
|
||||
{{#if this.reducedDamage}}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
<div class="damage-value">{{this.reducedDamage}}</div>
|
||||
{{/if}}
|
||||
{{localize "Damage"}}
|
||||
</button>
|
||||
</footer>
|
||||
</div>
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
<div>
|
||||
<div class="form-group">
|
||||
<label><strong>Total Damage</strong></label>
|
||||
<label><strong>{{title}}</strong></label>
|
||||
<div class="form-fields">
|
||||
<input type="text" value="{{this.rollString}}" disabled />
|
||||
<input type="text" value="{{formula}}" disabled />
|
||||
</div>
|
||||
</div>
|
||||
{{#each this.bonusDamage as |damage index|}}
|
||||
{{!-- {{#each bonusDamage as |damage index|}}
|
||||
<div class="form-group">
|
||||
<label><strong>{{damage.description}}</strong></label>
|
||||
<div class="form-fields">
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/each}} --}}
|
||||
<footer>
|
||||
<button data-action="rollDamage">Roll</button>
|
||||
<button data-action="submitRoll">Roll</button>
|
||||
</footer>
|
||||
</div>
|
||||
|
|
@ -1,26 +1,27 @@
|
|||
<div>
|
||||
{{#if @root.hasRoll}}
|
||||
<div class="roll-dialog-container">
|
||||
<div class="flexcol">
|
||||
<div class="roll-dialog-experience-container">
|
||||
{{#each this.experiences}}
|
||||
{{#if this.description}}
|
||||
<div class="roll-dialog-chip {{#if this.selected}}selected{{/if}}" data-action="selectExperience" data-key="{{this.id}}">
|
||||
<span>{{this.description}}</span>
|
||||
<span>+{{this.value}}</span>
|
||||
{{#each experiences}}
|
||||
{{#if description}}
|
||||
<div class="roll-dialog-chip {{#if (includes ../selectedExperiences id)}}selected{{/if}}" data-action="selectExperience" data-key="{{id}}">
|
||||
<span>{{description}}</span>
|
||||
<span>+{{value}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<button class="disadvantage flex1 {{#if this.advantage}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="true">{{localize "DAGGERHEART.General.Advantage.Full"}}</button>
|
||||
<button class="disadvantage flex1 {{#if (eq this.advantage false)}}selected{{/if}}" data-action="updateIsAdvantage">{{localize "DAGGERHEART.General.Disadvantage.Full"}}</button>
|
||||
<button class="disadvantage flex1 {{#if (eq advantage 1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="1">{{localize "DAGGERHEART.General.Advantage.Full"}}</button>
|
||||
<button class="disadvantage flex1 {{#if (eq advantage -1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="-1">{{localize "DAGGERHEART.General.Disadvantage.Full"}}</button>
|
||||
</div>
|
||||
{{#if (not this.isNpc)}}
|
||||
<div class="form-group">
|
||||
{{!-- {{#if (not isNpc)}} --}}
|
||||
{{!-- <div class="form-group">
|
||||
<label>Hope</label>
|
||||
<div class="form-fields">
|
||||
<select name="hope">
|
||||
{{selectOptions this.diceOptions selected=this.hope valueAttr="value" labelAttr="name" localize=true}}
|
||||
{{selectOptions diceOptions selected=hope valueAttr="value" labelAttr="name" localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -28,14 +29,15 @@
|
|||
<label>Fear</label>
|
||||
<div class="form-fields">
|
||||
<select name="fear">
|
||||
{{selectOptions this.diceOptions selected=this.fear valueAttr="value" labelAttr="name" localize=true}}
|
||||
{{selectOptions diceOptions selected=fear valueAttr="value" labelAttr="name" localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div> --}}
|
||||
{{!-- {{/if}} --}}
|
||||
</div>
|
||||
<footer>
|
||||
<button data-action="finish">Roll</button>
|
||||
</footer>
|
||||
</div>
|
||||
{{/if}}
|
||||
<footer>
|
||||
<button data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}>Roll</button>
|
||||
</footer>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue