substract BE from INI

This commit is contained in:
Sven Balzer 2025-03-02 12:28:02 +01:00
parent 91944f97ba
commit 2933dcd3ea

View File

@ -443,10 +443,6 @@ class DSA41_CharacterData extends TypeDataModel {
this.computed.parade.basiswert = Math.round((this.computed.attributes_without_modifiers.intuition + this.computed.attributes_without_modifiers.agility + this.computed.attributes_without_modifiers.strength) / 5);
this.computed.fernkampf.basiswert = Math.round((this.computed.attributes_without_modifiers.intuition + this.computed.attributes_without_modifiers.dexterity + this.computed.attributes_without_modifiers.strength) / 5);
this.computed.initiative.wert = this.computed.initiative.basiswert + this.modifikator_initiative;
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;
const equipped_ruestungen = this.parent.items.filter((x) => x.type === "Ruestung" && x.system.angelegt === true);
for (const item of equipped_ruestungen) {
@ -464,6 +460,11 @@ class DSA41_CharacterData extends TypeDataModel {
this.computed.kampf.ruestungen_gesamt.gesamt_behinderung += item.system.gesamt_behinderung;
}
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);
}