Attribute Mods verändern Boni nicht
Problem: + Mods für die Attribute (wie zb. bei dem Zauber Stärke) haben davon abgeleitete Werte (Wie Schadensbonus) nicht verändert Changes: + Mods werden vor den abgeleiteten Werten ausgewertet
This commit is contained in:
parent
37d6ba12e7
commit
82405a8771
|
|
@ -172,6 +172,26 @@ export class M5Character extends Actor {
|
||||||
ret.attributes.pa.bonus = M5Character.attributeBonus(data.attributes.pa);
|
ret.attributes.pa.bonus = M5Character.attributeBonus(data.attributes.pa);
|
||||||
ret.attributes.wk.bonus = M5Character.attributeBonus(data.attributes.wk);
|
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.lp = this.modResult(data.lp);
|
||||||
ret.stats.ap = this.modResult(data.ap);
|
ret.stats.ap = this.modResult(data.ap);
|
||||||
ret.stats.lpProtection = this.modResult(0);
|
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.thrustLoad = M5Character.thrustLoadValue(data.attributes.st);
|
||||||
ret.stats.encumbrance = 0;
|
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) {
|
if (!skip?.containers) {
|
||||||
context.items
|
context.items
|
||||||
?.filter((item) => item.type === "container")
|
?.filter((item) => item.type === "container")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue