• Smogon Premier League is here and the team collection is now available. Support your team!

Mechanics Gens 3-4: Truant, Sleep and Freeze should block Pursuit activation

What type of bug are you reporting? Mechanics

What is the bug?
Hello.

I am actually reporting two bugs because I think they are intertwined.

This is with how pursuit interacts with being used while waking up in gen 4. In-game, if a pokemon wakes up and uses pursuit against another pokemon that is switching out, the pokemon gets switched out and does not take any damage. The incoming pokemon will take damage from pursuit without the 2x boost for switching.

Additionally, if the pokemon that is asleep clicks pursuit but remains asleep, nothing happens to indicate that the sleeping pokemon clicked pursuit.

In showdown, the order of operations is reversed. The asleep pokemon will wake up, use pursuit on the pokemon that is switching out and get the 2x damage boost. The incoming pokemon will not get harmed.

Additionally, if the pokemon that clicked pursuit remains asleep, an information leak will occur and the simulator will say "(pokemon) is being withdrawn!" "opposing (pokemon) is fast asleep."

tbh im suprised this hasn't been noticed yet considering that pursuit + sleep are both staples of gen 4 ou.

Are you able to replicate it? If so, how?
It can very easily be replicated in game.

Here is how it is supposed to work in-game.

Here is how it is currently implemented on showdown:
https://play.pokemonshowdown.com/battle-gen4ou-2511822423
 
This is actually very interesting. Should be an easy fix. Thanks!

Edit: Would you be able to test it in Gens 2 and 3?
 
I also wonder whether there are other status conditions under which it fails. From what I can see in the decompiled code, Pursuit doesn't try to activate if status & 0b100111 is true, which makes me think there may be additional statuses that prevent it from activating. Moreover, the code also suggests that the ability Truant prevents Pursuit from activating.
 
Confirmations:
  • In Gen 2, Sleep does not prevent Pursuit from attempting to activate.
  • In Gen 3, Sleep, Freeze and Truant prevent Pursuit from activating.
  • In Gen 4, Sleep, Freeze and Truant prevent Pursuit from activating.
  • In Gen 5, neither Sleep nor Truant prevents Pursuit from attempting to activate.
I think I discovered something related: if Pursuit is able to activate in Gens 3 and 4, it seems that the Pokémon will never get paralyzed (at least I'm not being able to). I'm not sure about the other gens.

Fix: https://github.com/smogon/pokemon-showdown/pull/11680
 
I also wonder whether there are other status conditions under which it fails. From what I can see in the decompiled code, Pursuit doesn't try to activate if status & 0b100111 is true, which makes me think there may be additional statuses that prevent it from activating. Moreover, the code also suggests that the ability Truant prevents Pursuit from activating.
Heya, first time posting about something like this lol. I was curious about this and also looked into it in HGSS:

All the flags for a mon's status are stored in a 16 bit value with the following structure:
bytes 0-2: the sleep counter, also used to indicate if a mon is asleep or not
byte 3: if the mon is poisoned or not
byte 4: if the mon is burned or not
byte 5: if the mon is frozen or not
byte 6: if the mon is paralysed or not
byte 7: if the mon is badly poisoned or not
bytes 8-15: the poison counter
So "status & 0b0000000000100111" masks all status conditions aside from sleep or freeze, which are the only two which can stop pursuit from activating.

Also since the only other thing it checks is truant (and that you're not on the same side as the mon switching out), pursuit should in theory always activate when the mon is confused or infatuated.
 
Last edited:
Heya, first time posting about something like this lol. I was curious about this and also looked into it in HGSS:

All the flags for a mon's status are stored in a 16 bit value with the following structure:
bytes 0-2: the sleep counter, also used to indicate if a mon is asleep or not
byte 3: if the mon is poisoned or not
byte 4: if the mon is burned or not
byte 5: if the mon is frozen or not
byte 6: if the mon is paralysed or not
byte 7: if the mon is badly poisoned or not
bytes 8-15: the poison counter
So "status & 0b0000000000100111" masks all status conditions aside from sleep or freeze, which are the only two which can stop pursuit from activating.

Also since the only other thing it checks is truant (and that you're not on the same side as the mon switching out), pursuit should in theory always activate when the mon is confused or infatuated.
Thank you. I was intrigued by why there were so many 1 bits.
 
Heya, first time posting about something like this lol. I was curious about this and also looked into it in HGSS:

All the flags for a mon's status are stored in a 16 bit value with the following structure:
bytes 0-2: the sleep counter, also used to indicate if a mon is asleep or not
byte 3: if the mon is poisoned or not
byte 4: if the mon is burned or not
byte 5: if the mon is frozen or not
byte 6: if the mon is paralysed or not
byte 7: if the mon is badly poisoned or not
bytes 8-15: the poison counter
So "status & 0b0000000000100111" masks all status conditions aside from sleep or freeze, which are the only two which can stop pursuit from activating.

Also since the only other thing it checks is truant (and that you're not on the same side as the mon switching out), pursuit should in theory always activate when the mon is confused or infatuated.
Hey everyone. I just wanted to check in and confirm if clicking pursuit while para'd in Gen 4 prevents full paralysis or not. In the DPP Cord Aristrea said

"ok so update i realised that the TryPursuit function called there does actually check statuses (so yes im dumb), but it only checks for freeze and sleep (and also truant), not para, so yeah para shouldn't stop pursuit from activating when a mon switches out."

I understand this as when a pokemon who is paralysed clicks pursuit, they can't ever be fully paralysed.

I then tested this in Platinum because that's the only Gen 4 game I own, clicking Pursuit 22 times(george182 said 21 times is the threshold to be over 99.7% certain, maybe he can explain why that is 'cause I can't) and I didn't get full para'd once.


But as most of us know you can get full para'd when clicking pursuit on showdown
https://replay.pokemonshowdown.com/gen4ou-2520955060

I'd appreciate it if anyone could clarify how the mechanic operates and if someone could test this interaction out in HG/SS
 
Hey everyone. I just wanted to check in and confirm if clicking pursuit while para'd in Gen 4 prevents full paralysis or not. In the DPP Cord Aristrea said

"ok so update i realised that the TryPursuit function called there does actually check statuses (so yes im dumb), but it only checks for freeze and sleep (and also truant), not para, so yeah para shouldn't stop pursuit from activating when a mon switches out."

I understand this as when a pokemon who is paralysed clicks pursuit, they can't ever be fully paralysed.

I then tested this in Platinum because that's the only Gen 4 game I own, clicking Pursuit 22 times(george182 said 21 times is the threshold to be over 99.7% certain, maybe he can explain why that is 'cause I can't) and I didn't get full para'd once.


But as most of us know you can get full para'd when clicking pursuit on showdown
https://replay.pokemonshowdown.com/gen4ou-2520955060

I'd appreciate it if anyone could clarify how the mechanic operates and if someone could test this interaction out in HG/SS
yeah to clarify on what I said on the DPP cord, it shouldn't be possible for a mon to be fully paralysed if pursuit activates on a switch. However, If the opposing mon doesn't switch, pursuit can still be stopped by full para.
 
I said 99.7% because lots of industries use that number as mathematical certainty. No idea if Smogon has an established threshold.

99.7% is three standard deviations from the mean.

And for the calc there's a 75% chance not to get paralysed each turn:
1-(0.75^21) > 0.997
 
yeah to clarify on what I said on the DPP cord, it shouldn't be possible for a mon to be fully paralysed if pursuit activates on a switch. However, If the opposing mon doesn't switch, pursuit can still be stopped by full para.
As a TLDR for why this is, the normal checks for if a mon can use a move (e.g it's not blocked by freeze, confusion, encore, full para ect) are called after the game handles mons switching in and out of the field. But since pursuit activates as the target mon is switching, it can't use these checks and needs to have its own set of checks for if it can activate or not, and this doesn't include a check for full para like the normal one does.

However, if the target mon doesn't switch, pursuit is treated like a normal move, meaning it goes through the normal set of move checks and as such is checked for full para.
 
Last edited:
I'll implement that in the original PR. Edit: Done ✅
Confirmations:
  • In Gen 2, Pursuit activation can be paralyzed.
  • In Gen 3, Pursuit activation cannot be paralyzed (decompiled code analysis).
  • In Gen 4, Pursuit activation cannot be paralyzed (decompiled code analysis + empirical testing with 99.82% confidence by robertshortgrass).
  • In Gen 5, Pursuit activation can be paralyzed.
 
I'll implement that in the original PR. Edit: Done ✅
Confirmations:
  • In Gen 2, Pursuit activation can be paralyzed.
  • In Gen 3, Pursuit activation cannot be paralyzed (decompiled code analysis).
  • In Gen 4, Pursuit activation cannot be paralyzed (decompiled code analysis + empirical testing with 99.82% confidence by robertshortgrass).
  • In Gen 5, Pursuit activation can be paralyzed.

For gen 4 at least, this appears to have not yet been implemented on the ladder (no link cuz forgot to save replay):
 

Attachments

  • IMG_5597.jpeg
    IMG_5597.jpeg
    152.1 KB · Views: 9
Back
Top