Anpassungen Zauber und Kampftabs

This commit is contained in:
Ender
2024-03-12 19:52:50 +01:00
parent 08ca1cedce
commit 8e53e2010f
8 changed files with 163 additions and 27 deletions
+9
View File
@@ -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, "");
+8
View File
@@ -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,
};
});
}
+2 -1
View File
@@ -264,7 +264,8 @@
"umgebung": "midgard5.spell-target-umgebung",
"geist": "midgard5.spell-target-geist",
"koerper": "midgard5.spell-target-koerper"
}
},
"spellSpecialization": "none"
},
"kampfkunstSelection": {
"kampfkunstTypeSelection": {