mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
Merged with action branch
This commit is contained in:
commit
90e7000b9c
19 changed files with 280 additions and 496 deletions
|
|
@ -1,33 +1,51 @@
|
|||
<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">
|
||||
<ol class="dice-rolls">
|
||||
<div class="dice-hope-container">
|
||||
{{#each dice}}
|
||||
<div class="wrapper">
|
||||
<section class="tooltip-part">
|
||||
<div class="dice">
|
||||
{{#each roll.dice}}
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">{{number}}{{denomination}}</span>
|
||||
<span class="part-formula">{{formula}}</span>
|
||||
<span class="part-total">{{total}}</span>
|
||||
</header>
|
||||
<div class="flexrow">
|
||||
<ol class="dice-rolls">
|
||||
{{#each results}}
|
||||
<li class="roll die {{../denomination}}{{#if discarded}} discarded{{/if}} min">{{result}}</li>
|
||||
<li class="roll die {{../dice}}{{#if discarded}} discarded{{/if}} min">{{result}}</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
<div class="attack-roll-advantage-container">{{#if ../advantageState}}{{localize "DAGGERHEART.General.Advantage.Full"}}{{/if}}{{#if (eq ../advantageState false)}}{{localize "DAGGERHEART.General.Disadvantage.Full"}}{{/if}}</div>
|
||||
<div class="attack-roll-advantage-container">
|
||||
{{#if (eq ../roll.advantage.type 1)}}{{localize "DAGGERHEART.General.Advantage.Full"}}{{/if}}{{#if (eq ../roll.advantage.type -1)}}{{localize "DAGGERHEART.General.Disadvantage.Full"}}{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="modifiers-container">
|
||||
{{#each modifiers}}
|
||||
<li class="modifier-value" data-value="{{value}}" title="{{title}}">{{label}}</li>
|
||||
{{/each}}
|
||||
</div>
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dice-total">
|
||||
<div class="dice-total-value">{{roll.total}}</div>
|
||||
</div>
|
||||
{{#if (gt targets.length 0)}}
|
||||
<div class="target-section">
|
||||
{{#each targets as |target|}}
|
||||
<div class="dice-total target-container {{#if target.hit}}hit{{else}}miss{{/if}}" data-token="{{target.id}}">
|
||||
<img src="{{target.img}}" />
|
||||
<div class="target-inner-container">
|
||||
{{#if target.hit}}{{localize "Hit"}}{{else}}{{localize "Miss"}}{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if hasDamage}}
|
||||
<div class="flexrow">
|
||||
<button class="duality-action duality-action-damage" data-value="{{roll.total}}"><span>Roll Damage</span></button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -49,13 +49,43 @@
|
|||
|
||||
<fieldset class="two-columns even">
|
||||
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Attack"}}</legend>
|
||||
<button data-action="attackConfigure">Configure</button>
|
||||
<button data-action="attackRoll">Attack</button>
|
||||
<fieldset class="action-category" style="grid-column: 1 / -1;">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="range">
|
||||
<div>Name</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formGroup systemFields.attack.fields.name value=source.system.attack.name name="system.attack.name"}}
|
||||
{{formGroup systemFields.attack.fields.img value=source.img label="Icon" name="system.attack.img"}}
|
||||
</div>
|
||||
</fieldset>
|
||||
<div>
|
||||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="range">
|
||||
<div>Bonus</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formField systemFields.attack.fields.roll.fields.bonus value=source.system.attack.roll.bonus name="system.attack.roll.bonus"}}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{> 'systems/daggerheart/templates/views/actionTypes/range-target.hbs' fields=(object range=systemFields.attack.fields.range target=systemFields.attack.fields.target.fields) source=(object target=source.system.attack.target range=source.system.attack.range) path="system.attack."}}
|
||||
</div>
|
||||
{{> 'systems/daggerheart/templates/views/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=source.system.attack.damage path="system.attack."}}
|
||||
<div style="grid-column: 1 / -1;">
|
||||
{{> 'systems/daggerheart/templates/views/actionTypes/effect.hbs'}}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{{!-- <legend>{{localize "DAGGERHEART.Sheets.Adversary.Attack"}}</legend>
|
||||
|
||||
{{formGroup systemFields.attack.fields.name value=source.system.attack.name}}
|
||||
<button data-action="attackRoll">Attack</button>
|
||||
{{formGroup systemFields.attack.fields.modifier value=source.system.attack.modifier}}
|
||||
{{formGroup systemFields.attack.fields.range value=source.system.attack.range localize=true}}
|
||||
{{formGroup systemFields.attack.fields.damage.fields.value value=source.system.attack.damage.value}}
|
||||
{{formGroup systemFields.attack.fields.damage.fields.type value=source.system.attack.damage.type localize=true}}
|
||||
{{formGroup systemFields.attack.fields.damage.fields.type value=source.system.attack.damage.type localize=true}} --}}
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -33,8 +33,10 @@
|
|||
</fieldset>
|
||||
</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">
|
||||
|
|
|
|||
|
|
@ -4,33 +4,49 @@
|
|||
<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>
|
||||
{{!-- <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}}
|
||||
{{#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 @root.isNPC}}
|
||||
{{formField ../fields.custom.fields.enabled value=dmg.custom.enabled name=(concat ../path "damage.parts." index ".custom.enabled")}}
|
||||
{{#if dmg.custom.enabled}}
|
||||
{{formField ../../fields.custom.fields.formula value=dmg.custom.formula name=(concat "damage.parts." realIndex ".custom.formula") localize=true}}
|
||||
{{formField ../fields.custom.fields.formula value=dmg.custom.formula name=(concat ../path "damage.parts." index ".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.flatMultiplier value=dmg.flatMultiplier name=(concat "damage.parts." realIndex ".flatMultiplier") label="Multiplier" }}
|
||||
{{formField ../fields.dice value=dmg.dice name=(concat ../path "damage.parts." index ".dice")}}
|
||||
{{formField ../fields.bonus value=dmg.bonus name=(concat ../path "damage.parts." index ".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}}
|
||||
{{else}}
|
||||
{{#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}}
|
||||
{{else}}
|
||||
<div class="multi-display">
|
||||
{{formField ../../fields.multiplier value=dmg.multiplier name=(concat "damage.parts." realIndex ".multiplier") localize=true}}
|
||||
{{#if (eq dmg.multiplier 'flat')}}{{formField ../../fields.flatMultiplier value=dmg.flatMultiplier name=(concat "damage.parts." realIndex ".flatMultiplier") }}{{/if}}
|
||||
{{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}}
|
||||
</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}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
@ -3,15 +3,15 @@
|
|||
<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">
|
||||
<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="target.amount" }}
|
||||
{{ 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="target.type" localize=true }}
|
||||
{{ formField fields.target.type value=source.target.type label="Target" name=(concat path "target.type") localize=true }}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -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}}
|
||||
{{formField fields.difficulty label="Difficulty" name="roll.difficulty" value=source.difficulty}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</fieldset>
|
||||
Loading…
Add table
Add a link
Reference in a new issue