From 45f05d0d34a5baaed1b631a05e8d77d6de0a2956 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Tue, 16 Aug 2022 09:26:40 +0200 Subject: [PATCH] Fixed bug where actions targeting self weren't applying props to self --- .../api/engine/actions/applyPropertyByType/applyAction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/imports/api/engine/actions/applyPropertyByType/applyAction.js b/app/imports/api/engine/actions/applyPropertyByType/applyAction.js index f666bad9..26da462a 100644 --- a/app/imports/api/engine/actions/applyPropertyByType/applyAction.js +++ b/app/imports/api/engine/actions/applyPropertyByType/applyAction.js @@ -11,8 +11,8 @@ import { applyNodeTriggers } from '/imports/api/engine/actions/applyTriggers.js' export default function applyAction(node, actionContext) { applyNodeTriggers(node, 'before', actionContext); const prop = node.node; - let targets = actionContext.targets; - if (prop.target === 'self') targets = [actionContext.creature]; + if (prop.target === 'self') actionContext.targets = [actionContext.creature]; + const targets = actionContext.targets; // Log the name and summary let content = { name: prop.name };