Merge branch 'main' into bug/103-enrich-htmlfield-content-before-its-used-in-applications

This commit is contained in:
Joaquin Pereyra 2025-07-18 15:24:25 -03:00
commit f56c2482cb
551 changed files with 2831 additions and 14203 deletions

View file

@ -1,7 +1,7 @@
<fieldset class="one-column">
<legend>
Damage
{{localize "DAGGERHEART.GENERAL.damage"}}
{{#unless (eq path 'system.attack.')}}<a><i class="fa-solid fa-plus icon-button" data-action="addDamage"></i></a>{{/unless}}
</legend>
{{#unless (or @root.isNPC path)}}
@ -23,6 +23,16 @@
</div>
{{/if}}
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}}
{{#if ../horde}}
<fieldset class="one-column">
<legend>{{localize "DAGGERHEART.ACTORS.Adversary.hordeDamage"}}</legend>
<div class="nest-inputs">
{{formField ../fields.valueAlt.fields.flatMultiplier value=dmg.valueAlt.flatMultiplier name=(concat ../path "damage.parts." index ".valueAlt.flatMultiplier") label="Multiplier" classes="inline-child" }}
{{formField ../fields.valueAlt.fields.dice value=dmg.valueAlt.dice name=(concat ../path "damage.parts." index ".valueAlt.dice") classes="inline-child"}}
{{formField ../fields.valueAlt.fields.bonus value=dmg.valueAlt.bonus name=(concat ../path "damage.parts." index ".valueAlt.bonus") localize=true classes="inline-child"}}
</div>
</fieldset>
{{/if}}
{{else}}
{{#with (@root.getRealIndex index) as | realIndex |}}
<div class="nest-inputs">
@ -33,11 +43,11 @@
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}}
<div class="nest-inputs">
<fieldset class="one-column">
<legend>With Hope</legend>
<legend>{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}</legend>
{{> formula fields=../../fields.value.fields type=../../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
</fieldset>
<fieldset class="one-column">
<legend>With Fear</legend>
<legend>{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}</legend>
{{> formula fields=../../fields.valueAlt.fields type=../../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" realIndex=realIndex}}
</fieldset>
</div>

View file

@ -5,8 +5,8 @@
<ul class="actions-list">
{{#each actions}}
<li class="action-item">
<input type="radio" name="actionId" value="{{_id}}" {{#if (eq @index 0)}}checked{{/if}}>
<span class="label">{{ name }}</span>
<input type="radio" id="action-{{_id}}" name="actionId" value="{{_id}}" {{#if (eq @index 0)}}checked{{/if}}>
<label class="label" for="action-{{_id}}">{{ name }}</label>
</li>
{{/each}}
</ul>

View file

@ -6,8 +6,15 @@
<div class="form-group">
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="Situational Bonus">
</div>
<button class="submit-btn" data-action="submitRoll">
<i class="fa-solid fa-dice"></i>
<span class="label">Roll</span>
</button>
<div class="damage-section-controls">
{{#if directDamage}}
<select class="roll-mode-select" name="selectedRollMode">
{{selectOptions rollModes selected=selectedRollMode valueAttr="action" labelAttr="label" localize=true}}
</select>
{{/if}}
<button class="submit-btn" data-action="submitRoll">
<i class="fa-solid fa-dice"></i>
<span class="label">{{localize "DAGGERHEART.GENERAL.roll"}}</span>
</button>
</div>
</section>

View file

@ -3,14 +3,14 @@
{{#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"}}" />
<input type="number" data-dtype="Number" name={{concat "diceStates." (ifThen ../../this ../this state) ".value" }} value="{{state.value}}" min="1" />
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/" (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>
<button type="button" data-action="save">{{localize 'Save'}}</button>
<button type="button" data-action="rerollDice">{{localize "DAGGERHEART.APPLICATIONS.ResourceDice.rerollDice"}}</button>
</footer>
</section>

View file

@ -5,7 +5,7 @@
<div class="dices-section">
{{#if (eq @root.rollType 'D20Roll')}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/default/' @root.roll.d20.denomination '.svg'}}" alt="">
<img class="dice-icon normal" src="{{concat 'systems/daggerheart/assets/icons/dice/default/' @root.roll.d20.denomination '.svg'}}" alt="">
<div class="dice-select">
<select name="roll.dice.d20">
{{selectOptions diceOptions selected=@root.roll.d20.denomination}}
@ -88,7 +88,7 @@
{{/if}}
{{/each}}
</fieldset>
<fieldset class="modifier-container one-column">
<fieldset class="modifier-container {{#if (eq @root.rollType 'DualityRoll')}}two-columns{{else}}one-column{{/if}}">
<legend>Modifiers</legend>
<div class="nest-inputs">
<button class="advantage-chip flex1 {{#if (eq advantage 1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="1">
@ -98,6 +98,9 @@
<span><i class="fa-regular fa-circle"></i></span>
{{/if}}
<span class="label">{{localize "DAGGERHEART.GENERAL.Advantage.full"}}</span>
{{#if @root.rollConfig.data.advantageSources.length}}
<span class="advantage-chip-tooltip" data-tooltip="{{concat "#advantage#" @root.rollConfig.source.actor}}"><i class="fa-solid fa-circle-info"></i></span>
{{/if}}
</button>
<button class="disadvantage-chip flex1 {{#if (eq advantage -1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="-1">
{{#if (eq advantage -1)}}
@ -106,21 +109,43 @@
<span><i class="fa-regular fa-circle"></i></span>
{{/if}}
<span class="label">{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}</span>
{{#if @root.rollConfig.data.disadvantageSources.length}}
<span class="advantage-chip-tooltip" data-tooltip="{{concat "#disadvantage#" @root.rollConfig.source.actor}}"><i class="fa-solid fa-circle-info"></i></span>
{{/if}}
</button>
{{#unless (eq @root.rollType 'D20Roll')}}
<select name="roll.dice.advantageFaces">
</div>
{{#unless (eq @root.rollType 'D20Roll')}}
<div class="nest-inputs">
<select name="roll.dice.advantageNumber"{{#unless advantage}} disabled{{/unless}}>
{{#times 10}}
<option value="{{add this 1}}" {{#if (eq @root.roll.advantageNumber (add this 1))}} selected{{/if}}>{{add this 1}}</option>
{{/times}}
</select>
<select name="roll.dice.advantageFaces"{{#unless advantage}} disabled{{/unless}}>
{{selectOptions diceOptions selected=@root.roll.dAdvantage.denomination}}
</select>
{{/unless}}
</div>
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="Situational Bonus">
</div>
{{/unless}}
{{#if @root.rallyDie.length}}
<span class="formula-label">{{localize "DAGGERHEART.CLASS.Feature.rallyDice"}}</span>
<select name="roll.dice._rallyIndex">
{{selectOptions @root.rallyDie blank="" selected=@root.roll._rallyIndex}}
</select>
{{/if}}
{{#if (eq @root.rollType 'DualityRoll')}}<span class="formula-label">Situational Bonus</span>{{/if}}
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="{{#if (eq @root.rollType 'DualityRoll')}}Ex: 1d6 + 5{{else}}Situational Bonus{{/if}}">
</fieldset>
{{/unless}}
<span class="formula-label"><b>Formula:</b> {{@root.formula}}</span>
<button class="sunmit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}>
<i class="fa-solid fa-dice"></i>
<span class="label">Roll</span>
</button>
<div class="roll-dialog-controls">
<select class="roll-mode-select" name="selectedRollMode">
{{selectOptions rollModes selected=selectedRollMode valueAttr="action" labelAttr="label" localize=true}}
</select>
<button class="sunmit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}>
<i class="fa-solid fa-dice"></i>
<span class="label">Roll</span>
</button>
</div>
{{else}}
<button class="sunmit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}>
<span class="label">Continue</span>

View file

@ -1,24 +0,0 @@
<div>
<div class="downtime-container">
<h2 class="downtime-header">{{localize "DAGGERHEART.APPLICATIONS.Downtime.downtimeHeader" current=nrCurrentChoices max=moveData.nrChoices}}</h2>
{{#each moveData.moves as |move key|}}
<div class="activity-container">
<div class="activity-title">
<div class="activity-image {{#if this.selected}}selected{{/if}}" data-action="selectMove" data-move="{{key}}">
{{#if this.selected}}<div class="activity-select-label">{{move.selected}}</div>{{/if}}
<img src="{{move.img}}" />
</div>
<span class="activity-title-text">{{localize this.name}}</span>
</div>
<div class="activity-body">
{{localize this.description}}
</div>
</div>
{{/each}}
</div>
<footer class="flexrow">
<button type="button" data-action="close">{{localize "DAGGERHEART.Application.Cancel"}}</button>
<button type="button" data-action="takeDowntime" {{#if this.disabledDowntime}}disabled{{/if}}>{{localize "DAGGERHEART.Application.Downtime.TakeDowntime"}}</button>
</footer>
</div>

View file

@ -0,0 +1,18 @@
<fieldset class="one-column activities-grouping">
<legend>{{localize (concat "DAGGERHEART.APPLICATIONS.Downtime." category ".moves") max=nrChoices.max current=nrChoices.current}}</legend>
<div class="activities-container">
{{#each moves as |move key|}}
<a class="activity-container" data-action="selectMove" data-category="{{../category}}" data-move="{{key}}" data-tooltip="{{concat "#" ../category "#" key}}">
<div class="activity-inner-container">
<i class="{{#if move.selected}}fa-solid{{else}}fa-regular{{/if}} fa-circle activity-marker"></i>
<div class="activity-select-section">
<i class="{{move.icon}} activity-icon"></i>
<div>{{move.name}}</div>
</div>
</div>
{{#if move.selected}}<div class="activity-selected-marker">{{move.selected}}</div>{{/if}}
</a>
{{/each}}
</div>
</fieldset>

View file

@ -0,0 +1,14 @@
<div>
<header class="dialog-header">
<h1>{{title}}</h1>
</header>
<div class="downtime-container {{#if (and shortRestMoves.moves longRestMoves.moves)}}two-columns even{{else}}one-column{{/if}}">
{{#if shortRestMoves.moves}}{{> "systems/daggerheart/templates/dialogs/downtime/activities.hbs" moves=shortRestMoves.moves category='shortRest' nrChoices=nrChoices.shortRest}}{{/if}}
{{#if longRestMoves.moves}}{{> "systems/daggerheart/templates/dialogs/downtime/activities.hbs" moves=longRestMoves.moves category='longRest' nrChoices=nrChoices.longRest}}{{/if}}
</div>
<footer>
<button type="button" data-action="close">{{localize "Cancel"}}</button>
<button type="button" data-action="takeDowntime" {{#if disabledDowntime}}disabled{{/if}}>{{localize "DAGGERHEART.APPLICATIONS.Downtime.takeDowntime"}}</button>
</footer>
</div>

View file

@ -1,7 +1,12 @@
<div>
{{formGroup settingFields.schema.fields.hope value=settingFields._source.hope localize=true}}
<div class="form-group">
<label>{{localize "DAGGERHEART.SETTINGS.Automation.FIELDS.hopeFear.label"}}</label>
{{formGroup settingFields.schema.fields.hopeFear.fields.gm value=settingFields._source.hopeFear.gm localize=true}}
{{formGroup settingFields.schema.fields.hopeFear.fields.players value=settingFields._source.hopeFear.players localize=true}}
</div>
{{formGroup settingFields.schema.fields.actionPoints value=settingFields._source.actionPoints localize=true}}
{{formGroup settingFields.schema.fields.countdowns value=settingFields._source.countdowns localize=true}}
{{formGroup settingFields.schema.fields.hordeDamage value=settingFields._source.hordeDamage localize=true}}
<footer class="form-footer">
<button data-action="reset">

View file

@ -1,18 +1,17 @@
<div>
<div class="form-group">
<label>{{localize "Icon"}}</label>
<div class="form-field">
<input type="text" name="icon" value="{{icon}}" />
</div>
</div>
<fieldset>
<legend>{{localize "Description"}}</legend>
<prose-mirror name="description" value="{{description}}" toggled=true>
<prose-mirror name="description" value="{{description}}">
{{{ enrichedDescription }}}
</prose-mirror>
</fieldset>
{{!-- <fieldset>
<legend>{{localize "Actions"}} <a data-action="addItem"><i class="fa-solid fa-plus"></i></a></legend>
<div class="settings-items">
{{#each this.actions as |action index|}}
{{> "systems/daggerheart/templates/settings/components/settings-item-line.hbs" action type="actions" id=index }}
{{/each}}
</div>
</fieldset> --}}
</div>

View file

@ -19,5 +19,7 @@
{{/if}}
{{/if}}
</fieldset>
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=document.system.attack.damage path="system.attack."}}
{{#if (eq document.system.type 'horde')}}
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=document.system.attack.damage path="system.attack." horde=true}}
{{/if}}
</section>

View file

@ -19,20 +19,20 @@
<div class="fieldsets-section">
<fieldset class="flex">
<legend>{{localize "DAGGERHEART.GENERAL.hitPoints"}}</legend>
{{formGroup systemFields.resources.fields.hitPoints.fields.value value=document.system.resources.hitPoints.value}}
<legend>{{localize "DAGGERHEART.GENERAL.hitPoints.plural"}}</legend>
{{formGroup systemFields.resources.fields.hitPoints.fields.value value=document.system.resources.hitPoints.value label=(localize "DAGGERHEART.ACTORS.Adversary.FIELDS.resources.hitPoints.value.label")}}
{{formGroup systemFields.resources.fields.hitPoints.fields.max value=document.system.resources.hitPoints.max}}
</fieldset>
<fieldset class="flex">
<legend>{{localize "DAGGERHEART.GENERAL.stress"}}</legend>
{{formGroup systemFields.resources.fields.stress.fields.value value=document.system.resources.stress.value}}
{{formGroup systemFields.resources.fields.stress.fields.value value=document.system.resources.stress.value label=(localize "DAGGERHEART.ACTORS.Adversary.FIELDS.resources.stress.value.label")}}
{{formGroup systemFields.resources.fields.stress.fields.max value=document.system.resources.stress.max}}
</fieldset>
</div>
<fieldset class="flex">
<legend>{{localize "DAGGERHEART.GENERAL.DamageThresholds.title"}}</legend>
{{formGroup systemFields.damageThresholds.fields.major value=document.system.damageThresholds.major}}
{{formGroup systemFields.damageThresholds.fields.severe value=document.system.damageThresholds.severe}}
{{formGroup systemFields.damageThresholds.fields.major value=document.system.damageThresholds.major label=(localize "DAGGERHEART.GENERAL.DamageThresholds.majorThreshold")}}
{{formGroup systemFields.damageThresholds.fields.severe value=document.system.damageThresholds.severe label=(localize "DAGGERHEART.GENERAL.DamageThresholds.severeThreshold")}}
</fieldset>
</section>

View file

@ -11,13 +11,13 @@
{{formGroup systemFields.resources.fields.stress.fields.max value=document.system.resources.stress.max label='Max Stress'}}
</div>
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.ACTORS.Companion.FIELDS.partner.label"}}</label>
<select class="partner-value" name="system.partner">
{{selectOptions playerCharacters selected=document.system.partner.uuid labelAttr="name" valueAttr="key" blank=""}}
</select>
<div class="form-fields">
<label>{{localize "DAGGERHEART.ACTORS.Companion.FIELDS.partner.label"}}</label>
<select class="partner-value" name="system.partner">
{{selectOptions playerCharacters selected=document.system.partner.uuid labelAttr="name" valueAttr="key" blank=""}}
</select>
</div>
</div>
</div>
</fieldset>
<button type="button" data-action="levelUp" {{#if (not document.system.levelData.canLevelUp)}}disabled{{/if}}>Level Up</button>
</section>

View file

@ -11,12 +11,7 @@
{{#with ../fields.changes.element.fields as |changeFields|}}
<li data-index="{{i}}">
<div class="key">
<input type="text" name="{{concat "changes." i ".key"}}" value="{{change.key}}" list="change-fields" />
<datalist id="change-fields">
{{#each @root.fieldPaths}}
<option value="{{this}}">{{this}}</option>
{{/each}}
</datalist>
<input type="text" class="effect-change-input" name="{{concat "changes." i ".key"}}" value="{{change.key}}" />
</div>
<div class="mode">
{{formInput changeFields.mode name=(concat "changes." i ".mode") value=change.mode choices=@root.modes}}

View file

@ -20,14 +20,14 @@
{{#if (eq source.system.type 'horde')}}
<div class="tag">
<span>{{source.system.hordeHp}}</span>
<span>/HP</span>
<span>/{{localize "DAGGERHEART.GENERAL.hitPoints.short"}}</span>
</div>
{{/if}}
</div>
<line-div></line-div>
<div class="adversary-info">
<div class="description">
<i>{{source.system.description}}</i>
<i>{{{source.system.description}}}</i>
</div>
<div class="motives-and-tatics">
<b>{{localize 'DAGGERHEART.ACTORS.Adversary.FIELDS.motivesAndTactics.label'}}: </b>{{{source.system.motivesAndTactics}}}

View file

@ -1,5 +1,5 @@
<aside class="adversary-sidebar-sheet">
<div class="portrait {{#if (gte source.system.resources.hitPoints.value source.system.resources.hitPoints.max)}}death-roll{{/if}}">
<div class="portrait {{#if (and source.system.resources.hitPoints.max (gte source.system.resources.hitPoints.value source.system.resources.hitPoints.max))}}death-roll{{/if}}">
<img src="{{source.img}}" alt="{{source.name}}" data-action='editImage' data-edit="img">
<a class="death-roll-btn" data-tooltip="{{localize " DAGGERHEART.UI.Tooltip.makeDeathMove"}}"
data-action="makeDeathMove"><i class="fas fa-skull death-save"></i></a>

View file

@ -2,8 +2,7 @@
data-group='{{tabs.features.group}}'>
<div class="features-sections">
{{#each document.system.sheetLists as |category|}}
{{#if category.values}}
{{#if (eq category.type 'feature' )}}
{{> 'daggerheart.inventory-items'
title=category.title
type='feature'
@ -11,6 +10,14 @@
canCreate=true
showActions=true
}}
{{else if category.values}}
{{> 'daggerheart.inventory-items'
title=category.title
type='feature'
collection=category.values
canCreate=false
showActions=true
}}
{{/if}}
{{/each}}

View file

@ -116,5 +116,14 @@
{{/each}}
</div>
{{> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
{{#> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
<div class="character-downtime-container">
<button data-action="useDowntime" data-type="shortRest" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Downtime.shortRest.title"}}">
<i class="fa-solid fa-chair"></i>
</button>
<button data-action="useDowntime" data-type="longRest" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Downtime.longRest.title"}}">
<i class="fa-solid fa-bed"></i>
</button>
</div>
{{/'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
</header>

View file

@ -51,18 +51,32 @@
</div>
</div>
<div class="status-number">
<div class='status-value armor-slots'>
{{#if document.system.armor.system.marks}}
<p>{{document.system.armor.system.marks.value}}/{{document.system.armorScore}}</p>
{{else}}
<p>-</p>
{{/if}}
{{#if document.system.armor.system.marks}}
<div class="status-bar armor-slots">
<div class='status-value'>
<p><input class="bar-input armor-marks-input" value="{{document.system.armor.system.marks.value}}" type="number"></p>
<p>/</p>
<p class="bar-label">{{document.system.armorScore}}</p>
</div>
<progress
class='progress-bar stress-color'
value='{{document.system.armor.system.marks.value}}'
max='{{document.system.armorScore}}'
></progress>
<div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h4>
</div>
</div>
<div class="status-label">
<h4>Armor Slots</h4>
{{else}}
<div class="status-number armor-slots">
<div class='status-value'>
<p>-</p>
</div>
<div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h4>
</div>
</div>
</div>
{{/if}}
<div class="status-number">
<div class='status-value'>

View file

@ -2,8 +2,8 @@
data-group='{{tabs.details.group}}'>
<div class="partner-section">
<div class="title">
<side-line-div class="invert"></side-line-div>
<h3>Partner</h3>
<side-line-div class="invert"></side-line-div>
<h3>{{localize "DAGGERHEART.GENERAL.partner"}}</h3>
<side-line-div></side-line-div>
</div>
{{#if document.system.partner}}
@ -23,8 +23,8 @@
</div>
<div class="attack-section">
<div class="title">
<side-line-div class="invert"></side-line-div>
<h3>Attack</h3>
<side-line-div class="invert"></side-line-div>
<h3>{{localize "DAGGERHEART.GENERAL.attack"}}</h3>
<side-line-div></side-line-div>
</div>
<ul class="item-list">
@ -38,6 +38,11 @@
</ul>
</div>
<div class="experience-list">
<div class="title">
<side-line-div class="invert"></side-line-div>
<h3>{{localize "DAGGERHEART.GENERAL.experience.plural"}}</h3>
<side-line-div></side-line-div>
</div>
{{#each source.system.experiences as |experience id|}}
<div class="experience-row">
<div class="experience-value">

View file

@ -27,14 +27,14 @@
{{/if}}
</div>
<div class="status-label">
<h4>Difficulty</h4>
<h4>{{localize "DAGGERHEART.GENERAL.difficulty"}}</h4>
</div>
</div>
</div>
<line-div></line-div>
<div class="environment-info">
<div class="description">
<i>{{source.system.description}}</i>
<i>{{{source.system.description}}}</i>
</div>
<div class="impulses">
<b>{{localize 'DAGGERHEART.ACTORS.Environment.FIELDS.impulses.label'}}: </b>{{{source.system.impulses}}}

View file

@ -9,8 +9,7 @@
<a class='effect-control' data-action='editDoc' data-tooltip="DAGGERHEART.UI.Tooltip.openItemWorld">
<i class="fa-solid fa-globe"></i>
</a>
<a class='effect-control' data-action='deleteFeature' data-item-uuid='{{feature.uuid}}' data-action-path='{{actionPath}}'
data-tooltip="CONTROLS.CommonDelete">
<a class='effect-control' data-action='deleteFeature' data-tooltip="CONTROLS.CommonDelete">
<i class='fas fa-trash'></i>
</a>
</div>

View file

@ -19,11 +19,11 @@ Parameters:
data-item-uuid="{{item.uuid}}" data-type="{{type}}" draggable="true">
<div class="inventory-item-header" {{#unless noExtensible}}data-action="toggleExtended" {{/unless}}>
{{!-- Image --}}
<div class="img-portait">
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}"
data-action='{{ifThen (hasProperty item "use") "useItem" (ifThen (hasProperty item "toChat") "toChat" "editDoc") }}'
{{#unless hideTooltip}}data-tooltip="#item#{{item.uuid}}" {{/unless}} />
<img class="roll-img" src="systems/daggerheart/assets/icons/dice/default/d20.svg" alt="">
<div class="img-portait"
data-action='{{ifThen (hasProperty item "use") "useItem" (ifThen (hasProperty item "toChat") "toChat" "editDoc") }}'>
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" {{#unless
hideTooltip}}data-tooltip="#item#{{item.uuid}}" {{/unless}} />
<img class="roll-img" src="systems/daggerheart/assets/icons/dice/default/d20.svg" alt="">
</div>
{{!-- Name & Tags --}}

View file

@ -10,7 +10,7 @@
<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"}}" />
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/" (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>

View file

@ -19,7 +19,7 @@
{{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.dieFaces value=source.system.resource.dieFaces localize=true blank=false}}
{{formGroup systemFields.resource.fields.max value=source.system.resource.max label="DAGGERHEART.ITEMS.FIELDS.resource.amount.label" localize=true}}
{{/if}}
</div>

View file

@ -1,14 +0,0 @@
<section
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'
>
<fieldset>
<legend>{{localize "DAGGERHEART.GENERAL.Tabs.features"}}</legend>
<div class="feature-list">
{{#each source.system.abilities as |feature key|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' feature=feature}}
{{/each}}
</div>
</fieldset>
</section>

View file

@ -1,11 +1,18 @@
<section class='tab-navigation'>
<line-div></line-div>
<nav class='feature-tab sheet-tabs tabs' data-group='primary'>
{{#each tabs as |tab|}}
<a class='{{tab.id}} {{tab.cssClass}}' data-action='tab' data-group='{{tab.group}}' data-tab='{{tab.id}}'>
{{localize tab.label}}
</a>
{{/each}}
</nav>
<line-div></line-div>
<div class='navigation-container'>
<div class="navigation-inner-container">
<line-div></line-div>
<nav class='feature-tab sheet-tabs tabs' data-group='primary'>
{{#each tabs as |tab|}}
<a class='{{tab.id}} {{tab.cssClass}}' data-action='tab' data-group='{{tab.group}}' data-tab='{{tab.id}}'>
{{localize tab.label}}
</a>
{{/each}}
</nav>
<line-div></line-div>
</div>
{{#if @partial-block}}
{{> @partial-block }}
{{/if}}
</div>
</section>

View file

@ -1,32 +1,23 @@
<section class='tab {{tabs.features.cssClass}} {{tabs.features.id}}' data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'>
<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 class="drop-section hope-feature">
<legend>
{{localize "DAGGERHEART.ITEMS.Class.hopeFeatures"}}
<a data-action-path="hopeFeatures" data-action="addFeature">
<i class="fa-solid fa-plus icon-button"></i>
</a>
</legend>
<legend>{{localize "DAGGERHEART.ITEMS.Class.hopeFeatures"}} <a><i class="fa-solid fa-plus icon-button" data-type="hope" data-action="addFeature"></i></a></legend>
<div class="feature-list">
{{#each source.system.hopeFeatures as |feature|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs'
actionPath='hopeFeatures' feature=feature}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='hope' feature=feature}}
{{/each}}
</div>
</fieldset>
<fieldset class="drop-section class-feature">
<legend>
{{localize "DAGGERHEART.ITEMS.Class.classFeatures"}}
<a data-action-path="classFeatures" data-action="addFeature">
<i class="fa-solid fa-plus icon-button"></i>
</a>
</legend>
<legend>{{localize "DAGGERHEART.ITEMS.Class.classFeatures"}} <a><i class="fa-solid fa-plus icon-button" data-type="class" data-action="addFeature"></i></a></legend>
<div class="feature-list">
{{#each source.system.classFeatures as |feature|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs'
actionPath='classFeatures' feature=feature}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='class' feature=feature}}
{{/each}}
</div>
</fieldset>
@ -36,25 +27,34 @@
<legend>{{localize "TYPES.Item.subclass"}}</legend>
<div class="feature-list">
{{#each source.system.subclasses as |subclass index|}}
<li class='feature-item'>
<div class='feature-line'>
<img class='image' src='{{subclass.img}}' />
<h4>
{{subclass.name}}
</h4>
<div class='controls'>
<a class='effect-control' data-action='viewDoc' data-uuid={{subclass.uuid}}
data-tooltip='{{localize "DAGGERHEART.UI.Tooltip.openItemWorld"}}'>
<i class="fa-solid fa-globe"></i>
</a>
<a class='effect-control' data-action='removeItemFromCollection' data-target="subclasses"
data-uuid={{subclass.uuid}} data-tooltip='{{localize "CONTROLS.CommonDelete"}}'>
<i class='fas fa-trash'></i>
</a>
<li class='feature-item'>
<div class='feature-line'>
<img class='image' src='{{subclass.img}}' />
<h4>
{{subclass.name}}
</h4>
<div class='controls'>
<a
class='effect-control'
data-action='viewDoc'
data-uuid={{subclass.uuid}}
data-tooltip='{{localize "DAGGERHEART.UI.Tooltip.openItemWorld"}}'
>
<i class="fa-solid fa-globe"></i>
</a>
<a
class='effect-control'
data-action='removeItemFromCollection'
data-target="subclasses"
data-uuid={{subclass.uuid}}
data-tooltip='{{localize "CONTROLS.CommonDelete"}}'
>
<i class='fas fa-trash'></i>
</a>
</div>
</div>
</div>
</li>
</li>
{{/each}}
</div>
</fieldset>
</div>
</div>

View file

@ -8,8 +8,6 @@
<span>{{localize "DAGGERHEART.GENERAL.type"}}</span>
{{formField systemFields.type value=source.system.type localize=true}}
<span>{{localize "DAGGERHEART.ITEMS.DomainCard.foundation"}}</span>
{{formField systemFields.foundation value=source.system.foundation }}
<span>{{localize "DAGGERHEART.GENERAL.Domain.single"}}</span>
{{formField systemFields.domain value=source.system.domain localize=true}}
<span>{{localize "DAGGERHEART.GENERAL.level"}}</span>

View file

@ -1,52 +1,44 @@
<section class='tab {{tabs.features.cssClass}} {{tabs.features.id}}' data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'>
<fieldset class="drop-section" data-type="foundationFeature">
<section
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'
>
<fieldset class="drop-section" data-type="foundation">
<legend>
{{localize "DAGGERHEART.GENERAL.Tabs.foundation"}}
<a {{disabled source.system.foundationFeature}}>
<i data-action="addFeature" data-type="foundationFeature"
class="fa-solid fa-plus icon-button {{disabled source.system.foundationFeature}}"></i>
</a>
{{localize "DAGGERHEART.GENERAL.Tabs.foundation"}}
<a><i data-action="addFeature" data-type="foundation" class="fa-solid fa-plus icon-button"></i></a>
</legend>
<div class="feature-list">
{{#if source.system.foundationFeature}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs'
actionPath='foundationFeature'
feature=source.system.foundationFeature
}}
{{/if}}
{{#each source.system.foundationFeatures as | feature | }}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='foundation' feature=feature}}
{{/each}}
</div>
</fieldset>
<fieldset class="drop-section" data-type="specializationFeature">
<fieldset class="drop-section" data-type="specialization">
<legend>
{{localize "DAGGERHEART.GENERAL.Tabs.specialization"}}
<a {{disabled source.system.specializationFeature}}><i data-action="addFeature"
data-type="specializationFeature"
class="fa-solid fa-plus icon-button {{disabled source.system.specializationFeature}}"></i></a>
{{localize "DAGGERHEART.GENERAL.Tabs.specialization"}}
<a><i data-action="addFeature" data-type="specialization" class="fa-solid fa-plus icon-button"></i></a>
</legend>
<div class="feature-list">
{{#if source.system.specializationFeature}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs'
actionPath='specializationFeature' feature=source.system.specializationFeature}}
{{/if}}
{{#each source.system.specializationFeatures as | feature |}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='specialization' feature=feature}}
{{/each}}
</div>
</fieldset>
<fieldset class="drop-section" data-type="masteryFeature">
<fieldset class="drop-section" data-type="mastery">
<legend>
{{localize "DAGGERHEART.GENERAL.Tabs.mastery"}}
<a {{disabled source.system.masteryFeature}}><i data-action="addFeature" data-type="masteryFeature"
class="fa-solid fa-plus icon-button {{disabled source.system.masteryFeature}}"></i></a>
{{localize "DAGGERHEART.GENERAL.Tabs.mastery"}}
<a><i data-action="addFeature" data-type="mastery" class="fa-solid fa-plus icon-button"></i></a>
</legend>
<div class="feature-list">
{{#if source.system.masteryFeature}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs'
actionPath='masteryFeature' feature=source.system.masteryFeature}}
{{/if}}
{{#each source.system.masteryFeatures as | feature |}}
{{> 'systems/daggerheart/templates/sheets/global/partials/feature-section-item.hbs' type='mastery' feature=feature}}
{{/each}}
</div>
</fieldset>
</section>

View file

@ -16,6 +16,11 @@
{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}
</div>
{{/if}}
{{#if roll.rally.dice}}
<div class="duality-modifier">
{{localize "DAGGERHEART.CLASS.Feature.rallyDice"}} {{roll.rally.dice}}
</div>
{{/if}}
</div>
<div class="dice-result">
<div class="dice-formula">{{roll.formula}}</div>
@ -38,7 +43,7 @@
<div class="dice-title">{{localize "DAGGERHEART.GENERAL.hope"}}</div>
<div class="dice-inner-container hope" title="{{localize "DAGGERHEART.GENERAL.hope"}}">
<div class="dice-wrapper">
<img class="dice" src="../icons/svg/d12-grey.svg"/>
<img class="dice" src="../icons/svg/{{roll.hope.dice}}-grey.svg"/>
</div>
<div class="dice-value">{{roll.hope.value}}</div>
</div>
@ -49,7 +54,7 @@
<div class="dice-title">{{localize "DAGGERHEART.GENERAL.fear"}}</div>
<div class="dice-inner-container fear" title="{{localize "DAGGERHEART.GENERAL.fear"}}">
<div class="dice-wrapper">
<img class="dice" src="../icons/svg/d12-grey.svg"/>
<img class="dice" src="../icons/svg/{{roll.fear.dice}}-grey.svg"/>
</div>
<div class="dice-value">{{roll.fear.value}}</div>
</div>
@ -72,7 +77,7 @@
<div class="dice-container">
<div class="dice-inner-container {{#if (eq roll.advantage.type 1)}}advantage{{else}}disadvantage{{/if}}">
<div class="dice-wrapper">
<img class="dice" src="../icons/svg/d6-grey.svg"/>
<img class="dice" src="../icons/svg/{{roll.advantage.dice}}-grey.svg"/>
</div>
<div class="dice-value">{{roll.advantage.value}}</div>
</div>
@ -82,6 +87,30 @@
</div>
</div>
{{/if}}
{{#if roll.rally.dice}}
<div class="dice">
<header class="part-header flexrow">
<span class="part-formula">
<span>1{{roll.rally.dice}}</span>
</span>
<span class="part-total">{{roll.rally.value}}</span>
</header>
<div class="flexrow">
<ol class="dice-rolls">
<li class="roll die {{roll.rally.dice}}">
<div class="dice-container">
<div class="dice-inner-container">
<div class="dice-wrapper">
<img class="dice" src="../icons/svg/{{roll.rally.dice}}-grey.svg"/>
</div>
<div class="dice-value">{{roll.rally.value}}</div>
</div>
</div>
</li>
</ol>
</div>
</div>
{{/if}}
{{#each roll.extra as | extra | }}
<div class="dice">
<header class="part-header flexrow">

View file

@ -31,16 +31,17 @@
</div>
{{#if ../combat.round}}
<div class="token-actions">
{{#if isOwner}}
{{#if (and (not isNPC) ../actionTokens.enabled)}}
<div class="action-tokens">
{{#times ../actionTokens.tokens}}
<button type="button" class="inline-control main icon fa-solid fa-bolt-lightning action-token {{#if (lte ../system/actionTokens this)}}used{{/if}}" data-action="setActionTokens" data-combatant-id="{{../id}}" data-token-index="{{this}}">
</button>
{{/times}}
</div>
{{/if}}
<div class="token-actions">
{{#if (and (not isNPC) ../actionTokens.enabled)}}
<div class="action-tokens">
{{#times ../actionTokens.tokens}}
<button
type="button" class="inline-control main icon fa-solid fa-bolt-lightning action-token {{#unless ../isOwner}}inactive{{/unless}} {{#if (lte ../system/actionTokens this)}}used{{/if}}" {{#if ../isOwner}}
data-action="setActionTokens"{{/if}} data-combatant-id="{{../id}}" data-token-index="{{this}}" {{#unless ../isOwner}}disabled{{/unless}}
>
</button>
{{/times}}
</div>
{{/if}}
</div>
{{/if}}

View file

@ -0,0 +1,5 @@
<div class="daggerheart dh-style tooltip">
{{#each sources as | source |}}
<div>{{{source}}}</div>
{{/each}}
</div>

View file

@ -23,7 +23,7 @@
</div>
<div class="tooltip-information-section spaced">
<div class="tooltip-information">
<label>{{localize "DAGGERHEART.GENERAL.hitPoints"}}</label>
<label>{{localize "DAGGERHEART.GENERAL.hitPoints.plural"}}</label>
<div>{{item.system.resources.hitPoints.max}}</div>
</div>
<div class="tooltip-information">

View file

@ -0,0 +1,7 @@
<div class="daggerheart dh-style tooltip">
<div class="tooltip-title-container">
<img class="tooltip-image" src="{{move.img}}" />
<h2 class="tooltip-title">{{move.name}}</h2>
</div>
<div class="tooltip-description">{{{move.description}}}</div>
</div>