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

Brn/Psn/Par dont affect catch rate in GSC - Page 1

Brn/Psn/Par dont affect catch rate in GSC

Posted by: Bent`
Date: 2012-05-18 00:48:28
In RBY, Sleep and Freeze provide a higher catch rate than Burn/Poison/Paralysis, which in turn provide a higher catch rate than no status effect at all.

They tried to do the same in GSC, but introduced a bug that makes Burn/Poison/Paralysis provide the same catch rate as no status effect.

The GSC catch rate formula is explained here.

D = wild Pokémon's status: if asleep or frozen, D=10; if burned, paralyzed, or poisoned, D=5; else D=0

That is what the code attempts to do. The code looks like this:

        ld b, a
        ld a, [WildPokemonStatus]
        and SLP|FRZ
        ld c, 10
        jr nz, .done
        and a
        ld c, 5
        jr nz, .done
        ld c, 0
.done


and a is a quick zero check, but here it will always evaluate to 0, because nonzero values are caught by the jr immediately preceding it. As a result, the second jr never gets followed, and the modifier is always set to zero.

Here is a modified version of the routine that works properly:

        ld b, a
        ld a, [WildPokemonStatus]
        and a
        ld c, 0
        jr z, .done
        and SLP|FRZ
        ld c, 10
        jr nz, .done
        ld c, 5
.done

Re: Brn/Psn/Par dont affect catch rate in GSC

Posted by: Kyoukipichi
Date: 2012-05-18 17:39:02
Quite frankly, this was an unnoticeable bug, so I'm not really that surprised that it stayed in all this time.

Shame, though.

Re: Brn/Psn/Par dont affect catch rate in GSC

Posted by: GARYM9
Date: 2012-05-20 00:07:51
Placebo effect.

Re: Brn/Psn/Par dont affect catch rate in GSC

Posted by: Halfshadow
Date: 2016-04-11 08:51:35
Sorry if I up but i Think is important.

Are you sure IImarkus that the code is correct? If I change the asm instructions with your, decrease the catch rate of the pokémon in full health. Rattata and other pokémons of the Route 1 become almost impossible to catch with a MEGA BALL in full heal, a PIDGEY have lost all it's PP 'cause the balls haven't catched it.

You have wrote that the right code will be this:


        ld b, a
        ld a, [WildPokemonStatus]
        and a
        ld c, 0
        jr z, .done
        and SLP|FRZ
        ld c, 10
        jr nz, .done
        ld c, 5
.done


But the catch rate of a full health pokémon back normal if I tipe this instead:


        ld b, a
        ld a, [WildPokemonStatus]
        and a
        ld c, 0
        jr nz, .done
        and SLP|FRZ
        ld c, 10
        jr nz, .done
        ld c, 5
.done


Have you mistaked something when you tiped the code?

Re: Brn/Psn/Par dont affect catch rate in GSC

Posted by: Bent`
Date: 2016-04-20 21:48:59

Sorry if I up but i Think is important.

Are you sure IImarkus that the code is correct? If I change the asm instructions with your, decrease the catch rate of the pokémon in full health. Rattata and other pokémons of the Route 1 become almost impossible to catch with a MEGA BALL in full heal, a PIDGEY have lost all it's PP 'cause the balls haven't catched it.


It works fine when I try it (Ultra Ball catches level 23 Pokémon easily in 13 tries, whether paralyzed or not). Im guessing you made some sort of mistake when modifying the code.

Re: Brn/Psn/Par dont affect catch rate in GSC

Posted by: Halfshadow
Date: 2016-04-22 11:26:56
Have you tried also with the MEGA (GREAT) BALL? I've tried with it before and after the fix and was different.