Skill & Sheets Update

+ Added FW-Increase/Decrease on Weapon and Language Skills
+ Added ItemIcons for Skills, Gear, Spells, Combat and Effects
+ Re-Added Belastungseffect with all mods working nearly smoothless (only bugging on new actors once created)
This commit is contained in:
2024-03-14 12:08:20 +01:00
parent 43375a19c8
commit 2b8f2da7d8
7 changed files with 106 additions and 65 deletions
+42 -51
View File
@@ -363,6 +363,7 @@ export class M5Character extends Actor {
ret.gear.weapons[item.id] = {
label: label,
icon: item.img,
skillId: item.system.skillId,
magic: item.system.magic,
valuable: item.system?.valuable,
@@ -405,6 +406,7 @@ export class M5Character extends Actor {
ret.gear.defensiveWeapons[item.id] = {
label: label,
icon: item.img,
skillId: item.system.skillId,
magic: item.system.magic,
valuable: item.system?.valuable,
@@ -448,6 +450,7 @@ export class M5Character extends Actor {
ret.gear.armor[item.id] = {
label: label,
icon: item.img,
magic: item.system.magic,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
@@ -460,57 +463,41 @@ export class M5Character extends Actor {
containerId: item.system.containerId || "",
};
});
// if (!skip?.encumbrance) {
// const item = context.items.filter((x) => x.name === "Belastung");
// if (ret.stats.encumbrance > ret.stats.heavyLoad) {
// if (item.length === 0) {
// this.createEffect("Belastung", [{ id: "movement", operation: M5ModOperation.DIVISION, type: M5ModType.STAT, value: 2 }]);
// } else if (item.length === 1) {
// item[0].update({
// data: {
// equipped: true,
// },
// });
// } else if (item.length === 2) {
// item[1]?.delete();
// }
// } else if (ret.stats.encumbrance <= ret.stats.heavyLoad) {
// if (item.length === 1) {
// item[0]?.update({
// data: {
// equipped: false,
// },
// });
// }
// }
// }
// if (!skip?.encumbrance) {
// const item = context.items.filter((x) => x.name === "Höchstlast");
// if (ret.stats.encumbrance > ret.stats.loadMax) {
// if (item.length === 0) {
// this.createEffect("Höchstlast", [{ id: "ap", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 1 }]);
// } else if (item.length === 1) {
// item[0].update({
// data: {
// equipped: true,
// },
// });
// } else if (item.length === 2) {
// item[1]?.delete();
// }
// } else if (ret.stats.encumbrance <= ret.stats.loadMax) {
// if (item.length === 1) {
// item[0]?.update({
// data: {
// equipped: false,
// },
// });
// }
// }
// }
}
const item = context.items.filter((x) => x.name === "Belastung");
if (item.length === 0) {
this.createEffect("Belastung", [
{ id: "movement", operation: M5ModOperation.DIVISION, type: M5ModType.STAT, value: 2 },
{ id: "attackBonus", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 4 },
{ id: "defenseBonus", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 4 }
]);
} else if (item.length === 2) {
item[1]?.delete();
}
if (item.length === 1) {
item[0]?.update({
img: "icons/containers/bags/sack-simple-leather-orange.webp" });
}
if (ret.stats.encumbrance <= ret.stats.heavyLoad) {
item[0]?.update({
data: {
equipped: false,
}
});
}
if (!skip?.encumbrance) {
if (ret.stats.encumbrance > ret.stats.heavyLoad) {
item[0].update({
data: {
equipped: true,
},
});
}
}
}
if (!skip?.effects) {
context.items
@@ -526,6 +513,7 @@ export class M5Character extends Actor {
ret.gear.effects[item.id] = {
label: label,
icon: item.img,
magic: item.system.magic,
calc: item.system.calc,
equipped: item.system?.equipped || false,
@@ -543,6 +531,7 @@ export class M5Character extends Actor {
const skillMap = ret.skills[item.system.type];
skillMap[item.id] = {
label: item.name,
icon: item.img,
fw: item.system.fw,
attribute: item.system.attribute,
pp: item.system.pp,
@@ -570,6 +559,7 @@ export class M5Character extends Actor {
ret.spells[item.id] = {
label: item.name,
icon: item.img,
process: "midgard5.spell-process-" + item.system.process,
calc: item.system.calc,
type: item.system.type,
@@ -593,6 +583,7 @@ export class M5Character extends Actor {
ret.kampfkuenste[item.id] = {
label: item.name,
icon: item.img,
isKido: item.system.isKido,
type: item.system.type,
variante: item.system.variante,