diff --git a/source/module/actors/M5Character.ts b/source/module/actors/M5Character.ts index 071382a..d783216 100644 --- a/source/module/actors/M5Character.ts +++ b/source/module/actors/M5Character.ts @@ -99,7 +99,7 @@ export class M5Character extends Actor { const data = (this as any).system; if (!data) return null; - ret.level = M5Character.levelFromExp(data.es); + ret.level = M5Character.levelFromExp(data.info.race === "Zwerg" ? Math.min(data.calc.stats?.hoard * 2 || 0, data.es) : data.es); ret.attributes.st.value = M5Character.attributeMinMax(data.attributes.st); // TODO item effects ret.attributes.gs.value = M5Character.attributeMinMax(data.attributes.gs); @@ -204,6 +204,8 @@ export class M5Character extends Actor { magic: item.system.magic, calc: item.system.calc, equipped: item.system?.equipped, + valuable: item.system?.valuable, + hoarded: item.system?.hoarded, weight: item.system.weight || 0, containerId: item.system.containerId || "", value: item.system.value || 0, diff --git a/templates/sheets/item/armor.hbs b/templates/sheets/item/armor.hbs index d43dd9e..1c1c8ea 100644 --- a/templates/sheets/item/armor.hbs +++ b/templates/sheets/item/armor.hbs @@ -24,12 +24,12 @@ - {{#unless (eq data.info.race "Zwerg")}} + {{#if (eq item.parent.system.info.race "Zwerg")}} - {{/unless}} + {{/if}} diff --git a/templates/sheets/item/defensiveWeapon.hbs b/templates/sheets/item/defensiveWeapon.hbs index 27c0fea..80ead44 100644 --- a/templates/sheets/item/defensiveWeapon.hbs +++ b/templates/sheets/item/defensiveWeapon.hbs @@ -24,7 +24,7 @@ - {{#if (eq data.info.race "Zwerg")}} + {{#if (eq item.parent.system.info.race "Zwerg")}} diff --git a/templates/sheets/item/item.hbs b/templates/sheets/item/item.hbs index 46b3134..c55afeb 100644 --- a/templates/sheets/item/item.hbs +++ b/templates/sheets/item/item.hbs @@ -21,12 +21,12 @@ - {{#unless (eq data.info.race "Zwerg")}} + {{#if (eq item.parent.system.info.race "Zwerg")}} - {{/unless}} + {{/if}} diff --git a/templates/sheets/item/weapon.hbs b/templates/sheets/item/weapon.hbs index 060035e..dbd69b7 100644 --- a/templates/sheets/item/weapon.hbs +++ b/templates/sheets/item/weapon.hbs @@ -29,7 +29,7 @@ - {{#if (eq data.info.race "Zwerg")}} + {{#if (eq item.parent.system.info.race "Zwerg")}}