Daily Rewards & Claim System
Three independent daily-reset systems gate free value: a free Death Defiance revive token, a cap on ad-watch pull tickets, and the Supporter Club gem grant. Each tracks its own counter; there is no unified “daily reward” surface.
The three daily systems
1. Free Death Defiance token
One free in-run revive per day, after which subsequent uses in the same run escalate in gem cost.
DEATH_DEFIANCE_FREE_DAILY = 1— number of free uses granted per day (data/economy.ts:136).- Subsequent uses cost
DEATH_DEFIANCE_BASE_COST × useNumbergems: 1st free, 2nd = 40, 3rd = 60, up toDEATH_DEFIANCE_MAX_USES = 3total per run. - Cost ramp is independent of which uses were free vs. paid — the free token consumes use-slot #1.
2. Ad-ticket daily cap
Players can claim up to 5 free pull tickets per day by watching ads.
DAILY_AD_TICKET_LIMIT = 5— declared in bothdata/economy.ts:195anddata/pull-config.ts:30.claimAdTicket(currentDailyClaimed, dailyLimit)inservices/shopService.ts:105checks the cap, returns{ success: false, error: 'Daily limit reached' }past it, otherwise grantswallet.earnPullTickets(1).- The
AD_REWARD_SLOTStable (data/economy.ts:272) defines eight reward chains beyond simple tickets — gems, credits, scrap, stardust, ships — each gated by aviewsRequiredcounter that contributes to the daily-ad economy.
3. Supporter Club daily gem grant
Joining the Supporter Club unlocks a daily credits bonus (named “gems” in the brief but typed as credits in code).
- Free supporter: 200 credits/day. Paid supporter ($2.99/month): 500 credits/day.
- Source:
useSupporterStore.getDailyBonusCredits()instores/supporterStore.ts:47:case 'paid': return 500; case 'free': return 200; default: return 0; - Supporter status (
'none' | 'free' | 'paid') andactivatedAttimestamp persist to Supabase tableplayer_supporter. - A separate
getXpMultiplier()perk gives +10% XP (free) / +20% XP (paid) — passive, not a daily claim.
Reset boundary
Not specified in client code. No reset cron, midnight check, or rollover logic exists in the codebase. The currentDailyClaimed counter is supplied by the caller to claimAdTicket, implying server-side tracking. Reset is assumed to be authoritative on the server (UTC midnight is the conventional default for global games; local-midnight would require timezone storage which is not present).
When the reset cron lands it should reset, atomically:
player_currencies.ad_tickets_claimed_today→ 0- The death-defiance free-use flag (currently
RunState.bonuses.dailyBonusActiveis only a per-run flag — daily-token consumption tracking is not yet persisted) - The supporter daily-claim flag (not yet implemented;
getDailyBonusCreditsreturns the amount but no claim-state tracking exists)
Persistence
- Gems / credits / tickets:
walletStoremirrored to Supabaseplayer_currencies. Authoritative grants go through RPCs (grant_fake_gemsfor gem packs;runProgressionServicefor end-of-run credits). - Supporter status:
supporterStoremirrored to Supabaseplayer_supporter(table referenced instores/supporterStore.ts:10). - Daily-claim counters: caller-supplied to service functions — server-side state of record is implied but the RPC surface is not present in this codebase snapshot.
Related
services/shopService.ts—claimAdTicket, gem packs, supporter join/upgrade.stores/supporterStore.ts— supporter tier and perk calculation.data/economy.ts— all daily-limit constants, death defiance cost curve, ad reward slots, supporter pricing.data/pull-config.ts:30— duplicateDAILY_AD_TICKET_LIMITconstant.data/run-config.ts:272—dailyBonusActiverun-context flag (orthogonal: used for per-run scaling, not daily claims).