diff --git a/src/main.mjs b/src/main.mjs index c63d3bf..7614628 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -548,15 +548,15 @@ class DSA41_CharacterData extends TypeDataModel { this.computed.kampf.ruestungen_gesamt.gesamt_behinderung += item.system.gesamt_behinderung; } + for (let [key, value] of Object.entries(this.computed.kampf.ruestungen_gesamt)) { + this.computed.kampf.ruestungen_gesamt[key] = Math.round(value); + } + this.computed.initiative.wert = this.computed.initiative.basiswert + this.modifikator_initiative - this.computed.kampf.ruestungen_gesamt.gesamt_behinderung; this.computed.attacke.wert = this.computed.attacke.basiswert + this.modifikator_attacke; this.computed.parade.wert = this.computed.parade.basiswert + this.modifikator_parade; this.computed.fernkampf.wert = this.computed.fernkampf.basiswert + this.modifikator_fernkampf; - for (let [key, value] of Object.entries(this.computed.kampf.ruestungen_gesamt)) { - this.computed.kampf.ruestungen_gesamt[key] = Math.round(value); - } - this.kampftalente = this.parent.items.filter((x) => x.type === "Kampftalent").sort((a, b) => a.name > b.name); for(const talent of this.kampftalente) { this.computed.kampf.talente[talent.name] = {};