Sword & Shield Battle Mechanics Research

This is correct; if the Moxie / Beast Boost / Neigh are simply out on the field when Future Sight takes a KO, that's not enough to give them the boost. I took the questioner to mean something else; what if the Moxie / Beast Boost / Neigh user takes a KO with Future Sight? I have cartridge footage of this interaction which can be reviewed if you don't believe me (in fairness, I did not link to this footage in my original reply).
As a matter of fact, does this also apply if the Pokémon uses Future Sight/Doom Desire, switches out, and switches back in before the move hits?

I don't see any reason why it shouldn't, considering the game seems to remember who used the move, but with Game Freak you just can't know...
 

DaWoblefet

Demonstrably so
is a Battle Simulator Administratoris a Community Leaderis a Programmeris a Community Contributoris a Top Researcheris a Top Tiering Contributoris a Social Media Contributor Alumnus
PS Admin
As a matter of fact, does this also apply if the Pokémon uses Future Sight/Doom Desire, switches out, and switches back in before the move hits?

I don't see any reason why it shouldn't, considering the game seems to remember who used the move, but with Game Freak you just can't know...
Good question! It "remembers" the Moxie user originally used Future Sight, so it will give that Pokemon a boost even if the Moxie / Beast Boost / Neigh Pokemon switch out and back in.

Some more tests with new moves we've gotten back with Crown Tundra:
  • Shadow Force won't break or bypass Max Guard (it's like Phantom Force in that respect).
  • If you have a Truant Pokemon that was just switched in and a Neutralizing Gas Pokemon, Dynamaxing the Truant Pokemon and Neutralizing Gas then leaving the field will cause Truant to immediately trigger on its first turn (this is the same mechanic as using Entrainment Truant on Mega Evolutions last generation).
  • Diamond Storm can only boost a Pokemon's Defense by +2 one time, even if it hits multiple targets. This is unlike Gen 6, where Diamond Storm can boost Defense for each target is successfully hits. Apparently this has been known in the Japanese community for some time (thanks Zaggyo!) - it happens in Gen 7 as well.
  • Techno Blast sets its typing via Drives at the same time Multi Attack / Weather Ball set their move typing in the checks done before move success.
  • Lunar Dance redundancy failure is in move failure checks list 4 (doesn't double Stomping Tantrum).
 
Last edited:
Since the animation is different when doubled versus not, I was able to test this easily. I had my Surge Pincurchin use Rising Voltage on a Milcery I gave Levitate. Without Mold Breaker, I got the basic animation. But after getting Mold Breaker via Entrainment, I got the boosted animation. So yes, a Pokemon with Mold Breaker (or Terravolt) can use a boosted Rising Voltage on Levitate Pokémon.
Since Mold Breaker ignores Levitate when checking if the target is grounded, I tested Mold Breaker's interactions with Smack Down, another move that has different effects based on groundedness. When using Mold Breaker Smack Down, I found the following:
  • A Pokémon that is ungrounded solely due to having Levitate will not be grounded.
    • Holding an Air Balloon doesn't change this.
    • Getting hit after the first turn of Fly will cancel the move, but will not cause the Fly user to be grounded.
  • A Pokémon that is ungrounded due to being a Flying type and having Levitate will be grounded.
  • A Pokémon that is ungrounded due to Magnet Rise and having Levitate will be grounded.
 
According to Anubis on Twitter (and evidenced in their screenshots), both Galarian forms and Alolan forms can learn their primary form's moves.
Legally.

The fact that this can happen means…
It's time once again to update moves.

This is going to force so many metas to re-evaluate regional forms, because…
Obstagoon can have Belly Drum + Extreme Speed.
Sirfetch'd can have more high-crit moves.
Cursola can have Recover, Mist, and Mimic.
…among other things.

I wonder if it works on the regional evolutions, like Mr. Mime-Galar…
 
Last edited:

Jibaku

Who let marco in here????
is a Top Team Rater Alumnusis a Senior Staff Member Alumnusis a Smogon Discord Contributor Alumnusis a CAP Contributor Alumnusis a Tiering Contributor Alumnusis a Top Contributor Alumnusis a Smogon Media Contributor Alumnusis a Two-Time Past SPL Champion
When Hydro Pump Drilbur happened due to a raid event glitch, the new move is considered illegal by the game and is not implemented on PS.

I think the same will happen here; at this time, the glitch moves are considered illegal on unranked Battle Stadium, and may remain that way.
 
According to Anubis on Twitter (and evidenced in their screenshots), both Galarian forms and Alolan forms can learn their primary form's moves.
Legally.

The fact that this can happen means…
It's time once again to update moves.

This is going to force so many metas to re-evaluate regional forms, because…
Obstagoon can have Belly Drum + Extreme Speed.
Sirfetch'd can have more high-crit moves.
Cursola can have Recover, Mist, and Mimic.
…among other things.

I wonder if it works on the regional evolutions, like Mr. Mime-Galar…
The bug only affects mons with regular forms in LPGE. Sorry, still no pseudo-legit way to get espeed belly drum Obstagoon.

 
There appears to be a level-based variable added to the catch chance. Using a Quick Ball on the level 24 Gym Challenge pokes in Kabu's gym is supposed to be a 100% chance of capture*. I just went through it and 3 out of 3 times, they broke out when my level 23 Flareon was in the lead, 3 out of 3 times they were captured when my level 25 vaporeon was in the lead. That's not a lot of tests, but at least it's clear that's not the "over 99%" that it should be.

(If this is known, sorry, I didn't see it in the OP and it's not on Bulbapedia).

*That was the speedrunning route at one point, and I've made my own calculator that agrees.
 
quickly compiled all the new learnsets from this Pokemon GO transfer and it's relatively lackluster:

Alolan Forms
Exeggutor - None
Dugtrio - None
Sandslash - Poison Sting, Sand Attack
Ninetales - Ember, Will-O-Wisp, Fire Spin, Flamethrower, Fire Blast
Persian - None
Raichu - None
Marowak - None

Galarian Forms
Weezing - None
Perrserker - Bite, Feint
Sirfetch’d - Cut, Razor Leaf, Fury Attack, Agility, Slash, Air Slash
Rapidash - Fury Attack, Poison Jab, Ember, Fire Spin, Fire Blast, Flare Blitz
 
Last edited:
There appears to be a level-based variable added to the catch chance. Using a Quick Ball on the level 24 Gym Challenge pokes in Kabu's gym is supposed to be a 100% chance of capture*. I just went through it and 3 out of 3 times, they broke out when my level 23 Flareon was in the lead, 3 out of 3 times they were captured when my level 25 vaporeon was in the lead. That's not a lot of tests, but at least it's clear that's not the "over 99%" that it should be.

(If this is known, sorry, I didn't see it in the OP and it's not on Bulbapedia).

*That was the speedrunning route at one point, and I've made my own calculator that agrees.
there's a level penalty for every ball [prior to beating the champion]
the cave of dragonflies person ran tests when people noticed how fucking awful catchrates seemed to be. If you're lower than the enemy pokemon, the catch chance drops significantly, though the exact rate is unknown. If you're equal or higher level it runs as normal.
 
quickly compiled all the new learnsets from this Pokemon GO transfer and it's relatively lackluster:

Alolan Forms
Exeggutor - None
Dugtrio - None
Sandslash - Poison Sting, Sand Attack
Ninetales - Ember, Will-O-Wisp, Fire Spin, Flamethrower, Fire Blast
Persian - None
Raichu - None
Marowak - None

Galarian Forms
Weezing - None
Perrserker - Bite, Feint
Sirfetch’d - Cut, Razor Leaf, Fury Attack, Agility, Slash, Air Slash
Rapidash - Fury Attack, Poison Jab, Ember, Fire Spin, Fire Blast, Flare Blitz
CAN you get Flare Blitz on Rapidash? GO Transfers can only get up to Level 40 iirc and both Ponyta and Rapidash learn it later
 
How are the stats of eternamax eternatus in game? does it have a dynamax hp multiplier on top of the base stats of the transformed forme?
 
If a dance move is used and a dynamaxed dancer pokemon is on the field does it use a max move or the dance move? I'd assume it uses the dance move, but idt it's been tested.
 
Sup. I have a request to make from any of you who have access to Sword and Shield.
Could anyone please test out the behavior of Cotton Down in double battles?
I need to know how does SwSh behave after the Speed of all the battlers that are not the Pokémon with Cotton Down has been reduced as much as it's possible. More specifically, I'd like to know things like whether an ability pop up or a text string saying that the current battler's Speed couldn't go any lower appear or not.

I need to know because I'm implementing the ability in code and I'd like to implement it as faithfully as possible, but I don't have access to SwSh so I can't test it myself.
Thanks in advance for reading!

EDIT: A friend of mine was able to test it themself.
The ability pop up stays on screen until the ability's effect ends.
If the battlers' Speed can't go any lower, a text string saying "[Pokémon]'s Speed won't go any lower!" appears for each one of them.
 
Last edited:

Givrix

Mad Dog
is a Top Tiering Contributor
I'm not sure if I should post here first or in the bug report thread, since it's probably not a gen8-only mechanic but since I'm here...

A few days ago, I tried some weird sets on the DOU ladder, and I found something strange: When a Pokemon with the Shell Bell uses a spread move, the amount of healing created by damage dealt was awkward and a bit disappointing. Firstly, I thought that it was the accurate mechanic, but bulbapedia never talk about what happens with multi target move.

I decided to check by myself how it's actually working on cartrige, and here's what happened (wyndon battle café)

the shell bell has restored 76hp on Blacephalon
Jirachi has 341hp, that gives 42hp of heal (341/8 rounded down)
I assume that alcremie and slurpuff has 31ivs on hp (132 and 148hp), that gives 18 and 16hp
42+18+16=76, shell bell actually proc and restores 1/8 of the damage dealt on all targets

I know it seems obvious, but the fact is, it's not working like this at all on showdown, I needed to report this lol (edit: I made a post in the bug report thread as well)
 
Last edited:

Anubis

HONK
is a Community Contributoris a Top Researcheris a Battle Simulator Admin Alumnusis a Community Leader Alumnusis a Smogon Discord Contributor Alumnus
I assume that alcremie and slurpuff has 31ivs on hp (132 and 148hp), that gives 18 and 16hp
If the NPC is named Richard, here are the stats for those two mons:

Slurpuff (F)
Ability: Sweet Veil
Level: 47
Modest Nature
IVs: 25 HP / 25 Atk / 25 Def / 25 SpA / 25 SpD / 25 Spe
- Dazzling Gleam
- Flamethrower
- Helping Hand
- Thunderbolt

Alcremie-Caramel-Swirl
Ability: Sweet Veil
Level: 47
Modest Nature
IVs: 25 HP / 25 Atk / 25 Def / 25 SpA / 25 SpD / 25 Spe
- Dazzling Gleam
- Recover
- Psychic
- Magical Leaf

Neither has any EVs. It shouldn't change the HP/8 values you calculated.
 
Last edited:

DaWoblefet

Demonstrably so
is a Battle Simulator Administratoris a Community Leaderis a Programmeris a Community Contributoris a Top Researcheris a Top Tiering Contributoris a Social Media Contributor Alumnus
PS Admin
Accuracy research

Thanks to new USUM research, additional information on how the game calculates if you'll hit an attack is available. This is particularly awesome because we haven't had anything on this since like, beta Gen 4.

Check if the move will hit with certainty

1. Check if user or target has No Guard, or if the user has sure-hit accuracy from Poison-type Toxic, or if the user has used Lock-On / Mind Reader.
2. Check if the move itself is sure-hit (accuracy 101, like Aerial Ace), or if the move was custom-set to be sure-hit: Pursuit and target is switching, Thunder / Hurricane in rain, Blizzard in hail, Stomp / Steamroller / Dragon Rush / Body Slam / Malicious Moonsault / Heavy Slam / Heat Crash / Flying Press vs. Minimize.
3. Check if the target has Telekinesis.

Apply accuracy / evasion modifiers

4. Look up the move's "base accuracy". For example, Fire Blast's base accuracy is 85.
5. If the move is a status move, has greater than 50% accuracy, and the target has Wonder Skin, or the move is Thunder / Hurricane and the weather is sun, set the move's accuracy to 50.
6. Chain the accuracy and evasion modifiers, like how you would in the damage formula (see chaining modifiers section).
  1. Gravity - 6840/4096
  2. Abilities; order is determined by raw Speed with a non-RNG Speed tie.
    • Tangled Feet - 2048/4096
    • Hustle - 3277/4096
    • Sand Veil- 3277/4096
    • Snow Cloak - 3277/4096
    • Compound Eyes - 5325/4096
    • Victory Star - 4506/4096 for each Victory Star
  3. Items; order is determined by raw Speed with a non-RNG Speed tie.
    • Bright Powder - 3686/4096
    • Lax Incense - 3686/4096
    • Wide Lens - 4505/4096
    • Zoom Lens - 4915/4096
7. Apply a modifier to the value from step 5) with the result of step 6). That is, pokeRound[(step 5 * step 6) / 4096], where pokeRound means do standard rounding, but round down on 0.5. The resulting value can be greater than 100.

Apply accuracy stat boosts / drops
Determine the number of accuracy / evasion boosts. The number must be within 0-12. (0 = -6, 1 = -5, 6 = 0, 12 = +6, etc.)

8. If the user has Keen Eye or Unaware, or the move is Sacred Sword / Chip Away / Darkest Lariat, or the target is identified (Odor Sleuth / Foresight / Miracle Eye) and has positive evasion boosts, set the target's evasion boosts to 6 (+0).
9. Start with 6, then add all of the user's accuracy stat boosts / drops, and subtract all of the target's evasion stat boosts / drops.
10. Take the value of step 9 and compare to the following table. Multiply the result from step 7 by the numerator first, then divide by the denominator and floor the result. If the resulting value would be greater than 100, make it 100.

0 = 6/18
1 = 6/16
2 = 6/14
3 = 6/12
4 = 6/10
5 = 6/8
6 = 6/6
7 = 8/6
8 = 10/6
9 = 12/6
10 = 14/6
11 = 16/6
12 = 18/6

Final steps
11. If Micle Berry would boost the move's accuracy, pokeRound([step 10 * 4915]/4096).
12. If the percentage is above 100, make it 100.
13. If the affection of the target is 4 hearts or more, subtract 10 (the in-game Pokemon Amie stuff or whatever). You can't go below 0.
14. Roll a random number 0-99 inclusive. If the accuracy value is greater than that random number, the move hits. (That is, check if accuracy > rand(100)).

A few implications of this newfound research (with special thanks to SadisticMystic for helping to identify many of these!):
  • Poison-type Toxic sets a flag on the user, rather than on the move. By combining with Magic Bounce or Instruct to force Toxic to be used beforehand, you can get sure-hit attacks, including OHKO moves!
  • Final accuracy values must be integers between 0-100. For example, a Compound Eyes Sleep Powder would be pokeRound(75*5325/4096) = pokeRound(97.503662109375) = 98% accurate, not 97%.
  • Something like Wide Lens Fire Blast rounds down to 93% accuracy, but Victory Star Fire Blast rounds up to 94%.
  • Accuracy / evasion boosts stop mattering after a while. The modifier for +6 evasion is identical to +6 evasion & -6 accuracy which is also identical to +3 accuracy & -3 evasion.
OHKO move accuracy

OHKO moves are much simpler, as they don't use stat boosts / drops, Micle, or any other accuracy / evasion modifiers.

1. Fail if the user's level is less than the target's level (in addition in SwSh, or if the target is Dynamaxed)
2. Fail if the target has the ability Sturdy.
3. Check if user or target has No Guard, or if the user has sure-hit accuracy from Poison-type Toxic, or if the user has used Lock-On / Mind Reader
4. Look up the move's "base accuracy" (always 30 in the case of OHKO moves).
5. If the move is Sheer Cold and the user is not Ice-type, set move accuracy to 20.
6. Add (user level - target level) to move accuracy.

I don't think I can personally make further progress than this. See below for a justification way. If you're a math-savvy coder and can help, I'd be happy to share what I attempted to potentially work out any bugs in my code. If my code was working though, I may just be unable to do any more empirical tests to figure out the order. See this post for an update; pre helped me a ton.
Everyone I've asked who's looked at the USUM source code has had no idea how to determine the order of chained modifiers. It uses a stack, but it's not clear at all which order different modifiers are placed on the stack. I also wouldn't even between to know where to look to try to figure it out in real-time with RAM dumps or something. As a result, I went the good ol' route of attempting to bruteforce situations where I could prove an attack misses when it could potentially always hit. Since we understand everything besides modifier chaining order, we have a lot of the ground work laid out. We have a few additional things to consider:
  • There are a finite amount of base accuracy values to work with. 50, 55, 60, 70, 75, 80, 85, 90, 95, and 100 are the only possible base accuracy values, and a few are incompatible with Hustle (50, 55, and 60).
    • Hypnosis is the only 60% accurate move, Sing / Supersonic / Grass Whistle are the only 55% accurate moves, and Dark Void / Hurricane or Thunder in sun / Wonder Skinned status moves are the only way to get 50% accurate moves.
  • It would be pointless to check something like 85% vs. 86% for an accuracy value, as the amount of tests to prove something is 85% rather than 86% or similar is insanely high. Rather, we want to have something like a 99% vs. 100% test, where it is possible to miss. That way, all you have to do is try over and over again, and eventually you'll miss, which is enough to prove it's not 100%. So something like 98 vs. 100 or 99 vs. 100 will work.
  • Accounting for Micle Berry and no stat boosts/drops, modifiers reaching 82 vs. 83 would also work (Micle would scale that to 98 or 100).
  • Accounting for stat boosts / drops, the following pairs would also work work. Note that you can still use Micle + Zoom Lens or what have you by Flinging the Micle Berry.
Boosts / drops (no Micle)
  • 0
    • 299 -> 99
    • 300 -> 100
  • 1
    • 266 -> 99
    • 267 - > 100
  • 2
    • 233 -> 99
    • 234 -> 100
  • 3
    • 199 -> 99
    • 200 -> 100
  • 4
    • 166 -> 99
    • 167 -> 100
  • 5
    • 133 -> 99
    • 134 -> 100
  • 6
  • 7
    • 74 -> 98
    • 75 -> 100
  • 8
    • 59 -> 98
    • 60 -> 100
  • 9
    • 49 -> 98
    • 50 -> 100
  • 10
    • 42 -> 98
    • 43 -> 100
  • 11
    • 37 -> 98
    • 38 -> 100
  • 12
    • 33 -> 99
    • 34 -> 100

Boosts / drops (with Micle)
  • 0
    • 248 -> 82
    • 249 -> 83
  • 1
    • 221 -> 82
    • 222 - > 83
  • 2
    • 193 -> 82
    • 194 -> 83
  • 3
    • 165 -> 82
    • 166 -> 83
  • 4
    • 138 -> 82
    • 139 -> 83
  • 5
    • 110 -> 82
    • 111 -> 83
  • 6
  • 7
    • 62 -> 82
    • 63 -> 84
  • 8
    • 49 -> 81
    • 50 -> 83
  • 9
    • 41 -> 82
    • 42 -> 84
  • 10
    • 35 -> 81
    • 36 -> 84
  • 11
    • 31 -> 82
    • 32 -> 85
  • 12
    • 27 -> 81
    • 28 -> 84
In theory, what you would want to do first is generate all possible combinations of modifier chaining order. For example, suppose you have Tangled Feet, Victory Star (user), and Bright Powder. These would be the possible orders that they could be chained:

[2048, 4506, 3686]
[2048, 3686, 4506]
[4506, 2048, 3686]
[4506, 3686, 2048]
[3686, 4506, 2048]
[3686, 2048, 4506]

However, we can eliminate several of these, as in modifier chaining, swapping the first 2 slots will always be mathematically equivalent. So you can cut it down a bit:

[2048, 4506, 3686]
[2048, 3686, 4506]
[4506, 3686, 2048]

Next, you chain each one of these together. In our example:

[2048, 4506, 3686] = 2027
[2048, 3686, 4506] = 2027
[4506, 3686, 2048] = 2028

We've passed our first check - if the chained modifiers were all the same no matter which order you applied them in, you could move on to the next set of combinations.

Next, you need to apply 2027 and 2028 to every possible base accuracy. If applying 2027 vs. 2028 is inconsequential to base accuracy values that exist, we again need to move on to the next set of combinations.

Finally, we need to check to see if any of those resulting values are testable - i.e. if, after applying the modifier, we can further manipulate the accuracy / evasion calculation to be 98 vs. 100 or something similar. In our example, one of these does exist with a 100 base accuracy.

pokeRound(100*2027/4096) = pokeRound(49.4873046875) = 49
pokeRound(100*2028/4096) = pokeRound(49.51171875) = 50

In this case, we can use +3 accuracy to get a further 2x multiplier and have a 98 vs. 100 test case. In this case, it does miss, which means those 3 must be chained in one of these possible orders:
Victory Star (user) -> Tangled Feet -> Bright Powder
Tangled Feet -> Victory Star (user) -> Bright Powder
Tangled Feet -> Bright Powder -> Victory Star (user)
Bright Powder -> Tangled Feet -> Victory Star (user)

In theory, all you have to do then is generate those combinations and run the comparisons in a giant loop.

**********************

But of course, that's all in theory. I gave a good college try at implementing this logic myself; the hardest part by far is generating all of the combinations. The issue is that when I did, besides the Bright Powder and Zoom Lens vs. Tangled Feet / Victory Star tests, I wasn't able to bruteforce any combinations that allow me to prove positively the order of any other modifiers. The combinations simply don't exist, if I wrote my code correctly. That's not to say there's not plenty of combinations where the difference matters, but they aren't for cases that I can test empirically (e.g. 54% vs. 55%). It also doesn't do me any good to check 98 vs. 100 if the roll is expected to land on the side of 100. The sheer amount of tests needed to prove something is 100% accurate rather than 98% is astronomical. To give an example, I spent 2 hours on one 98 vs. 100 test (60 base accuracy with Gravity, Bright Powder, Victory Star, Zoom Lens, and Tangled Feet) and only completed 255 trials. It never missed, so it's probably 100, but you can't know for sure.

You could improve the time it would take to do empirical testing by loading a Battle Video in Citra and editing the 4-byte RNG seed of that Battle Video at 0x01E8. Then, you just play the Battle Video back with the new RNG seed. But even if you did that, you still would only prove that a specific range of combinations are possible to produce the chained modifier. To give an example, here's another one with 75 base accuracy and Victory Star, Zoom Lens, Hustle, Bright Powder, Gravity, and Tangled Feet: https://pastebin.com/MbqSeJT5

Say you were able to prove that 59 was correct, rather than 60. There's still 26 possible combinations that could be happening that would produce 59 when chained. Now, it's not trivial to do so; after all, you eliminate 694 impossible combinations. The trouble is that I suspect the value really is 60 here. If that's right, then you really only eliminate 24 combinations, which is nice but fairly trivial.

It's quite possible that I didn't write my program well enough to bruteforce combinations though; maybe I was just a bad coder and didn't do things right. In any case though, I don't think there's anything more I can do. I'd say the best options at this point are:
  1. Figure out how modifier chaining works by understanding the USUM source code better
  2. RAM edit accuracy success to force a miss / hit (Anubis has done this before so I know it's possible)
 
Last edited:

Users Who Are Viewing This Thread (Users: 2, Guests: 8)

Top