mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 20:51:07 +01:00
actions types - attack roll
This commit is contained in:
parent
4c7f3a02c4
commit
edaf5df9e0
35 changed files with 1015 additions and 165 deletions
|
|
@ -13,7 +13,7 @@
|
|||
<li class="item inventory-item">
|
||||
<div class="inventory-row" data-item-id="{{item.uuid}}">
|
||||
<div class="inventory-item-title-container">
|
||||
<div data-action="viewObject" data-value="{{item.uuid}}" class="inventory-item-title">
|
||||
<div data-action="useItem" data-value="{{item.uuid}}" class="inventory-item-title">
|
||||
<img src="{{item.img}}" />
|
||||
{{item.name}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div>
|
||||
<header>
|
||||
{{formField fields.name value=source.name label="Name" name="name" rootId=partId}}
|
||||
{{!-- {{formField fields.name value=source.name label="Name" name="name" rootId=partId}} --}}
|
||||
<nav class="sheet-tabs tabs">
|
||||
{{#each tabs as |tab|}}
|
||||
<a class="{{tab.cssClass}}" data-action="tab" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
||||
|
|
@ -11,7 +11,39 @@
|
|||
</nav>
|
||||
</header>
|
||||
<section>
|
||||
<div class="tab {{this.tabs.effects.cssClass}}" data-group="primary" data-tab="effects">
|
||||
<div class="tab {{this.tabs.base.cssClass}}" data-group="primary" data-tab="base">
|
||||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="identity">
|
||||
<div>Identity</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{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}}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{> 'systems/daggerheart/templates/views/actionTypes/roll.hbs' fields=fields.roll.fields source=source.roll}}
|
||||
</div>
|
||||
<div class="tab {{this.tabs.config.cssClass}}" data-group="primary" data-tab="config">
|
||||
{{> '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}}
|
||||
{{> '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)}}
|
||||
</div>
|
||||
<div class="tab {{this.tabs.effect.cssClass}}" data-group="primary" data-tab="effect">
|
||||
{{#if source.damage}}
|
||||
{{> 'systems/daggerheart/templates/views/actionTypes/damage.hbs' fields=fields.damage.fields.parts.element.fields source=source.damage}}
|
||||
{{/if}}
|
||||
{{!-- {{#switch source.type}}
|
||||
{{#case 'attack'}}
|
||||
{{> 'systems/daggerheart/templates/views/actionTypes/damage.hbs' fields=fields.damage.element.fields source=source.damage}}
|
||||
{{/case}}
|
||||
{{#case 'spellcast'}}
|
||||
<div>SpellCast</div>
|
||||
{{/case}}
|
||||
{{/switch}} --}}
|
||||
{{> 'systems/daggerheart/templates/views/actionTypes/effect.hbs'}}
|
||||
</div>
|
||||
{{!-- <div class="tab {{this.tabs.effects.cssClass}}" data-group="primary" data-tab="effects">
|
||||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="damage">
|
||||
<div>Damage</div>
|
||||
|
|
@ -48,14 +80,14 @@
|
|||
{{formField fields.target.fields.type value=source.target.type label="Target Type" name="target.type" rootId=partId}}
|
||||
</div>
|
||||
<div class="tab {{this.tabs.conditions.cssClass}}" data-group="primary" data-tab="conditions">
|
||||
{{!-- <h2>
|
||||
<h2>
|
||||
{{localize "Conditions"}}
|
||||
<select class="effect-select">
|
||||
{{selectOptions this.config.effectTypes selected=this.selectedEffectType labelAttr="name" localize=true blank=""}}
|
||||
</select>
|
||||
<i class="fa-solid fa-plus icon-button {{#if (not this.selectedEffectType)}}disabled{{/if}}" data-action="addCondition"></i>
|
||||
</h2> --}}
|
||||
</div>
|
||||
</h2>
|
||||
</div> --}}
|
||||
</section>
|
||||
<button type="submit">Save</button>
|
||||
{{!-- <button type="submit">Save</button> --}}
|
||||
</div>
|
||||
13
templates/views/actionSelect.hbs
Normal file
13
templates/views/actionSelect.hbs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<form id="item-action-select">
|
||||
<ul class="unlist list-select">
|
||||
{{#each actions}}
|
||||
<li>
|
||||
<label>
|
||||
<dh-icon><img src="{{ img }}"></dh-icon>
|
||||
<span>{{ name }}</span>
|
||||
<input type="radio" name="actionId" value="{{_id}}" {{#if (eq @index 0)}}checked{{/if}}>
|
||||
</label>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</form>
|
||||
13
templates/views/actionType.hbs
Normal file
13
templates/views/actionType.hbs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<form id="action-type-select">
|
||||
<ul class="unlist list-select">
|
||||
{{#each types}}
|
||||
<li>
|
||||
<label>
|
||||
<dh-icon class="dh-icon fas {{icon}}"></dh-icon>
|
||||
<span>{{localize name}}</span>
|
||||
<input type="radio" name="type" value="{{id}}" {{#if (eq @index 0)}}checked{{/if}}>
|
||||
</label>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</form>
|
||||
21
templates/views/actionTypes/cost.hbs
Normal file
21
templates/views/actionTypes/cost.hbs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="cost">
|
||||
<div>Cost</div>
|
||||
</legend>
|
||||
<div class="action-category-data open" data-key="cost">
|
||||
<div class="fas fa-plus icon-button" data-action="addElement"></div>
|
||||
{{#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.value label="Value" value=cost.value name=(concat "cost." index ".value")}}
|
||||
</div>
|
||||
<div class="multi-display">
|
||||
{{formField ../fields.scalable label="Scalable" value=cost.scalable name=(concat "cost." index ".scalable")}}
|
||||
{{formField ../fields.step label="Step" value=cost.step name=(concat "cost." index ".step")}}
|
||||
</div>
|
||||
<div class="fas fa-trash" data-action="removeElement" data-index="{{index}}"></div>
|
||||
</fieldset>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
36
templates/views/actionTypes/damage.hbs
Normal file
36
templates/views/actionTypes/damage.hbs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="effects">
|
||||
<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}}
|
||||
{{#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}}
|
||||
{{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}}
|
||||
</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}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
19
templates/views/actionTypes/effect.hbs
Normal file
19
templates/views/actionTypes/effect.hbs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="effects">
|
||||
<div>Effects</div>
|
||||
</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 | }}
|
||||
<fieldset>
|
||||
{{!-- <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> --}}
|
||||
</fieldset>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
11
templates/views/actionTypes/range-target.hbs
Normal file
11
templates/views/actionTypes/range-target.hbs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="range">
|
||||
<div>Range & Target</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formField fields.range value=source.range label="Range" name="range" localize=true}}
|
||||
</div>
|
||||
<div class="action-category-data open">
|
||||
{{formField fields.target.type value=source.target.type label="Target" name="target.type" localize=true}}
|
||||
</div>
|
||||
</fieldset>
|
||||
10
templates/views/actionTypes/roll.hbs
Normal file
10
templates/views/actionTypes/roll.hbs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="roll">
|
||||
<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}}
|
||||
</div>
|
||||
</fieldset>
|
||||
8
templates/views/actionTypes/target.hbs
Normal file
8
templates/views/actionTypes/target.hbs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="target">
|
||||
<div>Target</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formField targetField.type label="Target" name="target" rootId=partId localize=true}}
|
||||
</div>
|
||||
</fieldset>
|
||||
12
templates/views/actionTypes/uses.hbs
Normal file
12
templates/views/actionTypes/uses.hbs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="uses">
|
||||
<div>Uses</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
<div class="multi-display">
|
||||
{{formField fields.value label="Value" value=source.value name="uses.value" rootId=partId}}
|
||||
{{formField fields.max label="Max" value=source.max name="uses.max" rootId=partId}}
|
||||
</div>
|
||||
{{formField fields.recovery label="Recovery" value=source.recovery name="uses.recovery" rootId=partId localize=true}}
|
||||
</div>
|
||||
</fieldset>
|
||||
Loading…
Add table
Add a link
Reference in a new issue