fix AT and PA calculation for weapons

This commit is contained in:
Sven Balzer 2024-12-20 17:59:04 +01:00
parent ef4539ee39
commit dcbb9f6c9c

View File

@ -337,8 +337,8 @@ class DSA41_CharacterData extends TypeDataModel {
this.kampftalente = this.parent.items.filter((x) => x.type === "Kampftalent").sort((a, b) => a.name > b.name); this.kampftalente = this.parent.items.filter((x) => x.type === "Kampftalent").sort((a, b) => a.name > b.name);
for(const talent of this.kampftalente) { for(const talent of this.kampftalente) {
this.computed.kampf.talente[talent.name] = {}; this.computed.kampf.talente[talent.name] = {};
this.computed.kampf.talente[talent.name].attacke = this.computed.at_basiswert + talent.system.attacke; this.computed.kampf.talente[talent.name].attacke = this.computed.attacke.wert + talent.system.attacke;
this.computed.kampf.talente[talent.name].parade = this.computed.pa_basiswert + talent.system.parade; this.computed.kampf.talente[talent.name].parade = this.computed.parade.wert + talent.system.parade;
this.computed.kampf.talente[talent.name].talent_attacke = talent.system.attacke; this.computed.kampf.talente[talent.name].talent_attacke = talent.system.attacke;
this.computed.kampf.talente[talent.name].talent_parade = talent.system.parade; this.computed.kampf.talente[talent.name].talent_parade = talent.system.parade;
@ -377,8 +377,8 @@ class DSA41_CharacterData extends TypeDataModel {
schild_parade: 0, schild_parade: 0,
}; };
computed.basis_attacke = this.computed.at_basiswert; computed.basis_attacke = this.computed.attacke.wert;
computed.basis_parade = this.computed.pa_basiswert; computed.basis_parade = this.computed.parade.wert;
const talent = item.system.nahkampfwaffe.kampftalente; const talent = item.system.nahkampfwaffe.kampftalente;
@ -425,7 +425,7 @@ class DSA41_CharacterData extends TypeDataModel {
talent_attacke: 0, talent_attacke: 0,
}; };
computed.basis_attacke = this.computed.fk_basiswert; computed.basis_attacke = this.computed.fernkampf.wert;
const talent = item.system.nahkampfwaffe.kampftalente; const talent = item.system.nahkampfwaffe.kampftalente;
computed.talent_attacke = this.computed.kampf.talente[talent]?.talent_attacke ?? 0; computed.talent_attacke = this.computed.kampf.talente[talent]?.talent_attacke ?? 0;