Entbehrungsupdate

+ Better organization
This commit is contained in:
2024-03-16 17:49:24 +01:00
parent 83d5cfc51c
commit e679b9a972
4 changed files with 27 additions and 30 deletions
+15 -9
View File
@@ -127,10 +127,13 @@ export class M5Character extends Actor {
poisonResistance: { value: 0, mods: [] },
enduranceBonus: 0,
deprivationCold: { value: 0, mods: [] },
deprivationColdBonus: { value: 0, mods: [] },
deprivationColdPw: 0,
deprivationHeat: { value: 0, mods: [] },
deprivationHeatBonus: { value: 0, mods: [] },
deprivationHeatPw: 0,
deprivationFood: { value: 0, mods: [] },
deprivationFoodBonus: { value: 0, mods: [] },
deprivationFoodPw: 0,
hoard: 0,
encumbrance: 0,
@@ -207,12 +210,15 @@ export class M5Character extends Actor {
ret.stats.brawlFw = ret.stats.brawl.value + ret.stats.attackBonus.value + (data.info.race === "Zwerg" ? 1 : 0);
ret.stats.poisonResistance = this.modResult(30 + Math.floor(ret.attributes.ko.value / 2));
ret.stats.enduranceBonus = Math.floor(ret.attributes.ko.value / 10) + Math.floor(ret.attributes.st.value / 20);
ret.stats.deprivationCold = this.modResult(0);
ret.stats.deprivationColdPw = Math.min(100, Math.max(0, Math.floor(ret.attributes.ko.value / 2)));
ret.stats.deprivationHeat = this.modResult(0);
ret.stats.deprivationHeatPw = Math.min(100, Math.max(0, Math.floor(ret.attributes.ko.value / 2)));
ret.stats.deprivationFood = this.modResult(0);
ret.stats.deprivationFoodPw = Math.min(100, Math.max(0, Math.floor(40 + (ret.attributes.ko.value / 2))));
ret.stats.deprivationCold = this.modResult(Math.floor(ret.attributes.ko.value / 2));
ret.stats.deprivationColdBonus = this.modResult(0);
ret.stats.deprivationColdPw = Math.min(100, (ret.stats.deprivationCold.value + ret.stats.deprivationColdBonus.value));
ret.stats.deprivationHeat = this.modResult(Math.floor(ret.attributes.ko.value / 2));
ret.stats.deprivationHeatBonus = this.modResult(0);
ret.stats.deprivationHeatPw = Math.min(100, (ret.stats.deprivationHeat.value + ret.stats.deprivationHeatBonus.value));
ret.stats.deprivationFood = this.modResult(Math.floor(40 + (ret.attributes.ko.value / 2)));
ret.stats.deprivationFoodBonus = this.modResult(0);
ret.stats.deprivationFoodPw = Math.min(100, (ret.stats.deprivationFood.value + ret.stats.deprivationFoodBonus.value));
ret.stats.hoardMin = M5Character.levelThreshold.at(ret.level - 1) / 2;
ret.stats.hoardNext = M5Character.levelThreshold.at(ret.level) / 2;
ret.stats.wealth = parseFloat((data.info.gold + data.info.silver / 10 + data.info.copper / 100).toPrecision(3));
@@ -554,17 +560,17 @@ export class M5Character extends Actor {
// Adjust stat Kälte based on Überleben (Gebirge) skill
if (item.name === "Überleben (Gebirge)") {
ret.stats.deprivationCold.value += Math.floor(item.system.fw * 5);
ret.stats.deprivationColdBonus.value += Math.floor(item.system.fw * 5);
}
// Adjust stat Kälte based on Überleben (Steppe) skill
if (item.name === "Überleben (Steppe)") {
ret.stats.deprivationHeat.value += Math.floor(item.system.fw * 5);
ret.stats.deprivationHeatBonus.value += Math.floor(item.system.fw * 5);
}
// Adjust stat Durst & Hunger based on Robustheit skill
if (item.name === "Robustheit") {
ret.stats.deprivationFood.value += Math.floor(item.system.fw + 10);
ret.stats.deprivationFoodBonus.value += 10;
}
});
}