From f99a394b029eac4065e0e2223cc08eaac6528dbe Mon Sep 17 00:00:00 2001 From: Roland Chelwing Date: Fri, 17 Apr 2026 13:35:15 +0200 Subject: [PATCH 1/9] =?UTF-8?q?feat:=20gameplay=20changes=20=E2=80=94=20co?= =?UTF-8?q?st=20scaling,=20hacks=20prestige=20gate,=20endgame=20surge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three gameplay changes: 1. Building cost multiplier 1.15 → 1.30 for all 12 buildings Makes progression ~2x longer (intern: 15→20→25→33) 2. Hacks require "Hacker Mindset" prestige upgrade (5,000 rep) Removes early-game power spike, makes hacks a mid-game reward 3. Escalating Surge when 9+ buildings mastered - Production multiplier starts at 2x, +1x every 30 seconds - Buffs spawn 2x faster with doubled duration - Surge indicator in TopBar shows current multiplier - Makes the final push for last 3 buildings feel like a crescendo Also updates Help drawer with all mechanic changes. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/buffs/BuffSpawn.tsx | 15 +++++++++----- src/components/help/HelpDrawer.tsx | 23 +++++++++++++++++++--- src/components/layout/MobileBottomNav.tsx | 5 ++++- src/components/layout/StatsPanel.tsx | 4 ++-- src/components/layout/TopBar.tsx | 11 +++++++++++ src/config/gameConfig.ts | 5 +++++ src/data/buildings.ts | 24 +++++++++++------------ src/data/prestige.ts | 8 ++++++++ src/engine/production.ts | 13 ++++++++++++ src/store/gameStore.ts | 19 +++++++++++++++++- src/store/selectors.ts | 15 +++++++++++++- src/test/calculations.test.ts | 2 +- src/test/selectors.test.ts | 1 + src/types/game.ts | 1 + 14 files changed, 120 insertions(+), 26 deletions(-) diff --git a/src/components/buffs/BuffSpawn.tsx b/src/components/buffs/BuffSpawn.tsx index c67d220..9b27515 100644 --- a/src/components/buffs/BuffSpawn.tsx +++ b/src/components/buffs/BuffSpawn.tsx @@ -5,7 +5,7 @@ import { pickRandomBuff } from "../../data/buffs"; import type { SpawnedItem } from "../../hooks/useSpawnSystem"; import { useSpawnSystem } from "../../hooks/useSpawnSystem"; import { useGameStore } from "../../store/gameStore"; -import { selectClickValue, selectLocPerSecond } from "../../store/selectors"; +import { selectClickValue, selectIsSurgeActive, selectLocPerSecond } from "../../store/selectors"; const SPAWN_DURATION = GAME_CONFIG.buffs.spawnDurationMs; @@ -22,10 +22,14 @@ export function BuffSpawnLayer() { const [messages, setMessages] = useState([]); const { items, removeItem } = useSpawnSystem({ - getInterval: () => ({ - min: GAME_CONFIG.buffs.minSpawnIntervalMs, - max: GAME_CONFIG.buffs.maxSpawnIntervalMs, - }), + getInterval: () => { + const surgeActive = selectIsSurgeActive(useGameStore.getState()); + const divisor = surgeActive ? 2 : 1; + return { + min: GAME_CONFIG.buffs.minSpawnIntervalMs / divisor, + max: GAME_CONFIG.buffs.maxSpawnIntervalMs / divisor, + }; + }, canSpawn: (current) => current.length === 0, createItem: () => pickRandomBuff(), getLifetime: () => SPAWN_DURATION, @@ -50,6 +54,7 @@ export function BuffSpawnLayer() { if (result.productionMultiplier || result.clickMultiplier) { let duration = result.duration ?? 30; if (state.prestige.prestigeUpgrades.includes("buff_mastery")) duration *= 2; + if (selectIsSurgeActive(state)) duration *= 2; state.addBuff({ id: `${item.data.id}_${Date.now()}`, buffId: item.data.id, diff --git a/src/components/help/HelpDrawer.tsx b/src/components/help/HelpDrawer.tsx index 0e9839f..69897af 100644 --- a/src/components/help/HelpDrawer.tsx +++ b/src/components/help/HelpDrawer.tsx @@ -74,7 +74,7 @@ export function HelpDrawer({ open, onOpenChange }: Props) {

- Each building costs more as you buy more (1.15x per unit). Use Buy x1/x10/x100/Max to + Each building costs more as you buy more (1.3x per unit). Use Buy x1/x10/x100/Max to bulk purchase.

@@ -125,8 +125,8 @@ export function HelpDrawer({ open, onOpenChange }: Props) {

- Temporary boosts that add Tech Debt. Unlock at LoC milestones. Requires your TD to be below a threshold - to activate. TD costs scale with your current production. + Temporary boosts that add Tech Debt. Requires the Hacker Mindset prestige upgrade + (5,000 rep). Individual hacks unlock at LoC milestones. TD costs scale with your current production.

  • @@ -195,6 +195,23 @@ export function HelpDrawer({ open, onOpenChange }: Props) {

+
+

+ When 9 or more buildings achieve Mastery, an{" "} + Escalating Surge activates: +

+
    +
  • + Production multiplier starts at 2x and increases by 1x every 30 seconds +
  • +
  • Buffs spawn twice as fast with doubled duration
  • +
  • The surge resets when you prestige
  • +
+

+ The final push — master the last 3 buildings with an ever-growing production boost! +

+
+

Once you've earned 1,000,000 total LoC in a run, you can{" "} diff --git a/src/components/layout/MobileBottomNav.tsx b/src/components/layout/MobileBottomNav.tsx index 6f03193..0eac8ed 100644 --- a/src/components/layout/MobileBottomNav.tsx +++ b/src/components/layout/MobileBottomNav.tsx @@ -14,6 +14,7 @@ interface Props { export function MobileBottomNav({ onHelpClick }: Props) { const [activeDrawer, setActiveDrawer] = useState(null); const resetGame = useGameStore((s) => s.resetGame); + const hasHackAccess = useGameStore((s) => s.prestige.prestigeUpgrades.includes("hack_access")); const [confirmingRestart, setConfirmingRestart] = useState(false); const openDrawer = (tab: MobileTab) => { @@ -30,7 +31,9 @@ export function MobileBottomNav({ onHelpClick }: Props) { {/* Fixed bottom navigation bar */}