mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-23 00:35:51 +00:00
feat: Phase 2 — 战斗引擎 @pkmn 薄适配层
- 安装 @pkmn/protocol @pkmn/client @pkmn/view - 新建 battle/types.ts: BattleState, BattlePokemon, BattleEvent, PlayerAction 等 - 新建 battle/adapter.ts: Creature→PokemonSet 转换, 野生对手生成 - 新建 battle/engine.ts: createBattle() + executeTurn() 薄封装 @pkmn/sim - 新建 battle/handler.ts: @pkmn/protocol Handler→BattleEvent 转换 - 新建 battle/ai.ts: 随机合法招式 AI 决策 - 新建 battle/settlement.ts: 战后结算 XP/EV/升级/进化/招式学习 - 新建 battle/index.ts: 统一导出 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,5 +5,9 @@
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"dependencies": {}
|
||||
"dependencies": {
|
||||
"@pkmn/client": "^0.7.2",
|
||||
"@pkmn/protocol": "^0.7.2",
|
||||
"@pkmn/view": "^0.7.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user