|
52 | 52 | ---@field action "rearrange" The action to perform |
53 | 53 | ---@field cards number[] Array of card indices for every card in hand (0-based) |
54 | 54 |
|
| 55 | +---@class RearrangeJokersArgs |
| 56 | +---@field jokers number[] Array of joker indices for every joker (0-based) |
| 57 | + |
55 | 58 | ---@class ShopActionArgs |
56 | 59 | ---@field action "next_round" | "buy_card" | "reroll" The action to perform |
57 | 60 | ---@field index? number The index of the card to act on (buy, buy_and_use, redeem, open) (0-based) |
|
72 | 75 | ---@field last_client_port? number Port of the last client that sent a message |
73 | 76 |
|
74 | 77 | -- ============================================================================= |
75 | | --- Game Entity Types (used in utils.lua for state extraction) |
| 78 | +-- Game Entity Types |
76 | 79 | -- ============================================================================= |
77 | 80 |
|
78 | 81 | -- Root game state response (G object) |
|
81 | 84 | ---@field game? GGame Game information (null if not in game) |
82 | 85 | ---@field hand? GHand Hand information (null if not available) |
83 | 86 | ---@field jokers GJokers Jokers area object (with sub-field `cards`) |
84 | | ----@field consumeables GConsumeables Consumables area object (typo intentional to match API) |
| 87 | +---@field consumeables GConsumeables Consumables area object (typo intentional) |
| 88 | +---@field shop_jokers? GShopJokers Shop jokers area |
| 89 | +---@field shop_vouchers? GShopVouchers Shop vouchers area |
| 90 | +---@field shop_booster? GShopBooster Shop booster packs area |
85 | 91 |
|
86 | 92 | -- Game state (G.GAME) |
87 | 93 | ---@class GGame |
88 | 94 | ---@field bankrupt_at number Money threshold for bankruptcy |
89 | 95 | ---@field base_reroll_cost number Base cost for rerolling shop |
90 | 96 | ---@field blind_on_deck string Current blind type ("Small", "Big", "Boss") |
91 | | ----@field bosses_used table<string, number> Bosses used in run (bl_<boss_name> = 1|0) |
| 97 | +---@field bosses_used GGameBossesUsed Bosses used in run (bl_<boss_name> = 1|0) |
92 | 98 | ---@field chips number Current chip count |
93 | 99 | ---@field current_round GGameCurrentRound Current round information |
94 | 100 | ---@field discount_percent number Shop discount percentage |
|
141 | 147 | ---@field hands_played number Number of hands played |
142 | 148 | ---@field reroll_cost number Current dollar cost to reroll the shop offer |
143 | 149 | ---@field free_rerolls number Free rerolls remaining this round |
144 | | ----@field voucher table Vouchers for this round |
| 150 | +---@field voucher GGameCurrentRoundVoucher Vouchers for this round |
145 | 151 |
|
146 | 152 | -- Selected deck info (G.GAME.selected_back) |
147 | 153 | ---@class GGameSelectedBack |
|
182 | 188 | -- Hand card (G.hand.cards[]) |
183 | 189 | ---@class GHandCards |
184 | 190 | ---@field label string Display label of the card |
| 191 | +---@field sort_id number Unique identifier for this card instance |
185 | 192 | ---@field base GHandCardsBase Base card properties |
186 | 193 | ---@field config GHandCardsConfig Card configuration |
187 | 194 | ---@field debuff boolean Whether card is debuffed |
|
217 | 224 | ---@field config GCardAreaConfig Config for jokers card area |
218 | 225 | ---@field cards GJokersCard[] Array of joker card objects |
219 | 226 |
|
220 | | --- Keeping typo "consumeables" for compatibility with the runtime table name |
| 227 | +-- Keeping typo "consumeables" for compatibility |
221 | 228 | ---@class GConsumeables |
222 | 229 | ---@field config GCardAreaConfig Configuration for the consumables slot |
| 230 | +---@field cards? GConsumablesCard[] Array of consumable card objects |
223 | 231 |
|
224 | 232 | -- Joker card (G.jokers.cards[]) |
225 | 233 | ---@class GJokersCard |
226 | 234 | ---@field label string Display label of the joker |
227 | 235 | ---@field cost number Purchase cost of the joker |
| 236 | +---@field sort_id number Unique identifier for this card instance |
228 | 237 | ---@field config GJokersCardConfig Joker card configuration |
| 238 | +---@field debuff boolean Whether joker is debuffed |
| 239 | +---@field facing string Card facing direction ("front", "back") |
| 240 | +---@field highlighted boolean Whether joker is highlighted |
229 | 241 |
|
230 | 242 | -- Joker card configuration (G.jokers.cards[].config) |
231 | 243 | ---@class GJokersCardConfig |
232 | | ----@field center table Center configuration for joker |
| 244 | +---@field center_key string Key identifier for the joker center |
233 | 245 |
|
234 | 246 | -- Consumable card (G.consumeables.cards[]) |
235 | 247 | ---@class GConsumablesCard |
|
239 | 251 |
|
240 | 252 | -- Consumable card configuration (G.consumeables.cards[].config) |
241 | 253 | ---@class GConsumablesCardConfig |
242 | | ----@field center table Center configuration for consumable |
| 254 | +---@field center_key string Key identifier for the consumable center |
243 | 255 |
|
244 | 256 | -- ============================================================================= |
245 | | --- Utility Module (implemented in utils.lua) |
| 257 | +-- Utility Module |
246 | 258 | -- ============================================================================= |
247 | 259 |
|
248 | 260 | ---Utility functions for game state extraction and data processing |
|
290 | 302 | ---@field vsync_enabled boolean Whether vertical sync is enabled |
291 | 303 |
|
292 | 304 | -- ============================================================================= |
293 | | --- New composite area types (match utils.lua) |
| 305 | +-- Shop Area Types |
294 | 306 | -- ============================================================================= |
| 307 | + |
| 308 | +-- Shop jokers area |
| 309 | +---@class GShopJokers |
| 310 | +---@field config GCardAreaConfig Configuration for the shop jokers area |
| 311 | +---@field cards? GShopCard[] Array of shop card objects |
| 312 | + |
| 313 | +-- Shop vouchers area |
| 314 | +---@class GShopVouchers |
| 315 | +---@field config GCardAreaConfig Configuration for the shop vouchers area |
| 316 | +---@field cards? GShopCard[] Array of shop voucher objects |
| 317 | + |
| 318 | +-- Shop booster area |
| 319 | +---@class GShopBooster |
| 320 | +---@field config GCardAreaConfig Configuration for the shop booster area |
| 321 | +---@field cards? GShopCard[] Array of shop booster objects |
| 322 | + |
| 323 | +-- Shop card |
| 324 | +---@class GShopCard |
| 325 | +---@field label string Display label of the shop card |
| 326 | +---@field cost number Purchase cost of the card |
| 327 | +---@field sell_cost number Sell cost of the card |
| 328 | +---@field debuff boolean Whether card is debuffed |
| 329 | +---@field facing string Card facing direction ("front", "back") |
| 330 | +---@field highlighted boolean Whether card is highlighted |
| 331 | +---@field ability GShopCardAbility Card ability information |
| 332 | +---@field config GShopCardConfig Shop card configuration |
| 333 | + |
| 334 | +-- Shop card ability (G.shop_*.cards[].ability) |
| 335 | +---@class GShopCardAbility |
| 336 | +---@field set string The set of the card: "Joker", "Planet", "Voucher", "Booster", or "Consumable" |
| 337 | + |
| 338 | +-- Shop card configuration (G.shop_*.cards[].config) |
| 339 | +---@class GShopCardConfig |
| 340 | +---@field center_key string Key identifier for the card center |
| 341 | + |
| 342 | +-- ============================================================================= |
| 343 | +-- Additional Game State Types |
| 344 | +-- ============================================================================= |
| 345 | + |
| 346 | +-- Round voucher (G.GAME.current_round.voucher) |
| 347 | +---@class GGameCurrentRoundVoucher |
| 348 | +-- This is intentionally empty as the voucher table structure varies |
| 349 | + |
| 350 | +-- Bosses used (G.GAME.bosses_used) |
| 351 | +---@class GGameBossesUsed |
| 352 | +-- Dynamic table with boss name keys mapping to 1|0 |
0 commit comments