mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Merge branch 'main' into bug/103-enrich-htmlfield-content-before-its-used-in-applications
This commit is contained in:
commit
d26ed22e74
69 changed files with 1781 additions and 446 deletions
|
|
@ -6,7 +6,7 @@
|
|||
{{#each source as |cost index|}}
|
||||
<div class="nest-inputs">
|
||||
{{formField ../fields.scalable label="Scalable" value=cost.scalable name=(concat "cost." index ".scalable") classes="checkbox"}}
|
||||
{{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.key choices=(@root.disableOption index @root.costOptions ../source) label="Resource" value=cost.key name=(concat "cost." index ".key") localize=true}}
|
||||
{{formField ../fields.value label="Amount" value=cost.value name=(concat "cost." index ".value")}}
|
||||
{{formField ../fields.step label="Step" value=cost.step name=(concat "cost." index ".step") disabled=(not cost.scalable)}}
|
||||
<a class="btn" data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeElement" data-index="{{index}}"><i class="fas fa-trash"></i></a>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
<section class="creation-action-footer">
|
||||
<button data-action="close">{{localize "Cancel"}}</button>
|
||||
<button {{#if tabs.setup.finished}}data-action="finish"{{else}}disabled{{/if}}>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.finishCreation"}}</button>
|
||||
{{#if isLastTab}}
|
||||
<button data-action="finish" {{disabled (not tabs.setup.finished)}}>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.finishCreation"}}</button>
|
||||
{{else}}
|
||||
<button data-action="setupGoNext" {{disabled nextDisabled}}>{{localize "Next"}}</button>
|
||||
{{/if}}
|
||||
</section>
|
||||
63
templates/characterCreation/setupTabs/ancestry.hbs
Normal file
63
templates/characterCreation/setupTabs/ancestry.hbs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<section
|
||||
class='tab {{setupTabs.ancestry.cssClass}} {{setupTabs.ancestry.id}}'
|
||||
data-tab='{{setupTabs.ancestry.id}}'
|
||||
data-group='{{setupTabs.ancestry.group}}'
|
||||
>
|
||||
<div class="main-selections-container">
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "TYPES.Item.ancestry"}}</legend>
|
||||
|
||||
<div class="ancestry-name">
|
||||
<input type="text" name="ancestryName" value="{{ancestryName}}" placeholder="{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.ancestryNamePlaceholder"}}" {{disabled (not primaryAncestry.uuid)}} />
|
||||
</div>
|
||||
|
||||
<div class="ancestry-mixed-controller {{#if mixedAncestry}}active{{/if}}">
|
||||
<label class="mixed-ancestry-slider">
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.mixedAncestry"}}
|
||||
<i class="fa-solid {{#if mixedAncestry}}fa-circle-check{{else}}fa-circle{{/if}}"></i>
|
||||
</label>
|
||||
<input type="range" id="volume" class="mixed-ancestry-slider" value="{{mixedAncestry}}" min="0" max="1" />
|
||||
</div>
|
||||
|
||||
<div class="selections-outer-container">
|
||||
<div class="selections-container primary-ancestry-card">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" primaryAncestry altPartialBlock=true secondaryDisabled=secondaryAncestry.uuid mixedAncestry=mixedAncestry }}
|
||||
{{#if uuid}}
|
||||
<div class="ancestry-preview-info-container">
|
||||
<div class="ancestry-preview-label">{{name}}</div>
|
||||
<div class="ancestry-preview-features">
|
||||
<div class="ancestry-preview-feature" data-tooltip="{{concat "#item#" system.primaryFeature.uuid}}">{{system.primaryFeature.name}}</div>
|
||||
<div class="ancestry-preview-feature {{#if secondaryDisabled}}inactive{{/if}}" data-tooltip="{{concat "#item#" system.secondaryFeature.uuid}}">{{system.secondaryFeature.name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{#if mixedAncestry}}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectPrimaryAncestry"}}
|
||||
{{else}}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectAncestry"}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
|
||||
{{#if mixedAncestry}}
|
||||
<div class="selections-container secondary-ancestry-card">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" secondaryAncestry altPartialBlock=true }}
|
||||
{{#if uuid}}
|
||||
<div class="ancestry-preview-info-container">
|
||||
<div class="ancestry-preview-label">{{name}}</div>
|
||||
<div class="ancestry-preview-features">
|
||||
<div class="ancestry-preview-feature inactive" data-tooltip="{{concat "#item#" system.primaryFeature.uuid}}">{{system.primaryFeature.name}}</div>
|
||||
<div class="ancestry-preview-feature" data-tooltip="{{concat "#item#" system.secondaryFeature.uuid}}">{{system.secondaryFeature.name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectSecondaryAncestry"}}
|
||||
{{/if}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
24
templates/characterCreation/setupTabs/class.hbs
Normal file
24
templates/characterCreation/setupTabs/class.hbs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<section
|
||||
class='tab {{setupTabs.class.cssClass}} {{setupTabs.class.id}}'
|
||||
data-tab='{{setupTabs.class.id}}'
|
||||
data-group='{{setupTabs.class.group}}'
|
||||
>
|
||||
<div class="main-selections-container">
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "TYPES.Item.class"}}</legend>
|
||||
<div class="selections-outer-container">
|
||||
<div class="selections-container class-card">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" class }}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectClass"}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
|
||||
<div class="selections-container subclass-card">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" subclass disabled=(not class.img) }}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectSubclass"}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
18
templates/characterCreation/setupTabs/community.hbs
Normal file
18
templates/characterCreation/setupTabs/community.hbs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<section
|
||||
class='tab {{setupTabs.community.cssClass}} {{setupTabs.community.id}}'
|
||||
data-tab='{{setupTabs.community.id}}'
|
||||
data-group='{{setupTabs.community.group}}'
|
||||
>
|
||||
<div class="main-selections-container">
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "TYPES.Item.community"}}</legend>
|
||||
<div class="selections-outer-container">
|
||||
<div class="selections-container community-card">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" community }}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectCommunity"}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
22
templates/characterCreation/setupTabs/domainCards.hbs
Normal file
22
templates/characterCreation/setupTabs/domainCards.hbs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<section
|
||||
class='tab {{setupTabs.domainCards.cssClass}} {{setupTabs.domainCards.id}}'
|
||||
data-tab='{{setupTabs.domainCards.id}}'
|
||||
data-group='{{setupTabs.domainCards.group}}'
|
||||
>
|
||||
<div class="main-selections-container">
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "TYPES.Item.domainCard"}}</legend>
|
||||
<div class="selections-outer-container">
|
||||
{{#each domainCards as |domainCard id|}}
|
||||
<div class="selections-container domain-card" data-card="{{id}}">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" domainCard }}
|
||||
{{#each @root.class.system.domains }}
|
||||
<div>{{localize (concat "DAGGERHEART.GENERAL.Domain." this ".label")}}</div>
|
||||
{{/each}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
19
templates/characterCreation/setupTabs/experience.hbs
Normal file
19
templates/characterCreation/setupTabs/experience.hbs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<section
|
||||
class='tab {{setupTabs.experience.cssClass}} {{setupTabs.experience.id}}'
|
||||
data-tab='{{setupTabs.experience.id}}'
|
||||
data-group='{{setupTabs.experience.group}}'
|
||||
>
|
||||
<div class="main-selections-container">
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.initialExperiences"}} {{experience.nrSelected}}/{{experience.nrTotal}}</legend>
|
||||
<div class="experiences-inner-container">
|
||||
{{#each experience.values as |experience id|}}
|
||||
<div class="experience-container">
|
||||
<input class="experience-description" type="text" name="{{concat "experiences." id ".name" }}" value="{{experience.name}}" placeholder="{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.newExperience"}}" />
|
||||
<div class="experience-value">{{numberFormat this.value sign=true}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
32
templates/characterCreation/setupTabs/traits.hbs
Normal file
32
templates/characterCreation/setupTabs/traits.hbs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<section
|
||||
class='tab {{setupTabs.traits.cssClass}} {{setupTabs.traits.id}}'
|
||||
data-tab='{{setupTabs.traits.id}}'
|
||||
data-group='{{setupTabs.traits.group}}'
|
||||
>
|
||||
<div class="main-selections-container">
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.traitIncreases"}} {{traits.nrSelected}}/{{traits.nrTotal}}</legend>
|
||||
<div class="traits-container">
|
||||
<fieldset class="section-inner-container">
|
||||
<legend>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.suggestedTraits"}}</legend>
|
||||
<div class="suggested-traits-container">
|
||||
{{#each suggestedTraits}}
|
||||
<div class="suggested-trait-container">{{this}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<button class="action-button" data-action="useSuggestedTraits">{{localize "Use"}}</button>
|
||||
</fieldset>
|
||||
<div class="traits-inner-container">
|
||||
{{#each traits.values}}
|
||||
<div class="trait-container">
|
||||
<div>{{this.name}}</div>
|
||||
<select name="{{concat "traits." this.key ".value"}}" data-dtype="Number">
|
||||
{{selectOptions this.options selected=this.value valueAttr="key" labelAttr="value" blank=""}}
|
||||
</select>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -3,99 +3,11 @@
|
|||
data-tab='{{tabs.setup.id}}'
|
||||
data-group='{{tabs.setup.group}}'
|
||||
>
|
||||
<div class="main-selections-container">
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "TYPES.Item.class"}}</legend>
|
||||
<div class="selections-outer-container">
|
||||
<div class="selections-container class-card">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" class }}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectClass"}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
|
||||
<div class="selections-container subclass-card">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" subclass disabled=(not class.img) }}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectSubclass"}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{{#if (gte visibility 2)}}
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.heritage"}}</legend>
|
||||
<div class="selections-outer-container">
|
||||
<div class="selections-container ancestry-card">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" ancestry }}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectAncestry"}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
|
||||
<div class="selections-container community-card">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" community }}
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.selectCommunity"}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
|
||||
{{#if (gte visibility 3)}}
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.traitIncreases"}} {{traits.nrSelected}}/{{traits.nrTotal}}</legend>
|
||||
<div class="traits-container">
|
||||
<fieldset class="section-inner-container">
|
||||
<legend>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.suggestedTraits"}}</legend>
|
||||
<div class="suggested-traits-container">
|
||||
{{#each suggestedTraits}}
|
||||
<div class="suggested-trait-container">{{this}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<button class="action-button" data-action="useSuggestedTraits">{{localize "Use"}}</button>
|
||||
</fieldset>
|
||||
<div class="traits-inner-container">
|
||||
{{#each traits.values}}
|
||||
<div class="trait-container">
|
||||
<div>{{this.name}}</div>
|
||||
<select name="{{concat "traits." this.key ".value"}}" data-dtype="Number">
|
||||
{{selectOptions this.options selected=this.value valueAttr="key" labelAttr="value" blank=""}}
|
||||
</select>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
|
||||
{{#if (gte visibility 4)}}
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.initialExperiences"}} {{experience.nrSelected}}/{{experience.nrTotal}}</legend>
|
||||
<div class="experiences-inner-container">
|
||||
{{#each experience.values as |experience id|}}
|
||||
<div class="experience-container">
|
||||
<input class="experience-description" type="text" name="{{concat "experiences." id ".description" }}" value="{{experience.description}}" placeholder="{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.newExperience"}}" />
|
||||
<div class="experience-value">{{numberFormat this.value sign=true}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
|
||||
{{#if (gte visibility 5)}}
|
||||
<fieldset class="section-container">
|
||||
<legend>{{localize "TYPES.Item.domainCard"}}</legend>
|
||||
<div class="selections-outer-container">
|
||||
{{#each domainCards as |domainCard id|}}
|
||||
<div class="selections-container domain-card" data-card="{{id}}">
|
||||
{{#> "systems/daggerheart/templates/components/card-preview.hbs" domainCard }}
|
||||
{{#each @root.class.system.domains }}
|
||||
<div>{{localize (concat "DAGGERHEART.GENERAL.Domain." this ".label")}}</div>
|
||||
{{/each}}
|
||||
{{/"systems/daggerheart/templates/components/card-preview.hbs"}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
</div>
|
||||
<nav class='feature-tab sheet-tabs tabs setup-tabs' data-group='setup'>
|
||||
{{#each setupTabs as |tab|}}
|
||||
<button class='{{tab.id}} {{tab.cssClass}}' data-action='tab' data-group='{{tab.group}}' data-tab='{{tab.id}}' {{disabled tab.disabled}}>
|
||||
{{localize tab.label}}
|
||||
</button>
|
||||
{{/each}}
|
||||
</nav>
|
||||
</section>
|
||||
|
|
@ -4,7 +4,13 @@
|
|||
>
|
||||
{{#if this.img}}
|
||||
<img class="preview-image-container" src="{{this.img}}" />
|
||||
<div class="preview-text-container">{{this.name}}</div>
|
||||
<div class="preview-text-container">
|
||||
{{#if altPartialBlock}}
|
||||
{{> @partial-block }}
|
||||
{{else}}
|
||||
{{this.name}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="preview-empty-container">
|
||||
<div class="preview-empty-inner-container">
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
{{#each costs as | cost index |}}
|
||||
<div class="form-group">
|
||||
<div class="form-fields">
|
||||
<label for="{{type}}">{{type}}: {{total}}</label>
|
||||
<label>{{label}}: {{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">
|
||||
|
|
|
|||
16
templates/dialogs/dice-roll/resourceDice.hbs
Normal file
16
templates/dialogs/dice-roll/resourceDice.hbs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<section>
|
||||
<div class="resource-items">
|
||||
{{#times (rollParsed item.system.resource.max actor item numerical=true)}}
|
||||
{{#with (ifThen (lookup ../diceStates this) (lookup ../diceStates this) this) as | state |}}
|
||||
<div class="resource-item" data-dice="{{#if ../../this}}{{../this}}{{else}}{{state}}{{/if}}">
|
||||
<input type="number" data-dtype="Number" name={{concat "diceStates." (ifThen ../../this ../this state) ".value" }} value="{{state.value}}" />
|
||||
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/d" (ifThen ../../item.system.resource.dieFaces ../../item.system.resource.dieFaces ../item.system.resource.dieFaces) ".svg"}}" />
|
||||
</div>
|
||||
{{/with}}
|
||||
{{/times}}
|
||||
</div>
|
||||
<footer>
|
||||
<button data-action="save">{{localize 'Save'}}</button>
|
||||
<button data-action="rerollDice">{{localize "DAGGERHEART.APPLICATIONS.ResourceDice.rerollDice"}}</button>
|
||||
</footer>
|
||||
</section>
|
||||
|
|
@ -4,6 +4,6 @@
|
|||
data-tab="config"
|
||||
>
|
||||
{{> 'systems/daggerheart/templates/actionTypes/uses.hbs' fields=fields.uses.fields source=source.uses}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/cost.hbs' fields=fields.cost.element.fields source=source.cost}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/cost.hbs' fields=fields.cost.element.fields source=source.cost costOptions=costOptions}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/range-target.hbs' fields=(object range=fields.range target=fields.target.fields) source=(object target=source.target range=source.range)}}
|
||||
</section>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
{{#if (or document.system.needsCharacterSetup document.system.levelData.canLevelUp)}}
|
||||
<button
|
||||
type="button"
|
||||
class="level-button glow" data-tooltip="{{#if document.system.needsCharacterSetup}}{{localize "DAGGERHEART.Sheets.PC.CharacterSetup"}}{{else}}{{localize "DAGGERHEART.ACTORS.Character.levelUp"}}{{/if}}"
|
||||
class="level-button glow" data-tooltip="{{#if document.system.needsCharacterSetup}}{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.buttonTitle"}}{{else}}{{localize "DAGGERHEART.ACTORS.Character.levelUp"}}{{/if}}"
|
||||
data-action="levelManagement"
|
||||
>
|
||||
<i class="fa-solid fa-triangle-exclamation"></i>
|
||||
|
|
|
|||
|
|
@ -1,128 +1,137 @@
|
|||
<li class="inventory-item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-type="{{type}}" draggable="true">
|
||||
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" data-action="useItem" {{#if (not noTooltip)}}data-tooltip="{{concat "#item#" item.uuid}}"{{/if}} />
|
||||
<div class="item-label">
|
||||
{{#if isCompanion}}
|
||||
<a class="item-name" data-action="attackRoll">{{item.name}}</a>
|
||||
{{else}}
|
||||
<div class="item-name">{{item.name}}</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'weapon')}}
|
||||
<div class="item-tags">
|
||||
<div class="item-label-wrapper">
|
||||
<div class="item-label {{#unless (and (not isSidebar) (or (eq item.system.resource.type 'simple') item.system.quantity))}}fullWidth{{/unless}}">
|
||||
{{#if isCompanion}}
|
||||
<a class="item-name" data-action="attackRoll">{{item.name}}</a>
|
||||
{{else}}
|
||||
<div class="item-name">{{item.name}}</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'weapon')}}
|
||||
<div class="item-tags">
|
||||
{{#if isSidebar}}
|
||||
<div class="item-labels">
|
||||
<div class="label">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.short')}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.short')}}
|
||||
<span> - </span>
|
||||
{{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}}
|
||||
{{#each item.system.attack.damage.parts.0.type as | type | }}
|
||||
{{#with (lookup @root.config.GENERAL.damageTypes type)}}
|
||||
<i class="fa-solid {{icon}}"></i>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}}
|
||||
(
|
||||
{{#each item.system.attack.damage.parts.0.type}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.DamageType.' this '.abbreviation')}}
|
||||
{{/each}}
|
||||
)
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Burden.' item.system.burden)}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'armor')}}
|
||||
{{#if isSidebar}}
|
||||
<div class="item-labels">
|
||||
<div class="label">
|
||||
{{!-- {{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.short')}} --}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.short')}}
|
||||
<span> - </span>
|
||||
{{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}}
|
||||
{{!-- ({{localize (concat 'DAGGERHEART.CONFIG.DamageType.' item.system.attack.damage.parts.0.type '.abbreviation')}}) --}}
|
||||
{{#each item.system.attack.damage.parts.0.type as | type | }}
|
||||
{{#with (lookup @root.config.GENERAL.damageTypes type)}}
|
||||
<i class="fa-solid {{icon}}"></i>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}:
|
||||
{{item.system.baseScore}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}}
|
||||
(
|
||||
{{#each item.system.attack.damage.parts.0.type}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.DamageType.' this '.abbreviation')}}
|
||||
{{/each}}
|
||||
)
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Burden.' item.system.burden)}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}:
|
||||
{{item.system.baseScore}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.base"}}:
|
||||
{{item.system.baseThresholds.major}}
|
||||
<span>/</span>
|
||||
{{item.system.baseThresholds.severe}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'armor')}}
|
||||
{{#if isSidebar}}
|
||||
<div class="item-labels">
|
||||
<div class="label">
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}:
|
||||
{{item.system.baseScore}}
|
||||
{{/if}}
|
||||
{{#if (eq type 'domainCard')}}
|
||||
{{#if isSidebar}}
|
||||
<div class="item-labels">
|
||||
<div class="label">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.DomainCardTypes.' item.system.type)}}
|
||||
<span> - </span>
|
||||
{{localize (concat 'DAGGERHEART.GENERAL.Domain.' item.system.domain '.label')}}
|
||||
<span> - </span>
|
||||
<span class="recall-value">{{item.system.recallCost}}</span>
|
||||
<i class="fa-solid fa-bolt"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{else}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.DomainCardTypes.' item.system.type)}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.GENERAL.Domain.' item.system.domain '.label')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
<span class="recall-label">{{localize "DAGGERHEART.ITEMS.DomainCard.recallCost"}}: </span>
|
||||
<span class="recall-value">{{item.system.recallCost}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (eq type 'effect')}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}:
|
||||
{{item.system.baseScore}}
|
||||
{{localize (concat 'TYPES.Item.' item.parent.type)}}
|
||||
<span>: </span>
|
||||
{{item.parent.name}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.base"}}:
|
||||
{{item.system.baseThresholds.major}}
|
||||
<span>/</span>
|
||||
{{item.system.baseThresholds.severe}}
|
||||
{{#if item.duration.duration}}
|
||||
{{localize 'DAGGERHEART.EFFECTS.Duration.temporary'}}
|
||||
{{else}}
|
||||
{{localize 'DAGGERHEART.EFFECTS.Duration.passive'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#each item.statuses as |status|}}
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Condition.' status '.name')}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'action')}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.ACTIONS.TYPES.' item.type '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.ActionType.' item.actionType)}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (and (not isSidebar) (eq item.system.resource.type 'simple'))}}
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}}
|
||||
{{/if}}
|
||||
{{#if (eq type 'domainCard')}}
|
||||
{{#if isSidebar}}
|
||||
<div class="item-labels">
|
||||
<div class="label">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.DomainCardTypes.' item.system.type)}}
|
||||
<span> - </span>
|
||||
{{localize (concat 'DAGGERHEART.GENERAL.Domain.' item.system.domain '.label')}}
|
||||
<span> - </span>
|
||||
<span class="recall-value">{{item.system.recallCost}}</span>
|
||||
<i class="fa-solid fa-bolt"></i>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.DomainCardTypes.' item.system.type)}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.GENERAL.Domain.' item.system.domain '.label')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
<span class="recall-label">{{localize "DAGGERHEART.ITEMS.DomainCard.recallCost"}}: </span>
|
||||
<span class="recall-value">{{item.system.recallCost}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (eq type 'effect')}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize (concat 'TYPES.Item.' item.parent.type)}}
|
||||
<span>: </span>
|
||||
{{item.parent.name}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{#if item.duration.duration}}
|
||||
{{localize 'DAGGERHEART.EFFECTS.Duration.temporary'}}
|
||||
{{else}}
|
||||
{{localize 'DAGGERHEART.EFFECTS.Duration.passive'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#each item.statuses as |status|}}
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Condition.' status '.name')}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq type 'action')}}
|
||||
<div class="item-tags">
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.ACTIONS.TYPES.' item.type '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.ActionType.' item.actionType)}}
|
||||
</div>
|
||||
{{#if (and (not isSidebar) item.system.quantity)}}
|
||||
<div class="item-resource">
|
||||
<input type="number" class="inventory-item-quantity" value="{{item.system.quantity}}" step="1" />
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
@ -175,7 +184,9 @@
|
|||
<span></span>
|
||||
{{/unless}}
|
||||
<div class="item-description">{{#unless isSidebar}}{{{item.system.description}}}{{/unless}}</div>
|
||||
|
||||
{{#if (and (not isSidebar) (eq item.system.resource.type 'diceValue'))}}
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}}
|
||||
{{/if}}
|
||||
{{#if featureType}}
|
||||
<div class="item-buttons">
|
||||
{{#each item.system.actions as | action |}}
|
||||
|
|
|
|||
21
templates/sheets/global/partials/item-resource.hbs
Normal file
21
templates/sheets/global/partials/item-resource.hbs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{{#if (eq item.system.resource.type 'simple')}}
|
||||
<div class="item-resource">
|
||||
<i class="{{#if item.system.resource.icon}}{{item.system.resource.icon}}{{else}}fa-solid fa-hashtag{{/if}}"></i>
|
||||
<input type="number" class="inventory-item-resource" value="{{item.system.resource.value}}" step="1" />
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item-resources">
|
||||
{{#times (rollParsed item.system.resource.max item.parent item numerical=true)}}
|
||||
{{#with (ifThen (lookup ../item.system.resource.diceStates this) (lookup ../item.system.resource.diceStates this) this) as | state |}}
|
||||
<a class="item-resource" data-action="toggleResourceDice" data-dice="{{#if ../../this}}{{../this}}{{else}}{{state}}{{/if}}">
|
||||
<div class="item-dice-resource">
|
||||
<label>{{ifThen state.value state.value '?'}}</label>
|
||||
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/d" (ifThen ../../item.system.resource.dieFaces ../../item.system.resource.dieFaces ../item.system.resource.dieFaces) ".svg"}}" />
|
||||
{{#if state.used}}<i class="fa-solid fa-x"></i>{{/if}}
|
||||
</div>
|
||||
</a>
|
||||
{{/with}}
|
||||
{{/times}}
|
||||
<a data-action="handleResourceDice" data-tooltip="DAGGERHEART.APPLICATIONS.ResourceDice.rerollDice"><i class="fa-solid fa-dice resource-edit"></i></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
29
templates/sheets/global/partials/resource-section.hbs
Normal file
29
templates/sheets/global/partials/resource-section.hbs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<fieldset>
|
||||
<legend>
|
||||
{{localize "DAGGERHEART.GENERAL.Resource.single"}}
|
||||
{{#unless source.system.resource}}
|
||||
<a data-action="addResource"><i class="fa-solid fa-plus icon-button"></i></a>
|
||||
{{else}}
|
||||
<a data-action="removeResource"><i class="fa-solid fa-trash"></i></a>
|
||||
{{/unless}}
|
||||
</legend>
|
||||
|
||||
{{#if source.system.resource}}
|
||||
<div class="two-columns even">
|
||||
{{formGroup systemFields.resource.fields.type value=source.system.resource.type localize=true blank=false}}
|
||||
{{formGroup systemFields.resource.fields.recovery value=source.system.resource.recovery localize=true}}
|
||||
</div>
|
||||
|
||||
<div class="two-columns even">
|
||||
{{#if (eq source.system.resource.type 'simple')}}
|
||||
{{formGroup systemFields.resource.fields.value value=source.system.resource.value localize=true}}
|
||||
{{formGroup systemFields.resource.fields.max value=source.system.resource.max localize=true}}
|
||||
{{else}}
|
||||
{{formGroup systemFields.resource.fields.dieFaces value=source.system.resource.dieFaces localize=true}}
|
||||
{{formGroup systemFields.resource.fields.max value=source.system.resource.max label="DAGGERHEART.ITEMS.FIELDS.resource.amount.label" localize=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{#if (eq source.system.resource.type 'simple')}}{{formGroup systemFields.resource.fields.icon value=source.system.resource.icon localize=true placeholder="fa-solid fa-hashtag"}}{{/if}}
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
47
templates/sheets/items/ancestry/features.hbs
Normal file
47
templates/sheets/items/ancestry/features.hbs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<section
|
||||
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
|
||||
data-tab='{{tabs.features.id}}'
|
||||
data-group='{{tabs.features.group}}'
|
||||
>
|
||||
<fieldset class="one-column drop-section primary-feature">
|
||||
<legend>
|
||||
{{localize "DAGGERHEART.ITEMS.Ancestry.primaryFeature"}}
|
||||
{{#unless document.system.primaryFeature}}<a><i data-action="addFeature" data-type="primary" class="fa-solid fa-plus icon-button"></i></a>{{/unless}}
|
||||
</legend>
|
||||
<div class="features-list">
|
||||
{{#if document.system.primaryFeature}}
|
||||
<div class="feature-item"
|
||||
data-action="editFeature"
|
||||
data-type="primary"
|
||||
>
|
||||
<img class="image" src="{{document.system.primaryFeature.img}}" />
|
||||
<span>{{document.system.primaryFeature.name}}</span>
|
||||
<div class="controls">
|
||||
<a data-action="removeFeature" data-type="primary"><i class="fa-solid fa-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="one-column drop-section secondary-feature">
|
||||
<legend>
|
||||
{{localize "DAGGERHEART.ITEMS.Ancestry.secondaryFeature"}}
|
||||
{{#unless document.system.secondaryFeature}}<a><i data-action="addFeature" data-type="secondary" class="fa-solid fa-plus icon-button"></i></a>{{/unless}}
|
||||
</legend>
|
||||
<div class="features-list">
|
||||
{{#if document.system.secondaryFeature}}
|
||||
<div class="feature-item"
|
||||
data-action="editFeature"
|
||||
data-type="secondary"
|
||||
>
|
||||
<img class="image" src="{{document.system.secondaryFeature.img}}" />
|
||||
<span>{{document.system.secondaryFeature.name}}</span>
|
||||
<div class="controls">
|
||||
<a data-action="removeFeature" data-type="secondary"><i class="fa-solid fa-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</fieldset>
|
||||
</section>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<section class='tab {{tabs.features.cssClass}} {{tabs.features.id}}' data-tab='{{tabs.features.id}}'
|
||||
data-group='{{tabs.features.group}}'>
|
||||
<div class="two-columns even">
|
||||
<fieldset>
|
||||
<fieldset class="drop-section hope-feature">
|
||||
<legend>
|
||||
{{localize "DAGGERHEART.ITEMS.Class.hopeFeatures"}}
|
||||
<a data-action-path="hopeFeatures" data-action="addFeature">
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<fieldset class="drop-section class-feature">
|
||||
<legend>
|
||||
{{localize "DAGGERHEART.ITEMS.Class.classFeatures"}}
|
||||
<a data-action-path="classFeatures" data-action="addFeature">
|
||||
|
|
|
|||
|
|
@ -17,4 +17,6 @@
|
|||
<span>{{localize "DAGGERHEART.ITEMS.DomainCard.recallCost"}}</span>
|
||||
{{formField systemFields.recallCost value=source.system.recallCost data-dtype="Number"}}
|
||||
</fieldset>
|
||||
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/resource-section.hbs" }}
|
||||
</section>
|
||||
7
templates/sheets/items/feature/settings.hbs
Normal file
7
templates/sheets/items/feature/settings.hbs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<section
|
||||
class='tab {{tabs.settings.cssClass}} {{tabs.settings.id}}'
|
||||
data-tab='{{tabs.settings.id}}'
|
||||
data-group='{{tabs.settings.group}}'
|
||||
>
|
||||
{{> "systems/daggerheart/templates/sheets/global/partials/resource-section.hbs" }}
|
||||
</section>
|
||||
3
templates/ui/chat/resource-roll.hbs
Normal file
3
templates/ui/chat/resource-roll.hbs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div class="daggerheart chat resource-roll">
|
||||
<h5 class="reroll-message">{{localize "DAGGERHEART.UI.Chat.resourceRoll.playerMessage" user=user name=name }}</h5>
|
||||
</div>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
<div class="tooltip-tag-label">{{localize feature.name}}</div>
|
||||
{{#if feature.img}}<img class="tooltip-tag-image" src="{{feature.img}}" />{{/if}}
|
||||
</div>
|
||||
<div class="tooltip-tag-description">{{{localize (tertiary feature.description feature.system.description)}}}</div>
|
||||
<div class="tooltip-tag-description">{{{localize (ifThen feature.description feature.description feature.system.description)}}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue