From 975934f06a444d4fe2daa67840ded83a6237e672 Mon Sep 17 00:00:00 2001 From: Sven Balzer <4653051+Kyuusokuna@users.noreply.github.com> Date: Tue, 6 May 2025 11:31:23 +0200 Subject: [PATCH] fix initiative calculation to use the rounded total BE --- src/main.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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] = {};