Add Week 2 depth systems: research, events, competitors, talent, data

Tech tree with 21 research nodes across 5 categories (infrastructure,
efficiency, generation, specialization, safety). Research page with
category-grouped cards, progress tracking, prerequisite gating.

Event engine with 34 events across industry/regulatory/PR/internal/market
categories, weighted random firing, cooldowns, expiry, and choice modal
with consequence preview. Events auto-expire with default choice.

Competitor system with 3 rival AI labs (Prometheus AI, Nexus Labs, Titan
Computing), personality-driven milestone progression, and comparison UI.

Talent page with department hiring, headcount management, and key hire
recruitment from a pool of 10 named characters with special abilities.

Data marketplace with 8 purchasable datasets, user data flywheel from
subscribers, and data system processing in tick loop.

Era transition system checks revenue/capability/reputation thresholds.
All new systems integrated into tick processor with notifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 17:30:24 -04:00
parent d1d3eb4bf2
commit 8c9555bc08
19 changed files with 3166 additions and 21 deletions
@@ -0,0 +1,27 @@
import type { GameState, Era } from '@ai-tycoon/shared';
import { ERA_THRESHOLDS } from '@ai-tycoon/shared';
export function checkEraTransition(state: GameState): Era | null {
const current = state.meta.currentEra;
const eraOrder: Era[] = ['startup', 'scaleup', 'bigtech', 'agi'];
const currentIdx = eraOrder.indexOf(current);
const nextEra = eraOrder[currentIdx + 1];
if (!nextEra) return null;
const thresholds = ERA_THRESHOLDS[nextEra as keyof typeof ERA_THRESHOLDS];
if (!thresholds) return null;
const bestModel = state.models.trainedModels.reduce(
(best, m) => Math.max(best, m.benchmarkScore), 0,
);
if (
state.economy.totalRevenue >= thresholds.revenue &&
bestModel >= thresholds.capability &&
state.reputation.score >= thresholds.reputation
) {
return nextEra;
}
return null;
}