Pixelmon Mod - Bug tracker

9.1.9 Mega evolving the same turn your opponent switches causes the new mon to use a random move. pending

Ticket description:
Pretty much the title, if you mega evolve and your opponent hard switches to a new mon on the same turn, the mon they bring in will use a random move, and it hits a pokemon that is not on the field most/all of the time (not sure about this). Example: just had a battle where i mega evolved my scizor, and the same turn my opponent hard swapped to ferrothorn. When it was brought in it used leech seed on my annihilape who wasnt on the field. The leech seed was then still on annihilape when i brought it in later in the battle. This has been a bug since 9.1.7 but i just wanted to submit this because im not seeing any tickets about it.


#30929 Posted by LordSamosa » 02 Nov 2023 19:41

Hi there, I'm having some issues reproducing this.
I enter a battle with Gengar against a Bulbasaur. I mega evolve and the NPC switches from Bulbasaur to Ralts and uses Confusion. It always hits me, no one else. Can you reproduce this and get a battle log before the battle ends? Do /battlelog once the issue has happened, then attach that file here via a Pastebin link.

#30997 Posted by FarmerShinoy » 11 Nov 2023 05:42

Hy I can explain the issue and how to solve it:
When you mega evolve, it activate at the same priority step than you opponent switch.
(I'm sorry that's in french here, bulbapedia doesnt show this picture).
My theory is that it first make the opponent switch and after you mega evolve, but the opponent is considering that he still didn't act in the turn, so he use a move before you pass to the next turn.
I'm trying right now to reproduce the bug and record a video, but it's not easy

#31261 Posted by DutchyGold » 30 Nov 2023 09:54

Hi there,

I've experienced this bug plenty of times as well, but there's some missing information on how to reproduce it. Here's the steps and a video how to reproduce it: https://screenpal.com/watch/c0XvoVVmoLQ

User A leads with any pokemon, let's say Zamazenta. User B leads with any pokemon, let's say Volcarona.
Turn 1: User A goes for Close Combat versus Volcarona. User B can click any move.
Turn 2: User A swaps to any other pokemon, user B swaps to his mega pokemon.
Turn 3: User A swaps back to Zamazenta, user B mega evolves his pokemon and picks any move. This turn, Zamazenta will Close Combat the Volcarona again that is not on the field.

So in order for this bug to happen, the pokemon swapping into the mega must have made a move before in the battle.

#31267 Posted by Sophie847 » 02 Dec 2023 22:56

Hi there, apologies for the slow reply. I'm going to be taking over this ticket now.

I was able to confirm the behaviour shown in DutchyGolds video on pixelmon 9.1.9. By having a pokemon which used a move previously in the battle switch in on the same turn as the opponents mega evolution takes place, the attack that pokemon previously used is used again. This is erroneous as it is not their turn to attack, and the target of the move is no longer on the field.

I found this was easiest to reproduce by taking advantage of the EmergencyExit ability, rather than needing to rely on the AI switching at the right moment. An additional video reproduction, as well as the associated battle log, can be found here:

Moving this to internal now to be fixed, thanks!

Ticket details

  • Ticket ID: 21258
  • Project: Pixelmon Mod
  • Status: Pending
  • Component: Battle
  • Project version: 1.16.5-9.x.x
  • Priority: Normal
  • Severity: Normal
  • Forge/Sponge: (unknown)
  • What else would be useful to know?: (unknown)
  • Assigned to: Sophie847
  • Reported by: Eman4242 (Send PM)
  • Reporter's tickets: (List all tickets)
  • Reported on: 01 Nov 2023 10:21
  • Ticket last visited by: TheCrimsonV on 09 Jan 2024 17:06