Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emergency Exit now activates between hazards #10299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chouettevan
Copy link

Fixed an emergency exit bug.it should now activate between hazards.

@MathyFurret
Copy link
Contributor

Hi and welcome to the PS repository! From my testing, Emergency Exit already works fine with hazards; here is a replay from the current version of the main server: https://replay.pokemonshowdown.com/gen7anythinggoes-2127259105

Can you provide a replay that demonstrates the bug?

@chouettevan
Copy link
Author

chouettevan commented May 22, 2024

The problem is not that emergency exit does not activate after entry hazards but that it does not activate between hazards
Here is a replay from the current version of the main server:https://replay.pokemonshowdown.com/gen7ou-2128354558-sf422zzrt4pfpufmk9mi5bklotct5gipw

@MathyFurret
Copy link
Contributor

MathyFurret commented May 24, 2024

I see, thanks! Unfortunately, I don't think this will fix the issue. The EntryHazard is used for triggering entry hazards, not running effects related to them. What your change would do is make the Emergency Exit ability's handler run at the same time as the entry hazards will. Due to the order event handlers are queued in, the ability's handler always runs before the hazards themselves, instead of between them, which is what we need.

Also, you should generally include a unit test for mechanics fixes. Conveniently there already is one on line 324 of test/sim/abilities/emergencyexit.js; all you have to do is delete the .skip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants