ItemDex/RB:109: Difference between revisions

From Glitch City Wiki
Jump to navigation Jump to search
Content added Content deleted
(→‎Effects: Added a (relatively obscure) effect that gives the opponent's first Pokémon Swords Dance.)
m (Update info)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
([[ItemDex|↑ Back to the ItemDex index]].)
([[ItemDex|↑ Back to the ItemDex index]].)
{{ItemInfoGenI
{{ItemInfoGenI
|1=il<br>[[File:RB item 6D inventory.png]]
|1=#il#<br>[[File:RB item 6D inventory.png]]
|2=6D
|2=6D
|3=109
|3=109
|4=[https://github.com/pret/pokered/blob/2954013da1f10e11db4ec96f9586b7c01706ae1a/engine/overworld/clear_variables.asm#L7 433E]
|4=[https://github.com/pret/pokered/blob/2954013da1f10e11db4ec96f9586b7c01706ae1a/engine/overworld/clear_variables.asm#L7 03:433e (ROM 3)]
|5=No
|5=No
|6=No
|6=No
|7=509594 (508#8#)
|7=509594
|8=N/A
|8=254797
|9=$1b,$a8,$ab,$0c,$50}}
|9=$1b, $a8, $ab, $0c, $50}}


[[File:RBItem6D.png|link=]] (hex:6D) is a [[glitch item]] in {{RB}}.
[[File:RBItem6D.png|link=]] (hex:6D) is a [[glitch item]] in {{RB}}.
Line 17: Line 17:
== Effects ==
== Effects ==


The effect pointer of this glitch item points to the banked section of the ROM at [https://github.com/pret/pokered/blob/2954013da1f10e11db4ec96f9586b7c01706ae1a/engine/overworld/clear_variables.asm#L7 $03:433E], in the middle of the function <code>ClearVariablesOnEnterMap</code>. When using this glitch item, the register <code>a</code> is set to 0x3E, so many variables that are usually set to 0 when entering a map are set to 0x3E instead.
The effect pointer of this glitch item points to the banked section of the ROM at [https://github.com/pret/pokered/blob/2954013da1f10e11db4ec96f9586b7c01706ae1a/engine/overworld/clear_variables.asm#L7 03:433E], in the middle of the function <code>ClearVariablesOnEnterMap</code>. When using this glitch item, the register <code>a</code> is set to 0x3E, so many variables that are usually set to 0 when entering a map are set to 0x3E instead.


Some visible effects of this glitch item include:
Some visible effects of this glitch item include:
* Using this glitch item outside of battle forces the next battle to use the Gym Leader battle music. This is because <code>[wLoneAttackNo]</code> (alias of <code>[wGymLeaderNo]</code>) is set to 0x3E. This value is usually cleared on entering a map (including after a battle), and set when talking to an undefeated Gym Leader.
* Using this glitch item outside of battle forces the next battle to use the Gym Leader battle music. This is because <code>[wLoneAttackNo]</code> (alias of <code>[wGymLeaderNo]</code>) is set to 0x3E. This value is usually cleared on entering a map (including after a battle), and set when talking to an undefeated Gym Leader.
** After using this glitch item, if the player fights a trainer who is not a Gym Leader but has a "special" party (meaning that the level of each Pokémon in the party is defined individually, instead of all Pokémon having the same level), then the trainer's first Pokémon will have Swords Dance as the third move. As an example, Prof. Oak has three (unused) valid parties defined in the game, all of which starting with a level 66 Tauros. If the player uses this glitch item before triggering a fight with Prof. Oak, then the Tauros will have Swords Dance instead of Rage, which it normally has as its third move. This is because the game gives each Gym Leader a special move according to <code>[wLoneAttackNo]</code>, hardcoded to be the third move<ref>[https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/engine/battle/read_trainer_party.asm#L81-L98 The piece of code adding the special move for Gym Leaders], and [https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/data/trainers/special_moves.asm#L5 the table of special moves]</ref>. The index 0x3E is out of range, but the table lookup happens to give "00 0E"<ref>These two bytes are read from $0E:5D9C, i.e. [https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/data/trainers/parties.asm#L59-L62 the 4th and 5th bytes of <code>YoungsterData</code>]</ref>, which is interpreted as the first Pokémon having Swords Dance (ID 0x0E).
** After using this glitch item, if the player fights a trainer who is not a Gym Leader but has a "special" party (meaning that the level of each Pokémon in the party is defined individually, instead of all Pokémon having the same level), then the trainer's first Pokémon will have Swords Dance as the third move. As an example, Prof. Oak has three (unused) valid parties defined in the game, all of which starting with a level 66 Tauros. If the player uses this glitch item before triggering a fight with Prof. Oak, then the Tauros will have Swords Dance instead of Rage, which it normally has as its third move. This is because the game gives each Gym Leader a special move according to <code>[wLoneAttackNo]</code>, hardcoded to be the third move<ref>[https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/engine/battle/read_trainer_party.asm#L81-L98 The piece of code adding the special move for Gym Leaders], and [https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/data/trainers/special_moves.asm#L5 the table of special moves]</ref>. The index 0x3E is out of range, but the table lookup happens to give "00 0E"<ref>These two bytes are read from 0E:5D9C, i.e. [https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/data/trainers/parties.asm#L59-L62 the 4th and 5th bytes of <code>YoungsterData</code>]</ref>, which is interpreted as the first Pokémon having Swords Dance (ID 0x0E).
* Using this glitch item outside of battle will set the number of steps until the player takes poison damage to 2 if a Pokémon is poisoned. This is because <code>[wStepCounter]</code> is set to 0x3E. This step counter counts down (wrapping around from 0x00 to 0xFF), and poison damage is only applied when this counter is a multiple of 4.
* Using this glitch item outside of battle will set the number of steps until the player takes poison damage to 2 if a Pokémon is poisoned. This is because <code>[wStepCounter]</code> is set to 0x3E. This step counter counts down (wrapping around from 0x00 to 0xFF), and poison damage is only applied when this counter is a multiple of 4.
** If the player's party is fully fainted, using this glitch item will set the number of steps required to black out to 2. This can be repeated to avoid having to save and reset the game to work around the black out (see [[poison step avoidance glitch]]).
** If the player's party is fully fainted, using this glitch item will set the number of steps required to black out to 2. This can be repeated to avoid having to save and reset the game to work around the black out (see [[poison step avoidance glitch]]).


== References ==
{{clr}}
<references />

[[Category:Glitch items]]
[[Category:Glitch items]]
[[Category:Pokémon Red and Blue glitch items]]
[[Category:Pokémon Red and Blue glitch items]]

Latest revision as of 19:39, 25 December 2022

(↑ Back to the ItemDex index.)

Name (transcribed): #il#

Identifier (HEX): 6D
Identifier (DEC): 109
Effect pointer: 03:433e (ROM 3)
Unterminated name glitch item?: No
Tossable/Sellable?: No
Buy Price: 509594
Sell Price: 254797
Name bytes: $1b, $a8, $ab, $0c, $50

(hex:6D) is a glitch item in Pokémon Red and Blue.

The name of this glitch item is mojibake from from Red/Green's untranslated ブロンズ (Bronze) string. "ブロンズ" is also the name of the hex:6D glitch item in the Japanese versions.

Effects

The effect pointer of this glitch item points to the banked section of the ROM at 03:433E, in the middle of the function ClearVariablesOnEnterMap. When using this glitch item, the register a is set to 0x3E, so many variables that are usually set to 0 when entering a map are set to 0x3E instead.

Some visible effects of this glitch item include:

  • Using this glitch item outside of battle forces the next battle to use the Gym Leader battle music. This is because [wLoneAttackNo] (alias of [wGymLeaderNo]) is set to 0x3E. This value is usually cleared on entering a map (including after a battle), and set when talking to an undefeated Gym Leader.
    • After using this glitch item, if the player fights a trainer who is not a Gym Leader but has a "special" party (meaning that the level of each Pokémon in the party is defined individually, instead of all Pokémon having the same level), then the trainer's first Pokémon will have Swords Dance as the third move. As an example, Prof. Oak has three (unused) valid parties defined in the game, all of which starting with a level 66 Tauros. If the player uses this glitch item before triggering a fight with Prof. Oak, then the Tauros will have Swords Dance instead of Rage, which it normally has as its third move. This is because the game gives each Gym Leader a special move according to [wLoneAttackNo], hardcoded to be the third move[1]. The index 0x3E is out of range, but the table lookup happens to give "00 0E"[2], which is interpreted as the first Pokémon having Swords Dance (ID 0x0E).
  • Using this glitch item outside of battle will set the number of steps until the player takes poison damage to 2 if a Pokémon is poisoned. This is because [wStepCounter] is set to 0x3E. This step counter counts down (wrapping around from 0x00 to 0xFF), and poison damage is only applied when this counter is a multiple of 4.
    • If the player's party is fully fainted, using this glitch item will set the number of steps required to black out to 2. This can be repeated to avoid having to save and reset the game to work around the black out (see poison step avoidance glitch).

References