mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 14:25:51 +00:00
feat: Phase 1 — 数据模型升级 Creature v2 + PCBox/Bag
- 新增 MoveSlot, PCBox, Bag, ItemId 类型 - Creature 扩展 nature/moves/ability/heldItem/pokeball 字段 - BuddyData 升级 v2: 新增 boxes, bag, battlesWon/battlesLost - 新建 data/learnsets.ts: getDefaultMoveset/getDefaultAbility/getNewLearnableMoves - storage.ts v1→v2 迁移: 回填 nature/moves/ability,新增 PCBox/Bag - 新增 PCBox 操作: deposit/withdraw/move/rename/findLocation/release - 新增 Bag 操作: add/remove/getCount - generateCreature/loadBuddyData/hatchEgg 改为 async (Dex.learnsets.get 异步) - 修复 PokedexView: activeCreatureId → party[0] - 更新测试文件: async/await + v2 BuddyData fixtures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3462,7 +3462,7 @@ export function REPL({
|
||||
updateDailyStats: _updateDaily,
|
||||
incrementTurns: _incTurns,
|
||||
} = await import('@claude-code-best/pokemon');
|
||||
const _data = _updateDaily(_incTurns(_load()));
|
||||
const _data = _updateDaily(_incTurns(await _load()));
|
||||
const _creature = _getActive(_data);
|
||||
if (_creature) {
|
||||
// 1. Collect tool names from this turn's messages
|
||||
@@ -3502,7 +3502,7 @@ export function REPL({
|
||||
_data.eggs = _data.eggs.map((e: any) => _advSteps(e, 3));
|
||||
const _readyEgg = _data.eggs.find(_isReady);
|
||||
if (_readyEgg) {
|
||||
const { buddyData: _hatched, creature: _newC } = _hatchEgg(_data, _readyEgg);
|
||||
const { buddyData: _hatched, creature: _newC } = await _hatchEgg(_data, _readyEgg);
|
||||
Object.assign(_data, _hatched);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user