Trainer escape glitch: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
>Torchickens
>Torchickens
Line 308: Line 308:


==Explanation==
==Explanation==
Specifically for Special stat encounter, the disabled Start menu, and prevented battles, [https://forums.glitchcity.info/index.php?topic=7256.msg198353#msg198353 Háčky provided the following explanation].
Specifically for Special stat encounter, the disabled Start menu, and prevented battles, [https://forums.glitchcity.info/index.php?topic=7256.msg198353 Háčky provided the following explanations].

"When a Trainer spots you, the game loads the Trainer class into $CD2D and team number into $CD2E, and sets a map script that will have the Trainer give his/her dialogue and start the battle. When you leave the map, the current script for that map is saved, and will be run again when you re-enter that map.

In battle, $CD0F–CD1F are used to store the stats and stat modifiers of your active Pokémon, and $CD23–CD33 are used for the enemy Pokémon. This data consists of the Pokémon’s level and unmodified stats (HP, Attack, Defense, Speed, Special), followed by the modifier stages for Attack, Defense, Speed, Special, Accuracy, and Evasion. Thus, $CD2D is the lower byte (big-endian) of the enemy’s Special stat, and $CD2E is its Attack modifier. When you return to the map where you began the glitch, the map script will read these values and start a battle against whatever Pokémon or Trainer they indicate."

; and


"Bit 0 of $CD60 is set when the Trainer spots you, and disables the Start menu and so on. It’s cleared when you win a Trainer battle, when you black out (either in- or out-of-battle), or when you save and reset.
"Bit 0 of $CD60 is set when the Trainer spots you, and disables the Start menu and so on. It’s cleared when you win a Trainer battle, when you black out (either in- or out-of-battle), or when you save and reset.