diff --git a/app/imports/api/engine/action/tasks/applyCastSpellTask.ts b/app/imports/api/engine/action/tasks/applyCastSpellTask.ts index 5f9c598d..4f1cf772 100644 --- a/app/imports/api/engine/action/tasks/applyCastSpellTask.ts +++ b/app/imports/api/engine/action/tasks/applyCastSpellTask.ts @@ -10,6 +10,7 @@ export default async function applySpellProperty( task: CastSpellTask, action: EngineAction, result: TaskResult, userInput: InputProvider ): Promise { const prop = task.prop; + const targetIds = prop.target === 'self' ? [action.creatureId] : task.targetIds; if (!prop) { result.appendLog({ @@ -65,7 +66,7 @@ export default async function applySpellProperty( result.appendLog({ name: message, silenced: prop.silent, - }, task.targetIds); + }, targetIds); // Add the slot level to the scope result.pushScope = { @@ -76,6 +77,6 @@ export default async function applySpellProperty( // Run the rest of the spell as if it were an action return applyActionProperty({ prop, - targetIds: task.targetIds, + targetIds: targetIds, }, action, result, userInput); } diff --git a/app/imports/client/ui/creature/actions/doAction.ts b/app/imports/client/ui/creature/actions/doAction.ts index 065800f6..5a6f903c 100644 --- a/app/imports/client/ui/creature/actions/doAction.ts +++ b/app/imports/client/ui/creature/actions/doAction.ts @@ -72,6 +72,9 @@ export default async function doAction({ const finishedAction = await applyAction( action, getErrorOnInputRequestProvider(action._id), { simulate: true } ); + if (replaceDialog) { + $store.dispatch('popDialogStack', finishedAction); + } return callActionMethod(finishedAction); } catch (e) { if (e !== 'input-requested') throw e; diff --git a/app/imports/client/ui/log/TabletopLogContent.vue b/app/imports/client/ui/log/TabletopLogContent.vue index dab03be1..1d99d75f 100644 --- a/app/imports/client/ui/log/TabletopLogContent.vue +++ b/app/imports/client/ui/log/TabletopLogContent.vue @@ -29,7 +29,7 @@