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

[Bug][Ability] Fix wimp out and emergency exit skipping waves in double battles #5261

Open
wants to merge 2 commits into
base: beta
Choose a base branch
from

Conversation

SirzBenjie
Copy link
Member

@SirzBenjie SirzBenjie commented Feb 6, 2025

What are the changes the user will see?

Emergency Exit and Wimp Out will no longer open an alternate dimension and skip waves when a pokemon with wimp out's ability triggers in response to a spread move that causes its teammates to faint.

Why am I making these changes?

Fixes #5032
image

What are the changes from a developer perspective?

Inside the start method of NewBattlePhase and EndBattlePhase, the first thing that is done after the call to super() is to filter out the phase queue (and prependPhaseQueue) to clear out any extra phases that have been added.

This ends up being defensive programming. Rather than adding convoluted checks at the places where NewBattlePhase and EndBattlePhase occur to determine whether or not they should properly occur is

Screenshots/Videos

Fixed Wimp Out
wimp_out_fixed.mp4

Old behavior on #5032

How to test the changes?

Go into a new battle with this override set:

  BATTLE_TYPE_OVERRIDE: "double",
  STARTING_LEVEL_OVERRIDE: 4,
  OPP_LEVEL_OVERRIDE: 3,
  MOVESET_OVERRIDE: [Moves.DRAGON_ENERGY, Moves.GASTRO_ACID, Moves.METAL_SOUND],
  OPP_SPECIES_OVERRIDE: Species.WIMPOD,
  OPP_MOVESET_OVERRIDE: [Moves.SPLASH]

Follow the steps in the video depicted in #5032

Checklist

  • I'm using beta as my base branch
  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I tested the changes manually?
  • Are all unit tests still passing? (npm run test)
    • Have I created new automated tests (npm run create-test) or updated existing tests related to the PR's changes?
  • Have I provided screenshots/videos of the changes (if applicable)?
    • [ ] Have I made sure that any UI change works for both UI themes (default and legacy)?

Are there any localization additions or changes? If so:

  • [ ] Has a locales PR been created on the locales repo?
    • ~~[ ] If so, please leave a link to it here: ~~
  • [ ] Has the translation team been contacted for proofreading/translation?

@SirzBenjie SirzBenjie requested a review from a team as a code owner February 6, 2025 06:20
@SirzBenjie SirzBenjie changed the title Fix 5032 [Bug][Ability] Fix wimp out and emergency exit skipping waves in double battles Feb 6, 2025
@Madmadness65 Madmadness65 added Ability Affects an ability P2 Bug Minor. Non crashing Incorrect move/ability/interaction labels Feb 6, 2025
@Wlowscha
Copy link
Contributor

Wlowscha commented Feb 6, 2025

Could you also take a look at #4950 just in case it also gets fixed by this? It's most likely a different problem, but just to be sure.

@SirzBenjie
Copy link
Member Author

SirzBenjie commented Feb 7, 2025

Could you also take a look at #4950 just in case it also gets fixed by this? It's most likely a different problem, but just to be sure.

I didn't investigate the cause, but I just tested and can confirm that this PR does not fix that bug.

@DayKev
Copy link
Collaborator

DayKev commented Feb 7, 2025

Could you also take a look at #4950 just in case it also gets fixed by this? It's most likely a different problem, but just to be sure.

Yeah that's a different issue, from switch-summon-phase.ts, that would be fixed with something like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ability Affects an ability P2 Bug Minor. Non crashing Incorrect move/ability/interaction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Spread Move KOs Against Wimp Out/Emergency Exit in Double Battles Skip Waves if Left Side Fainted
4 participants