mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
Added ArmoreEffect.armorInteraction option
This commit is contained in:
parent
c067fd0e10
commit
10baf0ba10
9 changed files with 62 additions and 24 deletions
|
|
@ -51,10 +51,30 @@ export default class ArmorEffect extends foundry.data.ActiveEffectTypeDataModel
|
|||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
),
|
||||
armorInteraction: new fields.StringField({
|
||||
required: true,
|
||||
choices: CONFIG.DH.GENERAL.activeEffectArmorInteraction,
|
||||
initial: CONFIG.DH.GENERAL.activeEffectArmorInteraction.none.id,
|
||||
label: 'DAGGERHEART.EFFECTS.Armor.FIELDS.armorInteraction.label',
|
||||
hint: 'DAGGERHEART.EFFECTS.Armor.FIELDS.armorInteraction.hint'
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
get isSuppressed() {
|
||||
if (this.parent.actor?.type !== 'character') return false;
|
||||
|
||||
switch (this.armorInteraction) {
|
||||
case CONFIG.DH.GENERAL.activeEffectArmorInteraction.active.id:
|
||||
return !this.parent.actor.system.armor;
|
||||
case CONFIG.DH.GENERAL.activeEffectArmorInteraction.inactive.id:
|
||||
return Boolean(this.parent.actor.system.armor);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Type Functions */
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue