Support duplicate moves in moveset by preserving move slot selection in UpdateMoveData#1308
Support duplicate moves in moveset by preserving move slot selection in UpdateMoveData#1308
Conversation
Co-authored-by: vulcandth <6394873+vulcandth@users.noreply.github.com>
Co-authored-by: vulcandth <6394873+vulcandth@users.noreply.github.com>
Co-authored-by: vulcandth <6394873+vulcandth@users.noreply.github.com>
Co-authored-by: vulcandth <6394873+vulcandth@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. |
There was a problem hiding this comment.
Was this fail-safe change motivated by anything in particular? E.g. link battles where someone has hacked duplicate-move mons?
There was a problem hiding this comment.
This change enables proper support for Pokémon with duplicate moves in their moveset (e.g., from data edits or potential future features). Previously, UpdateMoveData would always reset the move number to the first occurrence, breaking PP tracking when multiple instances of the same move exist. The fail-safe behavior (checking if the current move number is already valid) ensures compatibility in cases where duplicate moves might occur, whether intentionally or through edge cases.
|
@copilot Address Rangi42's feedback. |
Co-authored-by: vulcandth <6394873+vulcandth@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. |
Summary
Successfully reworked
UpdateMoveDatato support multiple instances of the same move on a moveset. Simplified the implementation per code review feedback by:deregister pair efficiently for offset calculationOriginal prompt
UpdateMoveDatato support multiple instances of same move on a moveset #1058💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.