kill-streaks.ts

ACROSS

Data table for consecutive-kill milestone rewards plus flat XP bonuses for elite/boss kills. Pure data, no behavior. Streak progression is consumed by the kill-tracking system (not in this file) which awards bonusXp and pushes HUD notifications when killCount thresholds are crossed.

CHARON

File: src/starship-survivors/data/kill-streaks.ts (33 lines).

Exports:

  • StreakMilestone (interface) — shape: { killCount: number, label: string, bonusXp: number, color: string }.
  • STREAK_MILESTONES (StreakMilestone[]) — 5 milestones, ordered ascending by killCount.
  • ELITE_KILL_BONUS ({ xp: number }) — flat XP for elite kills.
  • BOSS_KILL_BONUS ({ xp: number }) — flat XP for boss kills.

Streak break conditions (per file header comment):

  • Hull damage taken (shield damage does NOT break).
  • 2-second timer between kills elapses without a new kill.

STYX

Streak milestones

killCountlabelbonusXpcolor
10STREAK ×1010#88ff88 (green)
25RAMPAGE ×2530#ffff44 (yellow)
50MASSACRE ×5080#ff8844 (orange)
100UNSTOPPABLE ×100200#ff44ff (magenta)
200GODLIKE ×200500#44ffff (cyan)

Cumulative XP if a single life hits all five tiers: 10 + 30 + 80 + 200 + 500 = 820 XP.

Flat per-kill bonuses

Kill typeXP bonus
Elite15
Boss50

These are flat additions on top of normal drops; they are not part of the milestone ladder and do not require a streak.

LETHE

  • No behavior in this file. Consumers must implement: streak counter, hull-damage reset, 2s decay timer, milestone-crossing detection, HUD notification with label+color, and bonusXp award. The color field is consumed by the HUD/notification layer.
  • Milestone ordering matters. STREAK_MILESTONES is sorted ascending by killCount; consumers likely iterate and award the first un-crossed threshold per new kill, or filter by killCount === currentStreak.
  • No diminishing returns / no resets on milestone. Hitting ×100 doesn’t reset the counter; the streak keeps climbing toward ×200.
  • Shield-vs-hull distinction is load-bearing. Per the header comment, shield damage explicitly does not break streaks — this is a design choice that interacts with shield-regen mechanics and survivability builds.
  • Hex colors are display-layer concern. Stored as strings in the data table; consumed verbatim by canvas/CSS rendering.

EXTRACT-CANDIDATE

  • Streak break rules live in comments, not data. The “2s decay” and “hull-only break” rules are documented in the file header but enforced elsewhere. A future refactor could promote these to named constants (e.g. STREAK_DECAY_MS = 2000) co-located with the milestone table, so designers tuning streak feel don’t have to grep for the timer.
  • Elite/boss bonuses are single-field objects. ELITE_KILL_BONUS = { xp: 15 } could collapse to a bare number (ELITE_KILL_BONUS_XP = 15) unless future bonuses (gold, scrap, drop-rate multiplier) are planned. If multi-currency rewards are roadmap, the object shape is correct as-is.
  • No StreakBonus interface for ELITE_KILL_BONUS / BOSS_KILL_BONUS. They share shape but aren’t typed. Trivial to extract: interface KillBonus { xp: number }.
  • Milestone color palette has no theme reference. Five hardcoded hex strings; if the game ships a palette token system, these should reference palette.streak.tier1 etc.