Skip to content

Commit d1ec66f

Browse files
committed
docs: add rearrange consumables to protocol api
1 parent 799ea81 commit d1ec66f

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

docs/protocol-api.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,30 @@ The BalatroBot API provides core functions that correspond to the main game acti
109109

110110
### Overview
111111

112-
| Name | Description |
113-
| ---------------------- | -------------------------------------------------------------------------------------------------------------------- |
114-
| `get_game_state` | Retrieves the current complete game state |
115-
| `go_to_menu` | Returns to the main menu from any game state |
116-
| `start_run` | Starts a new game run with specified configuration |
117-
| `skip_or_select_blind` | Handles blind selection - either select the current blind to play or skip it |
118-
| `play_hand_or_discard` | Plays selected cards or discards them |
119-
| `rearrange_hand` | Reorders the current hand according to the supplied index list |
120-
| `cash_out` | Proceeds from round completion to the shop phase |
121-
| `shop` | Performs shop actions: proceed to next round (`next_round`), purchase a card (`buy_card`), or reroll shop (`reroll`) |
112+
| Name | Description |
113+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------- |
114+
| `get_game_state` | Retrieves the current complete game state |
115+
| `go_to_menu` | Returns to the main menu from any game state |
116+
| `start_run` | Starts a new game run with specified configuration |
117+
| `skip_or_select_blind` | Handles blind selection - either select the current blind to play or skip it |
118+
| `play_hand_or_discard` | Plays selected cards or discards them |
119+
| `rearrange_hand` | Reorders the current hand according to the supplied index list |
120+
| `rearrange_consumables` | Reorders the consumables according to the supplied index list |
121+
| `cash_out` | Proceeds from round completion to the shop phase |
122+
| `shop` | Performs shop actions: proceed to next round (`next_round`), purchase a card (`buy_card`), or reroll shop (`reroll`) |
122123

123124
### Parameters
124125

125126
The following table details the parameters required for each function. Note that `get_game_state` and `go_to_menu` require no parameters:
126127

127-
| Name | Parameters |
128-
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
129-
| `start_run` | `deck` (string): Deck name<br>`stake` (number): Difficulty level 1-8<br>`seed` (string, optional): Seed for run generation<br>`challenge` (string, optional): Challenge name<br>`log_path` (string, optional): Full file path for run log (must include .jsonl extension) |
130-
| `skip_or_select_blind` | `action` (string): Either "select" or "skip" |
131-
| `play_hand_or_discard` | `action` (string): Either "play_hand" or "discard"<br>`cards` (array): Card indices (0-indexed, 1-5 cards) |
132-
| `rearrange_hand` | `cards` (array): Card indices (0-indexed, exactly `hand_size` elements) |
133-
| `shop` | `action` (string): Shop action ("next_round", "buy_card", or "reroll")<br>`index` (number, required when `action` = "buy_card"): 0-based card index to purchase |
128+
| Name | Parameters |
129+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
130+
| `start_run` | `deck` (string): Deck name<br>`stake` (number): Difficulty level 1-8<br>`seed` (string, optional): Seed for run generation<br>`challenge` (string, optional): Challenge name<br>`log_path` (string, optional): Full file path for run log (must include .jsonl extension) |
131+
| `skip_or_select_blind` | `action` (string): Either "select" or "skip" |
132+
| `play_hand_or_discard` | `action` (string): Either "play_hand" or "discard"<br>`cards` (array): Card indices (0-indexed, 1-5 cards) |
133+
| `rearrange_hand` | `cards` (array): Card indices (0-indexed, exactly `hand_size` elements) |
134+
| `rearrange_consumables` | `consumables` (array): Consumable indices (0-indexed, exactly number of consumables in consumable area) |
135+
| `shop` | `action` (string): Shop action ("next_round", "buy_card", or "reroll")<br>`index` (number, required when `action` = "buy_card"): 0-based card index to purchase |
134136

135137
### Shop Actions
136138

0 commit comments

Comments
 (0)