Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation I Glitch Discussion

Gen I battle mechanics glitches - Page 1

Gen I battle mechanics glitches

Posted by: Crystal_
Date: 2014-12-10 09:09:15
Here are some in-battle glitches in Generation I that as far as I'm aware hadn't been documented


Division by 0 Defense:

If the attacker has over 255 Attack/Special and the defender less than 4 Defense/Special (possible only with a negative stat level), the stat would become 0 when divided by 4, and the game will freeze when trying to divide by 0 during damage calculation.

https://www.youtube.com/watch?v=V6iUlyS8GMU

There is another bug involving Reflect/Light Screen: since there's no cap after applying the Reflect/Light Screen boost, the stat can be as high as 999 * 2 = 1998 (with positive stat level); if it's higher than 1023, the defense value will become 256 points lower when modded by 256, leading to unusually high damage dealt. Moreover, Defense/Special stat of 512/513 will freeze the game during damage calculation (divide by 0 again) if Reflect/Light Screen is active.

https://www.youtube.com/watch?v=fVtO_DKxIsI


Substitute + Confusion / (High) Jump Kick:

If a Pokemon with a Substitute up hurts itself due to confusion, or due to Jump Kick's or High Jump Kick's side effect, damage will be dealt to the opponent's Substitute instead. If the opponent doesn't have a Substitute up no damage will be dealt to any Pokemon.

In Pokemon Red, Blue, and Yellow, there are two functions that handle the damage dealt to a non-substitute target; one applies damage to the player, and the other applies damage to the enemy. Normally, which function is called depends on whether the turn belongs to the player or to the enemy (if it's the player's turn, call the second function, and vice versa). But if the game needs to handle self-inflicted confusion damage, the opposite function is called.

However, there is only one function that handles the damage dealt to a substitute. This subroutine will be called by either of the two functions described above when the *target* has a substitute up. The 'whose turn' flag determines whether to deal damage to the player's or enemy's substitute. This overrides the fact that confusion damage should use the opposite logic in order to inflict damage to the attacker, leading to this interesting bug.

Notice how the *target* is the attacker if we are applying confusion damage, and the defender otherwise. This makes this bug even more intriguing because the subroutine will be called when the confused Pokemon has a substitute up, and thus damage will be "dealt" to the other Pokemon's substitute regardless of whether that Pokemon is actually under a substitute.

P.S.: Same applies to (High) Jump Kick's crash damage.


https://www.youtube.com/watch?v=jw24URgBi5o


Counter glitches:

These are the Counter mechanics:

- Counter misses if the opponent's last selected move's Base Power is 0.
- Counter misses if the opponent's last selected move's type is not Normal or Fighting, or if the move is Counter
- Counter misses if the last move used in the battle did no damage to its target.
- If these three tests were passed, damage dealt by Counter will be equal to twice the damage dealt by the last move used in battle.

This means that it's possible to Counter non-Normal/Fighting type attacks, and even one's own attacks. For example:

Turn 1:
- Persian uses Slash and misses (doesn't affect) against Gengar
- Gengar uses Thunderbolt and deals e.g. 100 damage to Persian

Turn 2:
- Persian switches out and e.g. Snorlax enters
- Gengar uses Counter and deals 200 damage to Gengar

https://www.youtube.com/watch?v=COcd3i0GgPM (this is an unlisted video for a Pokemon Online bug report)

Counter desync glitches: https://www.youtube.com/watch?v=ftTalHMjPRY (caused due to Counter mechanics being also affected by the last position taken by the cursor in the battle menu, information that isn't shared with the opponent)


Deal 0 damage:

Not sure if this counts as a glitch, but it's possible to do 0 damage with a weak enough 4x resistant attack. If so, the move always misses (suggesting that it had missed for accuracy reasons instead)

https://www.youtube.com/watch?v=fxNzPeLlPTU


Some random curiosities:

- Mirror Move will fail if the opponent didn't use a move last turn due to a switch or due to being asleep or frozen, but it will succedd if it was because self confusion or full paralysis
- Fire Spin doesn't defrost the target
- Bide may hit Flying/underground targets (like Swift)
- If Counter somehow counters a hp draining move (e.g absorb), damage won't be doubled, but halved and then doubled.
- If a level 0, 1, or 171 Pokemon used Psywave, the game would freeze: https://www.youtube.com/watch?v=VyIFL_-l2o4