mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Changed Class/Multiclass to simple getters to avoid having to keep them up to date
This commit is contained in:
parent
006f9dde1f
commit
113ff2a8c5
4 changed files with 26 additions and 49 deletions
|
|
@ -42,10 +42,8 @@ export default class DHFeature extends BaseDataItem {
|
|||
traitValue =
|
||||
this.actor.system.traits[this.actor.items.get(this.originId).system.spellcastingTrait]?.value ?? 0;
|
||||
} else {
|
||||
const subclass =
|
||||
this.actor.system.multiclass.value?.id === this.originId
|
||||
? this.actor.system.multiclass.subclass
|
||||
: this.actor.system.class.subclass;
|
||||
const { value: multiclass, subclas } = this.actor.system.multiclass;
|
||||
const subclass = multiclass?.id === this.originId ? subclass : this.actor.system.class.subclass;
|
||||
traitValue = this.actor.system.traits[subclass.system.spellcastingTrait]?.value ?? 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue