Entbehrungen #89
|
|
@ -199,10 +199,13 @@ export interface M5CharacterCalculatedData {
|
|||
poisonResistance: M5ModResult;
|
||||
enduranceBonus: number;
|
||||
deprivationCold: M5ModResult;
|
||||
|
|
||||
deprivationColdBonus: M5ModResult;
|
||||
deprivationColdPw: number;
|
||||
deprivationHeat: M5ModResult;
|
||||
deprivationHeatBonus: M5ModResult;
|
||||
deprivationHeatPw: number;
|
||||
deprivationFood: M5ModResult;
|
||||
deprivationFoodBonus: M5ModResult;
|
||||
deprivationFoodPw: number;
|
||||
hoard: number;
|
||||
hoardNext: number;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ export class M5Roll {
|
|||
const rollData = actor.getRollData() as M5RollData;
|
||||
|
||||
rollData.rolls["0"] = {
|
||||
formula: "1d100 + @c.calc.stats.deprivationCold.value + @c.calc.stats.deprivationColdPw -100",
|
||||
formula: "1d100 + @c.calc.stats.deprivationCold.value + @c.calc.stats.deprivationColdBonus.value -100",
|
||||
enabled: true,
|
||||
label: (game as Game).i18n.localize("midgard5.deprivationCold"),
|
||||
result: "",
|
||||
|
|
@ -216,7 +216,7 @@ export class M5Roll {
|
|||
const rollData = actor.getRollData() as M5RollData;
|
||||
|
||||
rollData.rolls["0"] = {
|
||||
formula: "1d100 + @c.calc.stats.deprivationHeat.value + @c.calc.stats.deprivationHeatPw -100",
|
||||
formula: "1d100 + @c.calc.stats.deprivationHeat.value + @c.calc.stats.deprivationHeatBonus.value -100",
|
||||
enabled: true,
|
||||
label: (game as Game).i18n.localize("midgard5.deprivationHeat"),
|
||||
result: "",
|
||||
|
|
@ -233,7 +233,7 @@ export class M5Roll {
|
|||
const rollData = actor.getRollData() as M5RollData;
|
||||
|
||||
rollData.rolls["0"] = {
|
||||
formula: "1d100 + @c.calc.stats.deprivationFood.value + @c.calc.stats.deprivationFoodPw -100",
|
||||
formula: "1d100 + @c.calc.stats.deprivationFood.value + @c.calc.stats.deprivationFoodBonus.value -100",
|
||||
enabled: true,
|
||||
label: (game as Game).i18n.localize("midgard5.deprivationFood"),
|
||||
result: "",
|
||||
|
|
|
|||
|
|
@ -74,36 +74,24 @@
|
|||
<td class="flexpart-img"><img src="/icons/magic/water/snowflake-ice-blue.webp" class="flexpart-icon"></td>
|
||||
<td class="padding edit-item">{{localize "midgard5.deprivationCold"}}</td>
|
||||
<td class="fixed-value">{{data.calc.stats.deprivationCold.value}}</td>
|
||||
<td class="fixed-value">{{data.calc.stats.deprivationColdPw}}</td>
|
||||
{{#if (gt (add data.calc.stats.deprivationCold.value data.calc.stats.deprivationColdPw) 100)}}
|
||||
<td class="fixed-value">100</td>
|
||||
{{else}}
|
||||
<td class="fixed-value">{{add data.calc.stats.deprivationCold.value data.calc.stats.deprivationColdPw}}</td>
|
||||
{{/if}}
|
||||
<td class="fixed-value">{{data.calc.stats.deprivationColdBonus.value}}</td>
|
||||
<td class="fixed-value">{{add data.calc.stats.deprivationCold.value data.calc.stats.deprivationColdBonus.value}}</td>
|
||||
<td><button class="roll-button roll-deprivationCold-button"></button></td>
|
||||
</tr>
|
||||
<tr data-item-id="{{itemId}}">
|
||||
<td class="flexpart-img"><img src="/icons/magic/fire/orb-lightning-sun.webp" class="flexpart-icon"></td>
|
||||
<td class="padding edit-item">{{localize "midgard5.deprivationHeat"}}</td>
|
||||
<td class="fixed-value">{{data.calc.stats.deprivationHeat.value}}</td>
|
||||
<td class="fixed-value">{{data.calc.stats.deprivationHeatPw}}</td>
|
||||
{{#if (gt (add data.calc.stats.deprivationCold.value data.calc.stats.deprivationHeatPw) 100)}}
|
||||
<td class="fixed-value">100</td>
|
||||
{{else}}
|
||||
<td class="fixed-value">{{add data.calc.stats.deprivationHeat.value data.calc.stats.deprivationHeatPw}}</td>
|
||||
{{/if}}
|
||||
<td class="fixed-value">{{data.calc.stats.deprivationHeatBonus.value}}</td>
|
||||
<td class="fixed-value">{{add data.calc.stats.deprivationHeat.value data.calc.stats.deprivationHeatBonus.value}}</td>
|
||||
<td><button class="roll-button roll-deprivationHeat-button"></button></td>
|
||||
</tr>
|
||||
<tr data-item-id="{{itemId}}">
|
||||
<td class="flexpart-img"><img src="/icons/consumables/food/plate-fish-bowl-bones-brown.webp" class="flexpart-icon"></td>
|
||||
<td class="padding edit-item">{{localize "midgard5.deprivationFood"}}</td>
|
||||
<td class="fixed-value">{{data.calc.stats.deprivationFoodPw}}</td>
|
||||
<td class="fixed-value">{{data.calc.stats.deprivationFood.value}}</td>
|
||||
{{#if (gt (add data.calc.stats.deprivationFood.value data.calc.stats.deprivationFoodPw) 100)}}
|
||||
<td class="fixed-value">100</td>
|
||||
{{else}}
|
||||
<td class="fixed-value">{{add data.calc.stats.deprivationFood.value data.calc.stats.deprivationFoodPw}}</td>
|
||||
{{/if}}
|
||||
<td class="fixed-value">{{data.calc.stats.deprivationFoodBonus.value}}</td>
|
||||
<td class="fixed-value">{{add data.calc.stats.deprivationFood.value data.calc.stats.deprivationFoodBonus.value}}</td>
|
||||
<td><button class="roll-button roll-deprivationFood-button"></button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Muss das in 3 geteilt sein? Das mod Array von ColdBonus wird zb. garnicht verwendet sondern nur die Value beschrieben, der PW wert ist auch einfach nur die Summe von beiden werten.
Bitte das einmal zusammenfassen, am besten wird bei Skills dann ein Versteckter Aktiver Effekt hinzugefügt der den Mod beinhaltet.