fix AT and PA calculation for weapons
This commit is contained in:
parent
ef4539ee39
commit
dcbb9f6c9c
10
src/main.mjs
10
src/main.mjs
@ -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);
|
||||
for(const talent of this.kampftalente) {
|
||||
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].parade = this.computed.pa_basiswert + talent.system.parade;
|
||||
this.computed.kampf.talente[talent.name].attacke = this.computed.attacke.wert + talent.system.attacke;
|
||||
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_parade = talent.system.parade;
|
||||
@ -377,8 +377,8 @@ class DSA41_CharacterData extends TypeDataModel {
|
||||
schild_parade: 0,
|
||||
};
|
||||
|
||||
computed.basis_attacke = this.computed.at_basiswert;
|
||||
computed.basis_parade = this.computed.pa_basiswert;
|
||||
computed.basis_attacke = this.computed.attacke.wert;
|
||||
computed.basis_parade = this.computed.parade.wert;
|
||||
|
||||
const talent = item.system.nahkampfwaffe.kampftalente;
|
||||
|
||||
@ -425,7 +425,7 @@ class DSA41_CharacterData extends TypeDataModel {
|
||||
talent_attacke: 0,
|
||||
};
|
||||
|
||||
computed.basis_attacke = this.computed.fk_basiswert;
|
||||
computed.basis_attacke = this.computed.fernkampf.wert;
|
||||
|
||||
const talent = item.system.nahkampfwaffe.kampftalente;
|
||||
computed.talent_attacke = this.computed.kampf.talente[talent]?.talent_attacke ?? 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user