fix: 修复战斗中 PP 不递减的问题
projectPokemon 读取 maxPp 属性名错误,Showdown 使用小写 maxpp, 导致 maxPp 回退到当前 pp 值,UI 显示的 PP 总是满的。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
c5c7202348
commit
a58a36c35a
|
|
@ -274,7 +274,7 @@ function projectPokemon(pkm: any): BattlePokemon {
|
||||||
name: moveName,
|
name: moveName,
|
||||||
type: m.type ?? Dex.moves.get(m.id ?? toID(moveName))?.type?.toLowerCase() ?? 'normal',
|
type: m.type ?? Dex.moves.get(m.id ?? toID(moveName))?.type?.toLowerCase() ?? 'normal',
|
||||||
pp: m.pp ?? 0,
|
pp: m.pp ?? 0,
|
||||||
maxPp: m.maxPp ?? m.pp ?? 0,
|
maxPp: m.maxpp ?? m.maxPp ?? m.pp ?? 0,
|
||||||
disabled: m.disabled ?? false,
|
disabled: m.disabled ?? false,
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user