Skip to content

Commit ce99b11

Browse files
committed
docs: add sell joker to protocol-api.md
1 parent 674baf1 commit ce99b11

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

docs/protocol-api.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ The BalatroBot API operates as a finite state machine that mirrors the natural f
8383

8484
The game progresses through these states in a typical flow: `MENU``BLIND_SELECT``SELECTING_HAND``ROUND_EVAL``SHOP``BLIND_SELECT` (or `GAME_OVER`).
8585

86-
| State | Value | Description | Available Functions |
87-
| ---------------- | ----- | ---------------------------- | ---------------------------------------- |
88-
| `MENU` | 11 | Main menu screen | `start_run` |
89-
| `BLIND_SELECT` | 7 | Selecting or skipping blinds | `skip_or_select_blind` |
90-
| `SELECTING_HAND` | 1 | Playing or discarding cards | `play_hand_or_discard`, `rearrange_hand` |
91-
| `ROUND_EVAL` | 8 | Round completion evaluation | `cash_out` |
92-
| `SHOP` | 5 | Shop interface | `shop` |
93-
| `GAME_OVER` | 4 | Game ended | `go_to_menu` |
86+
| State | Value | Description | Available Functions |
87+
| ---------------- | ----- | ---------------------------- | ------------------------------------------------------ |
88+
| `MENU` | 11 | Main menu screen | `start_run` |
89+
| `BLIND_SELECT` | 7 | Selecting or skipping blinds | `skip_or_select_blind`, `sell_joker` |
90+
| `SELECTING_HAND` | 1 | Playing or discarding cards | `play_hand_or_discard`, `rearrange_hand`, `sell_joker` |
91+
| `ROUND_EVAL` | 8 | Round completion evaluation | `cash_out`, `sell_joker` |
92+
| `SHOP` | 5 | Shop interface | `shop`, `sell_joker` |
93+
| `GAME_OVER` | 4 | Game ended | `go_to_menu` |
9494

9595
### Validation
9696

@@ -120,6 +120,7 @@ The BalatroBot API provides core functions that correspond to the main game acti
120120
| `rearrange_consumables` | Reorders the consumables according to the supplied index list |
121121
| `cash_out` | Proceeds from round completion to the shop phase |
122122
| `shop` | Performs shop actions: proceed to next round (`next_round`), purchase a card (`buy_card`), or reroll shop (`reroll`) |
123+
| `sell_joker` | Sells a joker from the player's collection for money |
123124

124125
### Parameters
125126

@@ -133,6 +134,7 @@ The following table details the parameters required for each function. Note that
133134
| `rearrange_hand` | `cards` (array): Card indices (0-indexed, exactly `hand_size` elements) |
134135
| `rearrange_consumables` | `consumables` (array): Consumable indices (0-indexed, exactly number of consumables in consumable area) |
135136
| `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 |
137+
| `sell_joker` | `index` (number): 0-based index of the joker to sell from the player's joker collection |
136138

137139
### Shop Actions
138140

0 commit comments

Comments
 (0)