From 5f02f5ba83d3957d5ca3ba69c2837c687192dfdb Mon Sep 17 00:00:00 2001 From: Byroks Date: Mon, 2 Nov 2026 15:35:17 +0100 Subject: [PATCH] Angriffe, Zauber & Merkmale Bug fix: Zauber konnten nicht Sortiert werden --- lang/de.json | 12 +- src/sheets/actor-sheet.mjs | 12 +- src/sheets/character-sheet.mjs | 5 +- src/sheets/components/character-prep.mjs | 17 +- src/sheets/components/nsc-prep.mjs | 70 +++++ src/sheets/components/roll-actions.mjs | 4 +- src/sheets/nsc-sheet.mjs | 92 ++++--- src/styles/M6.scss | 9 +- src/system.mjs | 8 + system.json | 3 +- templates/actor/items.hbs | 138 ++++------ templates/actor/zauber.hbs | 81 +++--- templates/dialog/roll-dialog.hbs | 2 +- templates/nsc/eigenschaften.hbs | 97 +++++-- templates/nsc/hintergrund.hbs | 320 ----------------------- templates/nsc/items.hbs | 138 ++++------ templates/nsc/zauber.hbs | 81 +++--- 17 files changed, 451 insertions(+), 638 deletions(-) create mode 100644 src/sheets/components/nsc-prep.mjs delete mode 100644 templates/nsc/hintergrund.hbs diff --git a/lang/de.json b/lang/de.json index 8d4517b..5ccc5f9 100644 --- a/lang/de.json +++ b/lang/de.json @@ -176,6 +176,15 @@ "würfe": "Kompetenz Würfe", "hinzufügen": "Kompetenz hinzufügen", "kompetenz": "Kompetenz" + }, + "angriff": { + "singular": "Angriff", + "plural": "Angriffe" + }, + "merkmal": { + "singular": "Merkmal", + "plural": "Merkmale", + "hinzufügen": "Merkmal hinzufügen" } }, "RollList": { @@ -213,7 +222,8 @@ "makel": "Makel", "schicksalsgabe": "Schicksalsgabe", "legende": "Legende", - "geld": "Geld" + "geld": "Geld", + "merkmal": "Merkmal" } } } diff --git a/src/sheets/actor-sheet.mjs b/src/sheets/actor-sheet.mjs index d3443fc..85ef54e 100644 --- a/src/sheets/actor-sheet.mjs +++ b/src/sheets/actor-sheet.mjs @@ -46,18 +46,21 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe _attachPartListeners(partId, html, bubble) { super._attachPartListeners(partId, html, bubble); - const collapsible = html.querySelectorAll("div[data-action=collapsible]"); + const collapsible = html.querySelectorAll("[data-action=collapsible]"); if (collapsible) { collapsible.forEach((node) => { node.addEventListener( "click", function (e) { e = window.event || e; + if (this === e.target) { - node.classList.toggle("active"); - var content = node.nextElementSibling; + const header = node.closest("div[data-action=collapsible]"); + header.classList.toggle("active"); + const content = header.nextElementSibling; content.classList.toggle("active"); - node.getElementsByTagName("i")[0].classList.toggle("fa-compress"); + const icon = node.closest(".fa-expand") || node.getElementsByTagName("i")[0]; + icon.classList.toggle("fa-compress"); } }, { capture: true }, @@ -508,7 +511,6 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe */ async _onDropItem(event, data) { if (!this.actor.isOwner) return false; - if (this.actor.items.get(data.itemId)) return this._onSortItem(event, data); const item = await Item.implementation.fromDropData(data); diff --git a/src/sheets/character-sheet.mjs b/src/sheets/character-sheet.mjs index 6f590a9..8cfc67d 100644 --- a/src/sheets/character-sheet.mjs +++ b/src/sheets/character-sheet.mjs @@ -114,6 +114,9 @@ export class M6CharacterSheet extends M6ActorSheet { flags: this.actor.flags, config: CONFIG, }); + + context.itemTypes = await super._getItems(); + return context; } @@ -135,12 +138,10 @@ export class M6CharacterSheet extends M6ActorSheet { context.tab = context.tabs[partId]; break; case "items": - context.itemTypes = await super._getItems(); context.gewicht = await prepWeight(this.actor); context.tab = context.tabs[partId]; break; case "zauber": - context.zauber = await this._getZauber(); context.tab = context.tabs[partId]; break; case "hintergrund": diff --git a/src/sheets/components/character-prep.mjs b/src/sheets/components/character-prep.mjs index 49a8560..d794da4 100644 --- a/src/sheets/components/character-prep.mjs +++ b/src/sheets/components/character-prep.mjs @@ -1,19 +1,16 @@ export async function prepArmor(actor) { const actorData = actor.system; - // 1. Basis-Wert festlegen let baseRüstwert = actorData.rüstwert.base || 0; - // 2. Ausgerüstete Rüstung finden und addieren const equippedMainArmor = actor.items.filter( - (i) => i.type === "armor" && i.system.equipped && !i.system.zusätzlich + (i) => i.type === "armor" && i.system.equipped && !i.system.zusätzlich, ); const equippedAddArmor = actor.items.filter( - (i) => i.type === "armor" && i.system.equipped && i.system.zusätzlich + (i) => i.type === "armor" && i.system.equipped && i.system.zusätzlich, ); let armorBonus = Math.max(...equippedMainArmor.map((x) => x.system.rüstwert), 0); for (let armor of equippedAddArmor) { armorBonus += armor.system.rüstwert; } - // 3. Finalen Standard-Wert berechnen actorData.rüstwert.mod = baseRüstwert + armorBonus; const armors = []; @@ -25,7 +22,7 @@ export async function prepArmor(actor) { name: armor.name, rüstwert: armor.system.rüstwert, img: armor.img, - id: armor.id + id: armor.id, }; armors.push(w); }); @@ -46,7 +43,7 @@ export async function prepWeapons(actor) { img: weapon.img, skillPath: weapon.system.fertigkeit, path: weapon.system.fertigkeit, - id: weapon.id + id: weapon.id, }; weapons.push(w); }); @@ -66,7 +63,7 @@ export async function prepSpells(actor) { img: spell.img, skillPath: "system.skills.magie.zaubern", path: "Zaubern", - id: spell.id + id: spell.id, }; spells.push(w); }); @@ -77,12 +74,12 @@ export async function prepWeight(actor) { const items = actor.items.filter((x) => x.system.gewicht && !x.system.equipped); let gewicht = items.reduce( (accumulator, item) => accumulator + item.system.gewicht * item.system.anzahl, - 0 + 0, ); let traglast = Math.max(actor.system.skills.körper.athletik.value, 10); return { traglast, - gewicht + gewicht, }; } diff --git a/src/sheets/components/nsc-prep.mjs b/src/sheets/components/nsc-prep.mjs new file mode 100644 index 0000000..9877597 --- /dev/null +++ b/src/sheets/components/nsc-prep.mjs @@ -0,0 +1,70 @@ +export async function prepArmor(actor) { + const actorData = actor.system; + let baseRüstwert = actorData.rüstwert.base || 0; + const equippedMainArmor = actor.items.filter( + (i) => i.type === "armor" && i.system.equipped && !i.system.zusätzlich, + ); + const equippedAddArmor = actor.items.filter( + (i) => i.type === "armor" && i.system.equipped && i.system.zusätzlich, + ); + let armorBonus = Math.max(...equippedMainArmor.map((x) => x.system.rüstwert), 0); + for (let armor of equippedAddArmor) { + armorBonus += armor.system.rüstwert; + } + actorData.rüstwert.mod = baseRüstwert + armorBonus; + + const armors = []; + const einschränkungen = []; + [...equippedMainArmor, ...equippedAddArmor]?.forEach((armor) => { + einschränkungen.push(...armor.system.merkmale); + + const w = { + name: armor.name, + rüstwert: armor.system.rüstwert, + img: armor.img, + id: armor.id, + }; + armors.push(w); + }); + + return { armors: armors, einschränkungen: [...new Set(einschränkungen)] }; +} + +export async function prepWeapons(actor) { + const weaponItems = actor.items.filter((x) => x.type === "weapon" && x.system.equipped); + const weapons = []; + weaponItems.forEach((weapon) => { + const skillValue = + actor.system.fertigkeiten.find((x) => x.name === weapon.fertigkeit)?.wurf || + Math.floor((actor.system.kompetenz + 8) / 2); + const w = { + name: weapon.name, + skillValue, + schaden: weapon.system.schaden, + img: weapon.img, + id: weapon.id, + }; + weapons.push(w); + }); + return weapons; +} + +export async function prepSpells(actor) { + const spellItems = actor.items.filter((x) => x.type === "zauber" && x.system.equipped); + const spells = []; + const skillValue = + actor.system.fertigkeiten.find((x) => x.name === "Zaubern")?.wurf || + Math.floor((actor.system.kompetenz + 8) / 2); + spellItems.forEach((spell) => { + const w = { + name: spell.name, + skillValue, + schaden: spell.system.eigenschaften.schaden, + img: spell.img, + path: "Zaubern", + id: spell.id, + }; + spells.push(w); + }); + return spells; +} diff --git a/src/sheets/components/roll-actions.mjs b/src/sheets/components/roll-actions.mjs index 99163f4..b5404f5 100644 --- a/src/sheets/components/roll-actions.mjs +++ b/src/sheets/components/roll-actions.mjs @@ -267,8 +267,8 @@ export async function rollWeapon(event, target) { export async function rollDialog(rollDialogRequest) { // Assamble dialog depending on roll type let label = rollDialogRequest.name; - let skillValue = rollDialogRequest.skill.value || rollDialogRequest.skill; - let bonuses = rollDialogRequest.skill.bonuses || []; + let skillValue = rollDialogRequest.skill?.value || rollDialogRequest.skill; + let bonuses = rollDialogRequest.skill?.bonuses || []; let damageRoll = rollDialogRequest.damageRoll || ""; let preSelectedSpez = rollDialogRequest.preSelectedSpez || ""; let vorteil = 0; diff --git a/src/sheets/nsc-sheet.mjs b/src/sheets/nsc-sheet.mjs index 691e66b..c288e67 100644 --- a/src/sheets/nsc-sheet.mjs +++ b/src/sheets/nsc-sheet.mjs @@ -1,7 +1,7 @@ import { systemPath } from "../constants.mjs"; import { prepareActiveEffectCategories } from "../helpers/utils.mjs"; import { addSpezialisierung, editSepzialisierung } from "./components/spezialisierung-actions.mjs"; -import { prepArmor, prepWeapons, prepWeight, prepSpells } from "./components/character-prep.mjs"; +import { prepArmor, prepWeapons, prepWeight, prepSpells } from "./components/nsc-prep.mjs"; import { rollSpell, rollWeapon, rollSkill, rollDialog } from "./components/roll-actions.mjs"; import { M6ActorSheet } from "./actor-sheet.mjs"; @@ -19,6 +19,7 @@ export class M6NSCSheet extends M6ActorSheet { ...super.DEFAULT_OPTIONS.actions, // Kopiert alle bestehenden Actions aus M6ActorSheet cycleEquip: this.#cycleEquip, rollKompetenz: this.#rollKompetenz, + // rollWeapon: this.#rollWeapon, rollSpell: rollSpell, cycleEquip: this.#cycleEquip, addKompetenz: this.#addKompetenz, @@ -75,15 +76,15 @@ export class M6NSCSheet extends M6ActorSheet { scrollable: [""], }, zauber: { - template: systemPath("templates/nsc/zauber.hbs"), + template: systemPath("templates/actor/zauber.hbs"), scrollable: [""], }, items: { - template: systemPath("templates/nsc/items.hbs"), + template: systemPath("templates/actor/items.hbs"), scrollable: [""], }, biographie: { - template: systemPath("templates/nsc/biographie.hbs"), + template: systemPath("templates/actor/biographie.hbs"), scrollable: [""], }, // effects: { @@ -116,6 +117,10 @@ export class M6NSCSheet extends M6ActorSheet { switch (partId) { case "eigenschaften": context.kompetenzWürfe = await this.calcKompetenzWürfe(); + context.itemTypes = await super._getItems(); + context.armor = await prepArmor(this.actor); + context.equippedWeapons = await prepWeapons(this.actor); + context.equippedSpells = await prepSpells(this.actor); context.tab = context.tabs[partId]; break; case "effects": @@ -123,11 +128,9 @@ export class M6NSCSheet extends M6ActorSheet { context.tab = context.tabs[partId]; break; case "items": - context.itemTypes = await super._getItems(); context.tab = context.tabs[partId]; break; case "zauber": - context.zauber = await this._getZauber(); context.tab = context.tabs[partId]; break; case "biographie": @@ -255,7 +258,6 @@ export class M6NSCSheet extends M6ActorSheet { fieldset.fields.push({ field, value: foundry.utils.getProperty(source, path), - localizationName: "Midgard6.Skills." + field.label, }); } } @@ -431,7 +433,6 @@ export class M6NSCSheet extends M6ActorSheet { label: "Midgard6.Dialog.speichern", default: true, callback: async (event, button, dialog) => { - console.warn(resistenzen); await this.actor.update({ [`system.resistenzen`]: resistenzen }); }, }, @@ -441,11 +442,14 @@ export class M6NSCSheet extends M6ActorSheet { static async #rollKompetenz(event, target) { const dataset = target.dataset; - const kompetenz = dataset.kompetenz; + const kompetenz = dataset.kompetenz || ""; const kompetenzValue = dataset.kompetenzValue; + const schaden = dataset.schaden; + const item = this.actor.items.get(dataset.itemId); const dialogResult = await rollDialog({ skill: kompetenzValue, + damageRoll: schaden, }); console.log("Dialog Result", dialogResult); @@ -466,45 +470,65 @@ export class M6NSCSheet extends M6ActorSheet { die = "1d20"; break; } - - let rollTerm = "@die + @skill"; - let rollFlavor = kompetenz; - let roll; - - if (dialogResult.spezLevel) { - rollTerm += " + @spezBonus"; - rollFlavor += ": " + dialogResult.spezName; + let rollFlavor = dataset.name ?? kompetenz; + let rolls; + if (dialogResult.customRoll) { + rolls = [await new Roll(dialogResult.customRoll, {}, { title: rollFlavor }).evaluate()]; + } else { + rolls = [ + await new Roll( + "@die + @skill", + { + die: die, + skill: skillValue, + spezBonus: dialogResult.spezLevel + 1, + }, + { title: rollFlavor }, + ).evaluate(), + ]; } - if (dialogResult.customRoll) { - roll = new Roll(dialogResult.customRoll, {}, { title: rollFlavor }); - } else { - roll = new Roll( - rollTerm, - { - die: die, - skill: skillValue, - spezBonus: dialogResult.spezLevel + 1, - }, - { title: rollFlavor }, + if (dialogResult.customDamageRoll) { + rolls.push( + await new Roll( + "@die", + { die: dialogResult.customDamageRoll }, + { title: game.i18n.localize("Midgard6.Schaden") }, + ).evaluate(), + ); + } else if (schaden) { + rolls.push( + await new Roll( + "@die", + { die: schaden }, + { title: game.i18n.localize("Midgard6.Schaden") }, + ).evaluate(), ); } - // The parsed terms of the roll formula - console.log("Roll:", roll); // [Die, OperatorTerm, NumericTerm, OperatorTerm, NumericTerm] - - // Execute the roll - await roll.evaluate(); + console.log("Roll:", rolls); const chatData = { - rolls: roll, + rolls: rolls, speaker: ChatMessage.getSpeaker(), flags: { "midgard6-lvd": { title: rollFlavor, + eigenschaften: item?.system?.eigenschaften, + merkmale: item?.system?.merkmale, + isSpell: item?.type === "zauber", + beschreibung: await foundry.applications.ux.TextEditor.implementation.enrichHTML( + item?.system?.beschreibung, + { + secrets: false, + rollData: this.actor.getRollData(), + relativeTo: this.actor, + }, + ), }, }, }; + ChatMessage.applyMode(chatData, dialogResult.rollMode); await ChatMessage.create(chatData); diff --git a/src/styles/M6.scss b/src/styles/M6.scss index f75301f..410d234 100644 --- a/src/styles/M6.scss +++ b/src/styles/M6.scss @@ -99,10 +99,17 @@ border-radius: 0; transition: none; margin-bottom: 4px; - option:hover { + border: none; + > :nth-child(odd) { + background-color: var(--M6-background-grey); + } + > :hover { background-color: var(--M6-background-brown); } } + select:focus { + outline: none; + } p { &.center { text-align: center; diff --git a/src/system.mjs b/src/system.mjs index 25daab7..7fef784 100644 --- a/src/system.mjs +++ b/src/system.mjs @@ -108,6 +108,14 @@ Hooks.once("init", () => { types: ["legende"], }, ); + foundry.applications.apps.DocumentSheetConfig.registerSheet( + Item, + "midgard6-lvd", + M6HintergrundSheet, + { + types: ["merkmal"], + }, + ); loadSettings(); diff --git a/system.json b/system.json index 568aec4..82241b9 100644 --- a/system.json +++ b/system.json @@ -42,7 +42,8 @@ "makel": {}, "schicksalsgabe": {}, "legende": {}, - "geld": {} + "geld": {}, + "merkmal": {} } }, "compatibility": { diff --git a/templates/actor/items.hbs b/templates/actor/items.hbs index 3f8fb69..e33513e 100644 --- a/templates/actor/items.hbs +++ b/templates/actor/items.hbs @@ -4,25 +4,22 @@
- {{localize "Midgard6.Item.type.münze.plural" }} + {{localize "Midgard6.Item.type.münze.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
- {{localize "Midgard6.Item.type.item.plural" }} + {{localize "Midgard6.Item.type.item.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
    {{#with itemTypes.item}} -
  • -
    - {{#if @root.editable}} - - - {{localize "DOCUMENT.Create" type=this.label}} - - {{/if}} -
    -
    • {{#each this.items as |item|}}
    • @@ -120,25 +114,22 @@ {{!-- Waffen --}}
      - {{localize "Midgard6.Item.type.weapon.plural" }} + {{localize "Midgard6.Item.type.weapon.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
      {{!-- Rüstung --}} -
      - {{localize "Midgard6.Item.type.armor.plural" }} + {{localize "Midgard6.Item.type.armor.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
-
-
- {{localize "Midgard6.Traglast"}}: {{gewicht.gewicht}} / {{gewicht.traglast}} - -
- -
-
-
\ No newline at end of file diff --git a/templates/actor/zauber.hbs b/templates/actor/zauber.hbs index d04cdee..ffe5952 100644 --- a/templates/actor/zauber.hbs +++ b/templates/actor/zauber.hbs @@ -4,53 +4,52 @@
- {{localize "Midgard6.Item.type.zauber.plural" }} + {{localize "Midgard6.Item.type.zauber.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
    -
  • -
    - {{#if @root.editable}} - - - {{localize "DOCUMENT.Create" type="Zauber"}} - - {{/if}} -
    -
    • - {{#each zauber as |zauber|}} -
    • -

      {{zauber.name}}

      -

      {{zauber.system.eigenschaften.ursprung}}

      -

      {{localize "Midgard6.Zauber.stufe"}} {{zauber.system.eigenschaften.stufe}}

      - - -
      - {{#if @root.editable}} - - - + {{#with itemTypes.zauber}} + {{#each this.items as |zauber|}} +
    • +

      {{zauber.name}}

      +

      {{zauber.system.eigenschaften.ursprung}}

      +

      {{localize "Midgard6.Zauber.stufe"}} {{zauber.system.eigenschaften.stufe}}

      + + +
      + {{#if @root.editable}} - + - {{/if}} -
      -
    • - {{/each}} + + + + {{/if}} +
+ + {{/each}} + {{/with}}
diff --git a/templates/dialog/roll-dialog.hbs b/templates/dialog/roll-dialog.hbs index a8a3994..3f89023 100644 --- a/templates/dialog/roll-dialog.hbs +++ b/templates/dialog/roll-dialog.hbs @@ -46,7 +46,7 @@ {{#if damageRoll}} {{#each system.fertigkeiten as |fertigkeit|}}
-
+
{{#if @root.editable}} {{#unless @root.system.locked}} {{/each}} +
+ + {{localize "Midgard6.NSC.merkmal.plural"}} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} + +
+
+ {{#with itemTypes.merkmal}} + {{#each this.items as |merkmal|}} +
{{merkmal.name}} +
+ + + + {{#if @root.editable}} + {{#unless @root.system.locked}} + + + + + + + {{/unless}} + {{/if}} +
+
+ +
+ {{{merkmal.system.beschreibung}}} +
+ {{/each}} + {{/with}} +
+
+
@@ -203,9 +265,11 @@
- {{!--
+
- {{localize "Midgard6.Item.type.weapon.plural" }} + + {{localize "Midgard6.NSC.angriff.plural" }} +
{{#each equippedWeapons as |weapon|}}
@@ -215,16 +279,18 @@

{{weapon.name}}:

- + {{weapon.skillValue}} {{#if weapon.bonusValue}}+ {{weapon.bonusValue}}{{/if}}

+ + {{weapon.skillValue}}

--}} +
diff --git a/templates/nsc/hintergrund.hbs b/templates/nsc/hintergrund.hbs deleted file mode 100644 index 695100b..0000000 --- a/templates/nsc/hintergrund.hbs +++ /dev/null @@ -1,320 +0,0 @@ -{{! Beschreibung Allgemein Tab }} -
-
-
-
-
- {{localize "Midgard6.Grad.grad"}} -
- -

{{localize - "Midgard6.Grad.erfahrung" - }}

-
- - -
-

+

-
- - -
- -

=

-
- - -
- -
-
-
- -
- -
-
- {{localize "Midgard6.Hintergrund.type.legende.plural"}} -
-
- {{#with itemTypes.legende}} -
-
- {{#if @root.editable}} - - - {{localize "DOCUMENT.Create" type=this.label}} - - {{/if}} -
-
- {{#each this.items as |legende|}} -
{{legende.name}} -
- - - {{#if @root.editable}} - - - - - - - {{/if}} -
-
- -
- {{{legende.system.beschreibung}}} -
- {{/each}} - {{/with}} -
-
-
-
- -
-
- {{localize "Midgard6.Hintergrund.type.schicksalsgabe.plural"}} -
-
- {{#with itemTypes.schicksalsgabe}} -
-
- {{#if @root.editable}} - - - {{localize "DOCUMENT.Create" type=this.label}} - - {{/if}} -
-
- {{#each this.items as |schicksalsgabe|}} -
{{schicksalsgabe.name}} -
- - {{#if @root.editable}} - - - - - - - {{/if}} -
-
- -
- {{{gunst.system.beschreibung}}} -
- {{/each}} - {{/with}} -
-
-
-
-
-
-
\ No newline at end of file diff --git a/templates/nsc/items.hbs b/templates/nsc/items.hbs index 3f8fb69..e33513e 100644 --- a/templates/nsc/items.hbs +++ b/templates/nsc/items.hbs @@ -4,25 +4,22 @@
- {{localize "Midgard6.Item.type.münze.plural" }} + {{localize "Midgard6.Item.type.münze.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
- {{localize "Midgard6.Item.type.item.plural" }} + {{localize "Midgard6.Item.type.item.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
    {{#with itemTypes.item}} -
  • -
    - {{#if @root.editable}} - - - {{localize "DOCUMENT.Create" type=this.label}} - - {{/if}} -
    -
    • {{#each this.items as |item|}}
    • @@ -120,25 +114,22 @@ {{!-- Waffen --}}
      - {{localize "Midgard6.Item.type.weapon.plural" }} + {{localize "Midgard6.Item.type.weapon.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
      {{!-- Rüstung --}} -
      - {{localize "Midgard6.Item.type.armor.plural" }} + {{localize "Midgard6.Item.type.armor.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
-
-
- {{localize "Midgard6.Traglast"}}: {{gewicht.gewicht}} / {{gewicht.traglast}} - -
- -
-
-
\ No newline at end of file diff --git a/templates/nsc/zauber.hbs b/templates/nsc/zauber.hbs index d04cdee..3e33e6c 100644 --- a/templates/nsc/zauber.hbs +++ b/templates/nsc/zauber.hbs @@ -4,53 +4,52 @@
- {{localize "Midgard6.Item.type.zauber.plural" }} + {{localize "Midgard6.Item.type.zauber.plural" }} + {{#if @root.editable}} + {{#unless system.locked}} + + + + {{/unless}} + {{/if}} +
    -
  • -
    - {{#if @root.editable}} - - - {{localize "DOCUMENT.Create" type="Zauber"}} - - {{/if}} -
    -
    • - {{#each zauber as |zauber|}} -
    • -

      {{zauber.name}}

      -

      {{zauber.system.eigenschaften.ursprung}}

      -

      {{localize "Midgard6.Zauber.stufe"}} {{zauber.system.eigenschaften.stufe}}

      - - -
      - {{#if @root.editable}} - - - + {{#with itemTypes.zauber}} + {{#each this.item as |zauber|}} +
    • +

      {{zauber.name}}

      +

      {{zauber.system.eigenschaften.ursprung}}

      +

      {{localize "Midgard6.Zauber.stufe"}} {{zauber.system.eigenschaften.stufe}}

      + + +
      + {{#if @root.editable}} - + - {{/if}} -
      -
    • - {{/each}} + + + + {{/if}} +
+ + {{/each}} + {{/with}}