rh-hideout / pokeemerald-expansion

Feature branche for the pokeemerald decompilation. See the wiki for more info.
372 stars 1.21k forks source link

Red Card + Eject Pack interaction #5716

Closed TerraPrograms closed 2 days ago

TerraPrograms commented 3 days ago

Description

If an Eject Pack Pokemon uses a move like Superpower, Overheat etc against a Pokemon holding Red Card (and not fainting it), the Eject Pack activates first, then the Red Card activates later:

Visualization: https://www.twitch.tv/moxi/clip/ResoluteGentleDinosaurNerfBlueBlaster-Wi00HWD9sO2Ae3pF (Based on Pokemon Lucid, but I checked it in the current Expansion version and it's still present) Intended interaction: Red Card cancells Eject Pack, the latter still gets consumed apparently Showdown got this part wrong, tested it on Cardridge and the Pokemon should keep its Eject Pack. https://replay.pokemonshowdown.com/gen9customgame-2245743669

https://github.com/user-attachments/assets/051a45a5-6847-4486-9bfb-1754b6f446bd

Furthermore, I want to bring attention to this smogon thread: https://www.smogon.com/forums/threads/various-eject-pack-bugs.3733517/ While I haven't tested any of the interactions described in there (yet), I think this could be a good baseline for writing Tests.

Version

1.9.3 (Latest release)

Upcoming/master Version

No response

Discord contact info

No response

hedara90 commented 3 days ago

Intended interaction: Red Card cancells Eject Pack, the latter still gets consumed. Is this interaction confirmed on cartridge?

TerraPrograms commented 3 days ago

Is this interaction confirmed on cartridge?

Unfortunately not, I was only able to verify it on Showdown. From what I've seen, Eject Pack is queue'd to activate really late, so I personally don't have doubt about the order. But I can see the consuption of Eject Pack being a point of contention, I was surprised about that too. Probably a wise choice if someone could verify it on cartridge.

hedara90 commented 3 days ago

I don't have a game with Eject Pack in it, so I can't test it myself.

TerraPrograms commented 3 days ago

I have a copy of Scarlett so if needed I can test. I definitely need a 2nd person however. And I'd need to collect the necessary items in the game but that shouldn't be too bad. So if you or anyone who is trying to verify this is interested, feel free to @ me in Discord. :)

hedara90 commented 3 days ago

You don't need a 2nd person, you can just Trick/Switcheroo items onto wild mons. I do all my testing solo on USUM with chains of Skill Swap, Switcheroo/Trick and various other ways of forcing specific behavior from the AI.

TerraPrograms commented 3 days ago

You don't need a 2nd person, you can just Trick/Switcheroo items onto wild mons. I do all my testing solo on USUM with chains of Skill Swap, Switcheroo/Trick and various other ways of forcing specific behavior from the AI.

Haven't thought of that, I will try thank you! Recording is probably gonna be scuffed 💀 But I'm sure thats fine. I will report back once I have it tested.

TerraPrograms commented 3 days ago

Update: Very rare moment of showdown actually getting a mechanic wrong, you do in fact keep the Eject Pack after Red Card phazes you out.

Video evidence - I Tricked Granbull a Red Card, then used Close Combat on it, here is the result.

https://github.com/user-attachments/assets/cd49a1c4-3132-428c-b5a0-4d0792ecf2a6

Thank you for the recommendation @hedara90 good intuition that Showdown might have gotten this wrong.

hedara90 commented 3 days ago

I kinda expected it. I don't rely on Showdown testing for verifying behavior at all any more.

TerraPrograms commented 3 days ago

PR 5657 implemented a fix where Eject Pack gets cancelled but still consumed due to Emergency Exit activation. This case seems very similar here and I'd say it should keep the Eject Pack in that case too, right?