todo_actions
Fetch legal actions for multiple units in one call, including promotions and targets, to replace individual per-unit queries.
Instructions
Legal actions for many units in one call. With no unit_ids: every unit in turn_status.todo.units
(still needs an order) plus every unit with a promotion waiting; with unit_ids: exactly those.
Each row is what available_unit_actions returns for that unit (actions, promotions, nearby_builds,
attack_targets, ranged_targets, moves, x, y) plus id, type and promotion_ready. Action rows
drop the computed help line (upgrade price, scrap gold) unless full=true; the standing text
for every action and promotion is in reference("actions") / reference("promotions"). One query instead of one per unit: the
read for a whole turn's units in one call. Refused while it is not our turn unless unit_ids is given.
detail: "normal" (default, the rows above), "full" (same as full=true) or "summary": per unit only id,
type, x, y, moves, promotion_ready, actions as bare type strings minus the everyday ones (move, route,
swap, skip, sleep, fortify, alert, wake, cancel, delete, automate/stop, remove route -- listed once in
routine_actions, counted per unit in routine), promotions (enums for choose_promotion), attack /
ranged targets (x, y, unit or city, owner, hp; no preview) and build_plots (x, y, builds, resource).
drill_down gives the exact todo_actions arguments for the normal rows. Same single read at every level;
a summary of 38 units is a fraction of the normal size. limit returns the first N units in todo order
and lists the rest in omitted (count, ids, the args that fetch them). Every reply has detail, n
(total units) and returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | ||
| limit | No | ||
| detail | No | ||
| unit_ids | No |