pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

[P3][Move] Fix Substitute visual bugs on wave transition

Open innerthunder opened this issue 4 months ago • 0 comments

What are the changes the user will see?

Currently, a player Pokemon's substitute doll does not shift position with the source during transitions between battles of different types (single or double). This change fixes that.

Why am I making these changes?

My mistake with the Sub implementation; my fix to make. (Reported in the Discord)

What are the changes from a developer perspective?

data/pokemon: Pokemon#setFieldPosition now also applies tweens and position changes to the Pokemon's Substitute Doll (if it has one).

Screenshots/Videos

Before (courtesy of @Snailman11)

https://github.com/user-attachments/assets/25bf2541-6cf2-4eef-b935-407f59be670a

After

https://github.com/user-attachments/assets/b0ab6977-6c2d-4947-b4d9-76e3deeee8ea

How to test the changes?

To replicate the above videos:

  1. Download Doublebattle.txt, change the file extension to .prsv, and import the session data onto a local environment under this branch.
  2. To speed up testing, use src/overrides.ts to give your Pokemon Substitute and Hyper Voice and the opposing Pokemon Splash.
  3. Clear Wave 11, making sure Bulbasaur (the left player Pokemon) has a Substitute up at the end of the battle.
  4. Continue to Wave 12, a single wild battle. The substitute doll should move with the Bulbasaur to "center" position at the start of the wave.

Checklist

  • [x] I'm using beta as my base branch
  • [x] There is no overlap with another PR?
  • [x] The PR is self-contained and cannot be split into smaller PRs?
  • [x] Have I provided a clear explanation of the changes?
  • [x] Have I considered writing automated tests for the issue?
  • [x] If I have text, did I make it translatable and add a key in the English locale file(s)?
  • [x] Have I tested the changes (manually)?
    • [x] Are all unit tests still passing? (npm run test)
  • [x] Are the changes visual?
    • [x] Have I provided screenshots/videos of the changes?

innerthunder avatar Oct 12 '24 08:10 innerthunder