---
name: sangokushi-2-end-command
description: "Sends the observed Sangokushi II province-command end sequence (0, Return, y), attempts screen settling and returns an observation. Use only at the province (0-19)? prompt while authorized to drive the shared machine. Check the settle result: stable=false means the frame budget ended before settling; continue observation with masc_msx_step_until_change or masc_msx_step before judging completion. Inspect the image even when stable=true; settling does not prove province completion or month progression. If another driver intervened or the result is uncertain, observe before further input; do not replay the sequence automatically."
---

# Sangokushi II: end the province's commands

The verified province-command end for Sangokushi II, observed as the province
10 to 18 transition. One call presses `0`, Return, `y` in sequence, attempts
screen settling (`masc_msx_step_until_change`), and returns a screen observation
with its frame and artifact. The frame budget can expire before settling.

Read the settle node's `stable` result before treating the image as settled.
If `stable=false`, continue observation with `masc_msx_step_until_change` or
`masc_msx_step` and inspect the resulting state. If the composition result does
not expose `stable`, call `masc_msx_step_until_change` directly to obtain it.
Neither `stable=true` nor a returned PNG proves province completion or month
progression; verify the visible game state. Do not replay the key sequence to
continue a transition.

Use it only when the visible prompt is the province command prompt of the
province you are finishing; a macro pressed on another screen is just keys.
The game knowledge this macro comes from — menus, save flow, media pitfalls —
lives in the `sangokushi-2` Skill. The machine is shared: an unexpected
result may mean another driver intervened between the presses and the settle;
re-observe before retrying (the `msx-play` Skill, shared machine).

```toml composition
[[compositions]]
name = "sangokushi-2-end-command"
description = "Sends the observed Sangokushi II province-command end sequence (0, Return, y), attempts screen settling and returns an observation. Use only at the province (0-19)? prompt while authorized to drive the shared machine. Check the settle result: stable=false means the frame budget ended before settling; continue observation with masc_msx_step_until_change or masc_msx_step before judging completion. Inspect the image even when stable=true; settling does not prove province completion or month progression. If another driver intervened or the result is uncertain, observe before further input; do not replay the sequence automatically."
execution = "inline"

[[compositions.nodes]]
id = "press"
tool = "masc_msx_press"
[compositions.nodes.input]
kind = "object"

[[compositions.nodes.input.fields]]
name = "keys"
[compositions.nodes.input.fields.value]
kind = "literal"
value = ["0", "Return", "y"]

[[compositions.nodes.input.fields]]
name = "sequence"
[compositions.nodes.input.fields.value]
kind = "literal"
value = true

[[compositions.nodes]]
id = "settle"
tool = "masc_msx_step_until_change"
after = ["press"]
[compositions.nodes.input]
kind = "literal"
value = {}

[[compositions.nodes]]
id = "screen"
tool = "masc_msx_screen"
after = ["settle"]
[compositions.nodes.input]
kind = "literal"
value = {}
```
