take_action
Execute one Slay the Spire 2 game action, such as playing a card or ending a turn, and return the result with a fresh game state; optional expected state ID blocks stale decisions.
Instructions
Perform one game action and return the result plus a fresh game state.
Call get_action_help for parameter names. Examples: play_card: {"card_index": 0, "target": "CULTIST_0"}; end_turn: {}; choose_map_node: {"index": 0}; menu_select: {"option": "singleplayer"}. Use current state indices and target IDs. Actions are serialized and never retried. Optionally supply expected_state_id from get_game_state to reject stale decisions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | auto | |
| action | Yes | ||
| parameters | No | ||
| expected_state_id | No |