Skip to content

feat: ore pool, 7-hex spawn, combat-only expansion#8

Merged
keanji-x merged 4 commits into
mainfrom
add_game
Apr 5, 2026
Merged

feat: ore pool, 7-hex spawn, combat-only expansion#8
keanji-x merged 4 commits into
mainfrom
add_game

Conversation

@keanji-x

@keanji-x keanji-x commented Apr 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Ore pool: all hex production flows into a shared agent-level pool — no more per-hex ore fragmentation
  • 7-hex spawn: each agent starts with center + 6 surrounding hexes, no empty land on map
  • Combat-only expansion: removed claimHex/claimNeutral — territory gained only by raiding other agents
  • Ore cap at 1000: forces agents to spend ore on raids instead of hoarding
  • Building slots 12→6: limits turtling, forces strategic choices between mines and arsenals
  • Fast tempo: ore per-second, 5s attack cooldown, 30s happiness decay
  • Happiness system: post (+10), capture (+15 all hexes), defense (+20) — agents must actively maintain hexes
  • Capture steals 30% of defender's ore pool — rewards aggression
  • Frontend fix: updated getHex ABI (removed ore field, added happiness), fixed data decoding

Test plan

  • forge test — 14/14 passing
  • tsc --noEmit on mcp-server and agent-runner — clean
  • Frontend type-checks clean
  • Deploy to local anvil and verify agents fight
  • Verify frontend displays happiness correctly

🤖 Generated with Claude Code

keanji-x and others added 4 commits April 5, 2026 16:59
…te all layers

- Add GameEngine.sol: hex grid (radius 8), mines/arsenals, lazy ore harvest,
  Tullock probabilistic combat, happiness decay, territory expansion
- Update AgentRegistry: remove gold, integrate with GameEngine for hex-based identity
- Update MCP server: 26 tools including claim_hex, build, harvest, raid, attack,
  get_score, get_scoreboard
- Update agent-runner: new agent personalities (diplomat/warlord/builder),
  hex-aware context collection, strategy-driven goals
- Update frontend: hex territory visualization, building/ore display,
  agent score tracking, cartoon textures
- Update skill.md and CLAUDE.md to reflect hex territory strategy game
- Stop tracking deployed-addresses.json (local-only)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Ore pool: all hex production flows into agent-level pool (no more per-hex ore)
- 7-hex spawn: each agent starts with center + ring of 6, no empty land
- Remove claimHex/claimNeutral — territory gained only through combat
- Capture steals 30% of defender's ore pool
- Ore pool capped at 1000 to force spending on raids
- Building slots reduced from 12 to 6 per hex
- Time acceleration: ore production per-second, happiness decay per-30s
- Happiness: post_to_location +10, capture +15 all hexes, defense +20
- Attack cooldown reduced to 5 seconds
- MAP_RADIUS reduced to 4 (61 hexes, max ~8 agents)
- Fix getHex ABI: add happiness fields, remove ore field
- Update agent prompts for combat-focused gameplay
- Update frontend to match new contract interface

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add allHexKeys/hexExists to GameEngine for global hex enumeration
- Add getAllHexKeys ABI to mcp-server, update getWorld to return all hexes
- Fix frontend useGameEngine to match new getHex return signature
- Update Phaser scenes, CartoonTextures, LocationCluster for new hex data
- Update BuildingTags and WorldLayout for reduced slot count

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@keanji-x keanji-x merged commit 10a1325 into main Apr 5, 2026
2 of 3 checks passed
keanji-x added a commit that referenced this pull request Jun 26, 2026
…rch 定稿)

旧 §3 是一张 13 行「逐项签字才能开工」的 M0 决策门。经 research 真实合约 +
game-design,把那些「决策」全部定稿为 §3 已定架构——架构干净、接口可立即冻结、
无 GATE 0、无签字门。仅剩 §12 数值与 M7 ORACLE 信任模型待 owner(不阻塞)。

已定架构(每条带合约依据):
- World=B(V2World 自持)——被逼出来的:GameEngine 的 hexes/agentHexKeys/hexCount
  是 public mapping、无外部 setter(GameEngine.sol:76-78),方案 A 根本无法实现
- RNG=commit-reveal——全仓无 VRF,ArenaEngine.sol:545 自带「换 VRF/commit-reveal」TODO;
  自包含、藏在 RNGProvider 接口后,将来可换 VRF adapter
- 财库 #4/#5/#5b 是一坨耦合改造(一起落 L-A):reservedBackingG=(a)、creditG 锁
  单一 marketEngine(现状泛 onlyOperator,CardLedger/Arena 连带迁移)、withdrawSurplus
  onlyOwner 后门换多签/timelock、netTreasuryTakeG cap
- #3 checkpoint/#7 eligibility/#8 anti-snipe = 采纳 game-design §4/§5 原文
- QuestionRegistry=内嵌 PredictionMarketEngine(不占槽,留抽出缝)
- 合约面=5 net-new 槽、Router V4=14 槽、HexGrid=库、无 APActionAdapter
- HexGrid 改可逆打包键(旧 toKey 单向 keccak、无 fromKey,无法按 key 判邻接)

连带 ripple:删除 GATE 0 banner / M0-DECISIONS.md 工件 / 13 项签字 CI 门;时间线
省去旧 1.5w 决策门(全串行 ~13.5w、并行净 ~10.5w、最好 ~9w);CI gate(a) 改为
「改架构无 ADR → block」;§11 删 3 条已决风险行、补「架构被私自改」行。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant