daggerheart/templates/sheets/global/partials/inventory-item.hbs
Dapoulp 3593f44612
Feature/112 items use action datamodel (#194)
* Fix action for items

* Cost & Range #1

* remove log

* actions

* Split methods

* Roll classes

* Begin damage

* g

* Actions

* before main merge

* Fix d20RollDialog costs check

* Fix submit on close

* Add uses in action dialog

* Adversary Attack

* 166 - Damage Reduction (#180)

* Temp

* Fixed Stress Reductions

* Changed from index based to object

* Fixed stress resources management for DamageReduction

* Fix Adversary attack multiplier

* Auto add Attack action to newly created weapon

* Few fixes

* 164 - Add Hope/Fear formula

* 163 - Actor Sub Datas (#182)

* Added rules/bonuses for all classes and subclasses

* More

* Add Save

* Fix delete action button

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
Co-authored-by: WBHarry <89362246+WBHarry@users.noreply.github.com>
2025-06-28 19:01:08 +02:00

130 lines
No EOL
6.3 KiB
Handlebars

<li class="inventory-item" data-item-id="{{item.id}}">
<img src="{{item.img}}" class="item-img" data-action="useItem"/>
<div class="item-label">
<div class="item-name">{{item.name}}</div>
{{#if (eq type 'weapon')}}
<div class="item-tags">
{{#if isSidebar}}
<div class="item-labels">
<div class="label">
{{localize (concat 'DAGGERHEART.Abilities.' item.system.trait '.name')}}
{{localize (concat 'DAGGERHEART.Range.' item.system.range '.name')}}
<span> - </span>
{{item.system.damage.value}}
({{localize (concat 'DAGGERHEART.DamageType.' item.system.damage.type '.abbreviation')}})
</div>
</div>
{{else}}
<div class="tag">
{{localize (concat 'DAGGERHEART.Abilities.' item.system.trait '.name')}}
{{localize (concat 'DAGGERHEART.Range.' item.system.range '.name')}}
</div>
<div class="tag">
{{item.system.damage.value}}
({{localize (concat 'DAGGERHEART.DamageType.' item.system.damage.type '.abbreviation')}})
</div>
<div class="tag">
{{localize (concat 'DAGGERHEART.Burden.' item.system.burden)}}
</div>
{{/if}}
</div>
{{/if}}
{{#if (eq type 'armor')}}
{{#if isSidebar}}
<div class="item-labels">
<div class="label">
{{localize "DAGGERHEART.Sheets.Armor.baseScore"}}:
{{item.system.baseScore}}
</div>
</div>
{{else}}
<div class="item-tags">
<div class="tag">
{{localize "DAGGERHEART.Sheets.Armor.baseScore"}}:
{{item.system.baseScore}}
</div>
<div class="tag">
{{localize "DAGGERHEART.Sheets.Armor.baseThresholds.base"}}:
{{item.system.baseThresholds.major}}
<span>/</span>
{{item.system.baseThresholds.severe}}
</div>
</div>
{{/if}}
{{/if}}
{{#if (eq type 'domainCard')}}
{{#if isSidebar}}
<div class="item-labels">
<div class="label">
{{localize (concat 'DAGGERHEART.Domain.CardTypes.' item.system.type)}}
<span> - </span>
{{localize (concat 'DAGGERHEART.Domains.' 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.Domain.CardTypes.' item.system.type)}}
</div>
<div class="tag">
{{localize (concat 'DAGGERHEART.Domains.' item.system.domain '.label')}}
</div>
<div class="tag">
<span class="recall-label">{{localize "DAGGERHEART.Sheets.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.Condition.' status '.name')}}
</div>
{{/each}}
</div>
{{/if}}
</div>
<div class="controls">
{{#if (eq type 'weapon')}}
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
<i class="fa-solid fa-hands"></i>
</a>
{{/if}}
{{#if (eq type 'armor')}}
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
<i class="fa-solid fa-shield"></i>
</a>
{{/if}}
{{#if (eq type 'domainCard')}}
{{#unless item.system.inVault}}
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToVault'}}">
<i class="fa-solid fa-arrow-down"></i>
</a>
{{else}}
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToLoadout'}}">
<i class="fa-solid fa-arrow-up"></i>
</a>
{{/unless}}
{{/if}}
<a data-action="toChat" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToChat'}}"><i class="fa-regular fa-message"></i></a>
<a data-action="triggerContextMenu" data-tooltip="{{localize 'DAGGERHEART.Tooltip.moreOptions'}}"><i class="fa-solid fa-ellipsis-vertical"></i></a>
</div>
</li>