Gen 2 PS Development - Post bugs here

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
According to the description of the item on pokemon showdown and bulbapedia, Lucky Punch is supposed to increase Chansey's critical hit rate to 25%. After getting suspicious due to a very small number of critical hits in a game I spectated I tested with a friend to get a larger sample size. Out of 480 Water Guns, only 31 of them were critical hits which is what you would expect if Chansey didn't hold any item (~6,4583%). Here is the replay.
I obviously have no proof that we both used Lucky Punch as items but you can try it out yourself and see.
So what happened here is I implemented Gen 2 crits properly in 2015 and then a year later someone broke the items. Good catch, thanks, will be fixed next update!
 

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

FriendOfMrGolem120

aka. FOMG
is a Forum Moderatoris a Community Contributoris a Contributor to Smogonis a Social Media Contributor Alumnusis a Battle Simulator Moderator Alumnusis a Two-Time Past SPL Champion
Moderator
PS seems to prevent the Marowak glitch from occuring by capping the regular attack stat at 254 if it has the move Swords Dance which would also still be one point below of what it could have without activating the glitch.
Is this intentional? If so, it at least should be set to 255.
Besides that, I think changing something about a pokemon a player wanted to bring without notification should not be done. I'd rather have some kind of warning when validating the team.
Maro3.PNG
Maro1.PNG
Shoutouts to Avtomat for noticing this.
 

FriendOfMrGolem120

aka. FOMG
is a Forum Moderatoris a Community Contributoris a Contributor to Smogonis a Social Media Contributor Alumnusis a Battle Simulator Moderator Alumnusis a Two-Time Past SPL Champion
Moderator
Sorry for the double post but I got some new information.
Socks&Crocks found the relevant part in the PS code:
Code:
if (set.ivs && toId(set.item) === 'thickclub' && set.species === 'Marowak' && hasSD) {
                set.ivs.atk = 26;
            }
The attack DV now always gets set to 13 if Marowak holds Thick Club and has the move Swords Dance even if it is female which should prevent it from having 13 DVs in attack. Additionally, Marowak's DV still get set to 13 if it has a Hidden Power that sets the attacking DV to a different value (I tested with HpFlying which sets it to 12).
The above facts would now theoretically allow Marowak to run sets it usually could not pull off effectively (female Marowak with 254 attack and Attract to cheese mons like Skarmory).
MaroFlying.PNG
FemaleMaro.PNG
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Sorry for the double post but I got some new information.
Socks&Crocks found the relevant part in the PS code:
Code:
if (set.ivs && toId(set.item) === 'thickclub' && set.species === 'Marowak' && hasSD) {
                set.ivs.atk = 26;
            }
The attack DV now always gets set to 13 if Marowak holds Thick Club and has the move Swords Dance even if it is female which should prevent it from having 13 DVs in attack. Additionally, Marowak's DV still get set to 13 if it has a Hidden Power that sets the attacking DV to a different value (I tested with HpFlying which sets it to 12).
The above facts would now theoretically allow Marowak to run sets it usually could not pull off effectively (female Marowak with 254 attack and Attract to cheese mons like Skarmory).
Yeah, this is because we don't have a good way to implement this in the old teambuilder. The new one will be better about it.
 
SD + BSlam should be legal on Marowak, but currently it isn't. SD is a breeding move recieved in Crystal and BSlam a TM in RBY, thus trading it back to RBY and teaching it BSlam makes it get both moves.
Apparently this got fixed the way I put it down, but it's still not properly implemented. The following moveset should be legal:
Marowak @ Thick Club
- Swords Dance
- Body Slam
- Rock Slide
- Earthquake

but according to the team validator it is illegal, when it shouldn't be.
It learns Swords Dance and Rock Slide via breeding in GSC (Charizard passes it down).
Then you should just trade it back as I mentioned above to recieve Body Slam.

Thanks to FriendOfMrGolem120 for having told me about this and Salty3345 having found it.
 
PS seems to prevent the Marowak glitch from occuring by capping the regular attack stat at 254 if it has the move Swords Dance which would also still be one point below of what it could have without activating the glitch.
Is this intentional? If so, it at least should be set to 255.
Besides that, I think changing something about a pokemon a player wanted to bring without notification should not be done. I'd rather have some kind of warning when validating the team.
Shoutouts to Avtomat for noticing this.
Sorry for the double post but I got some new information.
Socks&Crocks found the relevant part in the PS code:
Code:
if (set.ivs && toId(set.item) === 'thickclub' && set.species === 'Marowak' && hasSD) {
                set.ivs.atk = 26;
            }
The attack DV now always gets set to 13 if Marowak holds Thick Club and has the move Swords Dance even if it is female which should prevent it from having 13 DVs in attack. Additionally, Marowak's DV still get set to 13 if it has a Hidden Power that sets the attacking DV to a different value (I tested with HpFlying which sets it to 12).
The above facts would now theoretically allow Marowak to run sets it usually could not pull off effectively (female Marowak with 254 attack and Attract to cheese mons like Skarmory).
Apparently this got fixed the way I put it down, but it's still not properly implemented. The following moveset should be legal:
Marowak @ Thick Club
- Swords Dance
- Body Slam
- Rock Slide
- Earthquake

but according to the team validator it is illegal, when it shouldn't be.
It learns Swords Dance and Rock Slide via breeding in GSC (Charizard passes it down).
Then you should just trade it back as I mentioned above to recieve Body Slam.

Thanks to FriendOfMrGolem120 for having told me about this and Salty3345 having found it.
So I just tested this again with FOMG. Issues with DVs seem to be working now, as all attack stat variations that don't roll over are now usable for Marowak.

However, the illegal moveset issue has not been fixed. Just in case the devs thought they were done with Gen 2 Marowak. :)
 

FriendOfMrGolem120

aka. FOMG
is a Forum Moderatoris a Community Contributoris a Contributor to Smogonis a Social Media Contributor Alumnusis a Battle Simulator Moderator Alumnusis a Two-Time Past SPL Champion
Moderator
In GSC pokemon are unable to boost their stat any further after the 999 cap is reached. In an emulator link battle I used Defense Curl with Shuckle 6 times (from the third time onwards a "won't rise anymore" message got displayed. Then I used Screech three times and attacked to confirm that Shuckle ended up being at -4 defense boosts as this calculation indicates: Dugtrio Earthquake vs. -4 Shuckle: 150-177 (61.7 - 72.8%) -- guaranteed 2HKO after Leftovers recovery
On Pokemon Showdown you are currently able to boost to +6 even though the 999 cap was reached earlier which leads to the Shuckle that is supposed to be at -4 being at +0 boosts. Replay (incorrect)

This actually matters a lot since Shuckle currently could be used as a wall for Snorlax but there are of course also many other examples.
Snorlax Double-Edge vs. Shuckle on a critical hit: 74-87 (30.4 - 35.8%) -- guaranteed 4HKO after Leftovers recovery (both at +6 / incorrect)
+6 Snorlax Double-Edge vs. +2 Shuckle on a critical hit: 128-151 (52.6 - 62.1%) -- 99.7% chance to 2HKO after Leftovers recovery (Snorlax at +5 and Shuckle at +2 / correct)
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
maybe someone should update the post with a list of existing bugs? reported this almost two years ago :(
I'm not aware of any existing bug other than the one FOMG posted today. If someone wants to give me a list, though, I can update the OP with it.
 
I don't think there's any currently, but if there are any in the future I think it'd be a good idea so they aren't forgotten and so devs don't have to trawl through forum posts to find reports.
 

FriendOfMrGolem120

aka. FOMG
is a Forum Moderatoris a Community Contributoris a Contributor to Smogonis a Social Media Contributor Alumnusis a Battle Simulator Moderator Alumnusis a Two-Time Past SPL Champion
Moderator
This posted in the RBY thread also affects GSC since the pokemon could be traded to it. (not relevant though for official tiers) Zarel
Basically some mons can be caught underleveled and used below the level they would normally evolve at.
 
Perhaps this could expedite the situation with stat boosts, but there are extremely relevant things beyond Shuckle.

+6 Leftovers Snorlax critical hit Double-Edge vs. +6 Leftovers Steelix: 82 - 97 (23.2 - 27.5%) -- 72.4% chance to 5HKO after Leftovers
+5 Leftovers Snorlax critical hit Double-Edge vs. +3 Leftovers Steelix: 128 - 151 (36.3 - 42.8%) -- 96.9% chance to 3HKO after Leftovers
 

Jorgen

World's Strongest Fairy
is a Forum Moderator Alumnusis a Community Contributor Alumnusis a Contributor Alumnusis a Past SPL Champion
Is it that the stat cap isn't implemented or that the stat stage is currently allowed to exceed the point at which the stat cap is reached?

If the former is the bug, that's huge. But I feel like that's not the case, because the damage calculator is capping things properly: Rhydon at +5 and +6 is reported to do just as much as a Rhydon at +4, which is correct.

If the latter is the bug, then that's less of a big deal for Curse matchups & such. That said, I'm pretty sure I've won a couple matches on ladder with BP teams that I perhaps shouldn't have: namely, with Belly Drum Snorlax reaching a true +6 stat level (instead of its capped level of +5), Charm Umbreon only brings me to +4 (954 Attack) rather than +3 (795).

EDIT: I see, lo siento. I was confused by the damage calcs at +impossible, but I had skimmed over the fact that they were crits, where the stat levels do very much matter, even if the stats themselves don't change.
 
Last edited:

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Jorgen Yes, it's the latter. FOMG and sulcata are complaining about Screech Snorlax vs +6 Shuckle/Steelix.
 
So besides for the 999 cap, there's another mechanic that interacts with it.

The game tries to prevent you from further boosting your stat once you are at +6 OR at a 999 boosted stat (only accounting for stat boosts, not other modifiers). So Curse Snorlax's final cursed up stats become +5/+6/-6, not +6/+6/-6, because its attack becomes 999 at +5. Steelix becomes +6/+3/-6.

The exception to this is Belly Drum (and I believe Swords Dance too), because Belly Drum boosts two at a time before deciding whether or not to continue. This means that an even number of boosts on Snorlax takes it to +6, while an odd number takes it to +5. If Snorlax started on an odd number and you lowered its attack stat so that +5 is not >= 999 attack, it should still go to +6. I believe this is actually working on the sim, but it's important to note this is an exception to the general mechanic.
edit: Belly Drum also does not circumvent the 999 cap, only the boost cap in some situations. Only damage calculation time modifiers can circumvent the 999 cap (screens, thick club, light ball...).

This is very important for a variety of reasons, but the most important reason by far is that it affects how much damage crits do as I illustrated above. Steelix should be taking much more from crits from Snorlax when both are fully boosted because of how crits choose whether or not to ignore boosts/screens/burn/etc. This also slightly affects the damage roll with Rhydon. Screech just happened to be a way to easily illustrate the early boost capping without waiting for a crit.

Sorry for the long post, just want to make sure everyone's on the same page.
 
Last edited:

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
Sorry for the long wait, I actually worked on this a bit last year after I fixed Belly Drum but didn't have time to test it thoroughly, then lost the code at some point. I think I've recreated what I had, and I just hotpatched the main server with it if any of you would like to try it out. I'm especially curious if this new stat cap fix breaks my old Belly Drum stat cap fix. sulcata Jorgen FriendOfMrGolem120 tell a friend!
 
FOMG and I just tested, it looks like that works! I thought some stuff looked weird if multiple boosts get passed to the function, but that doesn't seem to be the case.

Harden Shuckle can only go to +2.
DrumLax still goes to +6 from an even number.
DrumLax at +1 goes to +5.
Curse won't boost already boosted stats any higher (lax goes to +5/+6/-6, etc).

Great work :)
 

Zokuru

The Stall Lord
is a Tiering Contributor
Jorgen Yes, it's the latter. FOMG and sulcata are complaining about Screech Snorlax vs +6 Shuckle/Steelix.
Snorlax can only learn Screech in G4 and later Gen according to PS! I hope it's a mistake 'cause Screech Lax looks awesome in GSC, but if not I don't understand why they're bothering about it.
 
Screech lax isn't a thing. It is was an issue because it affects crit damage in a lot of extremely common scenarios that I pointed out above. This is because crits ignoring stat boosts, screens, etc are determined by the number of stat boosts.
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Screech lax isn't a thing. It is was an issue because it affects crit damage in a lot of extremely common scenarios that I pointed out above. This is because crits ignoring stat boosts, screens, etc are determined by the number of stat boosts.
I'm confused. You mention "ignoring stat boosts" in the same sentence as "determined by stat boosts". I think this means ignoring defender's stat boosts, and determined by attacker's stat boosts? But how are crits determined by the attacker's stat boosts? I thought they were a flat 2x on top of ignoring stat boosts?
 

Honko

he of many honks
is a Site Content Manager Alumnusis a Programmer Alumnusis a Top Contributor Alumnus
I'm confused. You mention "ignoring stat boosts" in the same sentence as "determined by stat boosts". I think this means ignoring defender's stat boosts, and determined by attacker's stat boosts? But how are crits determined by the attacker's stat boosts? I thought they were a flat 2x on top of ignoring stat boosts?
In GSC, crits ignore stat boosts (and other mods) for both players if the attack has equal or fewer boosts than the defense, and don't ignore stat boosts for either player if the attack has more boosts than the defense. A +5 Snorlax critting a theoretical +5 Steelix would ignore both stat boosts (treating Snorlax as 318 Attack vs Steelix's 498 Defense), whereas a +5 Snorlax critting a +3 Steelix would not ignore either one's boosts (999 Attack vs 999 Defense, much better for the Snorlax).
 

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

Top