mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 12:41:07 +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;
|
||||
|
||||
|
|
|
|||
|
|
@ -108,11 +108,21 @@ export default class DhCompanion extends BaseDataActor {
|
|||
get proficiency() {
|
||||
return this.partner?.system?.proficiency ?? 1;
|
||||
}
|
||||
|
||||
|
||||
isItemValid() {
|
||||
return false;
|
||||
}
|
||||
|
||||
allApplicableEffects(baseEffects) {
|
||||
if (!this.partner) return baseEffects;
|
||||
|
||||
const effects = [
|
||||
...Array.from(baseEffects),
|
||||
...Array.from(this.partner.getBaseApplicableEffects()).filter(x => x.type === 'companion')
|
||||
];
|
||||
return effects;
|
||||
}
|
||||
|
||||
prepareBaseData() {
|
||||
this.attack.roll.bonus = this.partner?.system?.spellcastModifier ?? 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue