generated from nhcarrigan/template
feat: add daily login bonus system with streak tracking
Awards escalating gold rewards each consecutive day (Day 7 grants bonus crystals). Streak resets on missed days; a week multiplier boosts all rewards for longer streaks. Shows a modal on first daily load and displays the current streak on the character sheet.
This commit is contained in:
@@ -41,6 +41,7 @@ export type {
|
||||
LeaderboardCategory,
|
||||
LeaderboardEntry,
|
||||
LeaderboardResponse,
|
||||
LoginBonusResult,
|
||||
LoadResponse,
|
||||
PrestigeRequest,
|
||||
PrestigeResponse,
|
||||
|
||||
@@ -21,6 +21,19 @@ export interface SaveResponse {
|
||||
signature?: string;
|
||||
}
|
||||
|
||||
export interface LoginBonusResult {
|
||||
/** Current login streak day count */
|
||||
streak: number;
|
||||
/** Gold awarded for today's login */
|
||||
goldEarned: number;
|
||||
/** Crystals awarded (day 7 bonus, scaled by week multiplier) */
|
||||
crystalsEarned: number;
|
||||
/** Day within the 7-day cycle (1–7) */
|
||||
day: number;
|
||||
/** Week number multiplier (week 1 = ×1, week 2 = ×2, …) */
|
||||
weekMultiplier: number;
|
||||
}
|
||||
|
||||
export interface LoadResponse {
|
||||
state: GameState;
|
||||
/** Offline gold earned since last save (server-calculated) */
|
||||
@@ -31,6 +44,10 @@ export interface LoadResponse {
|
||||
offlineSeconds: number;
|
||||
/** HMAC-SHA256 signature of the loaded state — store and include in next save request */
|
||||
signature?: string;
|
||||
/** Daily login bonus awarded on this load (null if already claimed today) */
|
||||
loginBonus: LoginBonusResult | null;
|
||||
/** Current login streak (always present) */
|
||||
loginStreak: number;
|
||||
}
|
||||
|
||||
export interface BossChallengeRequest {
|
||||
|
||||
Reference in New Issue
Block a user