Fix some stuff

This commit is contained in:
2024-03-24 19:45:51 +01:00
parent c9c2fb801d
commit ddbe48f937
9 changed files with 72 additions and 117 deletions
+24
View File
@@ -13,6 +13,7 @@ export class M5Item extends Item {
const character = actor as M5Character;
const itemData = (this as any).system;
const calc = itemData.calc;
const name = (this as any).name;
if (itemType === "item") {
calc.containers = null;
@@ -45,6 +46,29 @@ export class M5Item extends Item {
},
];
// Adjust attribute Aussehen based on Athletik skill
if (name === "Athletik") {
itemData.mods[0] = { type: "attribute", id: "au", operation: "add100", value: Math.floor(calc.fw / 3) };
}
// Adjust stat Bewegungsweite based on Laufen skill
if (name === "Laufen") {
itemData.mods[0] = { type: "stat", id: "movement", operation: "add", value: Math.floor(calc.fw / 3) };
}
// Adjust stat Kälte based on Überleben (Gebirge) skill
if (name === "Überleben (Gebirge)") {
itemData.mods[0] = { type: "stat", id: "deprivationCold", operation: "add", value: Math.floor(calc.fw * 5) };
}
// // Adjust stat Kälte based on Überleben (Steppe) skill
if (name === "Überleben (Steppe)") {
itemData.mods[0] = { type: "stat", id: "deprivationHeat", operation: "add", value: Math.floor(calc.fw * 5) };
}
// // Adjust stat Durst & Hunger based on Robustheit skill
if (name === "Robustheit") {
itemData.mods[0] = { type: "stat", id: "deprivationFood", operation: "add", value: Math.floor(calc.fw * 5) };
}
if (character) {
const actorCalc = character.derivedData({
containers: true,