Guides:TMless 0x1500 ACE (JP): Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
mNo edit summary
Line 160: Line 160:


=Appendix: in-depth explanation of the setup=
=Appendix: in-depth explanation of the setup=

===Effect of Onix===

Defeating the provided list of pokémon and viewing Onix's summary will result in the following values starting from the buffered species ID at $D10E, assuming the pokémon is in party slot #2:

<pre>
5F ld e, a
00 nop
21 67 00 ld hl, $0067 ; Determined by Onix's moves, Tackle and Screech
00 nop
BF cp a, a
1E 00 ld e, $00 ; $BF1E corresponds to Onix's OTID of 48926
01 XX 00 ld bc, $00XX ; $XX is determined by the exact level of the opponents fought
D2 00 F0 jp nc, $F000
</pre>

After the effect of 0x1500 ACE is triggered and execution is redirected to $D10E, execution slides harmlessly through move, OTID and experience data before jumping to $F000, which is echo RAM for $D000 and is located two bytes before the last buffered mail.

===Effect of Sandshrew===

Defeating the provided list of pokémon and viewing Sandshrew's summary will result in the following values starting from the buffered species ID at $D10E, assuming the pokémon is in party slot #2:

<pre>
1B dec de
30 0A jr .jump
XX XX XX XX XX XX XX XX XX 73 ; Move, OTID and experience is skipped over by the jr instruction
00 nop ; .jump
C3 00 F0 jp $F000
</pre>

After the effect of 0x1500 ACE is triggered and execution is redirected to $D10E, execution jumps over move, OTID and experience data, followed by another jump to $F000, which is echo RAM for $D000 and is located two bytes before the last buffered mail.


===Effect of the mail===
===Effect of the mail===