Follow our Instagram!
Curious about what we're currently doing about bots? Check out the latest updates from staff in this thread.
Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.

Gen 2 PS Development - Post bugs here

Status
Not open for further replies.
Latest gen 2 fixes, which makes it close to perfect:
Counter wasn't being done properly sometimes
https://github.com/Zarel/Pokemon-Showdown/commit/eac5f934e2f93b6c7f95ae5174732f8c2dd482fc

Residuals don't happen after a target faint
https://github.com/Zarel/Pokemon-Showdown/commit/f60a251f3d5932b3f7d986b67e1db8589c99a2c2
https://github.com/Zarel/Pokemon-Showdown/commit/8f5327db760619e2b6de1589da84632e7acc1937

Forced switch in (roar, ww) doesn't activate residuals
https://github.com/Zarel/Pokemon-Showdown/commit/dc34e0e18195b19202a781006012ffc5566eb966

As usual, if you see anything wrong, please post it here asap.
Showdown ladder isn't letting you use movesets that are perfectly legal. For example: Sandslash with Counter + Swords Dance gets rejected (presumably because Counter is an egg move and Swords Dance is an RBY TM), but it should be legal because Counter Sandslash can be traded back to RBY.
Hi, the berrys names are different in gen2. It is good to modify this because it may get some conflict when try to import teams.
Also there are missing exclusive GSC items like Berserk Gene and Polkadot Bow.

Also Jorgen you saw if the buff stats are stoping at 999?
Jorgen said:
Showdown ladder isn't letting you use movesets that are perfectly legal. For example: Sandslash with Counter + Swords Dance gets rejected (presumably because Counter is an egg move and Swords Dance is an RBY TM), but it should be legal because Counter Sandslash can be traded back to RBY.
Click to expand...Click to collapse...

Weird, I did add a special case for gen 2 in which it lets you get a gen 1 TM and a gen 2 move. Will review it again today.

Tiba said:
Hi, the berrys names are different in gen2. It is good to modify this because it may get some conflict when try to import teams.
Also there are missing exclusive GSC items like Berserk Gene and Polkadot Bow.

Also Jorgen you saw if the buff stats are stoping at 999?
Click to expand...Click to collapse...

The stat calculation follows step by step the code of the cartridge. Also about berries it's a thing we've had going on with policy, etc. will get them in asap.
Last edited:
Joim said:
Weird, I did add a special case for gen 2 in which it lets you get a gen 1 TM and a gen 2 move. Will review it again today.



The stat calculation follows step by step the code of the cartridge. Also about berries it's a thing we've had going on with policy, etc. will get them in asap.
Click to expand...Click to collapse...

About the buffed stats I just found it strange after my lax use a drum got x4 (+6) instead of +5 which is normal in another simulators
5_zps9a80fc91.png
It might be only a graphic error. Speaking about graphics there's a lot of mistakes like the name 'nightmare' under pokemons nickname afeter a nightmare move use which don't disappear after a wake up or the 'recharge' in hyper beam that is still there in RBY in situations where there is no recharge.
The GSC RBY team buildier need to be rebuild to comport the 252 evs in all stats, the 15 ivs and femeale mechanics connected with atk ivs for taking PS as serious simulator for any competitive tournament match. I hope you're working on it (: and also a small box for see the value of buffed stats like the nb one will be very appreciated ty
I've started working on the client recently, until a couple of days ago I only did server-part code (save for a couple of exceptions). Don't worry, a multi-gen teambuilder has been on my plans for long, it's just I took a long break and it's a lot of work for me alone, lol.

The +5/+6 is just a display issue, the stat is capped at 999 anyways. I've coded gen 1 so it automatically puts all DVs to 15 and Stat Exp to the max. I've coded gen 2 so it automatically raises Stat Exp to the max and DVs as well, and then it manipulates the DVs depending upon the genre you choose, hidden power, and shinyness (but you gotta state DVs * 2 for SD Marowak, I really should work on that asap).
Leftovers does not work properly. It should activate at the end of the turn, and for example if you switch in a pokemon, it gets leftovers recovery the same turn too.

Turn 39


Sexking used Earthquake!
A critical hit! The opposing movntainovs lost 55.0% of its health!

The opposing movntainovs fainted!

Lavish Spawn sent out inverted (Vaporeon)!

Turn 40


ie vaporeon should have got leftovers recovery there (nidoking too)

edit: I think the bug is happening only when a pokemon faints? either way they should get the lefties recovery
Last edited:
Not the biggest thing in the world since non-Ice Hidden Powers are rarely used but I noticed HP DV isn't being based on the other four stats. As such, you still have max Hit Points when running Hidden Powers that require an even DV (and thus lower Hit Points).

As much as I'd love for HP Grass Alakazam to retain max HP.
Mr.E said:
Not the biggest thing in the world since non-Ice Hidden Powers are rarely used but I noticed HP DV isn't being based on the other four stats. As such, you still have max Hit Points when running Hidden Powers that require an even DV (and thus lower Hit Points).

As much as I'd love for HP Grass Alakazam to retain max HP.
Click to expand...Click to collapse...

Fixed.
There's a fix for Leftovers, tell me if it's wrong, please.
Just so you all know, I've updated the OP with the information on how DV calculation works on PS, I've updated it today for proper HP DV on Hidden Power and it also now accounts for SD Thick Club Marowak so you never have your attack rolled back due to not understanding the PS Teambuilder.

How DVs work on PS:
By default, I set all DVs to 15.
If you input custom IVs on the PS teambuilder, I divide them by 2 and floor them, making them 0-15.
If you have a Hidden Power, I enforce all the DVs to the best case scenario for that Hidden Power.
If you have SD Marowak with Thick Club, I will force its Attack DV to 13 even if it isn't using Hidden Power Bug.
If you for some reason used a shiny, I will respect your decision to use a bad Pokémon, set all DVs to 10 and DV attack to 15 or 11 if you have SD Marowak.
I will then calculate the gender upon your attack DVs.
Last but not least, I calculate the HP DV.
Turn 29


Dragonite used DynamicPunch!
The opposing Raikou lost 28.0% of its health!

The opposing Raikou used Roar!

Snorlax was dragged out!
Snorlax is hurt by the spikes!

The opposing Raikou restored a little HP using its Leftovers!
Snorlax restored a little HP using its Leftovers!
----------------------------------------------------------

battle i just had, dynamicpunch isnt confusing the opponent when it hits and that is wrong. please fix

EDIT: ok it worked the next time i hit

Turn 51

Dragonite used DynamicPunch!
It's super effective! The opposing Snorlax lost 50% of its health!
The opposing Snorlax became confused!
The opposing Snorlax is confused!
It hurt itself in its confusion!

The opposing Snorlax fainted!
Last edited:
Lavish Spawn said:
Turn 29


Dragonite used DynamicPunch!
The opposing Raikou lost 28.0% of its health!

The opposing Raikou used Roar!

Snorlax was dragged out!
Snorlax is hurt by the spikes!

The opposing Raikou restored a little HP using its Leftovers!
Snorlax restored a little HP using its Leftovers!
----------------------------------------------------------

battle i just had, dynamicpunch isnt confusing the opponent when it hits and that is wrong. please fix

EDIT: ok it worked the next time i hit

Turn 51

Dragonite used DynamicPunch!
It's super effective! The opposing Snorlax lost 50% of its health!
The opposing Snorlax became confused!
The opposing Snorlax is confused!
It hurt itself in its confusion!

The opposing Snorlax fainted!
Click to expand...Click to collapse...
http://replay.pokemonshowdown.com/gen2ou-202294764 is the replay
Nightmare's effect currently ends at the end of the turn, rather than when the Pokemon wakes up. This means if you use Rest after waking up from a nightmare, it erroneously carries over to the new sleep cycle.


EDIT: also the thing where Leftovers fails to apply on a switch-in following a KO is still a problem.

EDIT2: Here's the log showing both the Nightmare and Leftovers issues.

Also Crystal_ is Nightmare supposed to be applied before or after Leftovers? In the log it's applied after, and I thought I remembered that being right, but I wanna double-check.
Last edited:
Sadly I'm not the only one touching faints on past gens as of lately, that may explain the leftovers thing. Will work on it to see if I can fix it now before my concert, otherwise, tomorrow/monday (all bugs).
Also Crystal_ is Nightmare supposed to be applied before or after Leftovers? In the log it's applied after, and I thought I remembered that being right, but I wanna double-check.
Click to expand...Click to collapse...
I think Nightmare goes before. At a glance it looks like https://github.com/xCrystal/pokecrystal/blob/master/battle/core.asm#L210 is responsible for residual effects while L226 does apparently a lot of things one of them being Leftovers recovery.
Also the order of residual effects seems to go like this: Poison/Burn -> Leech Seed -> Nightmare -> Curse
Status
Not open for further replies.
Back Top