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):
Openseeds the visit fromRunState.CreateShopRng(CurrentIndex): visit N is the shop before inning N + 1.Rollbuilds candidates from the upgrade pool (MetaProgression.UpgradePool, every unlocked upgrade). Charms are always candidates; other upgrades are skipped if you own them.- It draws
shopOfferCountoffers without repeats, weighted by rarity. - 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. - REROLL (coin and cost on the button) pays the reroll cost and rolls a fresh set from the same visit RNG.
- 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
| What | Value | Where to tune |
|---|---|---|
| Starting coins | 5 | RunConfig.startingCoins |
| Coins per home run | 1 (+ CoinBonus stat) | RunConfig.coinsPerHomeRun |
| $$$ ball home run | +3 | BallEffects.MoneyBallCoins |
| Clearing an inning | +4 | RunConfig.coinsPerInning |
| Per out left when cleared | +1 | RunConfig.coinsPerLeftoverOut |
| Boss inning cleared | +5 | RunConfig.bossBonusCoins |
| Offers per visit | 3 | RunConfig.shopOfferCount |
| Reroll cost | 2, +1 per reroll this visit | RunConfig.baseRerollCost, rerollCostIncrease |
| Rarity weights | Common 6, Rare 3, Epic 1 | ShopService.RarityWeight |
| Price multiplier | Normal 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
| File | What it does |
|---|---|
Assets/_Project/Scripts/Upgrades/ShopService.cs | Open, Roll, TryBuy, TryReroll, RerollCost, PriceOf, RarityWeight |
Assets/_Project/Scripts/UI/ShopView.cs | The shop screen and its buttons |
Assets/_Project/Scripts/Run/RunManager.cs | InningCoins, OpenShop (checkpoints on entry), LeaveShop |
Assets/_Project/Scripts/Run/RunState.cs | Coins, PriceOf, CreateShopRng, ShopSalt (co-op) |
Assets/_Project/Scripts/UI/BuildPanel.cs | Coins, score, equipment, synergies and stats beside the shop and map |
Assets/_Project/Scripts/UI/Theme/UIDraw.cs | CurrencyIcon, 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.
Related
- Upgrades and Synergies: what you are buying and how it stacks
- Upgrades: the full item list with prices
- Difficulty: the price multiplier
- Run Config: every economy field
- Meta Progression: unlocking more upgrades for the pool (PERKS)