Changes:
 + NPC Stat anzeige updaten damit boni mit angezeigt werden
 + Shit fix Mods da attribute Mods Sekundäre effekte (Schadensbonus zb.) nicht angepasst haben
This commit is contained in:
2024-05-27 11:56:10 +02:00
parent c5ce058f44
commit f06fbb2687
2 changed files with 31 additions and 10 deletions
+21
View File
@@ -223,6 +223,27 @@ export class M5Character extends Actor {
ret.stats.loadMax = M5Character.maxLoadValue(data.attributes.st);
ret.stats.thrustLoad = M5Character.thrustLoadValue(data.attributes.st);
if (!skip?.mods) {
const aggregate = new M5ModAggregate(data, ret);
context.items
?.filter(
(item) =>
(item.type === "item" || item.type === "skill" || item.type === "effect" || item.type === "armor" || item.type === "container" || item.type === "class") && item.system.equipped
)
.forEach((item) => {
const mods = item.system.mods;
//console.log("Actor item mods", mods)
Object.keys(mods).forEach((modIndex) => {
const mod = mods[modIndex] as M5ItemMod;
aggregate.push(mod, item.name);
});
});
ret.skillMods = aggregate.calculate();
console.log(ret);
}
if (!skip?.containers) {
context.items
?.filter((item) => item.type === "container")