{{!-- SPDX-FileCopyrightText: 2021 Johannes Loher SPDX-FileCopyrightText: 2021 Gesina Schwalbe SPDX-FileCopyrightText: 2021 Siegfried Krug SPDX-License-Identifier: MIT --}} {{!-- WEAPONS --}}

{{localize 'DS4.ItemTypeWeaponPlural'}}

{{#unless (isEmpty itemsByType.weapon)}}
    {{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true type='weapon'}} {{!-- attack type --}}
    {{localize 'DS4.AttackTypeAbbr'}}
    {{!-- weapon bonus --}}
    {{localize 'DS4.WeaponBonusAbbr'}}
    {{!-- opponent defense --}}
    {{localize 'DS4.OpponentDefenseAbbr'}}
    {{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}} {{#each itemsByType.weapon as |itemData id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true hasQuantity=true}} {{!-- attack type --}} {{!-- weapon bonus --}}
    {{ itemData.data.weaponBonus}}
    {{!-- opponent defense --}}
    {{#if itemData.data.opponentDefenseForAttackType.melee includeZero=true}} {{#if itemData.data.opponentDefenseForAttackType.ranged includeZero=true}} {{itemData.data.opponentDefenseForAttackType.melee}}/{{itemData.data.opponentDefenseForAttackType.ranged}} {{else}} {{itemData.data.opponentDefenseForAttackType.melee}} {{/if}} {{else}} {{itemData.data.opponentDefenseForAttackType.ranged}} {{/if}}
    {{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}} {{/each}}
{{/unless}} {{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle' documentType='item' type='weapon'}} {{!-- ARMOR --}}

{{localize 'DS4.ItemTypeArmorPlural'}}

{{#unless (isEmpty itemsByType.armor)}}
    {{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true type="armor"}} {{!-- armor material type --}}
    {{localize 'DS4.ArmorMaterialTypeAbbr'}}
    {{!-- armor type --}}
    {{localize 'DS4.ArmorTypeAbbr'}}
    {{!-- armor value --}}
    {{localize 'DS4.ArmorValueAbbr'}}
    {{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}} {{#each itemsByType.armor as |itemData id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true hasQuantity=true}} {{!-- armor material type --}}
    {{lookup @root/config.i18n.armorMaterialTypesAbbr itemData.data.armorMaterialType}}
    {{!-- armor type --}}
    {{lookup @root/config.i18n.armorTypesAbbr itemData.data.armorType}}
    {{!-- armor value --}}
    {{ itemData.data.armorValue}}
    {{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}} {{/each}}
{{/unless}} {{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle' documentType='item' type='armor'}} {{!-- SHIELD --}}

{{localize 'DS4.ItemTypeShieldPlural'}}

{{#unless (isEmpty itemsByType.shield)}}
    {{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true type='shield'}} {{!-- armor value --}}
    {{localize 'DS4.ArmorValueAbbr'}}
    {{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}} {{#each itemsByType.shield as |itemData id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true hasQuantity=true}} {{!-- armor value --}}
    {{itemData.data.armorValue}}
    {{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}} {{/each}}
{{/unless}} {{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle' documentType='item' type='shield'}} {{!-- EQUIPMENT --}}

{{localize 'DS4.ItemTypeEquipmentPlural'}}

{{#unless (isEmpty itemsByType.equipment)}}
    {{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true type='equipment'}} {{!-- storage location --}}
    {{localize 'DS4.StorageLocation'}}
    {{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}} {{#each itemsByType.equipment as |itemData id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true hasQuantity=true}} {{!-- storage location --}} {{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}} {{/each}}
{{/unless}} {{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle' documentType='item' type='equipment'}} {{!-- LOOT --}}

{{localize 'DS4.ItemTypeLootPlural'}}

{{#unless (isEmpty itemsByType.loot)}}
    {{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs hasQuantity=true type='loot'}} {{!-- storage location --}}
    {{localize 'DS4.StorageLocation'}}
    {{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}} {{#each itemsByType.loot as |itemData id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData hasQuantity=true}} {{!-- storage location --}} {{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}} {{/each}}
{{/unless}} {{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle' documentType='item' type='loot'}}