Fixed bug where actions targeting self

weren't applying props to self
This commit is contained in:
Stefan Zermatten
2022-08-16 09:26:40 +02:00
parent 58629c92f4
commit 45f05d0d34

View File

@@ -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 };