mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
make effects copy onto actor on attachment
This commit is contained in:
parent
4d5040bba5
commit
4c1d99c577
3 changed files with 138 additions and 6 deletions
|
|
@ -51,4 +51,14 @@ export default class DhActiveEffect extends ActiveEffect {
|
|||
|
||||
cls.create(msg.toObject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Document that this ActiveEffect targets for modification.
|
||||
* @type {Document|null}
|
||||
*/
|
||||
get target() {
|
||||
if (this.parent instanceof Actor) return this.parent;
|
||||
if (CONFIG.ActiveEffect.legacyTransferral) return this.transfer ? null : this.parent;
|
||||
return this.transfer ? (this.parent.parent ?? null) : this.parent;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue