Korrekte Resistenzen bei Multiclassing

This commit is contained in:
Byroks 2024-03-20 21:02:13 +01:00
parent 1c21e64d20
commit 5bf013c5dc
3 changed files with 16 additions and 12 deletions

View File

@ -300,7 +300,7 @@
"midgard5.spell-process-wilder_Dweomer": "Wilder Dweomer",
"midgard5.spell-process-zerstoeren": "Zerstören",
"midgard5.spell-process-zauberlied": "Zauberlieder",
"midgard5.spell-process-zaubersalz": "Zaubersalze",
"midgard5.spell-process-zaubersalz": "Zaubersalze",
"midgard5.spell-process-zaubermittel": "Zaubermittel",
"midgard5.spell-process-zauberschutz": "Zauberschutz",
"midgard5.spell-process-zauberrunen": "Zauberrunen",

View File

@ -497,17 +497,21 @@ export class M5Character extends Actor {
}
if (!skip?.class) {
const item = context.items
context.items
?.filter((item) => item.type === "class")
.forEach((item) => {
if (item) {
if (typeof data.info.class === "string") {
data.info.class = {};
}
data.info.class[item.id] = item.name;
if (item.system.magicUsing) {
data.info.magicUsing = item.system.magicUsing;
}
.sort((a, b) => b?.system.magicUsing - a?.system.magicUsing)
.forEach((item, index) => {
if (index !== 0) {
item.system.equipped = false;
} else {
item.system.equipped = true;
}
if (typeof data.info.class === "string") {
data.info.class = {};
}
data.info.class[item.id] = item.name;
if (item.system.magicUsing) {
data.info.magicUsing = item.system.magicUsing;
}
});
}

View File

@ -88,7 +88,7 @@
{{#each data.lernKostenZauber as |wert name|}}
<span style="flex: 1 0 26%">
<label for="data.lernKostenZauber.{{name}}">{{localize (m5concat "midgard5." name)}}</label>
<label for="data.lernKostenZauber.{{name}}">{{localize (m5concat "midgard5.spell-process-" name)}}</label>
<input style="width:35px" name="data.lernKostenZauber.{{name}}" type="number" value={{wert.kosten}} data-dtype="Number" />
</span>
{{/each}}