{"_id":"@aeon-games/agent-risk","_rev":"2-7d86942ebf131592707e032b3a9cbb42","name":"@aeon-games/agent-risk","dist-tags":{"latest":"5.0.0"},"versions":{"5.0.0":{"name":"@aeon-games/agent-risk","version":"5.0.0","_id":"@aeon-games/agent-risk@5.0.0","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"dist":{"shasum":"d9c6edc3e59c73018964f33ef1e19bb6d2c144a9","tarball":"https://registry.npmjs.org/@aeon-games/agent-risk/-/agent-risk-5.0.0.tgz","fileCount":51,"integrity":"sha512-Dlj8UUstKpxM9epqT8cur920b20K0kvmdVcF6DeUCDKoFyy80fdFDv6kTEZjrsepZynPmFdwAV4iUXxaRpoP7Q==","signatures":[{"sig":"MEYCIQCLwWKoZGJgYf4wPnL0wIPNkulyBXgYf2A1Vhgs/KgqBwIhAIhgyNRvlun61LcokppJooUGajt+DsafIFUrvJbZPIGI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":345079},"main":"src/index.tsx","gitHead":"ae54b0df6ac98ed86b037accafa16cf218dda541","scripts":{"forge:deploy":"bun ../../../apps/aeon-forge/src/cli/cli.tsx deploy . --oneshot"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"_npmVersion":"11.8.0","description":"Agent Risk — Territory Conquest on a Geodesic Sphere","directories":{},"_nodeVersion":"25.5.0","dependencies":{"react":"^19.0.0","three":"^0.183.1","@buley/hexgrid-3d":"^3.6.4","@aeon-games/engine":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"@types/three":"^0.183.1"},"_npmOperationalInternal":{"tmp":"tmp/agent-risk_5.0.0_1773156385371_0.7277632497809765","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."}},"time":{"created":"2026-03-10T15:26:25.224Z","modified":"2026-03-27T20:42:02.459Z","5.0.0":"2026-03-10T15:26:25.523Z"},"description":"Agent Risk — Territory Conquest on a Geodesic Sphere","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"readme":"# Agent Risk (Aeon Risk)\n\n## Purpose\nA high-stakes territory conquest game played on a geodesic sphere, integrating advanced AI strategies, fog of war, and strategic resource management. This package implements the core game engine, combat mechanics, and AI behavioral profiles for the AFFECTIVELY games platform.\n\n## Key Features\n- **Geodesic Sphere Board**: Uses a `GeodesicHexGrid` with pentagonal \"Citadels\" and hexagonal \"Territories.\"\n- **Turn-Based Strategy**: 4-player turn-based gameplay with phases for deployment, attack, and fortification.\n- **AI Behavioral Profiles**: 5 distinct AI strategies:\n  - **Expansionist**: Aggressive territory capture.\n  - **Fortress**: Defensive turtle strategy.\n  - **Diplomat**: Strategic alliance building and balanced growth.\n  - **Blitz**: High-risk, high-reward rapid strikes.\n  - **Calculator**: Optimizes for military efficiency and probability.\n  - Strategies use shared scoring over expected value, local threat/support, and great-circle pressure.\n- **Strategic Layers**:\n  - **Fog of War**: Vision range based on controlled territories and citadels.\n  - **Supply Lines**: Attrition for armies disconnected from their citadels.\n  - **Great Circles**: Bonus reinforcements for controlling strategic \"rings\" around the sphere.\n  - **Patron Gifts**: External sponsor interventions (reinforcements, orbital strikes, intel).\n- **Multiple Victory Conditions**: Domination (75% control), Elimination, Citadel control, or Time-based.\n\n## Key Files\n- `src/index.tsx`: Main game component and UI.\n- `src/state.ts`: Game state management and phase transitions.\n- `src/combat.ts`: Dice-based combat resolution logic with citadel bonuses.\n- `src/ai-strategies.ts`: Implementation of the 5 AI behavioral profiles.\n- `src/ai-strategies.test.ts`: Strategy behavior coverage for attack/fortify choices.\n- `src/fog.ts`: Visibility calculations for fog of war.\n- `src/reinforcements.ts`: Reinforcement calculation and deployment logic.\n\n## Architecture\nThe game extends the `@aeon-games/engine` and utilizes specialized modules for combat, vision, and AI. It features a robust state machine that handles turn phases (`setup`, `deploy`, `attack`, `fortify`) and ensures consistent rules for multi-player interactions.\n\n## Combat Mechanics\nCombat is resolved through dice rolls, where the number of dice is determined by the army count. Defenders receive bonuses when occupying Citadels (pentagonal cells).\n\n## Usage\nThe game is intended to be loaded within the AFFECTIVELY games runtime.\n\n```typescript\nimport AgentRiskGame from '@aeon-games/agent-risk';\n\n// ... in game runtime\n<AgentRiskGame\n  runtime={runtime}\n  roomId={roomId}\n  gameContext={gameContext}\n/>\n```\n","readmeFilename":"README.md"}