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

[P2] Fix binding, etc. not being removed when switching with Baton Pass #4709

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

innerthunder
Copy link
Collaborator

What are the changes the user will see?

This fixes an issue where binding effects (e.g. Bind, Sand Tomb) and other volatile effects would persist after the source used Baton Pass or Shed Tail to switch out.

Why am I making these changes?

This was discussed in the Discord. I assumed this interaction was correct when implementing Shed Tail 🤷‍♂️

What are the changes from a developer perspective?

phases/switch-summon-phase: The code to remove tags from enemies with the returning Pokemon as the source no longer only runs for the SWITCH switch type.

Screenshots/Videos

How to test the changes?

npm run test baton_pass (1 new test)

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 considered writing automated tests for the issue?
  • If I have text, did I make it translatable and add a key in the English locale file(s)?
  • Have I tested the changes (manually)?
    • Are all unit tests still passing? (npm run test)
  • [?] Are the changes visual?
    • [?] Have I provided screenshots/videos of the changes?

@innerthunder innerthunder added P2 Bug Minor. Non crashing Incorrect move/ability/interaction Move Affects a move labels Oct 23, 2024
@DayKev
Copy link
Collaborator

DayKev commented Oct 23, 2024

Noticed a couple unrelated problems with switch-summon-phase.ts while looking over this PR lmao.

private readonly slotIndex: integer;

//@ts-ignore
this.slotIndex = this.scene.currentBattle.trainer?.getNextSummonIndex(!this.fieldIndex ? TrainerSlot.TRAINER : TrainerSlot.TRAINER_PARTNER); // TODO: what would be the default trainer-slot fallback?

L48 should be removed, and L49 should have trainer? changed to trainer! (for now), and slotIndex shouldn't be marked as readonly on L19.

@Snailman11
Copy link
Collaborator

Fixes
#4309

@Tempo-anon Tempo-anon merged commit c7e9eaf into pagefaultgames:beta Oct 23, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Move Affects a move P2 Bug Minor. Non crashing Incorrect move/ability/interaction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Baton Passes User-on-the-field-Dependent Status, Includes Attract and Trapping Moves
4 participants