Fixes companion attack.roll.bonus

This commit is contained in:
WBHarry 2025-07-16 00:29:39 +02:00
parent 1ff1ee00dd
commit 701a69a9c1

View file

@ -91,9 +91,7 @@ export default class DhCompanion extends BaseDataActor {
} }
prepareBaseData() { prepareBaseData() {
const partnerSpellcastingModifier = this.partner?.system?.spellcastModifier; this.attack.roll.bonus = this.partner?.system?.spellcastModifier ?? 0;
const spellcastingModifier = this.partner?.system?.traits?.[partnerSpellcastingModifier]?.value;
this.attack.roll.bonus = spellcastingModifier ?? 0; // Needs to expand on which modifier it is that should be used because of multiclassing;
for (let levelKey in this.levelData.levelups) { for (let levelKey in this.levelData.levelups) {
const level = this.levelData.levelups[levelKey]; const level = this.levelData.levelups[levelKey];