Repository navigation
Conversation
Surface held skip tags, Idol/Mail/Ancient/Castle targets, interest/shop economy fields, probabilities, pool_flags, skips, starting_deck_size, and consumable_usage_total so bots can act on run context the game already tracks.
Collaborator
S1M0N38
added a commit
that referenced
this pull request
Nov 11, 2026
Expose the run's economy state as four top-level scalars so bots can plan money decisions without parsing localized effect text: - interest_cap: cap on interest, in interest units (max interest dollars = interest_cap/5 * interest_amount; Seed Money raises to 50, Money Tree to 100) - interest_amount: interest dollars per $5 held (default 1; To the Moon adds 1 per copy) - no_interest: true when the run disables interest entirely (Green Deck, The Omelette, Mad World) - the raw interest values stay nominal, so the gate flag keeps bots from computing interest that never pays - bankrupt_at: the spendable floor - purchases are blocked when cost > money - bankrupt_at (Credit Card lowers it to -20, allowing debt) PR #222 proposed these inside a thematic "economy" object; we placed them flat next to money instead, following the codebase's lifecycle grouping (run-persistent scalars at top level, round-scoped state in round). Deliberately skipped from the PR: discount_percent and inflation (already materialized in every card's cost.buy) and shop_slots (already exposed as the shop area's limit). All four are always present during a run (init_game_object initializes them), so they are assigned directly alongside the other always-present scalars rather than guarded as conditionally absent. Documented in types.lua, openrpc.json, and api.md alongside the extraction, with tests covering defaults and the voucher/joker/deck mutations. Co-authored-by: Brent Garber <me@bgarber.work>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tags) fromG.GAME.tagswith key/name/effect.idol_card,mail_card,ancient_card,castle_card) andfree_rerolls.economy(interest_cap/amount, bankrupt_at, discount_percent, shop_slots),probabilities,pool_flags,skips,starting_deck_size, and optionalconsumable_usage_total.Test plan
uv run pytest tests/lua/endpoints/test_gamestate.py::TestGamestateTopLevel::test_tags_empty_at_run_start -vuv run pytest tests/lua/endpoints/test_gamestate.py::TestGamestateTopLevel::test_tags_and_skips_after_skip -vuv run pytest tests/lua/endpoints/test_gamestate.py::TestGamestateTopLevel::test_economy_defaults -vuv run pytest tests/lua/endpoints/test_gamestate.py::TestGamestateTopLevel::test_probabilities_normal_default_and_oops -vuv run pytest tests/lua/endpoints/test_gamestate.py::TestGamestateTopLevel::test_pool_flags_and_starting_deck_size -vuv run pytest tests/lua/endpoints/test_gamestate.py::TestGamestateTopLevel::test_consumable_usage_total_after_using_tarot -vuv run pytest tests/lua/endpoints/test_gamestate.py::TestGamestateRound::test_round_joker_targets_and_free_rerolls -v