Refactored actions, 'cast a spell' task now works

This commit is contained in:
Thaum Rystra
2024-10-28 12:28:36 +02:00
parent 804c5f3aee
commit 8f8c9c28aa
39 changed files with 423 additions and 399 deletions

View File

@@ -22,7 +22,7 @@ export const insertAction = new ValidatedMethod({
action.tabletopId = creature.tabletopId;
// Ensure that all the targeted creatures exist and share a tabletop
if (action.targetIds) for (const targetId of action.targetIds) {
if (action.task.targetIds) for (const targetId of action.task.targetIds) {
const target = getCreature(targetId);
if (!target) {
throw new Meteor.Error('not-found', 'Target creature does not exist');