diff --git a/lang/de.json b/lang/de.json index e586f56..02fda8d 100644 --- a/lang/de.json +++ b/lang/de.json @@ -253,6 +253,7 @@ "midgard5.learned-skills": "Gelernte Fertigkeiten", "midgard5.language": "Sprache", "midgard5.languages": "Sprachen", + "midgard5.writings": "Schriften", "midgard5.weapon-skill": "Waffenfertigkeit", "midgard5.weapon-skills": "Waffenfertigkeiten", "midgard5.unlearned-skill": "Ungelernte Fertigkeit", diff --git a/source/module/actors/M5Character.ts b/source/module/actors/M5Character.ts index 200df12..cb72e9e 100644 --- a/source/module/actors/M5Character.ts +++ b/source/module/actors/M5Character.ts @@ -367,6 +367,7 @@ export class M5Character extends Actor { ret.gear.weapons[item.id] = { label: label, + icon: item.img, skillId: item.system.skillId, magic: item.system.magic, valuable: item.system?.valuable, @@ -409,6 +410,7 @@ export class M5Character extends Actor { ret.gear.defensiveWeapons[item.id] = { label: label, + icon: item.img, skillId: item.system.skillId, magic: item.system.magic, valuable: item.system?.valuable, @@ -452,6 +454,7 @@ export class M5Character extends Actor { ret.gear.armor[item.id] = { label: label, + icon: item.img, magic: item.system.magic, valuable: item.system?.valuable, hoarded: item.system?.hoarded, @@ -464,57 +467,41 @@ export class M5Character extends Actor { containerId: item.system.containerId || "", }; }); - - // if (!skip?.encumbrance) { - // const item = context.items.filter((x) => x.name === "Belastung"); - // if (ret.stats.encumbrance > ret.stats.heavyLoad) { - // if (item.length === 0) { - // this.createEffect("Belastung", [{ id: "movement", operation: M5ModOperation.DIVISION, type: M5ModType.STAT, value: 2 }]); - // } else if (item.length === 1) { - // item[0].update({ - // data: { - // equipped: true, - // }, - // }); - // } else if (item.length === 2) { - // item[1]?.delete(); - // } - // } else if (ret.stats.encumbrance <= ret.stats.heavyLoad) { - // if (item.length === 1) { - // item[0]?.update({ - // data: { - // equipped: false, - // }, - // }); - // } - // } - // } - - // if (!skip?.encumbrance) { - // const item = context.items.filter((x) => x.name === "Höchstlast"); - // if (ret.stats.encumbrance > ret.stats.loadMax) { - // if (item.length === 0) { - // this.createEffect("Höchstlast", [{ id: "ap", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 1 }]); - // } else if (item.length === 1) { - // item[0].update({ - // data: { - // equipped: true, - // }, - // }); - // } else if (item.length === 2) { - // item[1]?.delete(); - // } - // } else if (ret.stats.encumbrance <= ret.stats.loadMax) { - // if (item.length === 1) { - // item[0]?.update({ - // data: { - // equipped: false, - // }, - // }); - // } - // } - // } - } + + //if (!skip?.encumbrance) { + //const item = context.items.filter((x) => x.name === "Belastung"); + //if (item.length === 0) { + // this.createEffect("Belastung", [ + // { id: "movement", operation: M5ModOperation.DIVISION, type: M5ModType.STAT, value: 2 }, + // { id: "attackBonus", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 4 }, + // { id: "defenseBonus", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 4 } + // ]); + //} else if (item.length === 2) { + // item[1]?.delete(); + //} + // + //if (item.length === 1) { + // item[0]?.update({ + // img: "icons/containers/bags/sack-simple-leather-orange.webp" }); + // } + // + //if (ret.stats.encumbrance <= ret.stats.heavyLoad) { + // item[0]?.update({ + // data: { + // equipped: false, + // } + // }); + // } + // + //if (ret.stats.encumbrance > ret.stats.heavyLoad) { + // item[0].update({ + // data: { + // equipped: true, + // }, + // }); + // } + //} + } if (!skip?.effects) { context.items @@ -530,6 +517,7 @@ export class M5Character extends Actor { ret.gear.effects[item.id] = { label: label, + icon: item.img, magic: item.system.magic, calc: item.system.calc, equipped: item.system?.equipped || false, @@ -547,6 +535,7 @@ export class M5Character extends Actor { const skillMap = ret.skills[item.system.type]; skillMap[item.id] = { label: item.name, + icon: item.img, fw: item.system.fw, attribute: item.system.attribute, pp: item.system.pp, @@ -589,6 +578,7 @@ export class M5Character extends Actor { ret.spells[item.id] = { label: item.name, + icon: item.img, process: "midgard5.spell-process-" + item.system.process, calc: item.system.calc, type: item.system.type, @@ -612,6 +602,7 @@ export class M5Character extends Actor { ret.kampfkuenste[item.id] = { label: item.name, + icon: item.img, isKido: item.system.isKido, type: item.system.type, variante: item.system.variante, diff --git a/templates/sheets/character/combat.hbs b/templates/sheets/character/combat.hbs index d2a38f2..bd11d3c 100644 --- a/templates/sheets/character/combat.hbs +++ b/templates/sheets/character/combat.hbs @@ -54,6 +54,7 @@ + @@ -65,6 +66,7 @@ {{#each data.calc.gear.weapons as |item itemId|}} {{#if item.equipped}} + @@ -81,6 +83,7 @@ {{/each}} + @@ -93,6 +96,7 @@
{{localize "TYPES.Item.weapon"}} {{localize "midgard5.ew"}} {{localize "midgard5.damage"}}
{{item.label}}{{#if item.special}}(*){{/if}} {{item.calc.ew}} {{item.damageBase}}
{{localize "midgard5.brawl"}} {{data.calc.stats.brawlFw}} 1d6 -4
+ @@ -103,6 +107,7 @@ {{#each data.calc.kampfkuenste as |item itemId|}} +
{{localize "TYPES.Item.kampfkunst"}} {{localize "midgard5.kampfkunst-variante-short"}} {{localize "midgard5.ew"}}
{{item.label}} {{#if item.isKido}} @@ -131,17 +136,20 @@ + + + @@ -151,6 +159,7 @@
{{localize "midgard5.defense"}} {{add data.calc.stats.defense.value data.calc.stats.defenseBonus.value}}
{{localize "midgard5.resistanceMind"}} {{data.calc.stats.resistanceMind.value}}
{{localize "midgard5.resistanceBody"}} {{data.calc.stats.resistanceBody.value}}
+ @@ -162,6 +171,7 @@ {{#each data.calc.gear.defensiveWeapons as |item itemId|}} {{#if item.equipped}} + @@ -182,6 +192,7 @@
{{localize "TYPES.Item.defensiveWeapon"}} {{localize "midgard5.ew"}} {{localize "midgard5.defenseBonus-short"}}
{{item.label}} {{item.calc.ew}} {{item.defenseBonus}}
+ @@ -191,6 +202,7 @@ {{#each data.calc.gear.armor as |item itemId|}} {{#if item.equipped}} +
{{localize "TYPES.Item.armor"}} {{localize "midgard5.actor-lp-short"}}
{{item.label}} {{lpProtection}} diff --git a/templates/sheets/character/effects.hbs b/templates/sheets/character/effects.hbs index 59808f5..1d06a1b 100644 --- a/templates/sheets/character/effects.hbs +++ b/templates/sheets/character/effects.hbs @@ -1,6 +1,7 @@ + {{#each data.calc.gear.effects as |item itemId|}} + + {{!--{{#unless (eq item.label "Belastung")}}--}} + {{!--{{/unless}}--}} {{/each}} diff --git a/templates/sheets/character/gear.hbs b/templates/sheets/character/gear.hbs index 0556540..100521a 100644 --- a/templates/sheets/character/gear.hbs +++ b/templates/sheets/character/gear.hbs @@ -69,6 +69,7 @@
{{localize "TYPES.Item.effect"}} @@ -9,6 +10,7 @@
{{item.label}} {{#if item.equipped}} @@ -18,7 +20,9 @@ {{/unless}} {{/if}}
+ @@ -83,6 +84,7 @@ {{#each ../data.calc.gear.items as |item itemId|}} {{#if (eq item.containerId containerId)}} + @@ -116,6 +118,7 @@ {{#each ../data.calc.gear.weapons as |item itemId|}} {{#if (eq item.containerId containerId)}} + @@ -145,6 +148,7 @@ {{#each ../data.calc.gear.defensiveWeapons as |item itemId|}} {{#if (eq item.containerId containerId)}} + @@ -174,6 +178,7 @@ {{#each ../data.calc.gear.armor as |item itemId|}} {{#if (eq item.containerId containerId)}} + @@ -222,6 +227,7 @@
{{localize "TYPES.Item.item"}} {{localize "midgard5.item-quantity"}} {{localize "midgard5.item-value"}}
{{item.label}}
{{item.label}}
{{item.label}}
{{item.label}}
+ @@ -234,6 +240,7 @@ {{#each data.calc.gear.containers as |item itemId|}} + @@ -269,6 +276,7 @@
{{localize "TYPES.Item.container"}} {{localize "midgard5.item-value"}} {{localize "midgard5.item-weight"}}
{{item.label}}
+ @@ -283,6 +291,7 @@ {{#each data.calc.gear.items as |item itemId|}} {{#if (or ../data.info.showAllItems (eq item.containerId ""))}} + @@ -325,6 +334,7 @@
{{localize "TYPES.Item.item"}} {{localize "midgard5.item-quantity"}} {{localize "midgard5.item-value"}}
{{item.label}}
+ @@ -337,6 +347,7 @@ {{#each data.calc.gear.weapons as |item itemId|}} {{#if (or ../data.info.showAllItems (eq item.containerId ""))}} +
{{localize "TYPES.Item.weapon"}} {{localize "midgard5.item-value"}} {{localize "midgard5.item-weight"}}
{{item.label}} {{#unless (or (eq item.value 0) (eq item.currency ""))}} @@ -370,6 +381,7 @@ + @@ -381,6 +393,7 @@ {{#each data.calc.gear.defensiveWeapons as |item itemId|}} {{#if (or ../data.info.showAllItems (eq item.containerId ""))}} +
{{localize "TYPES.Item.defensiveWeapon"}} {{localize "midgard5.item-value"}} {{localize "midgard5.item-weight"}}
{{item.label}} {{#unless (or (eq item.value 0) (eq item.currency ""))}} @@ -414,6 +427,7 @@ + @@ -425,6 +439,7 @@ {{#each data.calc.gear.armor as |item itemId|}} {{#if (or ../data.info.showAllItems (eq item.containerId ""))}} +
{{localize "TYPES.Item.armor"}} {{localize "midgard5.item-value"}} {{localize "midgard5.item-weight"}}
{{item.label}} {{#unless (or (eq item.value 0) (eq item.currency ""))}} diff --git a/templates/sheets/character/skills.hbs b/templates/sheets/character/skills.hbs index 731fb76..cbebdde 100644 --- a/templates/sheets/character/skills.hbs +++ b/templates/sheets/character/skills.hbs @@ -6,6 +6,7 @@ + @@ -17,6 +18,7 @@ {{#each data.calc.skills.innate as |skill skillId|}} + @@ -68,6 +70,7 @@
{{localize "midgard5.innate-ability"}} {{localize "midgard5.fw"}} {{localize "midgard5.bonus"}}
{{skill.label}} {{skill.fw}} {{skill.calc.bonus}}
+ @@ -80,8 +83,13 @@ {{#each data.calc.skills.combat as |skill skillId|}} + - + @@ -94,10 +102,11 @@
-
{{localize "midgard5.languages"}}
+
{{localize "midgard5.languages"}} & {{localize "midgard5.writings"}}
{{localize "midgard5.weapon-skill"}} {{localize "midgard5.fw"}} {{localize "midgard5.bonus"}}
{{skill.label}}{{skill.fw}} + + {{skill.fw}} + + {{skill.calc.bonus}} {{skill.calc.ew}} {{skill.pp}}
+ @@ -110,8 +119,13 @@ {{#each data.calc.skills.language as |skill skillId|}} + - + diff --git a/templates/sheets/character/spells.hbs b/templates/sheets/character/spells.hbs index d54a85d..df236c5 100644 --- a/templates/sheets/character/spells.hbs +++ b/templates/sheets/character/spells.hbs @@ -30,6 +30,7 @@
{{localize "midgard5.language"}} {{localize "midgard5.fw"}} {{localize "midgard5.bonus"}}
{{skill.label}}{{skill.fw}} + + {{skill.fw}} + + {{skill.calc.bonus}} {{skill.calc.ew}} {{skill.pp}}
+ @@ -40,13 +41,14 @@ - + {{#each data.calc.spells as |item itemId|}} + {{/each}} - -
{{localize "TYPES.Item.spell"}} {{localize "midgard5.spell-type"}} {{localize "midgard5.spell-castDuration-short"}}{{localize "midgard5.spell-effectDuration-short"}} {{localize "midgard5.ew"}}
{{item.label}} {{localize item.process}} @@ -70,8 +72,8 @@
+
+