Crit happens.

Age 28
Faraway place
Seen May 14th, 2019
Posted June 15th, 2017
267 posts
7.6 Years
Hey Tlachtli, currently porting this to Fire Red, only thing I'm having trouble with, is what exactly 0x2024200 does, and what it corresponds to. My guess is either its 0x2023D50 (existing damage) or 0x2023D60 (which I'm not entirely sure what's purpose is). Would you mind sharing what specifically that byte does?
That's just an arbitrary, unused halfword I recycle as a temp variable in my ASMs and battle scripts. I can't say I'm 100% certain it's safe, but I watched it over the course of several battles and never saw it get used/changed by anything. Any halfword (or in this case, just a byte) that doesn't get used during battle and is cleared afterword will work fine.

In this case, I'm using it as a flag to check if the move's initial animation has already been played. If it cycles through all the targets and never sets the flag (because it never found a valid target and thus played the animation) then it knows to print the "But it failed" message.
Pokemon Sigma Σmerald:
(now under management by DraconianWing)

A Gen 3 remake de-make, featuring many new encounters and Gen VI mechanics