From cf4c546ca25ff148d2db09a808aa35dc552de350 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 28 Jun 2026 13:39:31 +0200 Subject: [PATCH] Fixed logic for picking which actor to summon --- module/data/fields/action/summonField.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/module/data/fields/action/summonField.mjs b/module/data/fields/action/summonField.mjs index a2275fa5..64b42267 100644 --- a/module/data/fields/action/summonField.mjs +++ b/module/data/fields/action/summonField.mjs @@ -65,9 +65,16 @@ export default class DHSummonField extends fields.ArrayField { /* Check for any available instances of the actor present in the world if we're missing artwork in the compendium. If none exists, create one. */ static async getWorldActor(baseActor) { const dataType = game.system.api.data.actors[`Dh${baseActor.type.capitalize()}`]; - if (baseActor.inCompendium && dataType && baseActor.img === dataType.DEFAULT_ICON) { + if (baseActor.inCompendium) { const worldActorCopy = game.actors.find(x => x.name === baseActor.name); - if (worldActorCopy) return worldActorCopy; + if ( + worldActorCopy && ( + baseActor.img === worldActorCopy.img || + (dataType && baseActor.img === dataType.DEFAULT_ICON) + ) + ) { + return worldActorCopy; + } return await game.system.api.documents.DhpActor.create(baseActor.toObject()); }