diff --git a/lang/de.json b/lang/de.json
index 7ceaf1c..bd65e5d 100644
--- a/lang/de.json
+++ b/lang/de.json
@@ -17,7 +17,8 @@
"midgard5.phase-movement": "Bewegungsphase",
"midgard5.no-encounter": "Kein Kampf",
"midgard5.encounter-not-started": "Kein aktiver Kampf",
- "midgard5.initiative": "Handlungsrang",
+ "midgard5.initiative": "Initiative",
+ "midgard5.actionrank": "Handlungsrang",
"midgard5.combat-join": "Kampf Beitreten/Handlungsrang zurücksetzen",
"midgard5.combat-ranged": "Fernangriff",
@@ -311,10 +312,15 @@
"midgard5.spell-type": "Art",
"midgard5.spell-process": "Prozess",
"midgard5.spell-castDuration": "Zauberdauer",
+ "midgard5.spell-castDuration-short": "Zd",
"midgard5.spell-range": "Reichweite",
+ "midgard5.spell-range-short": "Rw",
"midgard5.spell-effectTarget": "Wirkunsziel",
+ "midgard5.spell-effectTarget-short": "Wz",
"midgard5.spell-effectArea": "Wirkungsbereich",
+ "midgard5.spell-effectArea-short": "Wb",
"midgard5.spell-effectDuration": "Wirkungsdauer",
+ "midgard5.spell-effectDuration-short": "Wd",
"midgard5.spell-origin": "Ursprung",
"midgard5.spell-agens": "Agens",
"midgard5.spell-reagens": "Reagens",
diff --git a/source/index.ts b/source/index.ts
index deb2690..49f7311 100644
--- a/source/index.ts
+++ b/source/index.ts
@@ -81,6 +81,15 @@ Hooks.once("init", async () => {
return false;
});
+ Handlebars.registerHelper("skillEwInList", (skillName: string, list: any) => {
+ for (let key in list) {
+ if (list[key]?.label?.toLowerCase() === skillName?.toLowerCase()) {
+ return list[key].calc.ew;
+ }
+ }
+ return false;
+ });
+
Handlebars.registerHelper("stripHtml", function (param) {
var regex = /(<([^>]+)>)/gi;
return param.replace(regex, "");
diff --git a/source/module/actors/M5Character.ts b/source/module/actors/M5Character.ts
index 46f2263..290bae8 100644
--- a/source/module/actors/M5Character.ts
+++ b/source/module/actors/M5Character.ts
@@ -572,6 +572,14 @@ export class M5Character extends Actor {
label: item.name,
process: "midgard5.spell-process-" + item.system.process,
calc: item.system.calc,
+ type: item.system.type,
+ castDuration: item.system.castDuration || 0,
+ ap: item.system.ap || 0,
+ range: item.system.range|| 0,
+ effectTarget: item.system.effectTarget,
+ effectArea: item.system.effectArea,
+ effectDuration: item.system.effectDuration || 0,
+ equipped: item.system?.equipped || false,
};
});
}
diff --git a/source/template.json b/source/template.json
index 928e687..de65935 100644
--- a/source/template.json
+++ b/source/template.json
@@ -264,7 +264,8 @@
"umgebung": "midgard5.spell-target-umgebung",
"geist": "midgard5.spell-target-geist",
"koerper": "midgard5.spell-target-koerper"
- }
+ },
+ "spellSpecialization": "none"
},
"kampfkunstSelection": {
"kampfkunstTypeSelection": {
diff --git a/templates/sheets/character/combat.hbs b/templates/sheets/character/combat.hbs
index 9231f72..44abf11 100644
--- a/templates/sheets/character/combat.hbs
+++ b/templates/sheets/character/combat.hbs
@@ -8,9 +8,22 @@
| {{localize "midgard5.movementRange"}} |
{{data.calc.stats.movement.value}} |
+ |
+ |
+
+
| {{localize "midgard5.initiative"}} |
+
+ {{#if (isSkillInList (localizeMidgard "anfuehren") data.calc.skills.general)}}
+ {{skillEwInList (localizeMidgard "anfuehren") data.calc.skills.general}}
+ {{else}}
+ {{skillEw actor._id data.skills.general.anfuehren}}
+ {{/if}}
+ |
+ {{localize "midgard5.actionrank"}} |
{{data.calc.attributes.gw.value}} |
+
| {{localize "midgard5.defense"}} |
{{data.calc.stats.defense.value}} |
{{localize "midgard5.defenseBonus"}} |
@@ -28,7 +41,7 @@
-
+
@@ -196,4 +209,44 @@
+
+ {{#if actor.system.info.magicUsing }}
+
+
+
+
+
+
+ | {{localize "TYPES.Item.spell"}} |
+ {{localize "midgard5.spell-castDuration"}} |
+ {{localize "midgard5.actor-ap"}} |
+ {{localize "midgard5.ew"}} |
+  |
+  |
+
+
+
+ {{#each data.calc.spells as |item itemId|}}
+ {{#if item.equipped}}
+
+ | {{item.label}}{{#if item.special}}(*){{/if}} |
+ {{item.castDuration}} |
+ {{item.ap}} |
+ {{item.calc.ew}} |
+
+ {{#if item.equipped}}
+
+ {{else}}
+
+ {{/if}}
+ |
+ |
+
+ {{/if}}
+ {{/each}}
+
+
+
+
+ {{/if}}
diff --git a/templates/sheets/character/gear.hbs b/templates/sheets/character/gear.hbs
index 4a5158a..d56105a 100644
--- a/templates/sheets/character/gear.hbs
+++ b/templates/sheets/character/gear.hbs
@@ -59,6 +59,7 @@
+{{#unless (eq (count data.calc.gear.containers) 0)}}
{{localize "midgard5.itemsInContainers"}}
{{#each data.calc.gear.containers as |container containerId|}}
@@ -205,6 +206,9 @@
{{/each}}
+{{/unless}}
+
+
{{localize "midgard5.allItems"}}
diff --git a/templates/sheets/character/skills.hbs b/templates/sheets/character/skills.hbs
index c85769e..bea88e2 100644
--- a/templates/sheets/character/skills.hbs
+++ b/templates/sheets/character/skills.hbs
@@ -67,7 +67,7 @@
{{skill.fw}}
- {{!-- {{| {{skill.fw}} | }} --}}
+
{{skill.calc.bonus}} |
{{skill.calc.ew}} |
{{skill.pp}} |
diff --git a/templates/sheets/character/spells.hbs b/templates/sheets/character/spells.hbs
index 90d636a..d54a85d 100644
--- a/templates/sheets/character/spells.hbs
+++ b/templates/sheets/character/spells.hbs
@@ -1,23 +1,78 @@
-
-
-
- | {{localize "TYPES.Item.spell"}} |
- {{localize "midgard5.ew"}} |
- |
-
- |
-
-
- {{#each data.calc.spells as |item itemId|}}
-
- |
- {{item.label}}
- {{localize item.process}}
- |
- {{item.calc.ew}} |
- |
- |
-
- {{/each}}
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+ | {{localize "midgard5.spellCasting"}} |
+ {{data.calc.stats.spellCasting.value}} |
+ |
+ {{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}} |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+ | {{localize "TYPES.Item.spell"}} |
+ {{localize "midgard5.spell-type"}} |
+ {{localize "midgard5.spell-castDuration-short"}} |
+ {{localize "midgard5.actor-ap-short"}} |
+ {{localize "midgard5.spell-range-short"}} |
+ {{localize "midgard5.spell-effectTarget"}} |
+ {{localize "midgard5.spell-effectArea-short"}} |
+ {{localize "midgard5.spell-effectDuration-short"}} |
+ {{localize "midgard5.ew"}} |
+  |
+  |
+
+ |
+
+
+ {{#each data.calc.spells as |item itemId|}}
+
+ |
+ {{item.label}}
+ {{localize item.process}}
+ |
+ {{localize (m5concat 'midgard5.spell-type-' item.type)}} |
+ {{item.castDuration}} |
+ {{item.ap}} |
+ {{item.range}} |
+ {{localize (m5concat 'midgard5.spell-target-' item.effectTarget)}} |
+ {{item.effectArea}} |
+ {{item.effectDuration}} |
+ {{item.calc.ew}} |
+
+ {{#if item.equipped}}
+
+ {{else}}
+
+ {{/if}}
+ |
+ |
+ |
+
+ {{/each}}
+
+
+
+
+
+