mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Explicitely adding the false value rather than relying on undefined returns. Oops
This commit is contained in:
parent
459f87f24c
commit
5074a65183
1 changed files with 14 additions and 12 deletions
|
|
@ -445,20 +445,22 @@ export default class DhCharacter extends BaseDataActor {
|
|||
if (item.system.originItemType !== CONFIG.DH.ITEM.featureTypes.subclass.id) {
|
||||
return true;
|
||||
}
|
||||
if (this.class.subclass) {
|
||||
const prop = item.system.multiclassOrigin ? 'multiclass' : 'class';
|
||||
const subclassState = this[prop].subclass?.system?.featureState;
|
||||
if (!subclassState) return false;
|
||||
if (!this.class.subclass) return false;
|
||||
|
||||
if (
|
||||
item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.foundation ||
|
||||
(item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.specialization &&
|
||||
subclassState >= 2) ||
|
||||
(item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.mastery && subclassState >= 3)
|
||||
) {
|
||||
return true;
|
||||
const prop = item.system.multiclassOrigin ? 'multiclass' : 'class';
|
||||
const subclassState = this[prop].subclass?.system?.featureState;
|
||||
if (!subclassState) return false;
|
||||
|
||||
if (
|
||||
item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.foundation ||
|
||||
(item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.specialization &&
|
||||
subclassState >= 2) ||
|
||||
(item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.mastery && subclassState >= 3)
|
||||
) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
get sheetLists() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue