Research Legends: Arceus Battle Mechanics Research

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
So, I assume TargetActionSpeedMod is an action speed modifier to the target from standard moves, right?
Yep.
What about Priority and Flinch? Do you know what exactly they're used for?
They aren't - those moves just got translated into other effects for this game. Having "priority" and "flinch" data filled in for this game doesn't mean anything because they aren't used. You'll notice Bubble, Bulldoze, and Icy Wind had their Speed drop effects removed because stat drops are used. Priority and flinching have no function so there's no harm in leaving those fields populated, even for new moves like Mountain Gale which currently has a 30% flinch rate.
 

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
Also just to reiterate to everyone: this is not a competitive discussion thread. How good Combee and Lopunny are in an imaginary competitive setting is irrelevant. Thank you!
 
The guy just uploaded turn order mechanism.
Based on this Action Time research video, I listed the minimum Speed stat of every Action Time at Level 100 & Effort Level 10.
QQ图片20220218005543.png

e.g.
Lv.100 neutral nature Darkrai can reach the Action Time of 5 without the need of Timid.
Lv.100 Origin Forme Palkia must have the Timid nature to reach the Action Time of 5.
Interestingly, Hisuian Avalugg has 38 base Speed (original Avalugg has 28) so Lv.100 Jolly Hisuian Avalugg can reach the Action Time of 8. This could be a coincidence though.
Also Mountain Gale has the TargetActionSpeedMod of 3 but the ActionSpeedMod of 5, which just cancels its effect. This move is meant to be an upgraded version of Icicle Crash (same 30% chance of causing flinch as coded, with increased bp).
 
Last edited:
I can read Japanese, but with a very limited vocabulary. (I can look them up on a dictionary tho) And you're right, it's basically:



Other modifiers details:
Type effectiveness = Resistance 0.5x, Weakness 2x or 2.5x (does this mean 0.25x are now 0.5x?)
STAB = 1.25x
Attack Up = 1.5x
Defense Up = ⅔x
Double Hit = 1.5x
Critical Hit = 1.5x

*Boss enemies have 1.5x Attack thanks to Wild Power (I think I might've missed a mechanics term?)
*There's a 0.85-1 RNG adjustment

I'll try to watch the video later to try to see if anything is worth picking up.
Actually the video's subtitle says 0.25x resistance becomes 0.4x in PLA.
And wild Alpha Pokemon have 1.5x Attack, Sp.Attack, Defense, Sp.Defense and Speed due to their "Wild Might" status.
 
Last edited:
The guy just uploaded turn order mechanism.
I haven't seen someone translate it, so here goes. These are the 10 rules outlined.

1) Action time is set by the Pokemon's speed stat according to the table. Turn order is decided on at the start of battle, action speed works as a wait time of sorts, when it hits 0 the turn comes up.
2) If wait time becomes 0 at the same time, the Pokemon with a higher Speed stat will go first. If the Speed stats are tied, then the player side will go first.
Afterward, priority is given to the Pokemon that did not just act.
3) When ambushing, the wait time on the player side will be 0, and the wait time on the enemy side will be 1. After escaping, the wait time on the enemy side will be 0, and wait time on the player side will be 1, if you are to fight the same opponent again. (TL note: I'm unfamiliar with Legends' mechanics and haven't played it so I'm not sure if "surprise attacks" are things the player can do or have happen to them)
4) Moves using Agile Style and moves that target the player side can decrease the wait time on the player side, moves that target the opponent side can increase the wait time on the opponent side
5) Consecutively using Agile Style attacks will reduce the effect.
6) Power Style moves uniformly have an effect of increasing wait time by +4.
7) Paralysis has an identical effect to reducing action time by 1.
8) Action time is +/- 0 for recovery items, and add -3 wait time for buff items.
9) When switching, if there is a difference in action time, the enemy side will act immediately. Otherwise, the enemy wait time is set to (enemy wait time - action time). (TL note: I'm not sure if this is an accurate translation)
10) After a death, the Pokemon sent out inherits the elapsed wait time.

Following that is a detailed explanation in the rules.

Rule 1 is easy enough to understand with the visuals accompanying it, I think. In the example given, Crobat has an action time of 7 while Petili has an action time of 12. Crobat acts at 7, 14, 21, 28, etc, while Petilil acts at 12, 24, 36, etc. Consequently, the turn order goes Crobat (7) - Petilil (12) - Crobat (14) - Crobat (21) - Petilil (24) - Crobat (28) - Crobat (35) - Petilil (36).

Rule 2 is also fairly easy enough to understand. In the example given, the opponent Crobat and player H-Lilligant have the same action time. If Crobat has 250 Speed and H-Lilligant has 245 Speed, Crobat will act first. But if H-Lilligant also has 250 Speed, it will act first instead, because it's the player side. However, this can be dangerous if the opponent uses an Agile Style attack and the player does not, as their wait time will be lowered enough to get two consecutive actions. In the video example showing this, the Golbat and Mothim had identical speeds, so the player's Golbat went first, but the Mothim's Air Slash allowed it to act twice in a row, leaving the player no response.

Rule 3's explanation shows that if you initiate an ambush (is that right?), no matter the difference in Speed you will get the first turn. However, it's still possible for the opponent to get consecutive turns even with the same action time. In the example given, Crobat and H-Lilligant have the same action time, but if Crobat uses two Agile Style attacks, then it goes H-Lilligant (0), Crobat (1), H-Lilligant (7), Crobat (7), Crobat (13). The opposite is true if you flee an opponent and refight them, so you could use this to your advantage against Alpha Pokemon.

I got kinda burned out translating at this point, but for the final rule 10 regarding KOs, the example involves a Mothim with an action time of 10. In the first example, Roselia has an action time of 10, and Petilil has an action time of 11. In this case, after Roselia is KO'd by Mothim, Petilil inherits the action time of 10, and gets to act at 21. Mothim gets to act at 20, so it goes first again. However, if Roselia's action time is 9 instead of 10, then Petilil inherits the 9 and acts at 20, getting a turn that it otherwise would not get.

There's a lot more to it than I translated but I think people can generally get the gist of it. Well, it's something like that anyway, I'm not certain I grasped the explanation precisely.

I also found a list of moves by action time, but I'm not sure it's fully accurate. Here it is anyway.

+4: Quick Attack, Mach Punch, Bullet Punch, Ice Shard, Shadow Sneak, Aqua Jet, Wave Crash, Baby-Doll Eyes
+3: Extrasensory, Fire Fang, Thunder Fang, Ice Fang, Twister, Zen Headbutt, Bite, Rock Slide, Astonish, Air Slash, Iron Head, Icicle Crash, Icy Wind, Bulldoze
+2: Swords Dance, Nasty Plot, Double Hit, Focus Energy, Shelter, Acid Armor, Iron Defense
+1: Bulk Up, Calm Mind, Victory Dance
+/- 0: Everything else
-1: Phantom Force, Mountain Gale
-2: Hyper Beam, Giga Impact, Roar of Time, Dark Void, Chloroblast

But I'm not sure about this because I thought Extreme Speed has improved action time.
 
I haven't seen someone translate it, so here goes. These are the 10 rules outlined.

1) Action time is set by the Pokemon's speed stat according to the table. Turn order is decided on at the start of battle, action speed works as a wait time of sorts, when it hits 0 the turn comes up.
2) If wait time becomes 0 at the same time, the Pokemon with a higher Speed stat will go first. If the Speed stats are tied, then the player side will go first.
Afterward, priority is given to the Pokemon that did not just act.
3) When ambushing, the wait time on the player side will be 0, and the wait time on the enemy side will be 1. After escaping, the wait time on the enemy side will be 0, and wait time on the player side will be 1, if you are to fight the same opponent again. (TL note: I'm unfamiliar with Legends' mechanics and haven't played it so I'm not sure if "surprise attacks" are things the player can do or have happen to them)
4) Moves using Agile Style and moves that target the player side can decrease the wait time on the player side, moves that target the opponent side can increase the wait time on the opponent side
5) Consecutively using Agile Style attacks will reduce the effect.
6) Power Style moves uniformly have an effect of increasing wait time by +4.
7) Paralysis has an identical effect to reducing action time by 1.
8) Action time is +/- 0 for recovery items, and add -3 wait time for buff items.
9) When switching, if there is a difference in action time, the enemy side will act immediately. Otherwise, the enemy wait time is set to (enemy wait time - action time). (TL note: I'm not sure if this is an accurate translation)
10) After a death, the Pokemon sent out inherits the elapsed wait time.

Following that is a detailed explanation in the rules.

Rule 1 is easy enough to understand with the visuals accompanying it, I think. In the example given, Crobat has an action time of 7 while Petili has an action time of 12. Crobat acts at 7, 14, 21, 28, etc, while Petilil acts at 12, 24, 36, etc. Consequently, the turn order goes Crobat (7) - Petilil (12) - Crobat (14) - Crobat (21) - Petilil (24) - Crobat (28) - Crobat (35) - Petilil (36).

Rule 2 is also fairly easy enough to understand. In the example given, the opponent Crobat and player H-Lilligant have the same action time. If Crobat has 250 Speed and H-Lilligant has 245 Speed, Crobat will act first. But if H-Lilligant also has 250 Speed, it will act first instead, because it's the player side. However, this can be dangerous if the opponent uses an Agile Style attack and the player does not, as their wait time will be lowered enough to get two consecutive actions. In the video example showing this, the Golbat and Mothim had identical speeds, so the player's Golbat went first, but the Mothim's Air Slash allowed it to act twice in a row, leaving the player no response.

Rule 3's explanation shows that if you initiate an ambush (is that right?), no matter the difference in Speed you will get the first turn. However, it's still possible for the opponent to get consecutive turns even with the same action time. In the example given, Crobat and H-Lilligant have the same action time, but if Crobat uses two Agile Style attacks, then it goes H-Lilligant (0), Crobat (1), H-Lilligant (7), Crobat (7), Crobat (13). The opposite is true if you flee an opponent and refight them, so you could use this to your advantage against Alpha Pokemon.

I got kinda burned out translating at this point, but for the final rule 10 regarding KOs, the example involves a Mothim with an action time of 10. In the first example, Roselia has an action time of 10, and Petilil has an action time of 11. In this case, after Roselia is KO'd by Mothim, Petilil inherits the action time of 10, and gets to act at 21. Mothim gets to act at 20, so it goes first again. However, if Roselia's action time is 9 instead of 10, then Petilil inherits the 9 and acts at 20, getting a turn that it otherwise would not get.

There's a lot more to it than I translated but I think people can generally get the gist of it. Well, it's something like that anyway, I'm not certain I grasped the explanation precisely.

I also found a list of moves by action time, but I'm not sure it's fully accurate. Here it is anyway.

+4: Quick Attack, Mach Punch, Bullet Punch, Ice Shard, Shadow Sneak, Aqua Jet, Wave Crash, Baby-Doll Eyes
+3: Extrasensory, Fire Fang, Thunder Fang, Ice Fang, Twister, Zen Headbutt, Bite, Rock Slide, Astonish, Air Slash, Iron Head, Icicle Crash, Icy Wind, Bulldoze
+2: Swords Dance, Nasty Plot, Double Hit, Focus Energy, Shelter, Acid Armor, Iron Defense
+1: Bulk Up, Calm Mind, Victory Dance
+/- 0: Everything else
-1: Phantom Force, Mountain Gale
-2: Hyper Beam, Giga Impact, Roar of Time, Dark Void, Chloroblast

But I'm not sure about this because I thought Extreme Speed has improved action time.
Doesn't this conflict with the previously datamined information that Agile moves appear to impose a penalty on the target's action speed instead of a boost to the user's?
 
The explanation of the rules doesn't say it, but when showing the graph on player turns, Agile Style is depicted as a penalty to the opposing side's action time, yeah. It's a bit of a confusing explanation, like I can't quite tell if buff items are supposed to delay or increase the player's action time. It might be easier to understand if I had a better grasp of Japanese, that took me several hours to translate due to many unfamiliar kanji.

So the more accurate way to explain is something like, in example 2, Agile Style would go 1, 8, 15 for Crobat, and 0, 8, 16 for H-Lilligant. I think it doesn't actually make a difference except for multi-battles though.
 
I also found a list of moves by action time, but I'm not sure it's fully accurate. Here it is anyway.

+4: Quick Attack, Mach Punch, Bullet Punch, Ice Shard, Shadow Sneak, Aqua Jet, Wave Crash, Baby-Doll Eyes
+3: Extrasensory, Fire Fang, Thunder Fang, Ice Fang, Twister, Zen Headbutt, Bite, Rock Slide, Astonish, Air Slash, Iron Head, Icicle Crash, Icy Wind, Bulldoze
+2: Swords Dance, Nasty Plot, Double Hit, Focus Energy, Shelter, Acid Armor, Iron Defense
+1: Bulk Up, Calm Mind, Victory Dance
+/- 0: Everything else
-1: Phantom Force, Mountain Gale
-2: Hyper Beam, Giga Impact, Roar of Time, Dark Void, Chloroblast

But I'm not sure about this because I thought Extreme Speed has improved action time.
So Wave Crash is definitely meant to be a priority move then, since it's with the priority moves rather than the moves that normally Flinch or lower Speed.
 
Yep.


They aren't - those moves just got translated into other effects for this game. Having "priority" and "flinch" data filled in for this game doesn't mean anything because they aren't used. You'll notice Bubble, Bulldoze, and Icy Wind had their Speed drop effects removed because stat drops are used. Priority and flinching have no function so there's no harm in leaving those fields populated, even for new moves like Mountain Gale which currently has a 30% flinch rate.
Oh right, what about Strong style moves? Do they give no action speed modifier to the target or do they follow standard?
 

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
So I've got a handful of values from the game here, seemingly taken out of thin air or something, but I expect everyone knows how to read between the lines. I annotated them with which effects I think they represent, and added them to the OP along with their descriptions. Relevant rounding for these multipliers will have to be determined by empirical testing!
C++:
133   strong sunlight Grass Speed
133   snow Ice Speed
75    rain Fire damage
6     poison damage
12    burn damage
50    burn physical damage drop
12    frostbite damage
50    frostbite special damage drop
33    paralysis chance
50    paralysis Speed drop
33    drowsy chance
133   drowsy damage mod
150   fixated offensive damage mod
133   fixated defensive damage mod
33    evasiveness mod
1.5   offensive +1 damage mod
0.66  offensive -1 damage mod
0.66  defensive +1 damage mod
1.5   defensive -1 damage mod
 
How do the Speed modifiers from paralysis and strong sunlight / snow affect action time? Just the action time tier based on the modified speed stat?
 
Based on this Action Time research video, I listed the minimum Speed stat of every Action Time at Level 100 & Effort Level 10.
View attachment 407384
e.g.
Lv.100 neutral nature Darkrai can reach the Action Time of 5 without the need of Timid.
Lv.100 Origin Forme Palkia must have the Timid nature to reach the Action Time of 5.
Interestingly, Hisuian Avalugg has 38 base Speed (original Avalugg has 28) so Lv.100 Jolly Hisuian Avalugg can reach the Action Time of 8. This could be a coincidence though.
Also Mountain Gale has the TargetActionSpeedMod of 3 but the ActionSpeedMod of 5, which just cancels its effect. This move is meant to be an upgraded version of Icicle Crash (same 30% chance of causing flinch as coded, with increased bp).
So, I decided to compile a list of Pokemon-Damaging Move combinations with Action Speed of 1, this is only achievable with a Pokemon with 120+ Speed using a Move with -4 User Action Speed Mod (all such moves have the same User Action Speed Mod for both Standard and Agile Style).

Assumptions:
  • Level 100 Pokemon.
  • All Effort Level 10.
  • The power formula is:

    This is the damage formula before taking into account the defender's stat and other modifiers. The Base Power used is from Standard Style.

The list:
Note: + is beneficial nature, 0 is neutral nature, - is hindering nature. All moves in this list are physical.

Sorted by power:
PokemonMoveNature AttackNature SpeedPower
WeavileIce Shard
+​
0​
100700​
WeavileIce Shard
0​
+ or 0​
99500​
Arceus (Normal)Quick Attack
0​
+​
99500​
WeavileIce Shard
-​
+ or 0​
98300​
Arceus (Normal)Quick Attack
-​
+​
98300​
WeavileQuick Attack
+​
0​
80560​
SneaslerQuick Attack
0​
+​
80560​
WeavileQuick Attack
0​
+ or 0​
79600​
Arceus (non-Normal)Quick Attack
0​
+​
79600​
SneaslerQuick Attack
-​
+​
79520​
Shaymin (Sky)Quick Attack
+​
0​
78680​
WeavileQuick Attack
-​
+ or 0​
78640​
Arceus (non-Normal)Quick Attack
-​
+​
78640​
Shaymin (Sky)Quick Attack
0​
+ or 0​
77880​
DarkraiShadow Sneak
+​
0​
77320​
Shaymin (Sky)Quick Attack
-​
+ or 0​
77040​
DarkraiShadow Sneak
0​
+ or 0​
76600​
DarkraiShadow Sneak
-​
+ or 0​
75880​
JolteonQuick Attack
+​
0​
74560​
JolteonQuick Attack
0​
+ or 0​
74040​
JolteonQuick Attack
-​
+ or 0​
73520​

As noted by this video, you can use these combinations to create a "It's always my turn" situation (it's a Japanese YGO meme from the famous Berserker Soul scene) where you keep using the move, except when you don't get consecutive turns, in which case you use Agile style of the move, and restore your PP with Hopo Berry. I think this is also possible with Pokemon that have 6 or 7 Action Speed, but you'll have to restore your PP more often.
 
Last edited:
Since stat boosts stages are no longer a thing, do Critical Hits bypass Guard Boosts, Wild Might, etc?
 
Does anyone know what the actual numbers are for the snow buffs to drowsy and frostbite? I can't find them anywhere
 
Okay, after doing over 100 tests, it appears very clearly that drowsiness stops you from acting 2/3 of the time while it is snowing. So my results for frostbite were very odd. I got 40% frostbite chance on Ice Beam (normally 20%) but 70% chance of frostbite on Ice Punch. That could mean 1 of three things. Either Ice Punch actually has a 35% chance of causing frostbite, I got lucky on Ice Punch, or I got particularly unlucky on Ice Beam. The first two would mean a 2x modifier on frostbite in snow, whereas the latter would imply a 2.5x modifier. Or there could just be some other hidden mechanic I'm not aware of.
 
Last edited:
Okay, after doing over 100 tests, it appears very clearly that drowsiness stops you from acting 2/3 of the time while it is snowing. So my results for frostbite were very odd. I got 40% frostbite chance on Ice Beam (normally 20%) but 70% chance of frostbite on Ice Punch. That could mean 1 of three things. Either Ice Punch actually has a 35% chance of causing frostbite, I got lucky on Ice Punch, or I got particularly unlucky on Ice Beam. The first two would mean a 2x modifier on frostbite in snow, whereas the latter would imply a 2.5x modifier. Or there could just be some other hidden mechanic I'm not aware of.
According to Serebii.net, Ice Punch has 30% chance not 20%
 
I tried to figure out what formula is used in a simple example: Snorlax level 70 Double vs Blissey 44 Def. In the game, I got these rolls: [305,309,312,316,320,324,327,330,334,337,341,345,349,352,356,360] but the classic formula predicts (rounding in th end): [306, 309, 313, 316, 320, 324, 327, 331, 334, 338, 342, 345, 349, 352, 356, 360]. Has anyone figured out how the game rounds?
 

Anubis

HONK
is a Community Contributoris a Top Researcheris a Battle Simulator Admin Alumnusis a Community Leader Alumnusis a Smogon Discord Contributor Alumnus
I tried to figure out what formula is used in a simple example: Snorlax level 70 Double vs Blissey 44 Def. In the game, I got these rolls: [305,309,312,316,320,324,327,330,334,337,341,345,349,352,356,360] but the classic formula predicts (rounding in th end): [306, 309, 313, 316, 320, 324, 327, 331, 334, 338, 342, 345, 349, 352, 356, 360]. Has anyone figured out how the game rounds?
Do you have Snorlax's attack stat? And I assume the move is Double Edge?

I know how the game rounds but I want to test with some sample data first; your parameters are incomplete so I can't plug them into the formula.
 
Do you have Snorlax's attack stat? And I assume the move is Double Edge?

I know how the game rounds but I want to test with some sample data first; your parameters are incomplete so I can't plug them into the formula.
Sorry for the oversights, it's the Snorlax from path of solitude so it should have 204 Atk stat. And yes the move is double-edge.
 

Anubis

HONK
is a Community Contributoris a Top Researcheris a Battle Simulator Admin Alumnusis a Community Leader Alumnusis a Smogon Discord Contributor Alumnus
I was reverse engineering the damage formula and all the modifiers to verify exact sequence of calculations and ran into an unknown modifier that's immediately applied after the initial damage is calculated and adjustments are made for attack/defense boosts. It's passed into the function, while the other modifiers are read from a flatbuffer or hardcoded.


1659227863822.png


Unfortunately, I haven't been able to figure out what it is. Every time I observe it, it's 4096/4096. Tracing it backwards through the calls isn't very enlightening either.

Here's all that I've tried:
- It's not anything in this post; everything is already accounted for.
- It's not STAB, critical hit, or the 85-100% spreads; that's all accounted for later.
- It's not primed; that's accounted for later.
- I started a new game and played through all the way to all the Volo battles, then capturing Giratina.
- I tried fighting alphas as a low star rank player.
- I tried losing against the Lords and rematching the Lords.
- I tried battling in Distortions.
- I tried the Eternal Battle Reverie (including battle 50 vs Arceus, and battle 900 in case it was a high-streak).
- I tried the Path of Solitude.
- EDIT: Also tried on 3 different shinies, random wilds and Mass Outbreaks.

EDIT: Slow Start is a modifier to Attack, and the Mights modify all stats. These do not modify the damage directly.

Would anyone happen to have any more ideas for where this modifier could come into play?
 
Last edited:
I was reverse engineering the damage formula and all the modifiers to verify exact sequence of calculations and ran into an unknown modifier that's immediately applied after the initial damage is calculated and adjustments are made for attack/defense boosts. It's passed into the function, while the other modifiers are read from a flatbuffer or hardcoded.


View attachment 443464

Unfortunately, I haven't been able to figure out what it is. Every time I observe it, it's 4096/4096. Tracing it backwards through the calls isn't very enlightening either.

Here's all that I've tried:
- It's not anything in this post; everything is already accounted for.
- It's not STAB, critical hit, or the 85-100% spreads; that's all accounted for later.
- It's not primed; that's accounted for later.
- I started a new game and played through all the way to all the Volo battles, then capturing Giratina.
- I tried fighting alphas as a low star rank player.
- I tried losing against the Lords and rematching the Lords.
- I tried battling in Distortions.
- I tried the Eternal Battle Reverie (including battle 50 vs Arceus, and battle 900 in case it was a high-streak).
- I tried the Path of Solitude.

Would anyone happen to have any more ideas for where this modifier could come into play?
so If you actually experimented with the unknown value being less than 4096 what exactly are the damage values like with this in play. I'm not to ofamiliar with some of the commands here in this language, so the >> 12s are throwing me off, and it seems like the unknown mod could roll extremely high. And the things the if statements are checking just seems weird (why does it add the 1 for anything higher than 2048...?).
Could it just be weird error handling for edge cases that might never come up in regular gameplay?



Beyond that honestly the only thing that comes to mind is shiny Pokemon. Which is entirely on the back of "4096", something I'm sure comes up a lot because multiples of 2, and probably makes absolutely no sense to account for in a damage formula. But, hey, maybe something to at least look at, I guess?
 

Anubis

HONK
is a Community Contributoris a Top Researcheris a Battle Simulator Admin Alumnusis a Community Leader Alumnusis a Smogon Discord Contributor Alumnus
so If you actually experimented with the unknown value being less than 4096 what exactly are the damage values like with this in play. I'm not to ofamiliar with some of the commands here in this language, so the >> 12s are throwing me off, and it seems like the unknown mod could roll extremely high. And the things the if statements are checking just seems weird (why does it add the 1 for anything higher than 2048...?).
Could it just be weird error handling for edge cases that might never come up in regular gameplay?



Beyond that honestly the only thing that comes to mind is shiny Pokemon. Which is entirely on the back of "4096", something I'm sure comes up a lot because multiples of 2, and probably makes absolutely no sense to account for in a damage formula. But, hey, maybe something to at least look at, I guess?
This is pseudocode, i.e. what the program generates to represent the assembly language. Essentially it's applying some modifier that's a multiple of 4096 and then bitshifting to remove the 4096. Often it looks very strange because there are compiler optimizations. This isn't what anyone wrote as real code.

https://www.techopedia.com/definition/26846/bit-shifting
https://www.techopedia.com/definition/3467/bitwise-operator

Just think of it as approximately unknown_mod * damage / 4096.

I do not know what it could be because I have literally never observed it be anything but 4096 through an entire playthrough and more.

Already tested on shinies, including random wilds and Mass Outbreaks, didn't affect anything.

EDIT: Here, if you want to see how this code would work. Yes, it does work, and it is not "edge case error handling."

1659239279870.png
1659239297233.png
 
Last edited:
This is pseudocode, i.e. what the program generates to represent the assembly language. Essentially it's applying some modifier that's a multiple of 4096 and then bitshifting to remove the 4096. Often it looks very strange because there are compiler optimizations. This isn't what anyone wrote as real code.

https://www.techopedia.com/definition/26846/bit-shifting
https://www.techopedia.com/definition/3467/bitwise-operator

Just think of it as approximately unknown_mod * damage / 4096.
ah, i see. shoudl have figured
I do not know what it could be because I have literally never observed it be anything but 4096 through an entire playthrough and more.

Already tested on shinies, including random wilds and Mass Outbreaks, didn't affect anything.

EDIT: Here, if you want to see how this code would work:

View attachment 443476View attachment 443477
Hmm, I'm guessing the answer is yes but just to make sure, have you already accounted for something like level differential? Like attacking into someone at a much higher and much lower level?

And, likewise, I assume this has nothing to do with the out of combat stuff? Like hitting Pokemon with various items, or having Pokemon hit rocks (like maybe there's an internal "damage" value it rolls to actually break it, like how Fire Emblem has to give walls stats so you can break them rather than just being objects you can itneract with) or, I dunno, throwing balms at the lords (i'd assume this is just set damage but...).



Honestly the more I type out the more I think it is just weird debug stuff. Like the modifier changing during gameplay was important enough to track if it happened while testing, and sending it through the battle formula was how to catch it, but they just left it in after they were done. Or something to that effect.
 

Anubis

HONK
is a Community Contributoris a Top Researcheris a Battle Simulator Admin Alumnusis a Community Leader Alumnusis a Smogon Discord Contributor Alumnus
Hmm, I'm guessing the answer is yes but just to make sure, have you already accounted for something like level differential? Like attacking into someone at a much higher and much lower level?
Yes, that is what I meant by using a new file to attack alphas. And I ran around abundantly on an endgame save and never saw anything different.

Like hitting Pokemon with various items, or having Pokemon hit rocks (like maybe there's an internal "damage" value it rolls to actually break it
Yes, this is covered in "did an entire playthrough from start to Volo."

Honestly the more I type out the more I think it is just weird debug stuff.
This is untestable. I'm looking for something that can be tested because it's easy to say it could be any number of untestable things.
 

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

Top