Shop and Economy

In short

Coins are earned inside a run and only spent inside that run, in the shop that opens after every cleared inning (not after the last). The shop shows 3 offers drawn by rarity weight from your unlocked upgrades. Rerolls cost more each time within a visit. Coins never leave the run; meta points are a separate currency (Meta Progression).

How it works

Earning coins (RunManager.InningCoins, at the end of each inning):

coins = homeRuns x (coinsPerHomeRun + CoinBonus stat) + bonusCoins ($$$ balls)
if cleared: + coinsPerInning + outsLeft x coinsPerLeftoverOut + (boss inning ? bossBonusCoins : 0)

A home run off a $$$ ball adds BallEffects.MoneyBallCoins to bonusCoins (Special Balls).

The shop (ShopService, screen title SHOP):

  1. Open seeds the visit from RunState.CreateShopRng(CurrentIndex): visit N is the shop before inning N + 1.
  2. Roll builds candidates from the upgrade pool (MetaProgression.UpgradePool, every unlocked upgrade). Charms are always candidates; other upgrades are skipped if you own them.
  3. It draws shopOfferCount offers without repeats, weighted by rarity.
  4. BUY (the button shows a gold coin and the price) takes the price and calls RunState.AddUpgrade. The card then says SOLD. Bat, Glove and Cleats replace what is in the slot; Charms stack. See Upgrades and Synergies.
  5. REROLL (coin and cost on the button) pays the reroll cost and rolls a fresh set from the same visit RNG.
  6. NEXT INNING (co-op: READY) returns to the between-innings screen.

Currency icons. Coins are always drawn with a gold coin stamped ”$” (orange pill): the shop’s top-right balance, BUY and REROLL buttons, the build panel and the HUD. Meta points are always a purple gem (purple pill), so the two never get mixed up (UIDraw.CurrencyPill, PriceButton, CurrencyIcon; glyphs UIGlyphs.Coin, UIGlyphs.PointGem).

The screen also shows a recap line (“INNING 3 CLEARED 1000 / 975 4 HR 1 OUTS LEFT +14 COINS”), each card’s rarity, slot and “STACKS” or “REPLACES”, and the build panel (coins, score, equipment, synergies, stats).

Prices (RunState.PriceOf): ceil(cost x ShopPrice(difficulty)). Reroll cost (ShopService.RerollCost): max(0, PriceOf(baseRerollCost + rerolls this visit x rerollCostIncrease) - RerollDiscount stat).

Numbers

WhatValueWhere to tune
Starting coins5RunConfig.startingCoins
Coins per home run1 (+ CoinBonus stat)RunConfig.coinsPerHomeRun
$$$ ball home run+3BallEffects.MoneyBallCoins
Clearing an inning+4RunConfig.coinsPerInning
Per out left when cleared+1RunConfig.coinsPerLeftoverOut
Boss inning cleared+5RunConfig.bossBonusCoins
Offers per visit3RunConfig.shopOfferCount
Reroll cost2, +1 per reroll this visitRunConfig.baseRerollCost, rerollCostIncrease
Rarity weightsCommon 6, Rare 3, Epic 1ShopService.RarityWeight
Price multiplierNormal x1, Medium x1.25, Hard x1.5 (rounded up)Difficulties.ShopPrice

Example: clearing a boss inning with 2 home runs, one off a $$$ ball, and 1 out left on Normal with no upgrades pays 2 x 1 + 3 + 4 + 1 + 5 = 15 coins.

In the code

FileWhat it does
Assets/_Project/Scripts/Upgrades/ShopService.csOpen, Roll, TryBuy, TryReroll, RerollCost, PriceOf, RarityWeight
Assets/_Project/Scripts/UI/ShopView.csThe shop screen and its buttons
Assets/_Project/Scripts/Run/RunManager.csInningCoins, OpenShop (checkpoints on entry), LeaveShop
Assets/_Project/Scripts/Run/RunState.csCoins, PriceOf, CreateShopRng, ShopSalt (co-op)
Assets/_Project/Scripts/UI/BuildPanel.csCoins, score, equipment, synergies and stats beside the shop and map
Assets/_Project/Scripts/UI/Theme/UIDraw.csCurrencyIcon, CurrencyPill, PriceButton (the Currency enum, Points or Coins, is in UITheme.cs)

Gotchas

  • Each visit has its own seeded RNG, so rerolling in one shop never changes the next shop’s first offers, and buying or rerolling never changes pitches (Seeds and Determinism).
  • Quitting in the shop and pressing CONTINUE reopens it with the same first offers, but rerolls reset to 0 and coins are what you walked in with.
  • The offer pool depends on which perks you have unlocked, so two players on the same seed (the daily) can see different offers.
  • Charms can be offered and bought again even when owned, and each copy counts toward synergies.
  • A failed inning still adds its home-run coins, but the run is over, so they are never spent.
  • Reroll Discount can make rerolls free (cost floors at 0).
  • In co-op every player has their own shop and coins; offers differ per player via ShopSalt. See Co-op Rules.
  • After a boss inning (not the last) the BOSS DOWN! cutscene comes first; its reward card lists BOSS BONUS and COINS THIS INNING, then “NEXT: THE SHOP”. The shop is already open and checkpointed underneath. See Cutscenes.