tactical_view
Read a unit's surroundings—adjacent plots, terrain, visible occupants, cities, and melee/ranged targets with previews—to choose its next move or attack.
Instructions
One unit's surroundings in one read, for choosing its move or attack. neighbors are the six adjacent plots
by coordinate and direction (NE, E, SE, SW, W, NW; the engine's own adjacency, so map wrap and the edge rows
need no hex arithmetic), each with terrain, river_crossing, owner, visible units and move: attack (a melee
attack; its preview is in targets), open (move_unit would send the order), refused (move_unit would refuse it,
why says why) or enemy (a visible enemy this unit cannot melee). open is not a path cost: turns-to-reach and
movement cost are not available. targets are the unit's melee and ranged targets with the combat previews
available_unit_actions gives. occupants (visible units, hostile first) and cities (a fogged one is
last_seen) cover radius (1-5; by default as far as this unit itself sees or shoots, at least 2); fog counts
visible, fogged and unrevealed plots there, and unseen_within_2 is how many plots within two cannot be seen:
fog can hide units, so nothing is called safe. unit.sight is this unit's own line of sight from the engine
(range, on_hills, plots, reach: high ground adds a plot, hills and forest in between block); a ranged unit's
unit.fire_los is the same test with its attack range, the one a ranged attack must pass (a Crossbowman on a
hill reaches 3); occupant and city rows say in_sight / in_fire_los. grid is a lettered picture of the same
area with its legend; players names every owner id in the reply. detail="full" adds plots (every revealed
plot in radius, as map_window reads it) and the previews' modifier rows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | summary | |
| radius | No | ||
| unit_id | Yes |