Fixed token path for message

This commit is contained in:
WBHarry 2025-10-26 20:22:01 +01:00
parent 8b864ba388
commit 6c5f34f6c6
2 changed files with 4 additions and 28 deletions

View file

@ -100,13 +100,15 @@ export default class DamageField extends fields.SchemaField {
if (config.hasHealing)
damagePromises.push(
actor.takeHealing(config.damage).then(updates => targetDamage.push({ token: actor.token, updates }))
actor
.takeHealing(config.damage)
.then(updates => targetDamage.push({ token: actor.token ?? actor.prototypeToken, updates }))
);
else
damagePromises.push(
actor
.takeDamage(config.damage, config.isDirect)
.then(updates => targetDamage.push({ token: actor.token, updates }))
.then(updates => targetDamage.push({ token: actor.token ?? actor.prototypeToken, updates }))
);
}