Added consideration for an active combatant

This commit is contained in:
WBHarry 2026-03-07 19:09:21 +01:00
parent 56ba01043d
commit ae8db11155
2 changed files with 11 additions and 1 deletions

View file

@ -37,6 +37,11 @@ export default class DHSummonField extends fields.SchemaField {
return false;
}
if (this.actor.prototypeToken.actorLink) {
ui.notifications.warn(game.i18n.localize('DAGGERHEART.ACTIONS.TYPES.transform.actorLinkError'));
return false;
}
if (!this.actor.token) {
ui.notifications.warn(game.i18n.localize('DAGGERHEART.ACTIONS.TYPES.transform.prototypeError'));
return false;
@ -51,6 +56,10 @@ export default class DHSummonField extends fields.SchemaField {
{ diff: false, recursive: false, noHook: true }
);
if (this.actor.token.combatant) {
this.actor.token.combatant.update({ actorId: actor.id, img: actor.prototypeToken.texture.src });
}
const marks = { hitPoints: 0, stress: 0 };
if (!this.transform.resourceRefresh.hitPoints) {
marks.hitPoints = Math.min(