Entbehrungen #89

Merged
Byroks merged 10 commits from entbehrungen into develop 2024-03-24 20:02:26 +01:00
4 changed files with 27 additions and 30 deletions
Showing only changes of commit e679b9a972 - Show all commits

View File

@ -199,10 +199,13 @@ export interface M5CharacterCalculatedData {
poisonResistance: M5ModResult; poisonResistance: M5ModResult;
enduranceBonus: number; enduranceBonus: number;
deprivationCold: M5ModResult; deprivationCold: M5ModResult;

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.

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.
deprivationColdBonus: M5ModResult;
deprivationColdPw: number; deprivationColdPw: number;
deprivationHeat: M5ModResult; deprivationHeat: M5ModResult;
deprivationHeatBonus: M5ModResult;
deprivationHeatPw: number; deprivationHeatPw: number;
deprivationFood: M5ModResult; deprivationFood: M5ModResult;
deprivationFoodBonus: M5ModResult;
deprivationFoodPw: number; deprivationFoodPw: number;
hoard: number; hoard: number;
hoardNext: number; hoardNext: number;

View File

@ -127,10 +127,13 @@ export class M5Character extends Actor {
poisonResistance: { value: 0, mods: [] }, poisonResistance: { value: 0, mods: [] },
enduranceBonus: 0, enduranceBonus: 0,
deprivationCold: { value: 0, mods: [] }, deprivationCold: { value: 0, mods: [] },
deprivationColdBonus: { value: 0, mods: [] },
deprivationColdPw: 0, deprivationColdPw: 0,
deprivationHeat: { value: 0, mods: [] }, deprivationHeat: { value: 0, mods: [] },
deprivationHeatBonus: { value: 0, mods: [] },
deprivationHeatPw: 0, deprivationHeatPw: 0,
deprivationFood: { value: 0, mods: [] }, deprivationFood: { value: 0, mods: [] },
deprivationFoodBonus: { value: 0, mods: [] },
deprivationFoodPw: 0, deprivationFoodPw: 0,
hoard: 0, hoard: 0,
encumbrance: 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.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.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.enduranceBonus = Math.floor(ret.attributes.ko.value / 10) + Math.floor(ret.attributes.st.value / 20);
ret.stats.deprivationCold = this.modResult(0); ret.stats.deprivationCold = this.modResult(Math.floor(ret.attributes.ko.value / 2));
ret.stats.deprivationColdPw = Math.min(100, Math.max(0, Math.floor(ret.attributes.ko.value / 2))); ret.stats.deprivationColdBonus = this.modResult(0);
ret.stats.deprivationHeat = this.modResult(0); ret.stats.deprivationColdPw = Math.min(100, (ret.stats.deprivationCold.value + ret.stats.deprivationColdBonus.value));
ret.stats.deprivationHeatPw = Math.min(100, Math.max(0, Math.floor(ret.attributes.ko.value / 2))); ret.stats.deprivationHeat = this.modResult(Math.floor(ret.attributes.ko.value / 2));
ret.stats.deprivationFood = this.modResult(0); ret.stats.deprivationHeatBonus = this.modResult(0);
ret.stats.deprivationFoodPw = Math.min(100, Math.max(0, Math.floor(40 + (ret.attributes.ko.value / 2)))); 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.hoardMin = M5Character.levelThreshold.at(ret.level - 1) / 2;
ret.stats.hoardNext = M5Character.levelThreshold.at(ret.level) / 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)); 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 // Adjust stat Kälte based on Überleben (Gebirge) skill
if (item.name === "Überleben (Gebirge)") { 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 // Adjust stat Kälte based on Überleben (Steppe) skill
if (item.name === "Überleben (Steppe)") { 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 // Adjust stat Durst & Hunger based on Robustheit skill
if (item.name === "Robustheit") { if (item.name === "Robustheit") {
ret.stats.deprivationFood.value += Math.floor(item.system.fw + 10); ret.stats.deprivationFoodBonus.value += 10;
} }
}); });
} }

View File

@ -199,7 +199,7 @@ export class M5Roll {
const rollData = actor.getRollData() as M5RollData; const rollData = actor.getRollData() as M5RollData;
rollData.rolls["0"] = { 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, enabled: true,
label: (game as Game).i18n.localize("midgard5.deprivationCold"), label: (game as Game).i18n.localize("midgard5.deprivationCold"),
result: "", result: "",
@ -216,7 +216,7 @@ export class M5Roll {
const rollData = actor.getRollData() as M5RollData; const rollData = actor.getRollData() as M5RollData;
rollData.rolls["0"] = { 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, enabled: true,
label: (game as Game).i18n.localize("midgard5.deprivationHeat"), label: (game as Game).i18n.localize("midgard5.deprivationHeat"),
result: "", result: "",
@ -233,7 +233,7 @@ export class M5Roll {
const rollData = actor.getRollData() as M5RollData; const rollData = actor.getRollData() as M5RollData;
rollData.rolls["0"] = { 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, enabled: true,
label: (game as Game).i18n.localize("midgard5.deprivationFood"), label: (game as Game).i18n.localize("midgard5.deprivationFood"),
result: "", result: "",

View File

@ -74,36 +74,24 @@
<td class="flexpart-img"><img src="/icons/magic/water/snowflake-ice-blue.webp" class="flexpart-icon"></td> <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="padding edit-item">{{localize "midgard5.deprivationCold"}}</td>
<td class="fixed-value">{{data.calc.stats.deprivationCold.value}}</td> <td class="fixed-value">{{data.calc.stats.deprivationCold.value}}</td>
<td class="fixed-value">{{data.calc.stats.deprivationColdPw}}</td> <td class="fixed-value">{{data.calc.stats.deprivationColdBonus.value}}</td>
{{#if (gt (add data.calc.stats.deprivationCold.value data.calc.stats.deprivationColdPw) 100)}} <td class="fixed-value">{{add data.calc.stats.deprivationCold.value data.calc.stats.deprivationColdBonus.value}}</td>
<td class="fixed-value">100</td>
{{else}}
<td class="fixed-value">{{add data.calc.stats.deprivationCold.value data.calc.stats.deprivationColdPw}}</td>
{{/if}}
<td><button class="roll-button roll-deprivationCold-button"></button></td> <td><button class="roll-button roll-deprivationCold-button"></button></td>
</tr> </tr>
<tr data-item-id="{{itemId}}"> <tr data-item-id="{{itemId}}">
<td class="flexpart-img"><img src="/icons/magic/fire/orb-lightning-sun.webp" class="flexpart-icon"></td> <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="padding edit-item">{{localize "midgard5.deprivationHeat"}}</td>
<td class="fixed-value">{{data.calc.stats.deprivationHeat.value}}</td> <td class="fixed-value">{{data.calc.stats.deprivationHeat.value}}</td>
<td class="fixed-value">{{data.calc.stats.deprivationHeatPw}}</td> <td class="fixed-value">{{data.calc.stats.deprivationHeatBonus.value}}</td>
{{#if (gt (add data.calc.stats.deprivationCold.value data.calc.stats.deprivationHeatPw) 100)}} <td class="fixed-value">{{add data.calc.stats.deprivationHeat.value data.calc.stats.deprivationHeatBonus.value}}</td>
<td class="fixed-value">100</td>
{{else}}
<td class="fixed-value">{{add data.calc.stats.deprivationHeat.value data.calc.stats.deprivationHeatPw}}</td>
{{/if}}
<td><button class="roll-button roll-deprivationHeat-button"></button></td> <td><button class="roll-button roll-deprivationHeat-button"></button></td>
</tr> </tr>
<tr data-item-id="{{itemId}}"> <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="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="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> <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">{{data.calc.stats.deprivationFoodBonus.value}}</td>
<td class="fixed-value">100</td> <td class="fixed-value">{{add data.calc.stats.deprivationFood.value data.calc.stats.deprivationFoodBonus.value}}</td>
{{else}}
<td class="fixed-value">{{add data.calc.stats.deprivationFood.value data.calc.stats.deprivationFoodPw}}</td>
{{/if}}
<td><button class="roll-button roll-deprivationFood-button"></button></td> <td><button class="roll-button roll-deprivationFood-button"></button></td>
</tr> </tr>
</tbody> </tbody>