View Single Post
  #3    
Old October 18th, 2010 (11:16 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Huh, that's funny. I was just looking into this a couple weeks ago in Emerald. My hypothesis was that whenever the battle engine needed to figure out whether to use a pokémon's physical or special stat, it used the Type of the attack. I quickly figured out that types 0x00 (normal) through 0x08 (steel) were physical, 0x09 was "???", and the rest were special. Though I never finished the project I found that at '0x069a5a', there is the following code (more or less: I made up labels for better readability and left out a few unnecessary commands):

Code:
cmp r1, #0x8
blt physical
b continue

...

continue:
cmp r1, #0x9
bne special
... @ else, type == "???"
I assume that there are multiple instances of the following code. Again, I hypothesized that this check would need to be performed at least twice: once for the attacking pokémon's physical/special Attack stat and then again for the defending pokémon's physical/special Defense stat. But then there are variables such as whether Light Screen/Reflect is up. The above code is all that I've found so far but if I ever get the time, I'll look into it more in-depth.

Anyway, can you explain what some of those changed bytes do? Just showing us the changes in raw data between two ROMs is kinda boring. What, exactly, was changed?

Brother of Vrai
Reply With Quote