Skip to content

five-on-it / packages/missions/src/schema / Action

Variable: Action ​

const Action: ZodUnion<readonly [ZodObject<{ showText: ZodString; }, $strict>, ZodObject<{ sendMessage: ZodObject<{ from: ZodString; id: ZodOptional<ZodString>; text: ZodString; }, $strict>; }, $strict>, ZodObject<{ setFlag: ZodString; }, $strict>, ZodObject<{ clearFlag: ZodString; }, $strict>, ZodObject<{ startTimer: ZodObject<{ id: ZodString; seconds: ZodNumber; }, $strict>; }, $strict>, ZodObject<{ stopTimer: ZodString; }, $strict>, ZodObject<{ add: ZodObject<{ counter: ZodString; value: ZodUnion<readonly [ZodNumber, ZodObject<{ counter: ZodString; }, $strict>, ZodObject<{ timeLeft: ZodLiteral<...>; }, $strict>, ZodObject<{ elapsed: ZodLiteral<...>; }, $strict>, ZodObject<{ count: ZodUnion<...>; }, $strict>, ZodObject<{ distance: ZodTuple<..., ...>; }, $strict>, ZodObject<{ health: ZodUnion<...>; }, $strict>, ZodObject<{ wanted: ZodLiteral<...>; }, $strict>, ZodObject<{ phaseOf: ZodUnion<...>; }, $strict>, ZodObject<{ phase: ZodEnum<...>; }, $strict>, ZodObject<{ kills: ZodLiteral<...>; }, $strict>, ZodObject<{ alerts: ZodLiteral<...>; }, $strict>, ZodObject<{ seen: ZodLiteral<...>; }, $strict>, ZodObject<{ form: ZodString; }, $strict>, ZodObject<{ time: ZodLiteral<...>; }, $strict>]>; }, $strict>; }, $strict>, ZodObject<{ set: ZodObject<{ counter: ZodString; value: ZodUnion<readonly [ZodNumber, ZodObject<{ counter: ZodString; }, $strict>, ZodObject<{ timeLeft: ZodLiteral<...>; }, $strict>, ZodObject<{ elapsed: ZodLiteral<...>; }, $strict>, ZodObject<{ count: ZodUnion<...>; }, $strict>, ZodObject<{ distance: ZodTuple<..., ...>; }, $strict>, ZodObject<{ health: ZodUnion<...>; }, $strict>, ZodObject<{ wanted: ZodLiteral<...>; }, $strict>, ZodObject<{ phaseOf: ZodUnion<...>; }, $strict>, ZodObject<{ phase: ZodEnum<...>; }, $strict>, ZodObject<{ kills: ZodLiteral<...>; }, $strict>, ZodObject<{ alerts: ZodLiteral<...>; }, $strict>, ZodObject<{ seen: ZodLiteral<...>; }, $strict>, ZodObject<{ form: ZodString; }, $strict>, ZodObject<{ time: ZodLiteral<...>; }, $strict>]>; }, $strict>; }, $strict>, ZodObject<{ spawn: ZodObject<{ at: ZodOptional<ZodString>; count: ZodOptional<ZodNumber>; group: ZodString; }, $strict>; }, $strict>, ZodObject<{ setWanted: ZodNumber; }, $strict>, ZodObject<{ give: ZodObject<{ count: ZodDefault<ZodNumber>; item: ZodString; }, $strict>; }, $strict>, ZodObject<{ take: ZodObject<{ count: ZodOptional<ZodNumber>; tag: ZodString; }, $strict>; }, $strict>, ZodObject<{ lock: ZodObject<{ door: ZodString; }, $strict>; }, $strict>, ZodObject<{ unlock: ZodObject<{ door: ZodString; }, $strict>; }, $strict>, ZodObject<{ lockVehicle: ZodString; }, $strict>, ZodObject<{ unlockVehicle: ZodString; }, $strict>, ZodObject<{ giveKey: ZodString; }, $strict>, ZodObject<{ spawnItem: ZodObject<{ at: ZodString; count: ZodDefault<ZodNumber>; item: ZodString; }, $strict>; }, $strict>, ZodObject<{ alert: ZodObject<{ npc: ZodOptional<ZodString>; }, $strict>; }, $strict>, ZodObject<{ calm: ZodObject<{ npc: ZodOptional<ZodString>; }, $strict>; }, $strict>, ZodObject<{ cameraOff: ZodObject<{ camera: ZodString; }, $strict>; }, $strict>, ZodObject<{ cameraOn: ZodObject<{ camera: ZodString; }, $strict>; }, $strict>, ZodObject<{ reward: ZodObject<{ cash: ZodDefault<ZodNumber>; rep: ZodDefault<ZodNumber>; }, $strict>; }, $strict>, ZodObject<{ complete: ZodLiteral<true>; }, $strict>, ZodObject<{ fail: ZodUnion<readonly [ZodLiteral<true>, ZodObject<{ text: ZodString; }, $strict>]>; }, $strict>, ZodObject<{ win: ZodString; }, $strict>, ZodObject<{ message: ZodObject<{ choices: ZodOptional<ZodArray<ZodType<Reply, unknown, $ZodTypeInternals<Reply, unknown>>>>; from: ZodString; id: ZodOptional<ZodString>; text: ZodString; }, $strict>; }, $strict>, ZodObject<{ call: ZodObject<{ dialogue: ZodString; from: ZodString; }, $strict>; }, $strict>, ZodObject<{ addContact: ZodObject<{ contact: ZodString; dialogue: ZodOptional<ZodString>; }, $strict>; }, $strict>, ZodObject<{ removeContact: ZodString; }, $strict>, ZodObject<{ installApp: ZodString; }, $strict>, ZodObject<{ removeApp: ZodString; }, $strict>, ZodObject<{ waypoint: ZodString; }, $strict>, ZodObject<{ clearWaypoint: ZodLiteral<true>; }, $strict>, ZodObject<{ setClock: ZodString; }, $strict>, ZodObject<{ setPace: ZodNumber; }, $strict>, ZodObject<{ setWeather: ZodObject<{ intensity: ZodDefault<ZodNumber>; kind: ZodEnum<{ clear: "clear"; fog: "fog"; overcast: "overcast"; rain: "rain"; snow: "snow"; storm: "storm"; }>; minutes: ZodOptional<ZodNumber>; over: ZodDefault<ZodNumber>; }, $strict>; }, $strict>, ZodObject<{ skipTime: ZodObject<{ hours: ZodNumber; text: ZodOptional<ZodString>; }, $strict>; }, $strict>, ZodObject<{ setSignal: ZodObject<{ group: ZodOptional<ZodEnum<{ east-west: "east-west"; north-south: "north-south"; }>>; junction: ZodString; seconds: ZodOptional<ZodNumber>; state: ZodEnum<{ auto: "auto"; flashing: "flashing"; green: "green"; red: "red"; }>; }, $strict>; }, $strict>]>

Defined in: packages/missions/src/schema.ts:1260

What a rule does: show text, send a phone message, set or clear a flag, add to or set a counter (to a whole number), start or stop a timer, spawn more of a group (at its place unless at says), set the player's Wanted level (stars, 0 to 3: 0 calls the police off), give the player items (what does not fit lands at their feet), take items answering to a tag from them (all of them unless count says), lock or unlock a door actor, lock or unlock a vehicle actor, give the player a vehicle actor's key (the mission's item that answers to its key tag), lay items on the ground at a place, raise the alarm (every guard of the room, or an NPC actor, alert after the player) or call it off (calm: back to their rounds), switch a camera actor off or on, reward, complete or fail the mission, or end a versus mission won by a team (win); and the phone's (GAME_DESIGN §7.5): a message from one of the mission's contacts into the player's phone (with replies to pick; with an id, rules hear message:<id>.read once the player reads it, as a sendMessage with one), a call from one that rings with a dialogue, a contact added (with the dialogue a call to them plays) or removed, one of the mission's apps installed or removed, the waypoint set at a place or cleared; the room clock set to a time or run at a pace, or skipped hours on with a notice ("3 hours later", or the mission's own words), and the weather set (a kind at an intensity, coming in over over game minutes, for minutes or for good: GAME_DESIGN §5.7); the signalled junction nearest a place switched by hand (green for its north-south or east-west approaches, red, flashing, or back to its plan, auto) for so many seconds or until switched again (GAME_DESIGN §5.5). A text shows a counter's value where it says {counter:<id>}.