Merge branch 'develop' into entbehrungen

This commit is contained in:
2024-03-14 21:03:49 +01:00
7 changed files with 96 additions and 57 deletions
+42 -51
View File
@@ -367,6 +367,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,
@@ -409,6 +410,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,
@@ -452,6 +454,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,
@@ -464,57 +467,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,
// },
// });
// }
// }
// }
}
//if (!skip?.encumbrance) {
//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 (ret.stats.encumbrance > ret.stats.heavyLoad) {
// item[0].update({
// data: {
// equipped: true,
// },
// });
// }
//}
}
if (!skip?.effects) {
context.items
@@ -530,6 +517,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,
@@ -547,6 +535,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,
@@ -589,6 +578,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,
@@ -612,6 +602,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,