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 II Glitch Discussion

Nightmare glitch and more - Page 1

Nightmare glitch and more

Posted by: SnorlaxMonster
Date: 2017-02-03 11:35:14
In the Generation II games, if an opponent's Pokémon is affected by Nightmare and they cure it with a Full Heal, the effect of Nightmare will remain. This is documented by Chickasaurus in this video (inspired by this video which accidentally encountered it). However, that video doesn't delve into the cause.

Nescientist pointed out that, according to the disassembly, when either player uses a Full Heal (or Full Restore?), the player's Pokémon is cured of Nightmare, the Toxic effect of poison, and confusion, regardless of who used it.

So, while this could mean that the Toxic counter would continue to increase even if an opponent cures itself of poison with a Full Heal/Full Restore and potentially fail to cure their own Pokémon of confusion, I think it would also be worth looking into what happens to the player's Pokémon. While I don't know how you would get an opponent with a Full Heal/Full Restore to use Nightmare on the player's Pokémon, you can certainly get Koga to badly poison your Pokémon; if your Pokémon is badly poisoned, but Koga uses a Full Heal/Full Restore, in theory your Pokémon should have its poison become regular poison. Likewise, it's possible that opponents using Full Heal/Full Restore can cure your Pokémon of confusion.

Re: Nightmare glitch and more

Posted by: Háčky
Date: 2017-02-03 17:51:37
That code is only called when the player uses an item, not the AI. AI item usage is controlled by the code in battle/ai/items.asm. The equivalent function AI_HealStatus cures the AIs active Pokémon of the effect of Toxic but not the effect of Nightmare. EnemyUsedFullRestore additionally cures the AIs active Pokémon of confusion, but EnemyUsedFullHeal does not cure confusion. These bugs seem to be holdovers from Generation I, when Nightmare didnt exist and neither Full Heal nor Full Restore cured confusion.

Re: Nightmare glitch and more

Posted by: Yeniaul
Date: 2017-02-05 18:23:51

That code is only called when the player uses an item, not the AI. AI item usage is controlled by the code in battle/ai/items.asm. The equivalent function AI_HealStatus cures the AIs active Pokémon of the effect of Toxic but not the effect of Nightmare. EnemyUsedFullRestore additionally cures the AIs active Pokémon of confusion, but EnemyUsedFullHeal does not cure confusion. These bugs seem to be holdovers from Generation I, when Nightmare didnt exist and neither Full Heal nor Full Restore cured confusion.

Wait… the AI doesn't actually use any items? Wow…