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 bykillCount.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
| killCount | label | bonusXp | color |
|---|---|---|---|
| 10 | STREAK ×10 | 10 | #88ff88 (green) |
| 25 | RAMPAGE ×25 | 30 | #ffff44 (yellow) |
| 50 | MASSACRE ×50 | 80 | #ff8844 (orange) |
| 100 | UNSTOPPABLE ×100 | 200 | #ff44ff (magenta) |
| 200 | GODLIKE ×200 | 500 | #44ffff (cyan) |
Cumulative XP if a single life hits all five tiers: 10 + 30 + 80 + 200 + 500 = 820 XP.
Flat per-kill bonuses
| Kill type | XP bonus |
|---|---|
| Elite | 15 |
| Boss | 50 |
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, andbonusXpaward. Thecolorfield is consumed by the HUD/notification layer. - Milestone ordering matters.
STREAK_MILESTONESis sorted ascending bykillCount; consumers likely iterate and award the first un-crossed threshold per new kill, or filter bykillCount === 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
StreakBonusinterface forELITE_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.tier1etc.