feat: daily login bonus (consecutive login streak rewards) #21

Closed
opened 2026-03-07 14:38:09 -08:00 by hikari · 0 comments
Owner

Overview

Players earn a small bonus reward each day they log in, with escalating rewards for consecutive login streaks. Rewards reset to day 1 if a day is missed.

Design

Streak Mechanics

  • Streak increments when the player logs in on a new calendar day (UTC)
  • Missing a day resets the streak to 1
  • lastLoginDate and loginStreak stored on the Player model

Reward Structure

Example progression (exact values to be tuned):

Day Reward
1 500 gold
2 1,000 gold
3 2,500 gold
4 5,000 gold
5 10,000 gold
6 25,000 gold
7 50,000 gold + bonus (e.g. prestige upgrade unlock or crafting materials)
8+ Repeats from day 1 with a multiplier based on total streak weeks

UI

  • On login (after OAuth), a modal or toast shows the day's reward and current streak
  • A small streak indicator visible somewhere in the UI (e.g. resource bar or profile panel)

Task Checklist

  • Add lastLoginDate: String and loginStreak: Int to Player Prisma model
  • Check and update streak in the auth/login flow (after Discord OAuth callback)
  • loginBonus.ts data file defining rewards per day
  • Apply reward to GameState on login
  • Login bonus modal/toast component in the web app
  • Streak indicator in the UI
  • Update About panel How to Play

This issue was created with help from Hikari~ 🌸

## Overview Players earn a small bonus reward each day they log in, with escalating rewards for consecutive login streaks. Rewards reset to day 1 if a day is missed. ## Design ### Streak Mechanics - Streak increments when the player logs in on a new calendar day (UTC) - Missing a day resets the streak to 1 - `lastLoginDate` and `loginStreak` stored on the `Player` model ### Reward Structure Example progression (exact values to be tuned): | Day | Reward | |---|---| | 1 | 500 gold | | 2 | 1,000 gold | | 3 | 2,500 gold | | 4 | 5,000 gold | | 5 | 10,000 gold | | 6 | 25,000 gold | | 7 | 50,000 gold + bonus (e.g. prestige upgrade unlock or crafting materials) | | 8+ | Repeats from day 1 with a multiplier based on total streak weeks | ### UI - On login (after OAuth), a modal or toast shows the day's reward and current streak - A small streak indicator visible somewhere in the UI (e.g. resource bar or profile panel) ## Task Checklist - [ ] Add `lastLoginDate: String` and `loginStreak: Int` to `Player` Prisma model - [ ] Check and update streak in the auth/login flow (after Discord OAuth callback) - [ ] `loginBonus.ts` data file defining rewards per day - [ ] Apply reward to `GameState` on login - [ ] Login bonus modal/toast component in the web app - [ ] Streak indicator in the UI - [ ] Update About panel How to Play --- ✨ This issue was created with help from Hikari~ 🌸
naomi closed this issue 2026-03-08 15:53:41 -07:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/elysium#21