All Gens Past Gens Research Thread

On Discord a few weeks ago, Dhgss and I discussed a couple of third gen specific sim inaccuracies that occur when a Pokemon dies to spikes damage at the end of the turn.

The video below shows the expected behaviour:


and this replay shows the actual behaviour: https://replay.pokemonshowdown.com/gen3ou-2231692744-i8x3v47mszjal54za4p9gfz3vi037xrpw

The two mechanics that are inaccurate:
a.) Due to the previous turn's outcome, both sides must send in a new Pokemon. Banette enters the field and immediately faints to Spikes damage, the other side does not reveal any information about what they send in. However on PS this information is forced.
b.) Sand Stream activates in this interaction. On PS it does not.
 
I've been researching the game code of Ultra Sun/Ultra Moon for the past year or so, and I recently found the function that seems to be handling Solid Rock/Filter/Prism Armor, and it does not match what I had expected based on Bulbapedia - I found the equivalent functions in XY and ORAS, and aside from ORAS adding a function call to handle Delta Stream removing Flying's weaknesses...

XY - function at 0x000BC5B0, passes 0x04C9, based on context I think it's effectively multiplying by (0x1000 - 0x4C)/0x1000, or about 71% of the pre-Ability damage (XY is the most different from USUM, so there's bits that compiled rather differently, so I'm not quite so sure about this)
ORAS - function at 0x000C5CB8, passes 0x1AB8 with reference to defense, effectively divides by 6840/4096 ~ 1.67, which almost exactly 60% of the pre-Ability damage
USUM - funcion at 0x000D3920, function identical or ORAS except for the different offsets


Is this the expected/known behavior or is this something somehow missed (which I feel would be shocking, considering Mega Aggron in UU)? I'm mostly interested because if the damage reduction has been thoroughly tested on console, then I'm missing something significant here.
 
I've been researching the game code of Ultra Sun/Ultra Moon for the past year or so, and I recently found the function that seems to be handling Solid Rock/Filter/Prism Armor, and it does not match what I had expected based on Bulbapedia - I found the equivalent functions in XY and ORAS, and aside from ORAS adding a function call to handle Delta Stream removing Flying's weaknesses...

XY - function at 0x000BC5B0, passes 0x04C9, based on context I think it's effectively multiplying by (0x1000 - 0x4C)/0x1000, or about 71% of the pre-Ability damage (XY is the most different from USUM, so there's bits that compiled rather differently, so I'm not quite so sure about this)
ORAS - function at 0x000C5CB8, passes 0x1AB8 with reference to defense, effectively divides by 6840/4096 ~ 1.67, which almost exactly 60% of the pre-Ability damage
USUM - funcion at 0x000D3920, function identical or ORAS except for the different offsets


Is this the expected/known behavior or is this something somehow missed (which I feel would be shocking, considering Mega Aggron in UU)? I'm mostly interested because if the damage reduction has been thoroughly tested on console, then I'm missing something significant here.
Filter/Solid Rock/Prism Armor have always been final damage modifiers with a value of 3072 (0xC00). It was definitely that way in Gen 5 and in Gen 7, and I checked in Gen 6 and 9 and it's also 3072 there as well.

The only modifier I can think of that is 6840 is Gravity (accuracy).
 
Filter/Solid Rock/Prism Armor have always been final damage modifiers with a value of 3072 (0xC00). It was definitely that way in Gen 5 and in Gen 7, and I checked in Gen 6 and 9 and it's also 3072 there as well.

The only modifier I can think of that is 6840 is Gravity (accuracy).
The Gen 7 link isn't loading - I've been working in the compiled battle.cro, if that has any data on that it would be really helpful!
 
Not only does Lightning Rod not redirect Sky Drop when the latter is under the effect of Electrify, at least as of USUM, Storm Drain also checks to make sure the move is not Sky Drop before redirecting, although it is impossible for that situation to occur.
 
Sorry if this is the wrong place to ask, but what happens if a Ditto or Mew tries to use transform or impostor on a glitch Pokemon? The result depends on the generation or the specific glitch Pokemon, right?
 
Back
Top