Main Menu
Main Page
Forums
New pages
Recent changes
Random page
Help

Glitches
Arbitrary code execution
Pokémon cloning
Pomeg glitch and Glitzer Popping
Tweaking and voiding
Glitches by generation
Glitch categories

References/Resources
Databases
Disassembly projects
The Big HEX List
Pokémon cheat codes
Pokémon glitch terminology
Useful tools
More

Affiliates
Legendary Star Blob 2 (Hakuda) (日本語/Japanese)
Pokémon Speedruns wiki (English)
PRAMA Initiative (Français/French)
MissingNo. Glitch City (Italiano/Italian)
Become an affiliate!

Technical
Site source code

Search Wiki

 

Search Forums

 

Author Topic: Brn/Psn/Par don’t affect catch rate in GSC  (Read 3065 times)

0 Members and 1 Guest are viewing this topic.

IIMarckus

  • Administrator
  • *****
  • Offline Offline
  • Gender: Male
  • Impersonal Text
    • View Profile
    • iimarck.us
Brn/Psn/Par don’t affect catch rate in GSC
« on: May 17, 2012, 11:48:28 pm »
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:

Code: [Select]
        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:

Code: [Select]
        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
« Last Edit: May 17, 2012, 11:49:08 pm by IIMarckus »

Sasara

  • Princess of schizophrenia *cat yawns*
  • Banned
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: Brn/Psn/Par don’t affect catch rate in GSC
« Reply #1 on: May 18, 2012, 04:39:02 pm »
Quite frankly, this was an unnoticeable bug, so I'm not really that surprised that it stayed in all this time.

Shame, though.

Photon-Phoenix

  • Gotta pop dem windows.
  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Male
    • View Profile
Re: Brn/Psn/Par don’t affect catch rate in GSC
« Reply #2 on: May 19, 2012, 11:07:51 pm »
Placebo effect.

Halfshadow

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Brn/Psn/Par don’t affect catch rate in GSC
« Reply #3 on: April 11, 2016, 07:51:35 am »
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:

Code: [Select]
        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:

Code: [Select]
        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?
« Last Edit: April 11, 2016, 07:53:41 am by Halfshadow »

IIMarckus

  • Administrator
  • *****
  • Offline Offline
  • Gender: Male
  • Impersonal Text
    • View Profile
    • iimarck.us
Re: Brn/Psn/Par don’t affect catch rate in GSC
« Reply #4 on: April 20, 2016, 08:48:59 pm »
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 2–3 Pokémon easily in 1–3 tries, whether paralyzed or not). I’m guessing you made some sort of mistake when modifying the code.

Halfshadow

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Brn/Psn/Par don’t affect catch rate in GSC
« Reply #5 on: April 22, 2016, 10:26:56 am »
Have you tried also with the MEGA (GREAT) BALL? I've tried with it before and after the fix and was different.
« Last Edit: April 23, 2016, 03:49:38 am by Halfshadow »