fix: "Related Cards" does not show "rewinded" cards and show initial card instead - #1402
fix: "Related Cards" does not show "rewinded" cards and show initial card instead#1402artemovie wants to merge 2 commits into
Conversation
When Rewind re-picks during Discover, the game sends a new FULL_ENTITY - Updating for the same entity with a different CardID. The CreationRegex handler only set cardId for new entities, ignoring updates to existing ones. This caused Tess Greymane's related cards tooltip to show the first Discover pick instead of the actual played card. Also remove the incorrect cantPlayChange handler that was a previous attempt at fixing this issue.
game sends SHOW_ENTITY with blank CardID. The UpdatingEntityRegex handler unconditionally set latestCardId to the blank value, causing all zone change handlers (which pass latestCardId as cardId) to skip playerPlay due to the empty cardId guard in zoneChangeFromHand. - latestCardId getter now treats empty string same as nil, falling back to entity.cardId instead of returning blank - SHOW_ENTITY/CHANGE_ENTITY handler now skips latestCardId update when CardID is blank, preserving the previously known value
|
@artemovie You need a CLA in place before contributions can be accepted. You can work with @beheh to get that setup. |
|
Hi there, sorry for the delay and thanks for your PR! All contributions to HearthSim require a signed CLA. I've sent you an invite to the repository, please follow the instructions there. If you've already signed the CLA, please let us know. Once that's done and the CLA has been merged, we'll try to get this merged here as soon as possible. |
|
Hello @beheh , sorry for delay. I can access HearthSim/cla, but GitHub shows forking is disabled and my account only has read access, so I cannot push a signature branch or create the CLA PR. Could you temporarily enable forking or grant me write access so I can submit the signed CLA? Thanks! |
|
@artemovie Thanks for pointing this out! I flipped the setting - try again? |
|
Thanks @beheh , works now. Opened MR with my CLA signature |
|
All done, thanks again for contributing! @fmoraes74 We can proceed here and with future PRs from this contributor :-) |
|
I was reviewing the change and I have a question on the removal of |
Issue
Description:
Part I:
When Rewind re-picks during Discover (e.x. Rogue imbue ability), the game sends a new FULL_ENTITY - Updating for the same entity with a different
CardID. TheCreationRegexhandler only set cardId for new entities, ignoring updates to existing ones. This caused Tess Greymane's related cards tooltip to show the first Discover pick instead of the actual played card.Also remove the incorrect
cantPlayChangehandler that was a previous attempt at fixing this issue.Part II:
After Part I, Rewind-Discovered cards with Stealth or Dormant keywords were still missing from the tooltip (see video). When such a card is played, the game sends SHOW_ENTITY - Updating with a blank
CardID. TheUpdatingEntityRegexhandler unconditionally setlatestCardIdto that blank value, and since all zone change handlers passlatestCardIdas thecardIdparameter, theplayerPlaycall was skipped due to the emptycardIdguard inzoneChangeFromHand.Before:
bug2.mov
bug_stealth.mov
After:
fix_01.mov
fix_2.mov