Attribute Mods verändern Boni nicht #111
|
|
@ -172,6 +172,26 @@ export class M5Character extends Actor {
|
|||
ret.attributes.pa.bonus = M5Character.attributeBonus(data.attributes.pa);
|
||||
ret.attributes.wk.bonus = M5Character.attributeBonus(data.attributes.wk);
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
ret.stats.lp = this.modResult(data.lp);
|
||||
ret.stats.ap = this.modResult(data.ap);
|
||||
ret.stats.lpProtection = this.modResult(0);
|
||||
|
|
@ -201,26 +221,6 @@ export class M5Character extends Actor {
|
|||
ret.stats.thrustLoad = M5Character.thrustLoadValue(data.attributes.st);
|
||||
ret.stats.encumbrance = 0;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
if (!skip?.containers) {
|
||||
context.items
|
||||
?.filter((item) => item.type === "container")
|
||||
|
|
|
|||
Loading…
Reference in New Issue