• Follow our Instagram!
  • Curious about what we're currently doing about bots? Check out the latest updates from staff in this thread.

Research Champions Battle Mechanics Research

Apologies if this isn’t the proper place to ask, but has anyone tested in game if Sharpness does boost any of the five newly affected moves with Skill Swap or similar? Similar question with Dragon Cheer and Soundproof. Mainly wanted to ask since I saw that Rage Powder wasn’t marked as a Powder yet still functioned as one so I got curious about the opposite end.
 
Has it been tested yet if the damage formula that's been in place since Gen 5 is still the same in Champions? Asking since it uses a whole new battle engine and a ton of other stuff is seeming changed.

I'd test myself but I don't have a second Switch, nor do I particularly care to just forfeit random casual battles, and not to mention my opponent probably wouldn't get that I'm testing something and interfere with the process.
 
Last edited:
Is it confirmed that a Pokémon with Mega Sol can/cannot freeze opposing Pokémon since their moves are treated like they're under harsh sunlight? Mega-Meganium doesn't learn any freezing moves but that would matter for OM's, I don't know if this checks if the user is under harsh sunlight, or the target.
 
Assuming not, but does Mega Sol make the user immune to Water-type attacks? The description has harsh sunlight, similar to Primal Groudon’s Desolate Land, which fizzles out Water-type attacks. I’m assuming not, since I couldn’t find anything about it, but just asking.
 
Assuming not, but does Mega Sol make the user immune to Water-type attacks? The description has harsh sunlight, similar to Primal Groudon’s Desolate Land, which fizzles out Water-type attacks. I’m assuming not, since I couldn’t find anything about it, but just asking.
No, Mega Sol's functionality is very similar to, say, Mold Breaker. The moves used by the user are calculated as if (regular) Sun is up, but moves targetting the user work normally (fire moves don't deal double damage, either, and enemies don't get instant solar beam just for targetting Mega Meganium)
 
Assuming not, but does Mega Sol make the user immune to Water-type attacks? The description has harsh sunlight, similar to Primal Groudon’s Desolate Land, which fizzles out Water-type attacks. I’m assuming not, since I couldn’t find anything about it, but just asking.
"Harsh sunlight" is just what regular sun is called. Primal Groudon's special sun is apparently called "extremely harsh sunlight".
 
No, Mega Sol's functionality is very similar to, say, Mold Breaker. The moves used by the user are calculated as if (regular) Sun is up, but moves targetting the user work normally (fire moves don't deal double damage, either, and enemies don't get instant solar beam just for targetting Mega Meganium)
Note that Mega Sol doesn't work against Leaf Guard, so presumably the weather is only considered sunny during the early parts of the move execution (up to and including the damage calc step, not after that).

From this knowledge, I would assume that Mega Sol users can freeze foes, but haven't actually tested this.
 
Mechanics stream #5

The majority of this stream is spent reproducing a softlock with Competitive. If a Competitive Pokemon is KOed on the same turn it would receive a stat drop from another Pokemon (e.g. Icy Wind into Innards Out / Destiny Bond + Mirror Armor), Mirror Armor will attempt to reflect the stat drop, then Competitive will attempt to increase the user's Sp. Atk stat. If the Competitive Pokemon has nothing left to switch into, the next time any Ability activation triggers (e.g. Mirror Armor again, or Drizzle), the game will softlock. Neither player sees any additional animations, and neither player can select moves. However, the battle does appear to still be running in the background; closing out of the game and reopening it triggers the disconnect/reconnect and will put the player back into the battle.
  • 5:26 showcasing this bug with Milotic having a switchin available
  • 23:33 first successful instance of the bug, using another Mirror Armor as the extra Ability trigger. Showcased being softlocked for 5 minutes before AFK timer kicked me out.
  • 45:22 showcasing this bug with Drizzle as the extra Ability trigger.
  • 1:05:25 showcasing this bug with Innards Out instead of Destiny Bond
  • 1:23:18 Rapid Spin still removes Stealth Rock even if the user faints from Rough Skin
  • 1:26:57 Spit Up cannot be used if the user hasn't Stockpiled (message is "This move can't be used!", like Fake Out after turn 1)
  • 1:30:31 Knock Off still removes the target's item even if the user faints from Rough Skin
 
Has it been tested yet if the damage formula that's been in place since Gen 5 is still the same in Champions? Asking since it uses a whole new battle engine and a ton of other stuff is seeming changed.

I'd test myself but I don't have a second Switch, nor do I particularly care to just forfeit random casual battles, and not to mention my opponent probably wouldn't get that I'm testing something and interfere with the process.
Hi. It seems that according to this new research from saburoh326, the damage formula appears to be the same as SV so far, but it's possible that the damage rolls may only range from 0.86 to 1 instead of the usual 0.85 to 1. Possible bug. Thanks to cabforpitt, who saw the related tweet, for bringing this to my attention.
 
Mechanics stream #6

Jorijn, a VGC player, found that Choice Scarf did not impact entrance Ability activation order: . I was able to confirm this and found a few other quirks.
  • 4:39 Tailwind is respected for entrance Ability order on switchin after double KOs
  • 9:34 Choice Scarf is ignored for entrance Ability order on switchin after double KOs
  • 17:50 Trick Room is respected for entrance Ability order on switchin after double KOs
  • 17:50 Hazards are no longer tied to the same switchin event as entrance Abilities. In Trick Room, first Torkoal took Stealth Rock, then Typhlosion took Stealth Rock, then Torkoal's Drought activated, then Typhlosion's Frisk activated.
  • 21:37 Taking hazards on the Pokemon with Choice Scarf seems to cause Choice Scarf to be respected again in Speed order. Only having Stealth Rock on the non-Choice Scarf Pokemon's side isn't enough.
  • 34:00 Not selecting any actions for 3 turns from the start of the battle will cause the idle player to lose at the beginning of the 3rd turn.
    • "You have been idle for too long! The battle is over!"
  • 38:13 Selecting the left Pokemon's action is sufficient to not count as idle. However, I only had to remain idle for 2 turns to lose at the beginning of the 2nd turn.
  • 43:33 If neither player selects any action, the idle condition will apply for both, and the battle tied at the beginning of the 2nd turn.
  • 49:16 Attempting to switch controllers (e.g. taking off docked joycons) will delay the turn somewhat; eventually, it gets treated as if a player disconnected, though, and the battle proceeds server-side.
  • 1:01:12 If Gigaton Hammer gets Encored, it can still be used during the turn it is forced to be used via Encore. Tinkaton will then be forced to Struggle (same as Scarlet/Violet behavior)
  • 1:06:53 Pickpocket is not suppressed by a Sheer Force-negated move.
  • 1:07:14 If Gigaton Hammer gets Encored and Disabled in the same turn, it can still be used during that turn, "bypassing" Disable's restriction. Regular moves don't do this (e.g. Crunch).
  • 1:15:30 Reproducing the above interaction of Speed Swap + Mega Evolution. For both the user and target of Speed Swap, Mega Evolution retains the Speed Swap Speed stat.
  • 1:31:52 Failing to reproduce my clip where Fake Out did not flinch Mega Charizard Y
 
Follow up:
17:50 Hazards are no longer tied to the same switchin event as entrance Abilities. In Trick Room, first Torkoal took Stealth Rock, then Typhlosion took Stealth Rock, then Torkoal's Drought activated, then Typhlosion's Frisk activated.
Do Stealth Rock activate before Unnerve, and does Unnerve still activate before other abilities? Is there a fixed order for hazards check?

1:15:30 Reproducing the above interaction of Speed Swap + Mega Evolution. For both the user and target of Speed Swap, Mega Evolution retains the Speed Swap Speed stat.
Are all the stats not updated at all or just speed? Does the same thing happen with Power Swap + Mega Evolution? Does it happen with Speed Swap + Transform? Does it happen with Skill Swap + Mega Evolution :worrywhirl:?

Given how the mechanics worked before, it's a bit hard to imagine a "natural" code implementation that ends up causing both the Swap + Mega Evolution interaction and the Stealth Rock damage speed updates.
 
Last edited:
Mechanics stream #6

Jorijn, a VGC player, found that Choice Scarf did not impact entrance Ability activation order: . I was able to confirm this and found a few other quirks.
  • 4:39 Tailwind is respected for entrance Ability order on switchin after double KOs
  • 9:34 Choice Scarf is ignored for entrance Ability order on switchin after double KOs
  • 17:50 Trick Room is respected for entrance Ability order on switchin after double KOs
  • 17:50 Hazards are no longer tied to the same switchin event as entrance Abilities. In Trick Room, first Torkoal took Stealth Rock, then Typhlosion took Stealth Rock, then Torkoal's Drought activated, then Typhlosion's Frisk activated.
  • 21:37 Taking hazards on the Pokemon with Choice Scarf seems to cause Choice Scarf to be respected again in Speed order. Only having Stealth Rock on the non-Choice Scarf Pokemon's side isn't enough.
  • 34:00 Not selecting any actions for 3 turns from the start of the battle will cause the idle player to lose at the beginning of the 3rd turn.
    • "You have been idle for too long! The battle is over!"
  • 38:13 Selecting the left Pokemon's action is sufficient to not count as idle. However, I only had to remain idle for 2 turns to lose at the beginning of the 2nd turn.
  • 43:33 If neither player selects any action, the idle condition will apply for both, and the battle tied at the beginning of the 2nd turn.
  • 49:16 Attempting to switch controllers (e.g. taking off docked joycons) will delay the turn somewhat; eventually, it gets treated as if a player disconnected, though, and the battle proceeds server-side.
  • 1:01:12 If Gigaton Hammer gets Encored, it can still be used during the turn it is forced to be used via Encore. Tinkaton will then be forced to Struggle (same as Scarlet/Violet behavior)
  • 1:06:53 Pickpocket is not suppressed by a Sheer Force-negated move.
  • 1:07:14 If Gigaton Hammer gets Encored and Disabled in the same turn, it can still be used during that turn, "bypassing" Disable's restriction. Regular moves don't do this (e.g. Crunch).
  • 1:15:30 Reproducing the above interaction of Speed Swap + Mega Evolution. For both the user and target of Speed Swap, Mega Evolution retains the Speed Swap Speed stat.
  • 1:31:52 Failing to reproduce my clip where Fake Out did not flinch Mega Charizard Y
Since they were tinkering with battle entry order of operations, I was curious if hazards still go in the order they are initially set? If not, are there damaging hazards that still run before Toxic Spikes?

If it's still possible to faint to hazards before Toxic Spikes has the opportunity to be checked, I was curious if a Levitating Poison type who faints from hazards still absorb them, and whether a Poison/Flying type with Iron Ball who faints before Toxic Spikes don't abosrb them. But I don't think either thing can be checked, because neither Iron Ball, Weezing or Gastly/Haunter is in the game yet.
 
Idk if it's known, but I've had white herb proc to cancel 2 stage of intim with mirror herb

Situation was lead tauros typhlosion vs corviknight + Incineroar
First my tauros intim proc, and was reflected back via mirror armor
My white herb was not the next thing to proc but Incineroar Intimidate
After that my white herb did proc

When I checked on the menu my stat boost, I was at +0, no intim what so ever
 
Idk if it's known, but I've had white herb proc to cancel 2 stage of intim with mirror herb

Situation was lead tauros typhlosion vs corviknight + Incineroar
First my tauros intim proc, and was reflected back via mirror armor
My white herb was not the next thing to proc but Incineroar Intimidate
After that my white herb did proc

When I checked on the menu my stat boost, I was at +0, no intim what so ever
Luckily, everything here seems standard (same as SV). White Herb activates after most abilities, like Intimidate. The only things that always activate after White Herb are Mirror Herb and Opportunist.
 
This account is reporting that multihit moves that break Mimikyu's Disguise are not respecting type matchups on subsequent hits.
Pin Missile should be 1/4 damage here but acts like neutral.

[Please Share] Attention Mimikyu Users:

There is a glitch affecting Mimikyu's "Disguise" Ability: Type matchups are not being applied to damage taken from the second hit onward.
Intended Behavior: Pin Missile (1/4x damage)
Current Behavior: 1st Hit (Nullified by Disguise) → 2nd Hit Onward (Bypasses Disguise at 1x damage)

 
Anubis and I tested some interactions with Mega Sol with a few mechanics, namely:
  • If an attacker with Mega Sol had its Water type moves cut in half
  • If an Ice-type defender with Mega Sol still had a 50% Defense boost in Snow
  • If a Rock-type defender with Mega Sol still had a 50% Sp.Def boost in Sand
Anubis brought Mega Meganium and Starmie with Skill Swap.

I brought Pidgeot, Clefable, Snow Warning Alolan Ninetales, and Sand Stream Tyranitar.

Attacker with Mega Sol having Water moves cut in half:
To test this:
  1. I lead with Pidgeot and Clefable. Anubis leads with Starmie and Meganium.
  2. I use Roost on Pidgeot and Sleep Talk on Clefable.
  3. Anubis Mega Evolves Meganium, Starmie uses Skill Swap targeting Mega Meganium, and Mega Meganium uses Safeguard.
  4. Starmie uses Aqua Jet on Clefable, Clefable uses Sleep Talk, and Pidgeot uses Roost.
  5. If Aqua Jet's power wasn't reduced, it would do 19-24 damage (0 Atk Starmie Aqua Jet vs. 32 HP / 23 Def Clefable: 19-24 (9.4 - 11.8%) -- possible 9HKO).
  6. However, Aqua Jet's power was reduced, as it only did 12 damage to my Clefable.
Thus, Water moves used by a Pokemon with Mega Sol still have their damage cut in half, like they would under the sun.

Then, we tested Ice-type defender with Mega Sol getting a 50% Defense boost in the snow:
To test this:
  1. I swapped Pidgeot out for Alolan Ninetales to set the snow.
  2. Starmie Skill Swapped Mega Sol onto Alolan Ninetales, Clefable Sleep Talks, Meganium Safeguards.
  3. Starmie used Aqua Jet onto Mega Sol Alolan Ninetales, doing 16 damage.
    • If Alolan Ninetales were acting like the sun was up, the damage range for this would be 10-13.
    • If Alolan Ninetales were acting like the snow wasn't up, the damage range for this would be 24-28.
    • If Alolan Ninetales were acting like the snow was up, the damage range for this would be 16-19.
Thus, an Ice-type Pokemon with Mega Sol still gets the 50% Defense boost in the snow.

I don't wanna repeat typing but tl;dr sand still gives the Sp. Def boost too.
 
Hi. It seems that according to this new research from saburoh326, the damage formula appears to be the same as SV so far, but it's possible that the damage rolls may only range from 0.86 to 1 instead of the usual 0.85 to 1. Possible bug. Thanks to cabforpitt, who saw the related tweet, for bringing this to my attention.
Nails and I ran more tests on this and our research was consistent with their finding of the minimum damage roll being removed.


A Mega Alakazam with a neutral nature and no stat points in Special Attack (195 SpA) attacking into a Torterra with a neutral nature and no stat points in Special Defense (105 Sp. Def), using Grass Knot, never dealt the expected minimum damage.

Assuming the base damage formula is identical to Scarlet/Violet, and uses integer division:
((BP * Atk * (Level * 2 / 5 + 2) / Defense) / 50) + 2
((120 * 195 * (50 * 2 / 5 + 2) / 105) / 50) + 2
((120 * 195 * 22 / 105) / 50) + 2
((514800 / 105) / 50) + 2
(4902 / 50) + 2
98 + 2
100

This comes out to 100 base damage. No other modifiers are happening in this calculation, so if the distribution of damage rolls were the same as in past games, it could be any of [85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]. But like saburoh326 found, we never hit 85. Here was the distribution of damage rolls in the footage above:

Damage RollCount
850
869
8713
888
8911
9019
919
9210
9311
949
958
969
9716
984
9911
10013
Total:160

It would be extremely improbable for both saburoh326 (who tested 152 times) and Nails/myself (who tested 160 times) to have never hit the minimum damage roll once between our tests.

However, these tests assume the Scarlet/Violet base damage formula is identical to what's being used in Champions. That is a reasonable assumption, I think, since the distribution is so close. But let's explore two possible scenarios:

1) The base damage formula has sufficiently changed such that the result is not 100, but some other integer.

If true, you would expect it to be very close, at either 99 or 101. However, both 99 and 101 cannot produce a damage roll of 100.
Base damage of 99: 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Base damage of 101: 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101

2) The base damage formula and the random damage roll no longer use integer division; instead, damage is a float (i.e. uses decimals) that is later rounded at the end in some way.

If true, ((514800 / 105) / 50) + 2 would evaluate to something close to 100.05714285714286 rather than 100. If this is multiplied by 85-100, then divided by 100, here are the possible damage rolls:

[85.04857142857144, 86.04914285714287, 87.04971428571429, 88.05028571428574, 89.05085714285715, 90.05142857142857, 91.052, 92.05257142857143, 93.05314285714286, 94.05371428571429, 95.05428571428573, 96.05485714285714, 97.05542857142858, 98.056, 99.05657142857144, 100.05714285714286]

Note that I am just using Javascript for this, which is probably not what Champions's server-side backend is using, but rounding differences here would be very minor. Whatever rounding method you pick, 85 is still expected, which we did not hit.

So I don't think a different base damage formula explains it. Moreover, I can think of a plausible explanation for why there are only 15 damage rolls. In Scarlet/Violet, there is a constant associated with the damage formula's random damage roll that has a value of 15. My guess is that it's intended to represent that damage can be a range of 85-100% of the original damage. When the random damage roll is actually applied, however, they have to add 1 to the RNG call so it returns 0-15 rather than 0-14. Then, that random number is subtracted from 100, multiplied by current damage, divided by 100, and that's the adjusted damage. Perhaps Champions kept the constant the same, but forgot to do the +1? That's sheer speculation of course, but it would explain why the minimum damage roll in particular is what's missing.
 
Last edited:
Nails and I ran more tests on this and our research was consistent with their finding of the minimum damage roll being removed.


A Mega Alakazam with a neutral nature and no stat points in Special Attack (195 SpA) attacking into a Torterra with a neutral nature and no stat points in Special Defense (105 Sp. Def), using Grass Knot, never dealt the expected minimum damage.

Assuming the base damage formula is identical to Scarlet/Violet, and uses integer division:
((BP * Atk * (Level * 2 / 5 + 2) / Defense) / 50) + 2
((120 * 195 * (50 * 2 / 5 + 2) / 105) / 50) + 2
((120 * 195 * 22 / 105) / 50) + 2
((514800 / 105) / 50) + 2
(4902 / 50) + 2
98 + 2
100

This comes out to 100 base damage. No other modifiers are happening in this calculation, so if the distribution of damage rolls were the same as in past games, it could be any of [85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]. But like saburoh326 found, we never hit 85. Here was the distribution of damage rolls in the footage above:

​
Damage RollCount
850
869
8713
888
8911
9019
919
9210
9311
949
958
969
9716
984
9911
10013
Total:160


It would be extremely improbable for both saburoh326 (who tested 152 times) and Nails/myself (who tested 160 times) to have never hit the minimum damage roll once between our tests.

However, these tests assume the Scarlet/Violet base damage formula is identical to what's being used in Champions. That is a reasonable assumption, I think, since the distribution is so close. But let's explore two possible scenarios:

1) The base damage formula has sufficiently changed such that the result is not 100, but some other integer.

If true, you would expect it to be very close, at either 99 or 101. However, both 99 and 101 cannot produce a damage roll of 100.
Base damage of 99: 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Base damage of 101: 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101

2) The base damage formula and the random damage roll no longer use integer division; instead, damage is a float (i.e. uses decimals) that is later rounded at the end in some way.

If true, ((514800 / 105) / 50) + 2 would evaluate to something close to 100.05714285714286 rather than 100. If this is multiplied by 85-100, then divided by 100, here are the possible damage rolls:

[85.04857142857144, 86.04914285714287, 87.04971428571429, 88.05028571428574, 89.05085714285715, 90.05142857142857, 91.052, 92.05257142857143, 93.05314285714286, 94.05371428571429, 95.05428571428573, 96.05485714285714, 97.05542857142858, 98.056, 99.05657142857144, 100.05714285714286]

Note that I am just using Javascript for this, which is probably not what Champions's server-side backend is using, but rounding differences here would be very minor. Whatever rounding method you pick, 85 is still expected, which we did not hit.

So I don't think a different base damage formula explains it. Moreover, I can think of a plausible explanation for why there are only 15 damage rolls. In Scarlet/Violet, there is a constant associated with the damage formula's random damage roll that has a value of 15. My guess is that it's intended to represent that damage can be a range of 85-100% of the original damage. When the random damage roll is actually applied, however, they have to add 1 to the RNG call so it returns 0-15 rather than 0-14. Then, that random number is subtracted from 100, multiplied by current damage, divided by 100, and that's the adjusted damage. Perhaps Champions kept the constant the same, but forgot to do the +1? That's sheer speculation of course, but it would explain why the minimum damage roll in particular is what's missing.
if dmg roll is (85,100] rather than [85,100], is it possible that accuracy, and secondary effects are wonky as well? I would imagine they wouldn't be affected but they might be :(

We don't see the hidden roll for those. Getting confidence threshold for 29% vs 30% vs 31% would be so many trials to do :( I already have some rudimentary screen capture software running for champions, i might be able to cobble together some tester later

i know it is not productive to speculate this but I feel like, it is default random number generator behaviour for unity engine vs. gf's engine are different but both codes are written like `random.uniform(85,100)`.
 
i know it is not productive to speculate this but I feel like, it is default random number generator behaviour for unity engine vs. gf's engine are different but both codes are written like `random.uniform(85,100)`.
Well, we do have the previous damage calculations from GF games and BDSP for comparison, and neither uses a random.uniform(85,100) call. Previous Switch games used xoroshiro128+ to generate this random call. I will provide the decompiled pseudocode for comparison.
C:
        damage_rand = (*(*v749 + 104LL))(v749, &qword_7103C69EB8);
        if ( !v867 )
        {
          v751 = (damage_rand + 1);
          if ( v751 < 2 )
          {
            LOWORD(damage_rand) = 0;
          }
          else
          {
            xoro = *(a1->qword18 + 16LL);
            ++xoro[4];
            v753 = __clz(v751);
            v754 = 63LL;
            if ( ((v751 << v753) & 0x7FFFFFFFFFFFFFFFLL) != 0 )
              v754 = 64LL;
            v755 = v754 - v753;
            v756 = v755 >> 6;
            if ( (v755 & 0x3F) != 0 )
              ++v756;
            if ( v756 <= v755 )
              v757 = 0xFFFFFFFFFFFFFFFFLL >> -(v755 / v756);
            else
              v757 = 0LL;
            s0 = xoro[1];
            s1 = xoro[2];
            do
            {
              v760 = s0 ^ s1;
              v761 = s0 + s1;
              v762 = s0 ^ s1 ^ __ROR8__(s0, 40);
              s1 = __ROR8__(v760, 27);
              LOWORD(damage_rand) = v761 & v757;
              s0 = v762 ^ (v760 << 16);
            }
            while ( (v761 & v757) >= v751 );
            xoro[1] = s0;
            xoro[2] = s1;
          }
        }
        v647 = (100 - damage_rand) * v647 / 100;
Like how DaWoblefet described, SV gets the random range from some other file, adds 1 to it, then calls a xoro.NextUInt on it. This is then subtracted from 100 before it is applied to the damage, which is v647. Normally that random range is 15, so a xoro.NextUInt(16) gets 0-15, which gives the random range of 85-100%. If they simply forgot to include the +1 step, there would be an off-by-one error because a xoro.NextUInt(15) would return 0-14.

This is not specific to the battle RNG; other random calls in the game have to do the same thing, and there are off-by-one errors where they add +1 too many times. One example is in the SV Auctions where they add 1 before calling the random function, then the random function adds 1 again before generating the random number. This ends up increasing the chance of the first item in each table.

What about Legends: Z-A, the most recent game before Champions? LZA still uses approximately the same damage formula, except there are additional modifiers. I wrote about it here. The pseudocode is pretty much identical to the one from SV above.
C:
      LODWORD(damage_rand) = (*(*v117 + 48LL))(v117, &qword_7103390D10, 0LL);
      if ( !v192 )
      {
        v174 = (damage_rand + 1);
        if ( v174 < 2 )
        {
          LOWORD(damage_rand) = 0;
        }
        else
        {
          v175 = __clz(v174);
          v176 = v174 << v175;
          v177 = v175 | 0x40;
          v91 = (v176 & 0x7FFFFFFFFFFFFFFFLL) == 0;
          v178 = -64;
          if ( v91 )
            v178 = -63;
          v179 = 0xFFFFFFFFFFFFFFFFLL >> (v177 + v178);
          xoro = *(*(*(a1 + 56) + 104LL) + 56LL);
          ++xoro[9];
          s0 = xoro[6];
          s1 = xoro[7];
          do
          {
            v183 = s0 ^ s1;
            damage_rand = (s0 + s1) & v179;
            v184 = __ROR8__(s0, 40) ^ ((s0 ^ s1) << 16);
            s1 = __ROR8__(v183, 27);
            s0 = v184 ^ v183;
          }
          while ( damage_rand >= v174 );
          xoro[6] = s0;
          xoro[7] = s1;
        }
      }
      dam_after_random = (100 - damage_rand) * v94 / 100;// Randroll

And finally, what if this is a difference between the usual GF games written in C vs ILCA's Unity games written in C#? Well, BDSP also uses xoroshiro128+ for its battle RNG even though most of the rest of the game uses xorshift128, and it simply hardcodes that the random value should be 16.
From Dpr_Battle_Logic_EventLauncher__Event_CalcDamage:
C#:
        v37 = (100 - Dpr_Battle_Logic_calc__GetRand(16u, 0LL));

C#:
uint32_t __fastcall Dpr_Battle_Logic_calc__GetRand(uint32_t range, const MethodInfo *method)
{
  Dpr_Battle_Logic_calc_c *v3; // x0

  if ( (byte_7104ED6FC9 & 1) == 0 )
  {
    sub_710009AD20(0xAD1Au);
    byte_7104ED6FC9 = 1;
  }
  v3 = Dpr_Battle_Logic_calc_TypeInfo;
  if ( (Dpr_Battle_Logic_calc_TypeInfo->_2.bitflags2 & 2) != 0 && !Dpr_Battle_Logic_calc_TypeInfo->_2.cctor_finished )
  {
    sub_710009AE30(Dpr_Battle_Logic_calc_TypeInfo);
    v3 = Dpr_Battle_Logic_calc_TypeInfo;
  }
  return Dpr_Battle_Logic_Random__GetValue_485370123696(v3->static_fields->g_RandSys, range, 0LL);
}

C#:
uint64_t __fastcall Dpr_Battle_Logic_Random__GetValue_485370123696(
        Dpr_Battle_Logic_Random_o *this,
        uint64_t max,
        const MethodInfo *method)
{
  uint64_t result; // x0

  result = Xoroshiro128Plus_Xoroshiro128Plus__NextULong(this->fields.m_randomEngine, 0LL);
  if ( max )
    result %= max;
  return result;
}

SWSH also has the hardcoded 16 like BDSP. At some point, they decided the games should have these battle parameters set in config files rather than directly set in the damage formula, which could be an avenue for introducing the error.
 
Last edited:
This user on Reddit reports that Growth fails if your ability is Mega Sol.

EDIT: They've added additional testing reports at the bottom.
UPDATE: I've tested other interactions with Mega Sol:
  • Moonlight/Morning Sun both get their healing increased (Mega Sol will pop up).
  • Hurricane/Thunder get their accuracy reduced (No Mega Sol pop up, hit 20/50 in my testing)
  • If harsh sunlight is already up, a Pokemon with Mega Sol can now use Growth (instead of the move completely failing)
 
Last edited:
Back
Top