Focus Energy glitch: Difference between revisions
m
→Analysis: Use <syntaxhighlight> tags for assembly code.
m (→Ambiguity: Fixed spelling.) |
m (→Analysis: Use <syntaxhighlight> tags for assembly code.) |
||
Line 8:
The relevant block of code for Focus Energy's effect is this<ref>[https://github.com/pret/pokered/blob/bb76c06120bcd1fc0f86bd3cc96cbbde93c0c80c/engine/battle/core.asm#L4610-L4619 The same block of code in the pokered disassembly]</ref>, beginning at offset 3E055 in Pokémon Red and Blue (view 0F:6055 in a debugger). Thanks Wack0 for walking through this.
<syntaxhighlight lang="asm">
</syntaxhighlight>
The relative jump to '.focusEnergyUsed' that happens when Focus Energy is used makes the game skip a 'sla b' (double b), and then a 'srl b' (half b) at '.focusEnergyUsed' halves the value in register 'b'.
|