Gen 2 PS Development - Post bugs here

:gs/Ditto::gs/Unown:

After running several experimental games with BluesEnergy00 on Showdown, I may have found a bug that concerns Ditto in GSC (Gen 2). On Smogon the item Metal Powder's description reads as follows:

If held by a Ditto, its Defense and Sp.Def are x1.5, even while Transformed.

When the move transform is used in battle it changes all of the stats (except the HP stat) and typing into those of what it is transforming into. Thus in order to test this fairly we pitted a pokemon against Ditto that naturally has the same base HP stat as it, in this case, Unown. Given that they both have a base HP stat of 48 it was ideal for this test. Logic would tell you that a Ditto carrying Metal Powder would simply transform into Unown (keep the same HP stat) and copy all of its stats but also have a 50% boost to both of these defenses even while transformed like the description says, but no. We found that instead of doing that in practice it seems that Ditto is simply not getting that promised defensive boost in its transformed state as can be seen here:

https://replay.pokemonshowdown.com/gen2ou-1440425517-lvq6yygup6g6u8mpk8wfjcwxrxav839pw

Assuming that is indeed an oversight, it is one that significantly effects Ditto viability in the competitive scene given that it doesn't enter the battle with the best stats to begin with (that is if anyone was tempted to use it at all).
 
Last edited:

Siatam

is a Tutoris a Member of Senior Staffis a Community Contributoris a Former Old Generation Tournament Circuit Champion
RoA Leader
In GSC games PS incorrectly makes normal types immune to any status from Tri Attack.
The offending code is found in https://github.com/smogon/pokemon-showdown/blob/master/data/mods/gen2/moves.ts on line 951:
Code:
triattack: {
        inherit: true,
        onHit(target, source, move) {
            move.statusRoll = ['par', 'frz', 'brn'][this.random(3)];
        },
        secondary: {
            chance: 20,
            onHit(target, source, move) {
                if (!target.hasType('Normal') && move.statusRoll) {
                    target.trySetStatus(move.statusRoll, source);
                }
"!target.hasType('Normal')" should be removed.

Here is a video showing that Tri Attack can status normal types on Silver VC.

This is a post that discusses what is happening in Gold/Silver's assembly code as it relates to Tri Attack status.
 
:gs/Ditto::gs/Unown:

After running several experimental games with BluesEnergy00 on Showdown, I may have found a bug that concerns Ditto in GSC (Gen 2). On Smogon the item Metal Powder's description reads as follows:

If held by a Ditto, its Defense and Sp.Def are x1.5, even while Transformed.

When the move transform is used in battle it changes all of the stats (except the HP stat) and typing into those of what it is transforming into. Thus in order to test this fairly we pitted a pokemon against Ditto that naturally has the same base HP stat as it, in this case, Unown. Given that they both have a base HP stat of 48 it was ideal for this test. Logic would tell you that a Ditto carrying Metal Powder would simply transform into Unown (keep the same HP stat) and copy all of its stats but also have a 50% boost to both of these defenses even while transformed like the description says, but no. We found that instead of doing that in practice it seems that Ditto is simply not getting that promised defensive boost in its transformed state as can be seen here:

https://replay.pokemonshowdown.com/gen2ou-1440425517-lvq6yygup6g6u8mpk8wfjcwxrxav839pw

Assuming that is indeed an oversight, it is one that significantly effects Ditto viability in the competitive scene given that it doesn't enter the battle with the best stats to begin with (that is if anyone was tempted to use it at all).
I think this was tested and bulbapedia was wrong.
 
I think this was tested and bulbapedia was wrong.
Would be cool if you've got a link or something for that cause the current description of metal powder on showdown still reads:

If held by a Ditto, its Defense and Sp.Def are x1.5, even while Transformed.

I havn't tried this on an emulator or a handheld so there might indeed be more testing to be done
 
Metal Powder doesn't increase Ditto's defenses while transformed in Pokémon Stadium 2

After reading Blaine500's recent post, I decided to test Metal Powder's mechanics in a real game. Since I didn't have two Game Boys, I decided to test the item in Pokémon Stadium 2. For the test I used an Arcanine and a Ditto with these stats and moves:

Level: 25
Item: None
Stats:
Hit Points: 91​
Attack: 74​
Defense: 58​
Special Attack: 71​
Special Defense: 61​
Speed: 70​
Moves:
-Fire Blast​
-Body Slam​


Level: 26
Item: Metal Powder
Stats:
Hit Points: 66​
Attack: 35​
Defense: 33​
Special Attack: 36​
Special Defense: 36​
Speed: 30​
Moves:
-Transform​


In theory, Ditto's defenses with Metal Powder should be the following:

Without transformingAfter transforming into Arcanine
Physical Defense
49​
87​
Special Defense
54​
91​

After writing the stats I did eight battles, four where Ditto didn't have Metal Powder and four where Ditto had Metal Powder. The battles were simple because Arcanine only had to attack Ditto with Body Slam or Fire Blast.

Once the battles finished, I compared the real damage that Ditto got with the theoretical damage. Originally I intended to use Showdown's Damage Calculator for this phase, unfortunately, the app didn't allow me to do operations with Pokémon that didn't have full Effort Values, so, to solve that I had to use a damage calculator that I had on an Excel file. I show the results below:

Body Slam against Ditto without having used Transform

Theoretical DamageReal DamageIs the damage in the range?
40-47 HPs​
46 HPs​
Yes

Note: The Theoretical Damage is the damage that I got in the Excel Calculator; on the other hand, the Real Damage is the damage that Ditto got in the real game.

Body Slam against Ditto after transforming into Arcanine

Theoretical DamageReal DamageIs the damage in the range?
23-28 HPs​
25 HPs​
Yes

Fire Blast against Ditto without having used Transform

Theoretical DamageReal DamageIs the damage in the range?
75-88​
66​
Yes

Note: Ditto only has 66 HPs, so Fire Blast always KOs it.

Fire Blast against Ditto after transforming into Arcanine

Theoretical DamageReal DamageIs the damage in the range?
22-26​
24​
Yes


Body Slam against Ditto without having used Transform

Theoretical DamageReal DamageIs the damage in the range?
27-32​
30​
Yes

Conclusion: Metal Powder does increase the Physical Defense of Ditto by 1.5 when it is not transformed.

Body Slam against Ditto after transforming into Arcanine

Theoretical DamageReal DamageIs the damage in the range?
16-19 HPs​
23​
No

Conclusion: Metal Powder doesn't increase the Physical Defense of Ditto when it is transformed.

Fire Blast against Ditto without having used Transform

Theoretical DamageReal DamageIs the damage in the range?
50-59 HPs​
51 HPs​
Yes

Conclusion: Metal Powder does increase the Special Defense of Ditto by 1.5 when it is not transformed.

Fire Blast against Ditto after transforming into Arcanine

Theoretical DamageReal DamageIs the damage in the range?
15-18 HPs​
25 HPs​
No

Conclusion: Metal Powder doesn't increase the Special Defense of Ditto when it is transformed.


As you can see, Metal Powder does increase the Physical Defense and Special Defense of Ditto 1.5 times when it is not Transformed; however, contrary to popular belief, the item doesn't increase the defenses of Ditto while it is Transformed.

The question now is if Metal Powder has the same mechanics in Pokémon Gold, Silver and Crystal, if I had to make a guess, I'd say that it does because Pokémon Stadium 2 doesn't have many mechanics' changes compared with the portable games; however, it is impossible to know without having actual tests. If I get the resources, I'll test Metal Powder in the portable versions.

Well, that's all for now, thank you for reading my post.
 
Last edited:

Rezzo

(EVIOLITE COMPATIBLE)
is a Pre-Contributor
A couple of days ago, KarthikVGC made this post showing that Return can deal zero damage in the right situations. I can confirm this in Pokémon Crystal as well. For testing I used 7 Energy Roots on a Totodile (at base happiness of 70) to reduce to 0 and saw 0 HP of damage being dealt to the opponent:


The inverse for Frustration is also true; Frustration deals 0 HP to the target when happiness is maxed out. Not only that, but it also seems to occur at any level with any attack stat. I used an extreme example for this of a max happiness level 100 Feraligatr using Frustration on a low level wild Caterpie:


Don't think this affects too much, but it does mean that Metronome, Mirror Move, Transform and Mimic calls to Frustration with default happiness are dealing damage where they shouldn't, and Pokémon that (for some reason) might run both Return and Frustration alongside each other (again, with default or minimum happiness) are dealing damage with both attacks.

Not tested how this interacts with Counter or Kings Rock but it's probably worth double-checking.

Replay of the above being (roughly) replicated on sim for good measure
 

Rezzo

(EVIOLITE COMPATIBLE)
is a Pre-Contributor
It's come to my attention that there is a documented battle desync glitch on GS & C cartridges caused by the move Beat Up. You can see Crystal_ demonstrate the glitch in this video. To summarise, it is possible to enter a gamestate where Beat Up attacks a different number of times on both players' sides, causing the battle to fall away from an identical state for both players.

Currently Gen 2 has no desync clause and Beat Up is not banned from competitive play. I presume this is something that should be addressed to respect in-game accuracy, so I thought I'd bring some light to this as it seems to have never been directly discussed on Smogon before.
 
Metal Powder does boost Ditto's defenses post Transform, tested in game (Pokemon Crystal):

Rattata's Tackle did 3-4 damage with Metal Powder and 5 damage without.

The level 4 Rattata has 10 atk and 8 def. Level 4 STAB Tackle does 5-6 damage when used by 10 atk vs 8 def, and 3-4 damage when used by 10 atk vs 12 def (with Metal Powder).

 
just an fyi, in-game crystal != the mechanics used. Link battles always fall back to Gold/Silver mechanics, and Gold/Silver in-game has a few factors that can confound the results that need to be taken into account (badges modifying stats, etc).

Things like Belly Drum and stat rollover glitches are patched in Crystal iirc but are still present in link battles.

edit: same thing applies for PS2. The mechanics are different in sometimes subtle and sometimes major ways from Gold/Silver/Crystal cartridge link battles.
 
Last edited:
just an fyi, in-game crystal != the mechanics used. Link battles always fall back to Gold/Silver mechanics, and Gold/Silver in-game has a few factors that can confound the results that need to be taken into account (badges modifying stats, etc).

Things like Belly Drum and stat rollover glitches are patched in Crystal iirc but are still present in link battles.

edit: same thing applies for PS2. The mechanics are different in sometimes subtle and sometimes major ways from Gold/Silver/Crystal cartridge link battles.
Thanks for the information, will keep in mind the differences between the different games. Tested it on Pokemon Gold with the same result (Metal Powder applies post-transform):

 
Thanks for the information, will keep in mind the differences between the different games. Tested it on Pokemon Gold with the same result (Metal Powder applies post-transform):

Thank you for putting the effort in to look into this, I know I found something was off while testing ditto myself before :)
 
encore currently fails if used after being dragged in by a phazing move, seen here
according to beelzemon's testing this is correct in stadium 2 (except when the encore user was in during a roar/ww fail), and would have to be handled accordingly when changed
correct behavior, encore works
i forgot to put the roar fail case in the video but obviously encore works either way lol. ty waterwizard for mentioning this
 
Ancient Power and Swords Dance are incompatible in Marowak, but the combination is considered legal on Pokémon Showdown

I was building a team for Little Cup when I discovered that it is impossible for Cubone and Marowak to have Ancient Power and Swords Dance in the same moveset. Those Pokémon only learn those moves as egg moves; Ancient Power can be inherited from the Totodile family, the Bulbasaur family and the Charmander family; on the other hand, Swords Dance can be inherited from the Bulbasaur family, the Charmander family and Lickitung.

One could say that you could teach a Pokémon like Charmander Ancient Power and Swords Dance and then pass both moves to Cubone, but that's impossible. Ancient Power is the problem, the Bulbasaur family only learns it as a New York City Pokémon Center Event Move, while the Charmander family only learns it as an egg move. Both families only learn Swords Dance with a TM in the Gen I games, so they have to forget Ancient Power before they are transfered to those games and the Move Reminder of Pokémon Stadium 2 doesn't work for Event Moves nor egg moves. Regarding the Totodile family, it learns Ancient Power, but not Swords Dance and Lickitung learns Swords Dance, but not Ancient Power. In short, Cubone and Marowak can't have Ancient Power and Swords Dance in the same moveset.

The team builder in Pokémon Showdown considers legal for Cubone and Marowak to have Ancient Power and Swords Dance in the same moveset, which is wrong and therefore it should be fixed.

This discovery is a small hit for Cubone in Little Cup, because Ancient Power always one hit KOs Scyther without missing, something that Rock Slide doesn't do, so if players want to use Ancient Power, they have to give up Swords Dance and the possibility of doubling Cubone's Attack to hit harder with moves like Earthquake or Bonemearang. Something similar happens to Marowak in OU and Poké Cup, some players that prefer Ancient Power for its accuracy also use Swords Dance in the same set, something that soon won't be possible.
 
Last edited:
Ancient Power + Swords Dance in the same moveset is illegal on Chikorita, Bayleef and Meganium

Zalarye told me that Showdown also considers this combination legal; however, it is not, so it should be fixed.

Ancient Power and Swords Dance are egg moves and none of the possible fathers can have both moves at the same time, even with chain breed, in this link you can check Chikorita's egg moves with more detail.
 
Ancient Power + Swords Dance in the same moveset is illegal on Chikorita, Bayleef and Meganium

Zalarye told me that Showdown also considers this combination legal; however, it is not, so it should be fixed.

Ancient Power and Swords Dance are egg moves and none of the possible fathers can have both moves at the same time, even with chain breed, in this link you can check Chikorita's egg moves with more detail.
Yup I mentioned this exact point back on page 16 of this forum but it's good to see someone else come to the same conclusion :boi:
 
Heal Bell + Softboiled in Chansey are illegal on Little Cup

I discovered yet another combination that is considered legal by the simulator, but that is impossible to have in the real games. Chansey can't have Heal Bell and Softboiled in the same moveset at Level 5, here are the reasons:

1. Chansey only learns Heal Bell as an Egg Move.​
2. Chansey and Blissey are the only Pokémon that learn Softboiled in Gen II, which means that you can't have two parents of opposite genders that know the move and can pass it down to a baby Chansey, therefore, Chansey can only learn Softboiled at Level 5 if you trade her to a Gen I game, this means that you should erase Heal Bell first.​
3. The Move Reminder of Pokémon Stadium 2 doesn't work with Egg Moves.​

This combination is sometimes used in Little Cup tournaments in Showdown, but now is banned for the aforementioned reasons. If you want a Chansey in Little Cup with Heal Bell and a recovery move, you should use Rest instead. I hope this mistake gets fixed in the future.

Don't worry friends, Chansey can have Heal Bell and Softboiled at Level 13 and onward, because she learns Softboiled on her own at Level 13.
 
charm compatibility on clefairy/clefable

charm can only be learned by cleffa, and cleffa doesnt exist in gen 1 so moves that can only be transferred from gen 1 should be incompatible with charm, but showdown fails to check this correctly.
having eg two clefairys with a gen 1 transferred move breed wont work either as the move isnt in cleffa's level up learnset.

egg moves like belly drum that are also cleffa exclusive are checked correctly for compatibility, but showdown misses the compatibility check for charm which is a level up move for cleffa. (may be worth checking if the compatibility check is also missed with other babies that learn charm by level up, i cant rn but i can check for this at a later time)

this incompatibility needs to be implemented with all of clefairy/fable's moves that require gen 1 transfer, the most relevant ones being charm + thunder wave, charm + double edge, charm + body slam, charm + tri attack.
 
charm can only be learned by cleffa, and cleffa doesnt exist in gen 1 so moves that can only be transferred from gen 1 should be incompatible with charm, but showdown fails to check this correctly.
applies to all of the gen 2 only level up moves of baby mons and the same issue, but with the first stage not being able to learn the gen 1 tm, leads to flail+tm gyarados, bubblebeam + baton pass vaporeon (lmao) and probably not much else
 
Surf and Charm in the same moveset are illegal on Pikachu and Raichu, but Showdown considers them legal. Surf is a move that Pikachu and Raichu can only learn in Gen I, while Charm is a move they can only learn as a Pichu in Gen II. It is impossible to evolve a Charm Pichu into Pikachu and then transfer it to Pokémon Stadium 1 so it can learn Surf, because, before you move Pikachu to the Gen I game, it has to forget Charm and the Move Relearner of Gen II doesn't work on moves that can only be learned via a previous form (you can try with a Metapod that has forgotten String Shot).

Another thing is that Pikachu and Raichu can't learn Surf in Pokémon Stadium 2, even if they beat the Prime Cup with the same criteria of Pokémon Stadium 1, in fact, I once tried it and failed, if someone doesn't believe me, I invite him to try.

Finally, there is not an event Pichu that has Surf in Gen II, so, in short, Charm + Surf is illegal on Pikachu and Raichu.
 
Last edited:
I have confirmed that the certain glitch involving Perish Song and Spikes are not implemented correctly in PS!.
I would like to request to implement this glitch since this is something that cannot be denied the possibility of occurring in even competitive games such as GSC OU.

In GSC's Cartridge, there is the glitch which causes that the mon will not faint when HP become 0 due to Spikes damage when the switch occurs due to another mon's faint caused by Perish Song.
However, as shown in the replay below, I confirmed that PS! was not implemented correctly.
https://replay.pokemonshowdown.com/gen2ou-2047597575-wvskjjk9beejuvuy5kqmtg2uo4mdmdapw

This glitch was reported on the following page of "the pokecrystal disassembly project", and there is also a link to the verification video on the page below.
https://pret.github.io/pokecrystal/...es-can-leave-a-pokmon-with-0-hp-and-not-faint

I think the following is the behavior for the next turn if it is HP 0 with still alive.
I was able to confirm 3 and 4 in the verification video above, but 1, 2, 5 and 6 are just my conjecture, so it would be helpful if someone could verify them.
(Unfortunately, I do not have an environment where I can check it right away.)

1. If the mon with 0 HP switches out faster than the opponent's mon, the mon with 0 HP remains alive.
(The status of the mon at the switch destination should be loaded before the faint judgment.)

2. If the mon with 0 HP switches out later than the opponent's mon, the mon with 0 HP will faint when the opponent's switch is ended.
(I think faint judgment for both sides will be done once the opponent's mon switch is ended, but to be honest, I am not confident about this.)

3. If the mon with 0 HP uses a move faster than the opponent's mon, and as a result, the HP becomes 1 or more, this mon is alive when the opponent's move starts processing.
(As the verification video above.)

4. If the mon with 0 HP uses a move faster than the opponent's mon, and as a result, the HP still be 0, this mon faint when it is end of this move's processing.
(As the verification video above.)

5. If the mon with 0 HP uses a move later than the opponent's mon, and as a result, the HP becomes 1 or more, this mon is alive when the ally's move starts processing.
(This can only occur with Pain Split or Present. It should be handled in the same way as 3.)

6. If the mon with 0 HP uses a move faster than the opponent's mon, and as a result, the HP still be 0, this mon faint when it is end of this move's processing.
(It should be handled in the same way as 4.)
 
Last edited:

Jorgen

World's Strongest Fairy
is a Forum Moderator Alumnusis a Community Contributor Alumnusis a Contributor Alumnusis a Past SPL Champion
I have confirmed that the certain glitch involving Perish Song and Spikes are not implemented correctly in PS!.
I would like to request to implement this glitch since this is something that cannot be denied the possibility of occurring in even competitive games such as GSC OU.

In GSC's Cartridge, there is the glitch which causes that the mon will not faint when HP become 0 due to Spikes damage when the switch occurs due to another mon's faint caused by Perish Song.
However, as shown in the replay below, I confirmed that PS! was not implemented correctly.
https://replay.pokemonshowdown.com/gen2ou-2047597575-wvskjjk9beejuvuy5kqmtg2uo4mdmdapw

This glitch was reported on the following page of "the pokecrystal disassembly project", and there is also a link to the verification video on the page below.
https://pret.github.io/pokecrystal/...es-can-leave-a-pokmon-with-0-hp-and-not-faint

I think the following is the behavior for the next turn if it is HP 0 with still alive.
I was able to confirm 3 and 4 in the verification video above, but 1, 2, 5 and 6 are just my conjecture, so it would be helpful if someone could verify them.
(Unfortunately, I do not have an environment where I can check it right away.)

1. If the mon with 0 HP switches out faster than the opponent's mon, the mon with 0 HP remains alive.
(The status of the mon at the switch destination should be loaded before the faint judgment.)

2. If the mon with 0 HP switches out later than the opponent's mon, the mon with 0 HP will faint when the opponent's switch is ended.
(I think faint judgment for both sides will be done once the opponent's mon switch is ended, but to be honest, I am not confident about this.)

3. If the mon with 0 HP uses a move faster than the opponent's mon, and as a result, the HP becomes 1 or more, this mon is alive when the opponent's move starts processing.
(As the verification video above.)

4. If the mon with 0 HP uses a move faster than the opponent's mon, and as a result, the HP still be 0, this mon faint when it is end of this move's processing.
(As the verification video above.)

5. If the mon with 0 HP uses a move later than the opponent's mon, and as a result, the HP becomes 1 or more, this mon is alive when the ally's move starts processing.
(This can only occur with Pain Split or Present. It should be handled in the same way as 3.)

6. If the mon with 0 HP uses a move faster than the opponent's mon, and as a result, the HP still be 0, this mon faint when it is end of this move's processing.
(It should be handled in the same way as 4.)
Neat! This might be better suited for the Research Thread at this stage, so that the details can be tested and ironed out. Of particular interest is how likely a desync might be in a link battle: If that risk is extremely high, I could see the appropriate solution being to "patch by omission".
 

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

Top