mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Fixed so effects are only applied to correct tokens (#1439)
This commit is contained in:
parent
0936b46926
commit
27fe83d906
3 changed files with 15 additions and 11 deletions
|
|
@ -28,6 +28,7 @@ export default class DhpCombat extends Combat {
|
|||
...effect,
|
||||
name: game.i18n.localize(effect.name),
|
||||
description: game.i18n.localize(effect.description),
|
||||
effectTargetTypes: grouping.effectTargetTypes ?? [],
|
||||
flags: {
|
||||
[`${CONFIG.DH.id}.${CONFIG.DH.FLAGS.combatToggle}`]: {
|
||||
category: toggle.category,
|
||||
|
|
@ -45,11 +46,7 @@ export default class DhpCombat extends Combat {
|
|||
for (let actor of actors) {
|
||||
await actor.createEmbeddedDocuments(
|
||||
'ActiveEffect',
|
||||
effects.map(effect => ({
|
||||
...effect,
|
||||
name: game.i18n.localize(effect.name),
|
||||
description: game.i18n.localize(effect.description)
|
||||
}))
|
||||
effects.filter(x => x.effectTargetTypes.includes(actor.type))
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue