#6 Lasten und Gewichte #52
|
|
@ -107,6 +107,12 @@
|
||||||
|
|
||||||
"midgard5.no-container": "Ohne",
|
"midgard5.no-container": "Ohne",
|
||||||
|
|
||||||
|
"midgard5.encumbrance": "Getragene Last",
|
||||||
|
"midgard5.load": "Normallast",
|
||||||
|
"midgard5.heavy-load": "Schwere Last",
|
||||||
|
"midgard5.thrust-load": "Schublast",
|
||||||
|
"midgard5.load-max": "Höchstlast",
|
||||||
|
|
||||||
"midgard5.exp-overall": "Erfahrungsschatz",
|
"midgard5.exp-overall": "Erfahrungsschatz",
|
||||||
"midgard5.exp-available": "Erfahrungspunkte",
|
"midgard5.exp-available": "Erfahrungspunkte",
|
||||||
"midgard5.grace": "Göttliche Gnade",
|
"midgard5.grace": "Göttliche Gnade",
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,11 @@ export enum M5Stats {
|
||||||
HOARD_NEXT = "hoardNext",
|
HOARD_NEXT = "hoardNext",
|
||||||
HOARD_MIN = "hoardMin",
|
HOARD_MIN = "hoardMin",
|
||||||
WEALTH = "wealth",
|
WEALTH = "wealth",
|
||||||
|
LOAD = "load",
|
||||||
|
HEAVY_LOAD = "heavyLoad",
|
||||||
|
LOAD_MAX = "loadMax",
|
||||||
|
THRUST_LOAD = "thrustLoad",
|
||||||
|
ENCUMBRANCE = "encumbrance",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum M5ModType {
|
export enum M5ModType {
|
||||||
|
|
@ -181,6 +186,11 @@ export interface M5CharacterCalculatedData {
|
||||||
hoardNext: number;
|
hoardNext: number;
|
||||||
hoardMin: number;
|
hoardMin: number;
|
||||||
wealth: number;
|
wealth: number;
|
||||||
|
load: number;
|
||||||
|
heavyLoad: number;
|
||||||
|
loadMax: number;
|
||||||
|
thrustLoad: number;
|
||||||
|
encumbrance: number;
|
||||||
};
|
};
|
||||||
skillMods: {};
|
skillMods: {};
|
||||||
skills: {
|
skills: {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import { data } from "jquery";
|
||||||
import { M5Item } from "../items/M5Item";
|
import { M5Item } from "../items/M5Item";
|
||||||
import { M5Attribute, M5CharacterCalculatedData, M5ItemMod, M5ModOperation, M5ModResult, M5RollData, M5Skill, M5SkillCalculated, M5SkillLearned } from "../M5Base";
|
import { M5Attribute, M5Attributes, M5CharacterCalculatedData, M5ItemMod, M5ModOperation, M5ModResult, M5RollData, M5Skill, M5SkillCalculated, M5SkillLearned, M5Stats } from "../M5Base";
|
||||||
import M5ModAggregate from "./M5ModAggregate";
|
import M5ModAggregate from "./M5ModAggregate";
|
||||||
|
import { info } from "console";
|
||||||
export class M5Character extends Actor {
|
export class M5Character extends Actor {
|
||||||
// constructor(
|
// constructor(
|
||||||
// data: ConstructorParameters<typeof foundry.documents.BaseActor>[0],
|
// data: ConstructorParameters<typeof foundry.documents.BaseActor>[0],
|
||||||
|
|
@ -23,6 +25,54 @@ export class M5Character extends Actor {
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static loadValue(attribute: M5Attribute) {
|
||||||
|
const value = this.attributeMinMax(attribute);
|
||||||
|
if (value > 99) return 35;
|
||||||
|
if (value > 95) return 30;
|
||||||
|
if (value > 80) return 25;
|
||||||
|
if (value > 60) return 20;
|
||||||
|
if (value > 30) return 15;
|
||||||
|
if (value > 10) return 10;
|
||||||
|
if (value > 0) return 5;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static heavyLoadValue(attribute: M5Attribute) {
|
||||||
|
const value = this.attributeMinMax(attribute);
|
||||||
|
if (value > 99) return 50;
|
||||||
|
if (value > 95) return 45;
|
||||||
|
if (value > 80) return 40;
|
||||||
|
if (value > 60) return 35;
|
||||||
|
if (value > 30) return 30;
|
||||||
|
if (value > 10) return 25;
|
||||||
|
if (value > 0) return 20;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static maxLoadValue(attribute: M5Attribute) {
|
||||||
|
const value = this.attributeMinMax(attribute);
|
||||||
|
if (value > 99) return 90;
|
||||||
|
if (value > 95) return 80;
|
||||||
|
if (value > 80) return 75;
|
||||||
|
if (value > 60) return 70;
|
||||||
|
if (value > 30) return 60;
|
||||||
|
if (value > 10) return 50;
|
||||||
|
if (value > 0) return 40;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static thrustLoadValue(attribute: M5Attribute) {
|
||||||
|
const value = this.attributeMinMax(attribute);
|
||||||
|
if (value > 99) return 200;
|
||||||
|
if (value > 95) return 170;
|
||||||
|
if (value > 80) return 150;
|
||||||
|
if (value > 60) return 140;
|
||||||
|
if (value > 30) return 120;
|
||||||
|
if (value > 10) return 70;
|
||||||
|
if (value > 0) return 50;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
derivedData(
|
derivedData(
|
||||||
skip: {
|
skip: {
|
||||||
mods?: boolean;
|
mods?: boolean;
|
||||||
|
|
@ -72,6 +122,11 @@ export class M5Character extends Actor {
|
||||||
drinking: { value: 0, mods: [] },
|
drinking: { value: 0, mods: [] },
|
||||||
drinkingFW: 0,
|
drinkingFW: 0,
|
||||||
hoard: 0,
|
hoard: 0,
|
||||||
|
encumbrance: 0,
|
||||||
|
load: 0,
|
||||||
|
heavyLoad: 0,
|
||||||
|
thrustLoad: 0,
|
||||||
|
loadMax: 0,
|
||||||
},
|
},
|
||||||
skillMods: {},
|
skillMods: {},
|
||||||
skills: {
|
skills: {
|
||||||
|
|
@ -149,6 +204,11 @@ export class M5Character extends Actor {
|
||||||
ret.stats.hoardNext = M5Character.levelThreshold.at (ret.level)/2;
|
ret.stats.hoardNext = M5Character.levelThreshold.at (ret.level)/2;
|
||||||
ret.stats.wealth = data.info.gold + data.info.silver/10 + data.info.copper/100;
|
ret.stats.wealth = data.info.gold + data.info.silver/10 + data.info.copper/100;
|
||||||
ret.stats.hoard = 0;
|
ret.stats.hoard = 0;
|
||||||
|
ret.stats.load = M5Character.loadValue(data.attributes.st);
|
||||||
|
ret.stats.heavyLoad = M5Character.heavyLoadValue(data.attributes.st);
|
||||||
|
ret.stats.loadMax = M5Character.maxLoadValue(data.attributes.st);
|
||||||
|
ret.stats.thrustLoad = M5Character.thrustLoadValue(data.attributes.st);
|
||||||
|
ret.stats.encumbrance = 0;
|
||||||
|
|
||||||
|
|
||||||
if (!skip?.mods) {
|
if (!skip?.mods) {
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,31 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
|
<div class="flexpart">
|
||||||
|
<div class="flexpart-header"><img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon">Lasten in Kilogramm</div>
|
||||||
|
<table>
|
||||||
|
<thead class="theader">
|
||||||
|
<tr>
|
||||||
|
<th class="title" style="text-align: center">{{localize "midgard5.load"}}</th>
|
||||||
|
<th class="title" style="text-align: center">{{localize "midgard5.heavy-load"}}</th>
|
||||||
|
<th class="title" style="text-align: center">{{localize "midgard5.load-max"}}</th>
|
||||||
|
<th class="title" style="text-align: center">{{localize "midgard5.thrust-load"}}</th>
|
||||||
|
<th class="title" style="text-align: center">{{localize "midgard5.encumbrance"}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr height = 10px></tr>
|
||||||
|
<tr>
|
||||||
|
<td class="fixed-value"><input type="number" name="data.info.load" value="{{data.calc.stats.load}}"></td>
|
||||||
|
<td class="fixed-value"><input type="number" name="data.info.heavyLoad" value="{{data.calc.stats.heavyLoad}}"></td>
|
||||||
|
<td class="fixed-value"><input type="number" name="data.info.loadMax" value="{{data.calc.stats.loadMax}}"></td>
|
||||||
|
<td class="fixed-value"><input type="number" name="data.info.thrustLoad" value="{{data.calc.stats.thrustLoad}}"></td>
|
||||||
|
<td class="fixed-value"><input type="number" name="data.info.encumbrance" value="{{data.calc.stats.encumbrance}}"></td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
Reference in New Issue