- Container behavior for Weapons, Def. Weapons and Armor is now the same as for items

- Fixed some Bugs
This commit is contained in:
Ender 2024-01-20 14:57:17 +01:00
parent 33c65735bd
commit 9da36e6a6f
7 changed files with 324 additions and 196 deletions

View File

@ -17,6 +17,7 @@
"midgard5.phase-movement": "Bewegungsphase", "midgard5.phase-movement": "Bewegungsphase",
"midgard5.no-encounter": "Kein Kampf", "midgard5.no-encounter": "Kein Kampf",
"midgard5.encounter-not-started": "Kein aktiver Kampf", "midgard5.encounter-not-started": "Kein aktiver Kampf",
"midgard5.initiative": "Initiative",
"midgard5.time-duration": "Dauer", "midgard5.time-duration": "Dauer",
"midgard5.time-round": "Runde(n)", "midgard5.time-round": "Runde(n)",
@ -36,7 +37,7 @@
"midgard5.attributes": "Eigenschaften", "midgard5.attributes": "Eigenschaften",
"midgard5.points": "Punkte", "midgard5.points": "Punkte",
"midgard5.calculated-value": "Berechneter Wert", "midgard5.calculated-value": "Berechneter Wert",
"midgard5.calculated-values": "Sonstige Werte", "midgard5.calculated-values": "Werte und Boni",
"midgard5.skill": "Fertigkeit", "midgard5.skill": "Fertigkeit",
"midgard5.skill-value": "Fertigkeitswert", "midgard5.skill-value": "Fertigkeitswert",
@ -239,8 +240,8 @@
"midgard5.weapon-skills": "Waffenfertigkeiten", "midgard5.weapon-skills": "Waffenfertigkeiten",
"midgard5.unlearned-skill": "Ungelernte Fertigkeit", "midgard5.unlearned-skill": "Ungelernte Fertigkeit",
"midgard5.unlearned-skills": "Ungelernte Fertigkeiten", "midgard5.unlearned-skills": "Ungelernte Fertigkeiten",
"midgard5.innate-ability": "Angeborene/Besondere Fertigkeit", "midgard5.innate-ability": "Angeborene/Besondere Fähigkeit",
"midgard5.innate-abilities": "Angeborene/Besondere Fertigkeit", "midgard5.innate-abilities": "Angeborene und besondere Fähigkeiten",
"midgard5.base-damage": "Grundschaden", "midgard5.base-damage": "Grundschaden",
"midgard5.weapon": "Waffe", "midgard5.weapon": "Waffe",
@ -254,6 +255,11 @@
"midgard5.active": "Aktiv", "midgard5.active": "Aktiv",
"midgard5.rangedWeapon": "Schusswaffe", "midgard5.rangedWeapon": "Schusswaffe",
"midgard5.assignItemToCharacter": "Füge Gegenstand einem Charakter hinzu, um hier etwas auswählen zu können", "midgard5.assignItemToCharacter": "Füge Gegenstand einem Charakter hinzu, um hier etwas auswählen zu können",
"midgard5.showAll": "Alle anzeigen",
"midgard5.wealthAndContainers": "Vermögen und Aufbewahrung",
"midgard5.itemsInContainers": "Gegenstände in Aufbewahrung",
"midgard5.allItems": "Alle Gegenstände",
"midgard5.pw": "Prüfwurf", "midgard5.pw": "Prüfwurf",
"midgard5.attack": "Angriff", "midgard5.attack": "Angriff",

View File

@ -90,6 +90,16 @@ Hooks.once("init", async () => {
return label.toLowerCase().includes(contains.toLowerCase()); return label.toLowerCase().includes(contains.toLowerCase());
}); });
Handlebars.registerHelper("count", (object: any) => {
var length = 0;
for( var key in object ) {
if( object.hasOwnProperty(key) ) {
++length;
}
}
return length;
});
// Default Sheet für Items definieren und das Standardsheet deaktivieren // Default Sheet für Items definieren und das Standardsheet deaktivieren
Items.unregisterSheet("core", ItemSheet); Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("midgard5", M5ItemSheet, { makeDefault: true }); Items.registerSheet("midgard5", M5ItemSheet, { makeDefault: true });

View File

@ -157,6 +157,7 @@ export interface M5AttributeCalculated extends M5ModResult {
export interface M5CharacterCalculatedData { export interface M5CharacterCalculatedData {
level: number; level: number;
initiative: number;
attributes: { attributes: {
st: M5AttributeCalculated; st: M5AttributeCalculated;
gs: M5AttributeCalculated; gs: M5AttributeCalculated;

View File

@ -39,6 +39,7 @@ export class M5Character extends Actor {
): M5CharacterCalculatedData { ): M5CharacterCalculatedData {
let ret: M5CharacterCalculatedData = { let ret: M5CharacterCalculatedData = {
level: 0, level: 0,
initiative: 0,
attributes: { attributes: {
st: { value: 0, bonus: 0, mods: [] }, st: { value: 0, bonus: 0, mods: [] },
gs: { value: 0, bonus: 0, mods: [] }, gs: { value: 0, bonus: 0, mods: [] },
@ -101,6 +102,8 @@ export class M5Character extends Actor {
ret.level = M5Character.levelFromExp(data.info.race === "Zwerg" ? Math.min(data.calc.stats?.hoard * 2 || 0, data.es) : data.es); ret.level = M5Character.levelFromExp(data.info.race === "Zwerg" ? Math.min(data.calc.stats?.hoard * 2 || 0, data.es) : data.es);
ret.initiative = data.skills.general.anfuehren.fw;
ret.attributes.st.value = M5Character.attributeMinMax(data.attributes.st); // TODO item effects ret.attributes.st.value = M5Character.attributeMinMax(data.attributes.st); // TODO item effects
ret.attributes.gs.value = M5Character.attributeMinMax(data.attributes.gs); ret.attributes.gs.value = M5Character.attributeMinMax(data.attributes.gs);
ret.attributes.gw.value = M5Character.attributeMinMax(data.attributes.gw); ret.attributes.gw.value = M5Character.attributeMinMax(data.attributes.gw);

View File

@ -11,30 +11,31 @@
.flexcolumn { .flexcolumn {
flex-wrap: wrap; flex-wrap: wrap;
flex-direction: column;
} }
.flexcolumn-1 { .flexcolumn-1 {
flex: 100%; flex-basis: 100%;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flexcolumn-2 { .flexcolumn-2 {
flex: 50%; flex-basis: 50%;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flexcolumn-3 { .flexcolumn-3 {
flex: 33%; flex-basis: 33%;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flexcolumn-4 { .flexcolumn-4 {
flex: 25%; flex-basis: 25%;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flexcolumn-5 { .flexcolumn-5 {
flex: 20%; flex-basis: 20%;
flex-wrap: wrap; flex-wrap: wrap;
} }

View File

@ -1,5 +1,32 @@
<div class="flexbox"> <div class="flexbox">
<div class="flexcolumn-3">
<div class="flexcolumn-1">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/magic/time/arrows-circling-pink.webp" class="flexpart-icon">{{localize "midgard5.calculated-values"}}</div>
<table>
<tr height = 10px></tr>
<tr>
<td>{{localize "midgard5.initiative"}} </td>
<td class="fixed-value">{{data.calc.initiative}}</td>
<td>{{localize "midgard5.movementRange"}}</td>
<td class="fixed-value">{{data.calc.stats.movement.value}}</td>
</tr>
<td>{{localize "midgard5.defense"}}</td>
<td class="fixed-value">{{data.calc.stats.defense.value}}</td>
<td>{{localize "midgard5.defenseBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.defenseBonus.value}}</td>
</tr>
<tr>
<td>{{localize "midgard5.attackBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.attackBonus.value}}</td>
<td>{{localize "midgard5.damageBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.damageBonus.value}}</td>
</tr>
</table>
</div>
</div>
<div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/skills/melee/hand-grip-sword-white-brown.webp" class="flexpart-icon">{{localize "midgard5.attack"}}</div> <div class="flexpart-header"><img src="icons/skills/melee/hand-grip-sword-white-brown.webp" class="flexpart-icon">{{localize "midgard5.attack"}}</div>
<table> <table>
@ -78,33 +105,7 @@
</div> </div>
</div> </div>
<div class="flexcolumn-3"> <div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/magic/time/arrows-circling-pink.webp" class="flexpart-icon">{{localize "midgard5.calculated-values"}}</div>
<table>
<tr height = 10px></tr>
<tr>
<td>{{localize "midgard5.movementRange"}}</td>
<td class="fixed-value">{{data.calc.stats.movement.value}}</td>
<td>&nbsp;</td>
<td class="fixed-value">&nbsp;</td>
</tr>
<td>{{localize "midgard5.defense"}}</td>
<td class="fixed-value">{{data.calc.stats.defense.value}}</td>
<td>{{localize "midgard5.defenseBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.defenseBonus.value}}</td>
</tr>
<tr>
<td>{{localize "midgard5.damageBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.damageBonus.value}}</td>
<td>{{localize "midgard5.attackBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.attackBonus.value}}</td>
</tr>
</table>
</div>
</div>
<div class="flexcolumn-3">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/skills/melee/shield-block-gray-orange.webp" class="flexpart-icon">{{localize "midgard5.defense"}}</div> <div class="flexpart-header"><img src="icons/skills/melee/shield-block-gray-orange.webp" class="flexpart-icon">{{localize "midgard5.defense"}}</div>
<table> <table>

View File

@ -1,6 +1,7 @@
<h3>{{localize "midgard5.wealthAndContainers"}}</h3>
<div class="flexbox"> <div class="flexbox">
<div class="flexcolumn-2">
<div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/commodities/currency/coins-assorted-mix-copper-silver-gold.webp" class="flexpart-icon">{{localize "midgard5.currency"}}</div> <div class="flexpart-header"><img src="icons/commodities/currency/coins-assorted-mix-copper-silver-gold.webp" class="flexpart-icon">{{localize "midgard5.currency"}}</div>
<table> <table>
@ -29,165 +30,9 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="flexpart">
<div class="flexpart-header">
<img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon">
{{localize "midgard5.gear"}}
(alle <input id="data.info.showAllItems" class="checkbox" type="checkbox" name="data.info.showAllItems" {{checked data.info.showAllItems}}>)
</div>
<table>
<thead class="theader">
<tr>
<th class="title">{{localize "TYPES.Item.item"}}</th>
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th></th>
<th class="title add-item"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
<tr height = 10px></tr>
</tr>
{{#each data.calc.gear.items as |item itemId|}}
{{#if (or ../data.info.showAllItems (eq item.containerId ""))}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td>
<i class="fa fa-minus-circle quantity-decrease" style="cursor: pointer"></i>
<span>{{item.quantity}}</span>
<i class="fa fa-plus-circle quantity-increase" style="cursor: pointer"></i>
</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
</div>
<div class="flexpart">
<div class="flexpart-header"><img src="icons/weapons/swords/sword-guard-engraved-worn.webp" class="flexpart-icon">{{localize "midgard5.weapons"}}</div>
<table>
<thead>
<tr>
<th class="title">{{localize "TYPES.Item.weapon"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title add-weapon"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
{{#each data.calc.gear.weapons as |item itemId|}}
<tr data-item="{{itemId}}">
<td class="padding edit-item">{{item.label}}</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
</div>
<div class="flexpart">
<div class="flexpart-header"><img src="icons/equipment/shield/heater-wooden-brown-axe.webp" class="flexpart-icon">{{localize "midgard5.defensive-weapons"}}</div>
<table>
<thead>
<tr>
<th class="title">{{localize "TYPES.Item.defensiveWeapon"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title add-defensiveWeapon"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
{{#each data.calc.gear.defensiveWeapons as |item itemId|}}
<tr data-item="{{itemId}}">
<td class="padding edit-item">{{item.label}}</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
</div>
<div class="flexpart">
<div class="flexpart-header"><img src="icons/equipment/hand/gauntlet-armored-steel-grey.webp" class="flexpart-icon">{{localize "midgard5.armor"}}</div>
<table>
<thead>
<tr>
<th class="title">{{localize "TYPES.Item.armor"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title add-armor"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
{{#each data.calc.gear.armor as |item itemId|}}
<tr data-item="{{itemId}}">
<td class="padding edit-item">{{item.label}}</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div> </div>
<div class="flexcolumn-2"> <div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/containers/chest/chest-simple-box-brown.webp" class="flexpart-icon">{{localize "TYPES.Item.container"}}</div> <div class="flexpart-header"><img src="icons/containers/chest/chest-simple-box-brown.webp" class="flexpart-icon">{{localize "TYPES.Item.container"}}</div>
<table> <table>
@ -197,7 +42,7 @@
<th class="title center">{{localize "midgard5.item-value"}}</th> <th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th> <th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th> <th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th class="title add-container"><i class="fa-regular fa-plus"></i></th> <th class="title">&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -226,8 +71,13 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</div>
{{#each data.calc.gear.containers as |container containerId|}} <h3>{{localize "midgard5.itemsInContainers"}}</h3>
<div class="flexbox">
{{#each data.calc.gear.containers as |container containerId|}}
<div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="{{container.icon}}" class="flexpart-icon">{{container.label}}</div> <div class="flexpart-header"><img src="{{container.icon}}" class="flexpart-icon">{{container.label}}</div>
<table> <table>
@ -271,9 +121,265 @@
</tr> </tr>
{{/if}} {{/if}}
{{/each}} {{/each}}
{{#each ../data.calc.gear.weapons as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td></td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
{{#each ../data.calc.gear.defensiveWeapons as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td></td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
{{#each ../data.calc.gear.armor as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td></td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
</tbody> </tbody>
</table> </table>
</div> </div>
{{/each}}
</div> </div>
{{/each}}
</div>
<h3>
{{localize "midgard5.allItems"}}
<input id="data.info.showAllItems" class="checkbox" type="checkbox" name="data.info.showAllItems" {{checked data.info.showAllItems}} style="float: right;">
<label for="data.info.showAllItems" style="font-size: normal; font-weight: normal; font-style: italic; float: right;">{{localize "midgard5.showAll"}}&nbsp;</label>
</h3>
<div class="flexbox">
{{#unless (eq (count data.calc.gear.items) 0)}}
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon">{{localize "midgard5.gear"}}</div>
<table>
<thead class="theader">
<tr>
<th class="title">{{localize "TYPES.Item.item"}}</th>
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th></th>
<th class="title add-item"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
<tr height = 10px></tr>
</tr>
{{#each data.calc.gear.items as |item itemId|}}
{{#if (or ../data.info.showAllItems (eq item.containerId ""))}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td>
<i class="fa fa-minus-circle quantity-decrease" style="cursor: pointer"></i>
<span>{{item.quantity}}</span>
<i class="fa fa-plus-circle quantity-increase" style="cursor: pointer"></i>
</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
</div>
</div>
{{/unless}}
{{#unless (eq (count data.calc.gear.weapons) 0)}}
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header">
<img src="icons/weapons/swords/sword-guard-engraved-worn.webp" class="flexpart-icon">{{localize "midgard5.weapons"}}</div>
<table>
<thead>
<tr>
<th class="title">{{localize "TYPES.Item.weapon"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title add-weapon"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
{{#each data.calc.gear.weapons as |item itemId|}}
{{#if (or ../data.info.showAllItems (eq item.containerId ""))}}
<tr data-item="{{itemId}}">
<td class="padding edit-item">{{item.label}}</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
</div>
</div>
{{/unless}}
{{#unless (eq (count data.calc.gear.defensiveWeapons) 0)}}
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/equipment/shield/heater-wooden-brown-axe.webp" class="flexpart-icon">{{localize "midgard5.defensive-weapons"}}</div>
<table>
<thead>
<tr>
<th class="title">{{localize "TYPES.Item.defensiveWeapon"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title add-defensiveWeapon"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
{{#each data.calc.gear.defensiveWeapons as |item itemId|}}
{{#if (or ../data.info.showAllItems (eq item.containerId ""))}}
<tr data-item="{{itemId}}">
<td class="padding edit-item">{{item.label}}</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
</div>
</div>
{{/unless}}
{{#unless (eq (count data.calc.gear.armor) 0)}}
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/equipment/hand/gauntlet-armored-steel-grey.webp" class="flexpart-icon">{{localize "midgard5.armor"}}</div>
<table>
<thead>
<tr>
<th class="title">{{localize "TYPES.Item.armor"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title add-armor"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
{{#each data.calc.gear.armor as |item itemId|}}
{{#if (or ../data.info.showAllItems (eq item.containerId ""))}}
<tr data-item="{{itemId}}">
<td class="padding edit-item">{{item.label}}</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
</div>
</div>
{{/unless}}
</div> </div>