Entbehrungen
+ Added Deprivation for Cold, Heat and Food (Thirst & Hunger) on Base Values Page - Removed Drinking & Perception from Skills Page + Fixed Encumbrance Color Switch only above load
This commit is contained in:
@@ -103,8 +103,9 @@ export enum M5Stats {
|
||||
AP = "ap",
|
||||
PROTECTION_LP = "lpProtection",
|
||||
PROTECTION_AP = "apProtection",
|
||||
PERCEPTION = "perception",
|
||||
DRINKING = "drinking",
|
||||
DEPRIVATION_COLD = "cold",
|
||||
DEPRIVATION_HEAT = "heat",
|
||||
DEPRIVATION_FOOD = "food",
|
||||
HOARD = "hoard",
|
||||
HOARD_NEXT = "hoardNext",
|
||||
HOARD_MIN = "hoardMin",
|
||||
@@ -197,10 +198,12 @@ export interface M5CharacterCalculatedData {
|
||||
brawlFw: number;
|
||||
poisonResistance: M5ModResult;
|
||||
enduranceBonus: number;
|
||||
perception: M5ModResult;
|
||||
perceptionFW: number;
|
||||
drinking: M5ModResult;
|
||||
drinkingFW: number;
|
||||
deprivationCold: M5ModResult;
|
||||
deprivationColdPw: number;
|
||||
deprivationHeat: M5ModResult;
|
||||
deprivationHeatPw: number;
|
||||
deprivationFood: M5ModResult;
|
||||
deprivationFoodPw: number;
|
||||
hoard: number;
|
||||
hoardNext: number;
|
||||
hoardMin: number;
|
||||
|
||||
@@ -126,10 +126,12 @@ export class M5Character extends Actor {
|
||||
brawlFw: 0,
|
||||
poisonResistance: { value: 0, mods: [] },
|
||||
enduranceBonus: 0,
|
||||
perception: { value: 0, mods: [] },
|
||||
perceptionFW: 0,
|
||||
drinking: { value: 0, mods: [] },
|
||||
drinkingFW: 0,
|
||||
deprivationCold: { value: 0, mods: [] },
|
||||
deprivationColdPw: 0,
|
||||
deprivationHeat: { value: 0, mods: [] },
|
||||
deprivationHeatPw: 0,
|
||||
deprivationFood: { value: 0, mods: [] },
|
||||
deprivationFoodPw: 0,
|
||||
hoard: 0,
|
||||
encumbrance: 0,
|
||||
load: 0,
|
||||
@@ -205,10 +207,12 @@ 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.perception = this.modResult(0);
|
||||
ret.stats.perceptionFW = 6;
|
||||
ret.stats.drinking = this.modResult(0);
|
||||
ret.stats.drinkingFW = Math.floor(ret.attributes.ko.value / 10);
|
||||
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.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));
|
||||
@@ -558,6 +562,21 @@ export class M5Character extends Actor {
|
||||
if (item.name === "Laufen") {
|
||||
ret.stats.movement.value += Math.floor(item.system.fw / 3);
|
||||
}
|
||||
|
||||
// Adjust stat Kälte based on Überleben (Gebirge) skill
|
||||
if (item.name === "Überleben (Gebirge)") {
|
||||
ret.stats.deprivationCold.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);
|
||||
}
|
||||
|
||||
// Adjust stat Durst & Hunger based on Robustheit skill
|
||||
if (item.name === "Robustheit") {
|
||||
ret.stats.deprivationFood.value += Math.floor(item.system.fw + 10);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,9 @@ export default class M5ModAggregate {
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.AP, operation: M5ModOperation.SET, value: calc.stats.ap.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.PROTECTION_LP, operation: M5ModOperation.SET, value: calc.stats.lpProtection.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.PROTECTION_AP, operation: M5ModOperation.SET, value: calc.stats.apProtection.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.PERCEPTION, operation: M5ModOperation.SET, value: calc.stats.perception.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.DRINKING, operation: M5ModOperation.SET, value: calc.stats.drinking.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.DEPRIVATION_COLD, operation: M5ModOperation.SET, value: calc.stats.deprivationCold.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.DEPRIVATION_HEAT, operation: M5ModOperation.SET, value: calc.stats.deprivationHeat.value }, characterString);
|
||||
this.push({ type: M5ModType.STAT, id: M5Stats.DEPRIVATION_FOOD, operation: M5ModOperation.SET, value: calc.stats.deprivationFood.value }, characterString);
|
||||
}
|
||||
|
||||
push(mod: M5ItemMod, source: string) {
|
||||
|
||||
@@ -56,7 +56,7 @@ export class M5Roll {
|
||||
//if (rollResult.type === "ew") {
|
||||
if (d.total === 1) rowRes = M5EwResult.FUMBLE;
|
||||
else if (d.total === 20) rowRes = M5EwResult.CRITICAL;
|
||||
else if (d.total >= 16) rowRes = M5EwResult.HIGH;
|
||||
else if (d.total === 16, 17, 18, 19) rowRes = M5EwResult.HIGH;
|
||||
} else if (d.faces === 100) {
|
||||
face100 = d.total as number;
|
||||
}
|
||||
@@ -195,13 +195,13 @@ export class M5Roll {
|
||||
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.brawl"));
|
||||
}
|
||||
|
||||
static perception(actor: any) {
|
||||
static deprivationCold (actor: any) {
|
||||
const rollData = actor.getRollData() as M5RollData;
|
||||
|
||||
rollData.rolls["0"] = {
|
||||
formula: "1d20 + @c.calc.stats.perception.value + @c.calc.stats.perceptionFW",
|
||||
formula: "1d100 + @c.calc.stats.deprivationCold.value + @c.calc.stats.deprivationColdPw -100",
|
||||
enabled: true,
|
||||
label: (game as Game).i18n.localize("midgard5.perception"),
|
||||
label: (game as Game).i18n.localize("midgard5.deprivationCold"),
|
||||
result: "",
|
||||
total: 0,
|
||||
totalStr: "",
|
||||
@@ -209,16 +209,16 @@ export class M5Roll {
|
||||
css: "",
|
||||
} as M5RollResult;
|
||||
|
||||
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.perception"));
|
||||
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.deprivationCold"));
|
||||
}
|
||||
|
||||
static drinking(actor: any) {
|
||||
static deprivationHeat(actor: any) {
|
||||
const rollData = actor.getRollData() as M5RollData;
|
||||
|
||||
rollData.rolls["0"] = {
|
||||
formula: "1d20 + @c.calc.stats.drinking.value + @c.calc.stats.drinkingFW",
|
||||
formula: "1d100 + @c.calc.stats.deprivationHeat.value + @c.calc.stats.deprivationHeatPw -100",
|
||||
enabled: true,
|
||||
label: (game as Game).i18n.localize("midgard5.drinking"),
|
||||
label: (game as Game).i18n.localize("midgard5.deprivationHeat"),
|
||||
result: "",
|
||||
total: 0,
|
||||
totalStr: "",
|
||||
@@ -226,7 +226,24 @@ export class M5Roll {
|
||||
css: "",
|
||||
} as M5RollResult;
|
||||
|
||||
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.drinking"));
|
||||
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.deprivationHeat"));
|
||||
}
|
||||
|
||||
static deprivationFood(actor: any) {
|
||||
const rollData = actor.getRollData() as M5RollData;
|
||||
|
||||
rollData.rolls["0"] = {
|
||||
formula: "1d100 + @c.calc.stats.deprivationFood.value + @c.calc.stats.deprivationFoodPw -100",
|
||||
enabled: true,
|
||||
label: (game as Game).i18n.localize("midgard5.deprivationFood"),
|
||||
result: "",
|
||||
total: 0,
|
||||
totalStr: "",
|
||||
dice: {},
|
||||
css: "",
|
||||
} as M5RollResult;
|
||||
|
||||
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.deprivationFood"));
|
||||
}
|
||||
|
||||
static defense(actor: any) {
|
||||
|
||||
@@ -247,13 +247,18 @@ export default class M5CharacterSheet extends ActorSheet {
|
||||
await roll.toMessage();
|
||||
});
|
||||
|
||||
html.find(".roll-perception-button").on("click", async (event) => {
|
||||
const roll = M5Roll.perception(this.actor);
|
||||
html.find(".roll-deprivationCold-button").on("click", async (event) => {
|
||||
const roll = M5Roll.deprivationCold(this.actor);
|
||||
await roll.toMessage();
|
||||
});
|
||||
|
||||
html.find(".roll-drinking-button").on("click", async (event) => {
|
||||
const roll = M5Roll.drinking(this.actor);
|
||||
html.find(".roll-deprivationHeat-button").on("click", async (event) => {
|
||||
const roll = M5Roll.deprivationHeat(this.actor);
|
||||
await roll.toMessage();
|
||||
});
|
||||
|
||||
html.find(".roll-deprivationFood-button").on("click", async (event) => {
|
||||
const roll = M5Roll.deprivationFood(this.actor);
|
||||
await roll.toMessage();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user