Sword & Shield Battle Mechanics Research

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)
Better still, you could have used use +2 accuracy and Micle Berry to get a 97 vs. 100 test case. I've found one more 97 vs. 100 test case, which is Tangled Feet, Victory Star, Zoom Lens, plus +2 boosts and Micle Berry, with a 75% accurate move. (Well, I found one other 97 vs. 100 test case, but it requires an incompatible set of modifiers.)

Other 98 vs. 100 test cases do exist though. There isn't one with 4 modifiers, as it needs Compound Eyes, Tangled Feet and either Hustle, Sand Veil or Snow Cloak. For 5 modifiers, there appear to be four valid cases:
  • 90% accuracy; Gravity; Defender: Tangled Feet, Bright Powder; Attacker: Hustle, Wide Lens, +2 boosts
  • 90% accuracy; Gravity; Defender: Tangled Feet, Bright Powder; Ally: Victory Star; Attacker: Hustle, +2 boosts (Doubles)
  • 60% accuracy; Gravity; Defender: Tangled Feet, Bright Powder; Attacker: Victory Star, Zoom Lens, +2 boosts
  • 70% accuracy; Gravity; Defender: Bright Powder, +3 boosts; Ally: Victory Star, Victory Star; Attacker: Compound Eyes, Micle Berry (Triples in Gen 6 I guess?)
For 6 modifiers there appear to be five valid cases, mostly requiring Triples for that double Victory Star:
  • 75% accuracy; Gravity; Defender: Tangled Feet, Bright Powder; Ally: Victory Star; Attacker: Hustle, Zoom Lens, +2 boosts (Doubles)
  • 85% accuracy; Gravity; Defender: Tangled Feet; Ally: Victory Star, Victory Star; Attacker: Hustle, Zoom Lens, Micle Berry (Triples)
  • 50% accuracy; Defender: Tangled Feet, Bright Powder; Ally: Victory Star, Victory Star; Attacker: Compound Eyes, Zoom Lens, +4 boosts (Triples)
  • 70% accuracy; Defender: Tangled Feet, Bright Powder; Ally: Victory Star, Victory Star; Attacker: Compound Eyes, Zoom Lens, +2 boosts (Triples)
  • 85% accuracy; Gravity; Defender: Tangled Feet, Bright Powder, +1 boost; Ally: Victory Star, Victory Star; Attacker: Compound Eyes, Wide Lens, Micle Berry (Triples)
There may be other possibilities with 99 vs. 100 test cases; I haven't checked those yet.
 

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
Posting my efforts publicly has really enlightened me, as I got an outpouring of support from several different folks generating combinations (thanks pyuk and urkerab!) as well as some HUGE assistance from pre in helping me understand what's properly going on with not only accuracy and evasion, but also modifier application in general.

tl;dr when applying multiple modifiers from Abilities or items, Speed is used to determine which modifier applies first. Among other things, that means that damage calculations can change depending on the Speed interactions of the Pokemon involved. Note that this doesn't affect Singles at all (or at least very trivially if it does).

Within a given event in Pokemon, modifiers are applied in the following order:
  1. Z-move effects
  2. Move effects
  3. Effects relative to a particular slot of the field (Wish, Lunar Dance, Future Sight, etc.)
  4. Effects relative to a particular side of the field (Tailwind, Safeguard, Pledge combo effects, Wide Guard, etc.)
  5. Field effects (weather conditions, Terrains, Imprison, Ion Deluge, Magic Room, Gravity, etc.)
  6. Poison Touch
  7. All other abilities
  8. Items
  9. Stall (the ability)
Within those particular orders, further "subpriority" is given.
  • For moves, it seems to be based on the move's priority (e.g. Helping Hand is +5 priority), then on the user's Speed, similar to how regular turn order works.
  • For Abilities and items, it compares the Pokemon's raw Speed with a non-RNG based Speed tie. It was previously known that this was how things like, say, LightningRod redirection or which Eject Button activates worked. Here's a decent definition:
    • Compare the raw Speed stats of Pokemon as they are in the summary screen, without modifiers (no Speed Swap, no Tailwind, no +6 / -6, etc.). Apply the effect to whichever Pokemon is fastest. If there is a tie, apply the effect to the Pokemon that has had the ability the longest amount of time. If both players lead with Speed tying Pokemon, the Pokemon on the side of the player who is the host of the battle (the player with their trainer card on the left of the pre-battle challenge screen) will be considered to have the ability longer. If the host leads two Pokemon that Speed tie, the Pokemon on the left is considered to have had the ability the longest.
  • Z-moves also use raw Speed with a non-RNG based Speed tie. Not sure if this ever comes up though, since you couldn't have multiple Z-moves in the same interaction.
  • The other effects don't use Speed-based subpriority. I'm not entirely sure if it ever comes up to matter (they would have to share events, like say, be base power modifiers or something).
Let me give an example with base power calculation, since that's pretty well understood (well, I think the order of many events in the article are now mistaken but hang with me).

Suppose you have a Pokemon using Eruption with 345/367 HP (141 BP Eruption) that has an active Flare Boost, an ally with Battery, and the target has Heatproof. Because Flare Boost (6144/4096), Battery (5325/4096), and Heatproof (2048/4096) are all on different Pokemon, the Speed of those Pokemon matter when chaining modifiers. Here's the combinations listed below:

137 - [6144, 2048, 5325]
138 - [2048, 5325, 6144]
137 - [6144, 5325, 2048]
137 - [5325, 6144, 2048]
137 - [2048, 6144, 5325]
137 - [6144, 2048, 5325]

So as you can see, if the speed order is Heatproof > Battery > Flare Boost, then Eruption will have 138 BP in the end; if the Speeds are any other way, it will have 137 BP.

To test this, I used the following setup:
  • user: Mew at level 100, 200 Sp. Atk at -2, Flare Boost active while burned and 345/367 HP for a 141 BP Eruption
  • user ally: Battery
  • target: Mew with 168 Sp. Def at -6 with Heatproof
  • setting: doubles, spread move

If the BP is 137:
base damage = floor(floor(42 * 137 * 100 / 42) / 50)) +2
base damage = floor(13700 / 50) +2
base damage = 274 +2
base damage = 276

Apply spread move modifier: pokeRound(276 * 3072/4096) = 207
207's damage rolls:
175, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 207

If the BP is 138:
base damage = floor(floor(42 * 138 * 100 / 42) / 50)) +2
base damage = floor(13800 / 50) +2
base damage = 276 +2
base damage = 278

Apply spread move modifier: pokeRound(278 * 3072/4096) = 208
208's damage rolls:
176, 178, 180, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 208

When the order of Speeds was Flare Boost > Battery > Heatproof, I got a damage roll of 200, indicating 137 BP.
When the order of Speeds was Heatproof > Battery > Flare Blitz, I got a damage roll of 176, indicating 138 BP.

The applicability of this new discovery is far-reaching and this will deserve a LOT of attention from researchers. For accuracy / evasion in particular, it ends up being fairly straightforward:
  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
 

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
New SwSh patch came out - version 1.3.1. It doesn't seem to have changed anything other than fixing the Toxic glitch where sure-hit accuracy was applied to the Pokemon, rather than the move.

Between Anubis and myself, the following glitches still are in the game:
  • Dynamax double Eject Pack causing the user to switch out and in and still Dynamax same turn
  • Speed overflow, where Trick Room is "ignored" at 1810 Speed or higher
  • Dragon Darts + Ally Switch + Telepathy causing Dragon Darts to attack the user
  • Mimikyu getting damaged mid-semi-invulnerability (e.g. via Phantom Force) causes Disguise to break but does not visually change formes
  • The latest version of the Choice item lock glitch behaves the same, where you can Choice lock -> Magic Room -> remove Choice item -> undo Magic Room -> using any move other than the original locked move will fail.
  • Ripen still erroneously plays on Leftovers.
  • Skill Swapping Libero mid-turn on Curse causes the user to target itself with Ghost-type Curse.
  • Being Encored into an attack, Dynamaxing, and having that base move Disabled causes the Dynamax Pokemon to Struggle on the following turn rather than bypassing the Encore / Disable restrictions like normal.
There are certainly more than these, so if someone wants to check things like No Retreat + Mean Look / damage overflow / Mold Breaker Electrify + LightningRod improper messages / Own Tempo Baton Pass not curing confusion / Berries not being eaten after self-hit confusion damage / Ally Switch to Leech Seed yourself / Nature stat overflow / Rollout Storage / whatever else I'm missing feel free, but I suspect it was just Toxic. If something else changed, it wasn't just a regular bugfix.
 
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
If you utilize Neutralizing Gas for the switch in and a third Eject Pack on your initial partner, you could place the Pokemon you intend to Dynamax into the opposite slot instead of the same slot. In that case would your Pokemon still Dynamax or not?
You can even just switch to two Intimidates with a lead of double Eject Pack and pull that off. Yes, you will Dynamax in the other slot (and still not take your turn, effectively wasting a turn of Dynamax).
 
So it turns out when the game groups a bunch of multipliers together in the FX32 system (32-bit fixed point, aka "multiples of 1/4096"), there are limits on how far the result can be bounded in either direction. The basic stat stages (-6 to +6) aren't factored into there multiplier contraints, but things like Choice Band, Life Orb, and Normal Gem are. Specifically:
  • When calculating move power, the composite multiplier is constrained to a range of 0.01x - 512x.
  • When calculating an attacking stat, a defensive stat, or a speed stat, the multiplier is constrained to 0.1x - 32x.
  • When calculating accuracy, or the "damage modifier" for things like screens and Life Orb that apply at the end of the damage formula, the multiplier is constrained to 0.01x - 32x.
Generally, they've done a pretty good job of making sure these boundaries are wide enough that they're not going to be a factor. Even if you pile on every positive multiplier you can that affects the move power, you're not going to get close to the 512x limit there; meanwhile on the defense stats there are no FX32 multipliers at all that reduce their magnitude by any amount (if there were, they could be used with a 1-point defensive stat to easily bring out the unintuitive behavior that a 0-point defense is treated as an infinitely high stat, because the game really wants to avoid choking on a division by 0) and you can't even get below 1x on that, let alone 0.1x.

However, in the case of speed, it is possible to get pushed back by these boundaries. Specifically, if you have Slow Start + Iron Ball (or a similar item) + swamp pledge (Water + Grass Pledge) all applying to the same Pokemon at once, that would seem like it multiplies to 1/16, but because of these boundaries, it only reduces the speed as far as 1/10 of its original value instead. Because it's FX32, the accurate figure is really 410/4096, so if you had a Regigigas with 185 speed and all this nonsense, it gets to round up to 19 instead of down to 18 (like it would if it were 409), and certainly doesn't drop all the way to 12 like the full 1/16 nerf would. Because none of the speed modifiers use naive denominators greater than 4, and there aren't very many of them possible to have at once, I believe this is the single way in existence that we can empirically prove the speed modifier uses this resolution of 1/4096s instead of the naive fractions.

Note that because the paralysis modifier is a separate step that happens after everything else, you can't substitute it for any of the other factors: if you just had Iron Ball + swamp pledge + paralysis, without Slow Start involved, the composite multiplier doesn't factor in the paralysis so it doesn't reach the limit, and all of those speed reductions count for their full value (1/16 in gens 7-8, 1/32 in 5-6).

DaWoblefet edit: cartridge footage of this behavior in SwSh
 
Last edited by a moderator:
This is a very specific question, but in Marty's post on Shell Side Arm behavior he says that it ignores Wonder Room in terms of the base stats, so that it will still be a physical Shell Side Arm against a mon with naturally lower defense (assuming equal stats on the Slowbro) even in Wonder Room. But he also says that the same will happen even if the opposing mon has +2 defense, because it treats the stat stages as if they ARE switched by Wonder Room, so it won't take the +2 defense into account and will still attack physically.

However, that is not how Wonder Room works? Wonder Room does not swap the stat stages of Pokemon, only the base stats are changed. So is he saying that Shell Side Arm erroneously acts as if Wonder Room DOES swap the stat stages, even though it doesn't in reality? He also said that Download works the same way, which would also seem to be erroneous if that's true. Maybe I'm just not understanding Marty's post correctly, but it confused me.
 

Marty

Always more to find
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Member of Senior Staffis a Community Contributoris a Top Researcheris a Top Tiering Contributor
Research Leader
However, that is not how Wonder Room works?
Download, Body Press, and Shell Side Arm all ignore Wonder Room in the same way, but in doing so they fetch the real defensive stat (which is currently the other defensive stat) and the stat stage currently associated with that stat. Of course, this is the wrong stat stage during Wonder Room because it doesn't swap defensive stat stages, like you said. So what the final test in your linked post shows is that Shell Side Arm calculated against 70 at +0 and 89 at +2. Similarly, if you switch Download into that same opponent outside of Wonder Room you get a Special Attack boost, but in Wonder Room you get an Attack boost.

tl;dr Someone tried to be clever with stat fetching when Wonder Room was introduced back in Gen 5 and this behaviour is still being used today.
 
Trying to figure out how not-joke-tier Cramorant-Gorging is in Gen 8 Pure Hackmons since apparently Neutralizing Gas cannot suppress Gulp Missile (all questions assume the Cramorant in question has Gulp Missile as its ability):
  • Can a hacked-in pre-fight Cramorant-Gorging be switched in as Cramorant-Gorging mid-battle, or must it be your lead?
  • If Cramorant is switched out while not Gulping/Gorging, and Cramorant was hacked in as Cramorant-Gorging before entering the fight, does Cramorant get switched in as Cramorant-Gorging or just Cramorant? What about if Cramorant was switched out while Gulping/Gorging - is it switched in as Gulping/Gorging, or does it always get switched in as normal or Gorging?
  • Does Gulp Missile's damage and effect hit or bypass opposing Substitutes?
  • Does the Gulp Missile damage activate if the opponent hits Cramorant's Substitute?
 

Theia

I danced for you for the last time
is a Tournament Directoris a Site Content Manageris a Social Media Contributoris a Member of Senior Staffis a Community Contributoris a Top Contributoris a Top Smogon Media Contributoris a Top Dedicated Tournament Hostis a Battle Simulator Admin Alumnus
User Safety Lead
Can a hacked-in pre-fight Cramorant-Gorging be switched in as Cramorant-Gorging mid-battle, or must it be your lead?
Can be switched in mid-battle:
If Cramorant is switched out while not Gulping/Gorging, and Cramorant was hacked in as Cramorant-Gorging before entering the fight, does Cramorant get switched in as Cramorant-Gorging or just Cramorant? What about if Cramorant was switched out while Gulping/Gorging - is it switched in as Gulping/Gorging, or does it always get switched in as normal or Gorging?
Switched out while not gulping -> switches back in gulping: Switched out while gulping -> switched back in as gulping:
Does the Gulp Missile damage activate if the opponent hits Cramorant's Substitute?
If it's a move that breaks Substitute, Gulp Missile will not activate: If it's the move doesn't break Substitue, Gulp Missile will not activate:
Does Gulp Missile's damage and effect hit or bypass opposing Substitutes?
Gulp Missile bypasses Substitute:
 
Last edited:
Some of my transfered pokemon had some of their moves randomly changed while they where in a box

my Abomasnow suddenly got Giga Drain replaced with Sheer Cold, my Flygon had Earthquake repalced with Uproar, my Durant had Iron Head replaced with Guillotine, my Frosslas had Ice Beam replaced with Aurora Veil and my Glalie had Crunch replaced with Headbutt

this pokemon where all transfered months ago and had their correct moves when transfered, is only in the last month that their moveset where randomly changed
none of them are at level 100 and all of them originate from ORAS
all of my other ORAS pokemon are unchanged
 
Last edited:
How does Mirror Armor interact with Memento? Does it lower the user's stats? Does it reflect the stat drops if there's a foe in Doubles?
The user's stats get lowered before fainting, and Eject Pack and White Herb do not activate. I don't think Mirror Armor can reflect debuffs onto an uninvolved mon.
https://streamable.com/pdmgh8

In Showdown, Mirror Armor currently just shows blank messages when activating in this scenario. https://replay.pokemonshowdown.com/gen8ou-1265769264
 

Champion Leon

Banned deucer.
]
Can you confirm if Triage heals before Cramorant’s Gorging damage triggers, similar to Life Orb recoil, or Rocky Helmet?

I would assume so, but just wanted to see how the healing works.
 

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
]
Can you confirm if Triage heals before Cramorant’s Gorging damage triggers, similar to Life Orb recoil, or Rocky Helmet?

I would assume so, but just wanted to see how the healing works.
All Triage does is boost the priority of healing moves; it doesn't change how healing would interact with Life Orb / Rocky Helmet / Gulp Missile (and necessarily couldn't interact with recoil).
 

Theia

I danced for you for the last time
is a Tournament Directoris a Site Content Manageris a Social Media Contributoris a Member of Senior Staffis a Community Contributoris a Top Contributoris a Top Smogon Media Contributoris a Top Dedicated Tournament Hostis a Battle Simulator Admin Alumnus
User Safety Lead
What would be interesting to compare is the on-cart effect of Mirror Armor Explosion vs. Cotton Down.
RIP Corviknight 2021-2021

Cotton Down doesn't affect Corviknight since it faints before the ability activates, but it does affect the opponents. What was cool to me (though probably already known here, I just thought it was neat) was Delibird's speed dropping before it fainted.
 

Champion Leon

Banned deucer.
All Triage does is boost the priority of healing moves; it doesn't change how healing would interact with Life Orb / Rocky Helmet / Gulp Missile (and necessarily couldn't interact with recoil).
Thank you for your reply.
I made an error, I meant to say draining damaging moves like Drain Punch being used vs Cramorant-Gorging / Gulping.

Does the attack heal before the Gulp Missile triggers? I just want to know the order of events in a turn.

I.e. Life Orb wielding Drain Punch user attacking a Rocky Helmet Gulp Missile user.
 
Cotton Down doesn't affect Corviknight since it faints before the ability activates, but it does affect the opponents.
Thanks, I expected something like this, because Explosion faints the user before even its ally (if its ally would faint).
What was cool to me (though probably already known here, I just thought it was neat) was Delibird's speed dropping before it fainted.
That's probably because the game was still processing the effect on Eldegoss (being your ally, it gets processed before your foes) so it hadn't realised yet that Delibird had fainted.
 

Theia

I danced for you for the last time
is a Tournament Directoris a Site Content Manageris a Social Media Contributoris a Member of Senior Staffis a Community Contributoris a Top Contributoris a Top Smogon Media Contributoris a Top Dedicated Tournament Hostis a Battle Simulator Admin Alumnus
User Safety Lead

Champion Leon

Banned deucer.
Shiny Cryogonal showed up early so

Drain Punch heals -> Gulp Missile triggers -> Rocky Helmet damage -> Life Orb damage
Thank you so much! I didn’t realize Life Orb would take effect after everything else!

My final test requests:
Do Sitrus Berry and Shell Bell work like Life Orb; where it impacts health at the end of the other effects, or does it cause Healing before Gulp Missle, and / or before Rocky Helmet.

I.e. Shell Bell Drain Punch vs Rocky Helmet Gulp Missle.

1. This is important bc if I have a Sitrus Berry on something that falls below 50% health (like a recoil move) before Gulp Missile would trigger, do I heal before or after Gulp Missle would deal damage.
Then, if I don’t, does it at least heal before Rocky Helmet?

2. Same for Shell Bell, where it turns a move into a draining move, does it heal before Gulp Missile triggers, or does it heal at the end just like Life Orb causes recoil at the end.

3. Does Mold Breaker and Photon Geyser, etc. bypass Gulp Missile?

4. Does Core Enforcer negate its ability effect? I.e. It triggers when hit, but does the Core Enforcer negate it when you use Surf / Dive to try and get it back?
 
Last edited:
The literature (including Smogon's own description) has previously said that Serene Grace and the pledge rainbow (Fire + Water) are not cumulative with each other. However, this isn't quite right, and hasn't been for years. The non-stacking of effects only applies to flinch chances, which have only a single flag to decide whether they should be doubled, and attempting to set that flag more than once has no meaningful effect. Other percentage chances do benefit from both effects at once, making the probabilities 4 times as likely (such as a 100% poison rate for Poison Jab, 40% stat boost chance for Ancient Power, or 80% effect chance divided evenly among the three possible conditions for Tri Attack).
 

Theia

I danced for you for the last time
is a Tournament Directoris a Site Content Manageris a Social Media Contributoris a Member of Senior Staffis a Community Contributoris a Top Contributoris a Top Smogon Media Contributoris a Top Dedicated Tournament Hostis a Battle Simulator Admin Alumnus
User Safety Lead
My final test requests:
I didn't have the means to test your final request since I only have one Switch and you can't target an ally with Core Enforcer, so sorry about that. :psynervous: But Regieleki was putting in some work today otherwise.

I.e. Shell Bell Drain Punch vs Rocky Helmet Gulp Missle.

Drain Punch heals -> Gulp Missile triggers -> Rocky Helmet damage -> Shell Bell heals

This is important bc if I have a Sitrus Berry on something that falls below 50% health (like a recoil move) before Gulp Missile would trigger, do I heal before or after Gulp Missle would deal damage.

Gulp Missile damage happens before recoil damage. You heal whenever you drop below 50% (Above Escavalier healed after Gulp Missile, here: Regieleki heals after Rocky Helmet.)

2. Same for Shell Bell, where it turns a move into a draining move, does it heal before Gulp Missile triggers, or does it heal at the end just like Life Orb causes recoil at the end.

Heals at the end like Life Orb damage.

3. Does Mold Breaker and Photon Geyser, etc. bypass Gulp Missile?
No.

Mold Breaker: Photon Geyser:
Sorry about the last request, hopefully someone better equipped can answer. Hope this helped!
 

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

Top