mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 05:01:08 +01:00
Added so effects can be applied from a partner to a companion and vice versa
This commit is contained in:
parent
fa21baf8bf
commit
f3cf850355
6 changed files with 55 additions and 3 deletions
|
|
@ -453,8 +453,7 @@ export default class DhCharacter extends BaseDataActor {
|
|||
|
||||
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.specialization && subclassState >= 2) ||
|
||||
(item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.mastery && subclassState >= 3)
|
||||
) {
|
||||
return true;
|
||||
|
|
@ -573,6 +572,16 @@ export default class DhCharacter extends BaseDataActor {
|
|||
}
|
||||
}
|
||||
|
||||
allApplicableEffects(baseEffects) {
|
||||
if (!this.companion) return baseEffects;
|
||||
|
||||
const effects = [
|
||||
...Array.from(baseEffects),
|
||||
...Array.from(this.companion.getBaseApplicableEffects()).filter(x => x.type === 'companion')
|
||||
];
|
||||
return effects;
|
||||
}
|
||||
|
||||
prepareBaseData() {
|
||||
this.evasion += this.class.value?.system?.evasion ?? 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue