diff --git a/src/components/buffs/BuffSpawn.tsx b/src/components/buffs/BuffSpawn.tsx index c67d220..87691bf 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; @@ -20,18 +20,26 @@ let msgKey = 0; export function BuffSpawnLayer() { const [messages, setMessages] = useState([]); - - const { items, removeItem } = useSpawnSystem({ - getInterval: () => ({ - min: GAME_CONFIG.buffs.minSpawnIntervalMs, - max: GAME_CONFIG.buffs.maxSpawnIntervalMs, - }), - canSpawn: (current) => current.length === 0, - createItem: () => pickRandomBuff(), - getLifetime: () => SPAWN_DURATION, - paddingTop: 120, - paddingBottom: 80, - }); + const surgeStartedAt = useGameStore((s) => s.surgeStartedAt); + + const { items, removeItem } = useSpawnSystem( + { + 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, + paddingTop: 120, + paddingBottom: 80, + }, + surgeStartedAt, + ); const handleClick = useCallback( (item: SpawnedItem) => { @@ -50,6 +58,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..9348a99 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,9 @@ 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. Requires your TD to be below a threshold to + activate. TD costs scale with your current production.

  • @@ -195,6 +196,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 */}