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

Trainer-Fly plus Cycling Road - Page 1

Trainer-Fly plus Cycling Road

Posted by: ISSOtm
Date: 2017-01-15 18:02:30
I'm playing EU Pokémon Yellow, and I have triggered a Trainer-Fly using the Gambler we all know about. This doesn't seem important for what's next, but I say in case it might come in handy.
I flew to Celadon City for a match with a Cue Ball (I was aiming for a Kadabra), but when I entered the "sloped" area, I wasn't forced downwards ! All non-downwards movement is still slow, but Red doesn't move when not holding any button.
Both wild battles and Trainer battles cancel the glitch.

I assume this comes from that the game doesn't apply downwards movement when Red engages a battle, but the fact that wild battles also cancel the glitch proves that non-Trainer battles also unset a few flags. These flags might be worth researching.

Re: Trainer-Fly plus Cycling Road

Posted by: Yeniaul
Date: 2017-01-15 18:25:21
…kinda surprised nobody's found this out yet. Nice catch!

Re: Trainer-Fly plus Cycling Road

Posted by: ISSOtm
Date: 2017-01-16 06:15:59
The glitch isn't cancelled by saving (by changing PC boxes) nor it is by Fly.

Re: Trainer-Fly plus Cycling Road

Posted by: Crystal_
Date: 2017-01-16 15:18:10
This probably: https://github.com/pret/pokered/blob/bf67f7174d8e3f1348c786618ee5a3a076d1eff8/home/overworld.asm#L1852-L1854
ld a,[wFlags_D733]
bit 3,a ; check if a trainer wants a challenge
jr nz,.notForcedDownwards


Set when a trainer engages the played, before walking to him: https://github.com/pret/pokered/blob/46a94c63fc287e7290502776d02648476bc44171/home.asm#L2338-L2340
.trainerEngaging
ld hl, wFlags_D733
set 3, [hl]


Reset only when a battle (any kind of battle) occurs:
https://github.com/pret/pokered/blob/bf67f7174d8e3f1348c786618ee5a3a076d1eff8/home/overworld.asm#L326-L330
.battleOccurred
ld hl,wFlags_D733
res 3,[hl]


The game is assuming that one of the trainers in route 17 has engaged the player, so it prevents the player from moving down as the trainer walks to him.

Re: Trainer-Fly plus Cycling Road

Posted by: ISSOtm
Date: 2017-01-16 15:37:12
Neat, thanks Crystal_ !
Also, on an unrelated note, I noticed that the function right below is said to have a bug that doesn't show up, but it might be the explanation to the "walking on water glitch"

Re: Trainer-Fly plus Cycling Road

Posted by: Charmy
Date: 2017-01-17 07:37:56
I just want to mention, it's easy to reproduce on JP Red/Green with the trainer mutation select glitch, give it a try.