claude-code-best
|
e9405e4a8a
|
feat: 战斗引擎全面升级 — 捕获/逃跑/多对手/AI/道具/状态
- 新增 capture.ts:Gen 9 捕获率计算,支持精灵球/状态/时间修正
- 实现逃跑概率公式 (Gen 9) 和失败累计机制
- createBattle 支持多对手 OpponentEntry[],AI 换人考虑属性克制
- AI 选招改为优先克制招式,避免蓄力招式和被抵抗招
- 野生招式从 Dex.data.Learnsets 按等级获取,替换硬编码映射
- 实现 Potion/SuperPotion/FullRestore 等回复药效果
- 野生对手随机持有道具(5%树果/专属、3%属性增强道具)
- 新增 VolatileStatus 类型,BattlePokemon 添加 volatileStatus
- needsSwitch 检测改为更健壮的 p1Fainted + hasAliveBench 逻辑
- 解决 #3 物品使用、#4 逃跑、#5 多精灵对战、#6 AI、#7 野生招式、
#10 捕获系统、#11 volatile状态、#12 天气/地形、#19 野生道具
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-24 11:48:40 +08:00 |
|
claude-code-best
|
ecf2dbde44
|
feat: 又一大波改动
|
2026-04-23 11:20:24 +08:00 |
|
claude-code-best
|
02783e4f5d
|
feat: PC Box 管理系统 + 全英文名统一 + 队伍补位机制
- 新增 PC Box tab(左侧 party + 右侧 box 网格,支持 party↔box 拾取/放置/交换)
- 空格键抓取/放下,左键在 col=0 时切到 party 面板
- 使用 useTabHeaderFocus 避免左右键被 Tabs 组件拦截
- 所有 1025 只精灵统一使用 Dex 英文名,移除中英混搭
- compactParty 补位机制:不允许前置空位,队伍最少保留一只
- PC Box tab 移至第二位(Buddy → PC Box → Pokédex → Egg)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 17:21:24 +08:00 |
|
claude-code-best
|
2c15d9123d
|
fix: PokedexView 改为百分比统计视图,不再渲染全部 1025 只精灵
- 进度条固定 30 字符宽度,按百分比填充
- 新增分代统计(Gen I-IX),每代显示迷你进度条
- 只展示已发现的精灵,而非全部 1025 条
- 删除 groupByChain() 及进化链渲染(列表太长)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 15:18:18 +08:00 |
|
claude-code-best
|
1217c453c4
|
feat: 同步 pkmn Dex 全部 1025 只精灵,新增 SpeciesPicker 搜索选择器
- SpeciesId 从 10 项联合类型改为 string,动态从 @pkmn/sim Dex 加载 1025 只精灵
- getSpecies() 改用 Dex.species.get() 直接查找(gen wrapper 仅覆盖 733/1025)
- SUPPLEMENT/DEX_TO_SPECIES 动态生成,未收录 species 使用默认值兜底
- names/fallback 改为 partial records,缺失时回退到 Dex 英文名/通用 sprite
- 新增 SpeciesPicker 组件(基于 FuzzyPicker),支持中英文/编号搜索选择精灵
- BattleFlow configSelect 阶段替换为 SpeciesPicker,删除旧的上下翻页逻辑
- evolution 移除 ALL_SPECIES_IDS 限制,所有 Dex 物种均可进化
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 15:15:19 +08:00 |
|
claude-code-best
|
77e8d15482
|
feat: 解决显示问题
|
2026-04-22 14:24:41 +08:00 |
|
claude-code-best
|
72cfb83de3
|
feat: 一大坨优化
|
2026-04-22 13:33:02 +08:00 |
|
claude-code-best
|
bd70971632
|
fix: Battle 快捷键通过 inputRef 转发至主 Ink 上下文
BattleFlow 不再直接调用 useInput(外部包的 Ink 上下文可能不同),
改为暴露 handleInput 方法,由 BuddyPanel 中的 BattleTab 通过
useInput + ref 转发键盘事件,确保在正确的 StdinContext 中工作。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 08:44:33 +08:00 |
|
claude-code-best
|
f22caf0e97
|
feat: 集成 Battle tab 到 BuddyPanel,重命名 data/ 为 dex/ 规避 gitignore
- BuddyPanel 新增 Battle tab,BattleFlow 加 isActive 控制
- BattleFlow configSelect 阶段支持 ↑↓ 选择物种
- packages/pokemon/src/data/ → dex/,解决根 .gitignore 匹配问题
- 全量 Tab→2空格 缩进转换
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 08:35:19 +08:00 |
|
claude-code-best
|
25067e78af
|
fix: 修正 MoveLearnPanel 提示文本匹配实际键盘绑定
[S] 跳过, [1-4] 替换对应招式 — 与 BattleFlow 输入处理一致
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 07:03:22 +08:00 |
|
claude-code-best
|
70d8c0038c
|
refactor: 进化链动态生成替代硬编码
- PokedexView.tsx: groupByChain() 改用 ALL_SPECIES_IDS + getNextEvolution 动态构建
- SpeciesDetail.tsx: EvolutionChain 用相同方式找链头
- 删除未使用的 isInChain 函数
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 06:32:36 +08:00 |
|
claude-code-best
|
3c64113d77
|
feat: 添加 BattleFlow 完整键盘输入处理
所有 phase 现在都支持键盘交互:
- config: Enter/1=随机战斗, 2=指定对手, ESC=取消
- configSelect: Enter=确认, ESC=返回
- battle: 1-4=选招, S=换人, I=道具
- switch: 1-6=选队友, ESC=取消
- item: 1-9=选道具, ESC=取消
- result: Enter=继续
- learnMoves: 1-4=替换招式, S=跳过
- evolution: Enter=确认进化
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 06:07:01 +08:00 |
|
claude-code-best
|
39299f6e17
|
refactor: 清理未使用 import 和添加 spriteCache 错误日志
- SpeciesDetail.tsx: 移除未使用的 SPECIES_PERSONALITY import
- CompanionCard.tsx: 移除未使用的 SPECIES_I18N import
- spriteCache.ts: 空 catch 块添加错误日志输出
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 04:18:51 +08:00 |
|
claude-code-best
|
7c64199fc5
|
fix: 修复战斗系统 bug(switch 映射、async learnableMoves、类型安全)
- engine.ts: switch 动作改为映射 creatureId 到 party slot index
- settlement.ts: 改用 for-of 循环支持 async learnableMoves 检测
- types.ts: miss 事件增加 side 字段,消除 as any
- BattleFlow.tsx: handleAction 改为 async 支持 await settleBattle
- battle.test.ts: 补充缺失的 async 标记
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 04:12:13 +08:00 |
|
claude-code-best
|
98284a5908
|
refactor: 提取共享 getStatColor、移除 deprecated EVOLUTION_CHAINS
- 新增 ui/shared.ts 统一 getStatColor 函数
- CompanionCard/SpeciesDetail 改用共享函数,消除重复
- 移除 data/evolution.ts 中已废弃的 EVOLUTION_CHAINS 常量
- 清理 index.ts 导出
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 01:58:33 +08:00 |
|
claude-code-best
|
661cc764fe
|
refactor: 清理 SwitchPanel 未使用变量和导入
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 00:51:51 +08:00 |
|
claude-code-best
|
391e0c233a
|
chore: 移除 SwitchPanel 未使用的 calculateStats 导入
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 00:50:27 +08:00 |
|
claude-code-best
|
74682b2a82
|
refactor: 代码优化 — 扩展类型覆盖、修复变量遮蔽、移除未使用导入
- engine.ts: 扩展 getSpeciesMoves 覆盖全部 18 种属性
- settlement.ts: 重命名 species → oppSpecies 避免遮蔽外层变量
- storage.ts: addItemToBag/removeItemFromBag 深拷贝 bag items 避免修改原对象
- BattleFlow.tsx: 移除未使用导入和条件 useInput 调用(React hooks 规则)
- BattleView.tsx: 移除未使用的 BattlePokemon/MoveOption/Dex 导入
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 00:49:48 +08:00 |
|
claude-code-best
|
100b1589f2
|
fix: 修复 BattleFlow 进化阶段输入处理 + 清理无用文件
- BattleFlow.tsx: useInput hook 提升到顶层避免 React hooks 规则违规
- 删除未使用的 battle/adapter.ts 和 battle/handler.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 00:47:05 +08:00 |
|
claude-code-best
|
e3570f8cdb
|
feat: 添加 BattleFlow 战斗状态机组件 (Phase 3)
实现完整的战斗 UI 流程:配置 → 战斗 → 换人/道具 → 结果 → 学招 → 进化 → 完成
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 00:38:17 +08:00 |
|
claude-code-best
|
f5a97011e8
|
feat: Phase 3 — 战斗 UI 终端交互组件
- BattleConfigPanel: 战斗前配置(队伍展示 + 对手选择)
- BattleView: 战斗主界面(双方 HP + 招式选择 + 事件日志)
- SwitchPanel: 换人选择面板
- ItemPanel: 道具使用面板
- BattleResultPanel: 战斗结算展示
- MoveLearnPanel: 新招式学习面板
- HP 条颜色分级(绿/黄/红)
- 事件日志中文格式化
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-22 00:37:26 +08:00 |
|
claude-code-best
|
12cbb7c4c7
|
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>
|
2026-04-22 00:20:08 +08:00 |
|
claude-code-best
|
970fcd627f
|
feat: 又是更新了一大堆
|
2026-04-21 21:38:13 +08:00 |
|
claude-code-best
|
f74492617b
|
feat: 一大堆优化
|
2026-04-21 20:31:10 +08:00 |
|
claude-code-best
|
722aa6c97a
|
feat: 扩展精灵动画系统并新增 SpriteAnimator 组件
- 新增动画模式: breathe, bounce, walkLeft, walkRight, flip
- 新增 SpriteAnimator 组件,内置 tick 循环和居中渲染
- BuddyPanel 使用 SpriteAnimator 替代手动渲染
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-21 19:23:24 +08:00 |
|
claude-code-best
|
88ddba6c23
|
feat: 第一版可用 pokemon
|
2026-04-21 19:03:31 +08:00 |
|