[Bug] Companion Trait Useage (#357)

* Removed trait useage for companion attack

* Fixes companion attack.roll.bonus

* More fixes

* Corrected companion resource change on duality

* .

* Added Dead/Unconcious
This commit is contained in:
WBHarry 2025-07-16 01:53:37 +02:00 committed by GitHub
parent f2176c6238
commit 5635bcaf7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 36 additions and 25 deletions

View file

@ -60,8 +60,7 @@ export default class DhCompanion extends BaseDataActor {
},
roll: {
type: 'attack',
bonus: 0,
trait: 'instinct'
bonus: 0
},
damage: {
parts: [
@ -87,20 +86,12 @@ export default class DhCompanion extends BaseDataActor {
};
}
get traits() {
return {
instinct: { value: this.attack.roll.bonus }
};
}
get proficiency() {
return this.partner?.system?.proficiency ?? 1;
}
prepareBaseData() {
const partnerSpellcastingModifier = this.partner?.system?.spellcastModifier;
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;
this.attack.roll.bonus = this.partner?.system?.spellcastModifier ?? 0;
for (let levelKey in this.levelData.levelups) {
const level = this.levelData.levelups[levelKey];
@ -133,12 +124,6 @@ export default class DhCompanion extends BaseDataActor {
}
}
prepareDerivedData() {
if (this.partner) {
this.partner.system.resources.hope.max += this.resources.hope;
}
}
async _preDelete() {
if (this.partner) {
await this.partner.update({ 'system.companion': null });