I managed to get some readings on Gyro Ball at both ends of the speed spectrum, and in both cases there are implementation details the sim doesn't get right for now.
In the
first battle, we attempt to get some very fast Pokemon. I have it saved as a battle video at my end, but each save file has a limit of 10 battle videos uploaded to the public at once; I don't want to take any of the existing ones down so it doesn't have a code yet. However,
DaWoblefet was also in on the test and captured an
actual video, which is what's at the link.
There's a long-standing anecdote about the phenomenon "If a Pokemon has at least 1809 speed, it can continue to outspeed slower things even when Trick Room is up." But what's really going on with speed and turn order that gives rise to that behavior is a more fundamental series of steps:
1. Start with the original speed stat
2. Apply all stat modifiers and other effects (such as Swift Swim or Tailwind)
3. If the speed is greater than 10000, set it to 10000
4. If Trick Room is in effect, replace speed with (10000 - speed)
5. If the speed is 8192 or higher, subtract 8192 (a truncation to 13 bits of precision)
After turn 4, Swoobat (which is max-speed Jolly) has 213 attack, and a starting speed of 359 at +5 with Tailwind up, for a total of 2512. Ditto, meanwhile, came in under a Tailwind of its own with +6 Speed (as well as +1 Defense) on a Baton Pass, and was immediately given a 504 as the "step 1 speed" from Speed Swap, Surge Surfer as its ability from Skill Swap, and a Quick Powder from Trick, so it has 198 defense, and a speed stat of 16128--the highest "speed" it's possible for any Pokemon to reach under current rules. Of course, that's so fast that it hits the cap of 10000, which then gets truncated to 1808 for the purpose of effective turn order, so on turn 5 Swoobat will actually be able to act before Ditto can transform, and that action is a Gyro Ball.
The question here was "at what point in that series of speed steps does Gyro Ball draw the speed it plugs into the formula?" If Gyro Ball used the full step-2 speed of 16128, then Swoobat's Gyro Ball would hit for the maximum of 150 power; if it drew from the step-3 speed (after it's been capped out at 10000), then Gyro Ball would be 99 power; or if it drew from the final effective turn-order speed (1808 in this case) then Gyro Ball would be 17 power. Luckily, these figures are far enough apart that they have no overlap between them:
252 Atk Swoobat Gyro Ball (150 BP) vs. +1 252 HP / 0 Def Ditto: 116-137 (38.6 - 45.6%) -- guaranteed 3HKO
252 Atk Swoobat Gyro Ball (99 BP) vs. +1 252 HP / 0 Def Ditto: 77-91 (25.6 - 30.3%) -- guaranteed 4HKO
252 Atk Swoobat Gyro Ball (17 BP) vs. +1 252 HP / 0 Def Ditto: 14-17 (4.6 - 5.6%) -- possibly the worst move ever
As it turns out, the move from the actual battle dealt 85 damage, which confirms case 2:
Gyro Ball does not consider a Pokemon's speed until after it has been subject to the hard cap of 10000. Simulator behavior in this case shows that it's considering the entire 16128, which is now known to be incorrect.
By contrast, the
second battle is about getting a very slow Pokemon. Level 39 is as high as Shuckle can go while allowing its speed on a 0- nature to stay as low as 7, and 7 is as high as it can start out in order to round down to 1 at -6. Then on top of that, Shuckle holds an Iron Ball to cut its speed even further, and it has nowhere left to round down but 0. Trivially, if you have 0 speed then your opponent is obviously "at least 6 times as fast as you are", which is colloquially what it takes to get max power out of Gyro Ball, but the game expresses that condition in a particular way, and the game also really doesn't like dividing by 0, which is what that formula would task it with doing.
The first few Gyro Balls in the video hit for just 1/2/4 damage depending on the type matchup. But then a level 1 Chimchar, who resists the attack, switches in and takes more damage than I originally expected, and it turns out the explanation is pretty simple after all:
If a Pokemon uses Gyro Ball when its own speed rounds down to 0, the move is automatically set to 1 base power, no matter what the opponent's speed is--even if that's also 0.The rest of the battle is all about testing various permutations of critical hit and Life Orb with the type matchups, but it's all consistent with "the move is always 1 power", with the blatant except that when Stantler comes in for the second time, Ditto has lost its Iron Ball and hasn't been paralyzed yet, so on that turn it has 1 speed and the Gyro Ball is 150 power, in a damage range to be expected for that. The final hit, where the L100 Ditto comes in and transforms into Shuckle for its own "0 speed vs. 0 speed" test, dealt 16 damage, more than the first Shuckle vs. Ditto hit did because of level superiority and how that plays into the damage formula.
The simulator test for this case reveals that Gyro Ball seems to default to 1 power in the 0 speed vs. 0 speed case, but 0 speed vs. anything greater than 0 is taken as a 150 power move.
I don't have video footage for it, but one more observation is easy enough to set up in-game using a wild Ditto: If you use
Electro Ball against a target with 0 speed, no matter what your own speed is, the move hits at the lowest possible power level of 40, rather than the highest level of 150. One more case where it seems to be saying "I hate trying to divide by 0, so I'll just default to the low end of the power range instead."