{{!-- 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 |item id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item isEquipable=true hasQuantity=true}} {{!-- attack type --}} {{!-- weapon bonus --}}
    {{ item.system.weaponBonus}}
    {{!-- opponent defense --}}
    {{#if item.system.opponentDefenseForAttackType.melee includeZero=true}} {{#if item.system.opponentDefenseForAttackType.ranged includeZero=true}} {{item.system.opponentDefenseForAttackType.melee}}/{{item.system.opponentDefenseForAttackType.ranged}} {{else}} {{item.system.opponentDefenseForAttackType.melee}} {{/if}} {{else}} {{item.system.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 |item id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item isEquipable=true hasQuantity=true}} {{!-- armor material type --}}
    {{lookup @root/config.i18n.armorMaterialTypesAbbr item.system.armorMaterialType}}
    {{!-- armor type --}}
    {{lookup @root/config.i18n.armorTypesAbbr item.system.armorType}}
    {{!-- armor value --}}
    {{ item.system.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 |item id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item isEquipable=true hasQuantity=true}} {{!-- armor value --}}
    {{item.system.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 |item id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item 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 |item id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item 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'}}