Pokémon Red and Blue: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(→‎Game-breaking glitches: Added some information about the utilities of walk through wall glitches. Although I wonder if they will make the most important paragraph in this section (the MissingNo. route) less conspicuous...)
(→‎Effects: Since many individual glitch item's articles mention them taking a turn, may as well add this here.)
Line 77: Line 77:


Certain glitch items will also open the party menu when used, usually because they share the effect pointer of one of the abovementioned items (since the item IDs differ by 128). However, since they are not in the hardcoded list, when the party menu is closed, the overworld sprites are not properly loaded. This glitched game state can be exploited, giving the player a limited ability to walk through walls.
Certain glitch items will also open the party menu when used, usually because they share the effect pointer of one of the abovementioned items (since the item IDs differ by 128). However, since they are not in the hardcoded list, when the party menu is closed, the overworld sprites are not properly loaded. This glitched game state can be exploited, giving the player a limited ability to walk through walls.

==== In battle ====
When using any item, the variable <code>wActionResultOrTookBattleTurn</code> is set to 1 by default<ref>[https://github.com/pret/pokered/blob/53805947c3bc30c491b4f2a820c27e152dfa4b89/engine/items/item_effects.asm#L3 The line of code setting <code>wActionResultOrTookBattleTurn</code> to 1 by default]</ref>, indicating that the item use is successful, and if it is in battle it will consume the player's turn. For valid items, if they cannot be used currently (e.g. trying to use the Town Map in battle), or the player canceled the item use (e.g. using a Potion but backing out on the party menu), this value is manually set back to 0 so that it would not consume the player's turn in battle. (For some items this value can also be set to 2 to indicate that the item use failed without displaying the party menu, but this cannot happen in battle<ref>Specifically, this happens when the player [https://github.com/pret/pokered/blob/53805947c3bc30c491b4f2a820c27e152dfa4b89/engine/items/item_effects.asm#L1637-L1638 tries to use an X item out of battle] or [https://github.com/pret/pokered/blob/53805947c3bc30c491b4f2a820c27e152dfa4b89/engine/items/item_effects.asm#L2181-L2182 boots up a TM or HM but chooses not to teach the move after just seeing the move name].</ref>.) Since many glitch items do not modify <code>wActionResultOrTookBattleTurn</code>, those items will take a turn to use in battle even if they do not do anything significant.


=== Obtaining ===
=== Obtaining ===