Wally defeating Ralts oversight: Difference between revisions

Jump to navigation Jump to search
Ugh. The decompiled code seems to suggest that the Zigzagoon has random nature, but confirmation is really needed.
(Rewrote the page, both fixing style problems and recalculating the probability.)
(Ugh. The decompiled code seems to suggest that the Zigzagoon has random nature, but confirmation is really needed.)
Line 1:
[[File:Zigzagoon fainting Ralts.png|thumb|right|240px|Wally's Zigzagoon causing the wild Ralts to faint]]
 
In {{RSE}}, it is possible, although extremely unlikely (with a probability of approximately 1/242054199495), that [[bp:Wally|Wally]]'s Zigzagoon would defeat the Ralts that he is supposed to catch in the demonstration near the beginning of the game.<!-- The Reddit post referenced says that it does not occur in {{ORAS}}. But I don't think it's relevant here. -->
 
When this happens, Zigzagoon will gain experience, and the battle will end as if it were a normal wild encounter, skipping the scripted section where Wally uses a Poké Ball in his bag and catches Ralts. However, the game is not otherwise affected (e.g. after exiting to the overworld, Wally will still declare "I did it... It's my... My Pokémon!", and in later trainer battles with Wally he will still use a Ralts or a Gardevoir).
Line 7:
== Probability ==
Critical hits are disabled for this battle, so this event could only happen with extreme stats and damage rolls. Namely:
* Zigzagoon needs to have 11 or 12 Attack. (theHaving 12 Attack does not help it to KO a 7 Defense Ralts, or to KO a 6 Defense Ralts without maximum) damage rolls.)
** This means that it needs to have:
** Zigzagoon always has a neutral nature, but it has random IVs. For it to have 11 Attack, it needs an Attack IV of 26 or higher, which has a probability of 6/32.
*** Either an Attack-raising nature, and an Attack IV of 12 or higher, which happens with probability (4/25) * (20/32);
*** Zigzagoon always hasOr a neutral nature, butthat itdoes hasnot randomaffect IVs. For it to have 11the Attack, it needsand an Attack IV of 26 or higher, which hashappens awith probability of(17/25) * (6/32).
:: Therefore the total probability for Zigzagoon to have 11 or 12 Attack is (4/25) * (20/32) + (17/25) * (6/32) = 182/800.
* Ralts needs to have 17 HP and 6 Defense (both the minimum).
** This means that it needs to have a Defense-lowering nature (since there is no nature that affectaffects the HP), as well as an HP IV of 3 or lower and a Defense IV of 9 or lower<ref>Some sources (e.g. [https://www.reddit.com/r/pokemon/comments/94wi7i/chances_of_wally_killing_a_shiny_ralts/ Chances of Wally killing a shiny Ralts]) states that the Ralts needs a Defense IV of 5 or lower. This would be the case if the stat value is not rounded down before applying the nature multiplier. However, according to [[bp:Statistic#In Generation III onward|the stat formula]], the stat value is rounded down both before and applying the nature multiplier, which makes an IV of 9 still low enough. The [https://github.com/pret/pokeemerald/blob/d74f739e05c4ed9646a9e42b4400243474dd9fa8/src/pokemon.c#L2801-L2803 decompiled source code of Emerald] agrees with the latter formula: Since the variable <code>n</code> is of type <code>s32</code> (an alias for <code>int32_t</code>), any intermediate results stored in it is necessarily rounded down to an integer (but since the operands are all integers, the results for divisions are actually rounded down already).</ref>. The probability for all three to happen is (4/25) * (4/32) * (10/32).
* Given the above stats, Zigzagoon still needs to hit both Tackles for the maximum damage, 10 and 7 respectively; the second one with a -1 Attack modifier since Ralts always uses Growl on the first turn.
** [[bp:Tackle|Tackle]] has a 95% accuracy in Generation III. Furthermore, the probability of getting the maximum damage roll is only 1/16 for each hit<ref>Similarly, some sources state that the probabilities are 5/16 and 7/16 respectively. This is likely another rounding problem: If the damage is rounded down both before and after the random multiplier (which ranges between 85% and 100% in increments of 1%), then there must be a gap between the maximum damage roll (i.e. 100% damage) and 99% damage. The numbers used in this page is calculated with the [https://calc.pokemonshowdown.com/?gen=3 Pokémon Showdown Damage Calculator].</ref>.
 
The probability for all of the above to happen is thus (6182/32800) * (4/25) * (4/32) * (10/32) * 95% * (1/16) * 95% * (1/16) ≈ 1/242054199495.
 
It is possible that, when the developers set up this scenario, they tried to check for all the maximum and minimum values to ensure that this event is truly impossible, which is also why they made critical hits impossible. However, they forgot that Ralts could have a Defense-lowering nature, which is the only other "discrete" variable in the equation.<!-- I know that technically all numbers here are discrete since they are integers... -->
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu