Readded so that armor items have their system defined armor instead of using an ActiveEffect

This commit is contained in:
WBHarry 2026-03-21 18:55:03 +01:00
parent 50dcbf4396
commit 1cdabf15a5
11 changed files with 198 additions and 161 deletions

View file

@ -9,7 +9,7 @@
</h3>
<h3>
{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}:
{{source.system.armorData.max}}
{{source.system.armor.max}}
<span>-</span>
{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.base"}}:
{{source.system.baseThresholds.major}}

View file

@ -6,13 +6,9 @@
<fieldset class="two-columns">
<legend>{{localize tabs.settings.label}}</legend>
<span>{{localize "DAGGERHEART.GENERAL.Tiers.singular"}}</span>
{{formField systemFields.tier value=source.system.tier}}
{{#if this.armorScore includeZero=true}}
<span>{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}</span>
<div class="form-fields">
<input type="text" data-dtype="Number" class="base-score-input" value="{{this.armorScore}}" />
</div>
{{/if}}
{{ formField systemFields.tier value=source.system.tier }}
<span>{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}</span>
{{ formField systemFields.armor.fields.max value=source.system.armor.max }}
<span>{{localize "TYPES.Item.feature"}}</span>
<input type="text" class="features-input" value="{{features}}" />

View file

@ -1,37 +1,19 @@
<div class="daggerheart armor-management-container">
<h3>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h3>
{{#each sources as |source|}}
{{#if ../useResourcePips}}
<div class="armor-source-container">
<p class="armor-source-label">{{source.name}}</p>
<div class="slot-bar">
{{#times source.max}}
<a class='armor-slot' data-value="{{add this 1}}" data-uuid="{{source.uuid}}">
{{#if (gte ../current (add this 1))}}
<i class="fa-solid fa-shield" data-index="{{this}}"></i>
{{else}}
<i class="fa-solid fa-shield-halved" data-index="{{this}}"></i>
{{/if}}
</a>
{{/times}}
</div>
<div class="armor-source-container">
<p class="armor-source-label">{{source.name}}</p>
<div class="slot-bar">
{{#times source.max}}
<a class='armor-slot' data-value="{{add this 1}}" data-uuid="{{source.uuid}}" data-is-armor-item="{{source.isArmorItem}}">
{{#if (gte ../current (add this 1))}}
<i class="fa-solid fa-shield" data-index="{{this}}"></i>
{{else}}
<i class="fa-solid fa-shield-halved" data-index="{{this}}"></i>
{{/if}}
</a>
{{/times}}
</div>
{{else}}
<div class="armor-source-container">
<p class="armor-source-label">{{source.name}}</p>
<div class="status-bar armor-slots">
<div class='status-value'>
<input class="bar-input armor-marks-input" value="{{source.current}}" data-uuid="{{source.uuid}}" type="number">
<span>/</span>
<span class="bar-label">{{source.max}}</span>
</div>
<progress
class='progress-bar stress-color'
value='{{source.current}}'
max='{{source.max}}'
></progress>
</div>
</div>
{{/if}}
</div>
{{/each}}
</div>