diff --git a/lang/de.json b/lang/de.json index 9a45ae7..c6cc2eb 100644 --- a/lang/de.json +++ b/lang/de.json @@ -163,6 +163,7 @@ "faelschen": "Fälschen", "fangen": "Fangen", "fechten": "Fechten", + "fechtkunst": "Fechtkunst", "feueralchimie": "Feueralchimie", "gassenwissen": "Gassenwissen", "gaukeln": "Gaukeln", @@ -288,6 +289,16 @@ "attack": "Angriff", "damage": "Schaden", + "skill-goup-alltag": "Alltag", + "skill-goup-freiland": "Freiland", + "skill-goup-halbwelt": "Halbwelt", + "skill-goup-kampf": "Kampf", + "skill-goup-koerper": "Körper", + "skill-goup-sozial": "Sozial", + "skill-goup-unterwelt": "Unterwelt", + "skill-goup-waffen": "Waffen", + "skill-goup-wissen": "Wissen", + "spell-process-none": "Ohne", "spell-process-artefakte": "Artefakte", "spell-process-beherrschen": "Beherrschen", @@ -306,6 +317,7 @@ "spell-process-nekromantie": "Nekromantie", "spell-process-runenstaebe": "Runenstäbe", "spell-process-thaumatherapie": "Thaumatherapie", + "spell-process-thaumagraphie": "Thaumagraphie", "spell-process-veraendern": "Verändern", "spell-process-vigilsignien": "Vigilsignien", "spell-process-wundertat": "Wundertat", diff --git a/source/helpers.ts b/source/helpers.ts index f0c0572..845cc7b 100644 --- a/source/helpers.ts +++ b/source/helpers.ts @@ -107,4 +107,8 @@ export const loadHelpers = async function () { } return length; }); + + Handlebars.registerHelper("console", (object: any) => { + console.log(object); + }); }; diff --git a/source/module/actors/M5Character.ts b/source/module/actors/M5Character.ts index 4b9546e..3f83d15 100644 --- a/source/module/actors/M5Character.ts +++ b/source/module/actors/M5Character.ts @@ -461,6 +461,7 @@ export class M5Character extends Actor { } else { item.system.equipped = true; data.info.magicUsing = item.system.magicUsing; + data.lernKostenZauber = item.system.lernKostenZauber; } if (typeof data.info.class === "string") { diff --git a/source/module/sheets/M5CharacterSheet.ts b/source/module/sheets/M5CharacterSheet.ts index 3a4a898..01b8b5b 100644 --- a/source/module/sheets/M5CharacterSheet.ts +++ b/source/module/sheets/M5CharacterSheet.ts @@ -193,6 +193,36 @@ export default class M5CharacterSheet extends ActorSheet { }); }); + html.find(".pp-increase").on("click", async (event) => { + let target = event.target.closest("[data-pp-name]") as HTMLElement; + let ppName = target ? target.dataset.ppName : null; + const context = this.actor as any; + const item = context.items.find((x) => x.type === "class" && x.system.equipped); + item.update({ + system: { + lernKostenZauber: { + [ppName]: { pp: context.system.lernKostenZauber[ppName].pp + 1 }, + }, + }, + }); + this.render(); + }); + + html.find(".pp-decrease").on("click", async (event) => { + let target = event.target.closest("[data-pp-name]") as HTMLElement; + let ppName = target ? target.dataset.ppName : null; + const context = this.actor as any; + const item = context.items.find((x) => x.type === "class" && x.system.equipped); + item.update({ + system: { + lernKostenZauber: { + [ppName]: { pp: context.system.lernKostenZauber[ppName].pp - 1 }, + }, + }, + }); + this.render(); + }); + html.find(".fw-increase").on("click", async (event) => { let target = event.target.closest("[data-item-id]") as HTMLElement; let itemId = target ? target.dataset.itemId : null; diff --git a/source/style/Character-sheet.less b/source/style/Character-sheet.less index 898b404..e8ebd2c 100644 --- a/source/style/Character-sheet.less +++ b/source/style/Character-sheet.less @@ -388,4 +388,13 @@ .closebtn:hover { color: #000; } + + .pp-listing { + margin: 0 2rem; + flex: 1 0 16%; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: baseline; + } } diff --git a/templates/sheets/character/spells.hbs b/templates/sheets/character/spells.hbs index 34fe0a0..6884d0a 100644 --- a/templates/sheets/character/spells.hbs +++ b/templates/sheets/character/spells.hbs @@ -1,5 +1,4 @@
-
{{localize "midgard5.spellCasting"}}
@@ -41,7 +40,7 @@ {{localize "midgard5.spell-effectDuration-short"}} {{localize "midgard5.ew"}} - + @@ -77,4 +76,31 @@
+ +
+
+
{{localize "midgard5.pp"}} {{localize "midgard5.spells"}}
+ + + + + + +
+
+ + {{#each data.lernKostenZauber as |group name|}} + + + + + + + + + {{/each}} +
+
+
+
diff --git a/templates/sheets/item/class.hbs b/templates/sheets/item/class.hbs index 2d8e4ba..80604a3 100644 --- a/templates/sheets/item/class.hbs +++ b/templates/sheets/item/class.hbs @@ -49,7 +49,7 @@
{{#each data.lernKostenAllgemein as |wert name|}} - + {{/each}}