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
A Pokemon suffering from Nightmare shouldn't take damage from it on a turn on which it KOes an opposing Pokemon, similarly with Poison. See turn 27: https://replay.pokemonshowdown.com/smogtours-gen2ou-496601

Bulbapedia confirms this and it has also been verified on cart by Century Express.
Good catch, thanks, will be fixed next update! The issue here was that PS checked the target of the move to determine whether it was knocked out by the user, but the target of Sleep Talk is the user. Now it checks the actual opponent no matter what move is used.
A sleeping pokemon with sleeptalk or snore should be immune to flinch unless the attacker has kings rock, according to bulbapedia. Still waiting on the test on cart

https://m.bulbapedia.bulbagarden.net/wiki/Status_condition#Flinch
No need for testing in-game, this has been implemented for a while: https://git.io/JfZAx
Here's the relevant bit of the Crystal disassembly if you're interested: https://git.io/Jfnv4
 

Jorgen

World's Strongest Fairy
is a Forum Moderator Alumnusis a Community Contributor Alumnusis a Contributor Alumnusis a Past SPL Champion
Apologies if this is a duplicate.

In Gens 1 and 2, moves with 40 base PP are currently given 64 max PP on Showdown.

However, due to how the PP up item works in these games, the maximum amount of PP these moves can have is actually 61.

Gen 2 example (courtesy xJoelituh):

splash1.png

splash2.png

splash3.png

splash4.png


Bulbapedia seems to have the correct explanation in this case: The PP gain from each PP up is capped at 7, presumably as a strategy to avoid overflowing the maximum PP byte: https://bulbapedia.bulbagarden.net/wiki/PP_Up

Indeed, here it is in the Pokemon Crystal disassembly: https://git.io/Jfz86 (lines 2779 through 2786 are important, the rest is highlighted for context)
And the Pokemon Yellow disassembly: https://git.io/Jfz8F (offending lines are 2764 through 2767)
 
Last edited:
I have to report two problems, the first one is that Fury Cutter's Base Power in Showdown doesn't increase after hitting, it is always 10. In Cartridge and Pokémon Stadium 2, Fury Cutter's Base Power doubles each time it hits: 10, 20, 40, 80 and 160, the move's Base Power doesn't rise once it reaches 160.

The other problem I have to report is this: a friend and I were playing Gen 2 Borderline with a custom set of rules that prevented any of us from using OU or Uber pokémon. My friend selected a team for our fight and while he was waiting for me, he started to work in a OU team. When I returned, he clicked the "Ready" button to start our fight; however, the system told him that he "sent invalid team data" and that if he was not a custom client he had to "report this as a bug". My friend was unable to start the battle, despite the fact that he had a legal team. We theorize that this happened because Showdown's system tried to load the OU team that he was working on, which had illegal mons for our Borderline fight. In this post I include a screenshot of the message that appeared each time my friend tried to start the battle, there you can see that his team had pokémon that did qualify for Gen 2 Borderline:

Bug.png


To solve the problem I ended up canceling the tournament and started it again, after that, we finally could fight.
 
Last edited:

Siatam

is a Tutoris a Member of Senior Staffis a Community Contributoris a Former Old Generation Tournament Circuit Champion
RoA Leader
This is a copy and paste from a general bug reports thread, didn't find this thread until today.

I believe there is a bug in the way PS handles Pursuit + Status Damage in Gen 2.
Normally when a pokemon faints, the opposing mon does not take status damage at the end of the turn. However, if a pokemon is knocked out by pursuit while switching the pursuiter should take status damage at the end of the turn. This does not happen on PS.

PS replay showing current interaction:
https://replay.pokemonshowdown.com/gen2ou-1118894795

Video of virtual console interaction:



Original cartridge video:


I think this would also apply to burn and leech seed though I don't have footage of it atm.
Edit: I now have footage of burn and leech seed
 
Last edited:

Plague von Karma

Banned deucer.
I was talking with Kris in the research Discord and found a bunch of Gen 2 move statistics. A few of these are wrong and/or inaccurate. Not many of these are of competitive relevance, but yeah. My main source is, unfortunately, Bulbapedia, and many of these are difficult to test. I encourage people with more interest in Gen 2 to test before applying any changes.
  • Mud-Slap is listed as having a 100% chance to inflict Accuracy -1. This is inaccurate exclusively in Gen 2, it's actually 99.6%.
  • Pain Split is listed as having --% accuracy. This is inaccurate at least in Gen 2, as it has 100%. As such, inflicting Accuracy drops can cause it to miss.
  • Lock-On is listed as having --% accuracy. This is inaccurate until Gen 4 iirc; it has 100% accuracy in Gen 2. It also cannot be Baton Passedon the sim despite being perfectly possible on the cartridge.
    • Mind Reader has the same issues, most likely.
  • Foresight is listed as having --% accuracy. This is inaccurate; it has 100% accuracy in Gen 2. The short description also says Evasiveness is ignored when this is also a bit misleading.
  • Nightmare is listed as having 100% accuracy. This is false in Gens 2 and 3, where it bypassed accuracy checks with --% accuracy.
  • Safeguard is meant to protect users of thrashing about moves from Confusion, but as we can see here, this isn't happening. To note, it does not prevent Berserk Gene confusion, so no funny gimmicks with that!
    • If you're interested in the Pokemon that can use this combo, here's a list from a quick once-over on the teambuilder.
      • Arcanine can use Safeguard+Thrash
      • Meganium and Venusaur can use Safeguard+Petal Dance
      • Dragonite can use Safeguard+Outrage
  • Mimic is listed as having --% accuracy. This is inaccurate; it has 100% accuracy in Gen 2.
I believe the rest I talked about with Kris is ok though.
 
Last edited:
There is a mistake in Showdown's validator, it says that Vileplume can have Body Slam and Moonlight in the same set which, unfortunately, is not true. To learn Body Slam, Vileplume has to forget Moon Light so it can travel back to a Gen I game to learn Body Slam and since Moon LIght is not one of its level up moves, it can't remember it via Stadium 2's move relearner.
 

Zarel

Not a Yuyuko fan
is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Pokemon Researcheris an Administrator
Creator of PS
Another Showdown validator error. High Jump Kick + Body Slam on Hitmonchan is being marked as illegal when it is not. HJK can be bred onto Tyrogue in Gen 2, evolved into Hitmonchan, transferred back to Gen 1, taught Body Slam via TM, and transferred back to Gen 2.
Fixed now.

This is ridiculous :/
Listen, you try to write a validator that supports breeding as well as arbitrarily many tradebacks before and after every possible evolution.

You should be impressed that we support evolution/tradeback validation at all. I'm still impressed we managed to write such a reliable chainbreeding validation algorithm (it's an NP-complete problem, we only managed to solve it at all by cutting corners to make it polynomial).
 

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
According to this Bulbapedia article, if a confused pokemon switches out into a pokemon holding Berserk Gene, that one will only be confused for the remaining confusion duration of the first pokemon and not for 256 turns. Shoutouts Siatam for making an evidence video.. (Edit #2: that video is now from Silver virtual console).

As shown in this replay, the pokemon stayed confused for far longer.
 
Last edited:

Siatam

is a Tutoris a Member of Senior Staffis a Community Contributoris a Former Old Generation Tournament Circuit Champion
RoA Leader
Found a bug concerning multi-turn moves and opponents fainting before the second turn is completed.
The steps to recreate the bug are as follows:

1. A mon begins charging a multi-turn move. (I.e. Fly, Dig, Sky Attack, Skull Bash, Razor Wind)
2. On the turn when the multi-turn move will finish the opponent moves first. (Either from being naturally faster or using a priority move.)
3. The opponent immediately faints. (Due to Recoil or status such as Poison, Burn, Confusion, Leech Seed)
4a. On cartridge the opponent sends out their next mon, and the multi-turn move is still in effect. The multi-turn move will be completed on the next turn.
4b. On PS the opponent sends out their next mon, and the multi-turn move is no longer in effect. Any action can be selected.

Here are two replays showing the current interactions on Showdown:
Sky Attack+Poisoned Opponent and Fly+Confused Opponent. This bug comes with the added affect of messing up animations.

Here are two videos showing the same interactions on Silver Virtual Console:
Sky Attack+Poisoned Opponent and Fly+Confused Opponent.

As you can see it does not make a difference if the opponent completes their selected action, only that they faint before the charging mon can move. If this is implemented, moves with semi-invulnerable stages can be used to dodge more than one attack from the opponent.
 
Last edited:
I've been unable to come up with a plausible explanation for the damage roll on turn 3 of this SPL battle.
Replay said:
Turn 3

The opposing stable flights used Hidden Power!
A critical hit!
It's super effective!
(Forretress lost 94% of its health!)
The damage calculator suggests that a Hidden Power Fire Skarmory should deal this much to a Hidden Power Ghost Forretress (i.e. one with an 11 HP DV and 15 Special Defense DV, revealed on turn 133) with a critical hit.
Damage Calc said:
Skarmory Hidden Power Fire vs. Forretress on a critical hit: 333-392 (96.5 - 113.6%) -- 79.5% chance to OHKO
gorgie has confirmed that he has not reduced his Special stats on his Skarmory.

Is there a bug here (PS! or calc) or is there some other explanation?
 

Bughouse

Like ships in the night, you're passing me by
is a Site Content Manageris a Forum Moderator Alumnusis a CAP Contributor Alumnusis a Tiering Contributor Alumnusis a Contributor Alumnus
I've been unable to come up with a plausible explanation for the damage roll on turn 3 of this SPL battle.

The damage calculator suggests that a Hidden Power Fire Skarmory should deal this much to a Hidden Power Ghost Forretress (i.e. one with an 11 HP DV and 15 Special Defense DV, revealed on turn 133) with a critical hit.


gorgie has confirmed that he has not reduced his Special stats on his Skarmory.

Is there a bug here (PS! or calc) or is there some other explanation?
I can't say for certain what the PS calc site is doing, but it just must not be the same thing as the actual damage calculator on PS used in games.

The calculation PS seems to be doing in game is:

let damage = level * 2;
damage = Math.floor(damage / 5);
damage += 2;
damage *= basePower;
damage *= attack;
damage = Math.floor(damage / defense);
damage = this.clampIntRange(Math.floor(damage / 50), 1, 997);
damage += 2;

Where level has already been *2 earlier on to account for the critical hit, so it is input as 200, not 100

This equates to floor(floor(((floor((200*2)/5)+2)*70*178)/218)/50)+2 = 95
This base of 95 then goes into the modifiers, which are *4 for quad effective = 380 as the maximum damage
And then the only other relevant modifier to this particular case is the damage roll, which in GSC goes all the way down to a minimum of 217/255 of the max damage.

Therefore the range from how PS is calculating GSC damage is floor(217*380/255)-380=323-380
That's why gorgie got the roll he got, since 323/345 is 93.6%, making gorgie's low roll possible. He dealt min or close to min damage depending on what precisely "94%" damage was without the rounding that we see in the battle log.

It's worth pointing out that even with what PS is doing vs what the damage calc site is showing, if he got a min roll, then HP Fire would not have killed in either case, regardless of which formula is correct. He'd have done 96.5% instead of ~94% but nothing more.

That said, I am not convinced that the PS in-game damage calc is actually correct, since I just don't know enough and old gen damage calcs may not be precisely the same as newer gens. This one on PS right now certainly doesn't look anything like the DPP damage calc.
I would hazard a guess that most likely PS itself is correct and that the calc site is using something closer to a DPP damage calc, which is close but definitely not always exactly the same. It is worth noting that the PS calc site does at least implement the crit via multiplying Level by 2 early on, and not by multiplying final damage by 2, as seen by the fact that the HP Fire calc is max 200 damage with no crit and max 392 damage with a crit (i.e. not 400 damage, which would be the obvious 200*2). So whether that particular factor is right or wrong, it seems to be the case in both places.
 

Honko

he of many honks
is a Site Content Manager Alumnusis a Programmer Alumnusis a Top Contributor Alumnus
Bughouse pretty much nailed it on what's different. It looks like the calc applies the crit modifier later than PS does (though both do it earlier than in DPP).

PS in-game formula for GSC (assuming Bughouse's post is correct):
Code:
(floor(floor(((floor((level * 2 * critModifier) / 5) + 2) * basePower * attack) / defense) / 50) + 2) * typeEffectiveness * roll
or
(floor(floor(((floor((100 * 2 * 2) / 5) + 2) * 70 * 178) / 218) / 50) + 2) * 4 * roll = 380 * roll
Calc formula for GSC (source):
Code:
(floor(floor(((floor((level * 2) / 5) + 2) * basePower * attack) / defense) / 50) * critModifier + 2) * typeEffectiveness * roll
or
(floor(floor(((floor((100 * 2) / 5) + 2) * 70 * 178) / 218) / 50) * 2 + 2) * 4 * roll = 392 * roll
I don't know which one is correct. I've long forgotten the sources I referenced to implement the old gen formulas in the calc originally, and it doesn't look like anyone has changed the calc's core GSC formula since then. I would guess PS has it right and the calc was never updated. Hopefully someone with knowledge of the actual cart formula can clear it up.
 

Bughouse

Like ships in the night, you're passing me by
is a Site Content Manageris a Forum Moderator Alumnusis a CAP Contributor Alumnusis a Tiering Contributor Alumnusis a Contributor Alumnus
Thanks Honko! Essentially what Honko and I are saying is that PS's in game calc and the separate calc site's calculator should currently be agreeing on damage rolls in GSC, except for critical hits, where the in game calc comes in with a lower damage range than the separate calc site because of the different order of operations. The in game calc applies the *2 factor earlier on, but since this then feeds into numerous calculations with floor functions, it can come out lower than the calc site version that applies the *2 much much later on, where there is only one remaining floor function (and actually this floor I think could never actually be flooring a non-integer since the input is a floored integer and it's just multiplying by either 1 or 2, and then adding 2?). And in either case, it's still happening at a point other than the very, very end, so critical hit damage is not strictly speaking 2x non-crit damage like it is in more modern generations.

Thankfully at least folks probably don't rely on the GSC damage calc for crits in their decision making process too often... but this should definitely get reconciled whichever way is correct. Tagging Marty as my best guess of who might know which GSC damage formula is correct to cartridge.
 

Siatam

is a Tutoris a Member of Senior Staffis a Community Contributoris a Former Old Generation Tournament Circuit Champion
RoA Leader
Hi, I would like to preface this by saying while I believe my conclusion is correct, I am not experienced in assembly code, apologies if I am mistaken.
I believe the cart accurate damage calculation in this case is:
Code:
(floor(floor(((floor((level * 2) / 5) + 2) * basePower * attack) / defense) / 50) * critModifier + 2) * typeEffectiveness * roll
Which is what Honko has given as the calc formula.

I am using https://github.com/pret/pokegold and https://github.com/pret/pokered as the sources for the cartridge code.
The damage calc code for GS is found under pret/pokegold/master/engine/battle/effect_commands.asm
The damage calc for RB is found under pret/pokered/master/engine/battle/core.asm

The damage calculation formula is virtually the same between RB and GS, the key differences are how critical hits are handled and the inclusion of items in GS. GS also has some minor code to prevent the overflowing of levels.
This is the shared code between Gen 1 and Gen 2: (Starting from line 4435 in RB and line 2962 in GS)
Code:
; Don't calculate damage for moves that don't do any.
    ld a, d ; base power
    and a
    ret z
.skipbp

    xor a
    ld hl, hDividend
    ldi [hl], a
    ldi [hl], a
    ld [hl], a

; Multiply level by 2
    ld a, e ; level
    add a
    jr nc, .nc
    push af
    ld a, 1
    ld [hl], a
    pop af
.nc
    inc hl
    ldi [hl], a

; Divide by 5
    ld a, 5
    ldd [hl], a
    push bc
    ld b, 4
    call Divide
    pop bc

; Add 2
    inc [hl]
    inc [hl]

    inc hl ; multiplier

; Multiply by attack base power
    ld [hl], d
    call Multiply

; Multiply by attack stat
    ld [hl], b
    call Multiply

; Divide by defender's defense stat
    ld [hl], c
    ld b, 4
    call Divide

; Divide by 50
    ld [hl], 50
    ld b, 4
    call Divide

; Update wCurDamage.
; Capped at MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE: 999 - 2 = 997.
    ld hl, wDamage
    ld b, [hl]
    ldh a, [hQuotient + 3]
    add b
    ldh [hQuotient + 3], a
    jr nc, .dont_cap_1

    ldh a, [hQuotient + 2]
    inc a
    ldh [hQuotient + 2], a
    and a
    jr z, .cap

.dont_cap_1
    ldh a, [hQuotient]
    ld b, a
    ldh a, [hQuotient + 1]
    or a
    jr nz, .cap

    ldh a, [hQuotient + 2]
    cp HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1)
    jr c, .dont_cap_2

    cp HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) + 1
    jr nc, .cap

    ldh a, [hQuotient + 3]
    cp LOW(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1)
    jr nc, .cap

.dont_cap_2
    inc hl

    ldh a, [hQuotient + 3]
    ld b, [hl]
    add b
    ld [hld], a

    ldh a, [hQuotient + 2]
    ld b, [hl]
    adc b
    ld [hl], a
    jr c, .cap

    ld a, [hl]
    cp HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1)
    jr c, .dont_cap_3

    cp HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) + 1
    jr nc, .cap

    inc hl
    ld a, [hld]
    cp LOW(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1)
    jr c, .dont_cap_3

.cap
    ld a, HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE)
    ld [hli], a
    ld a, LOW(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE)
    ld [hld], a

.dont_cap_3
; Add back MIN_NEUTRAL_DAMAGE (capping at 999).
    inc hl
    ld a, [hl]
    add MIN_NEUTRAL_DAMAGE
    ld [hld], a
    jr nc, .dont_floor
    inc [hl]
.dont_floor

; Returns nz and nc.
    ld a, 1
    and a
    ret
This essentially covers the (floor(floor(((floor((level * 2) / 5) + 2) * basePower * attack) / defense) / 50) + 2) section of the damage function.

Critical hit modifiers for RB are handled on line 4237 of pret/pokered/master/engine/battle/core.asm and is as follows:
Code:
ld a, [wCriticalHitOrOHKO]
    and a ; check for critical hit
    jr z, .done
    sla e ; double level if it was a critical hit
This occurs before the damage calculation code is executed and doubles the level 'e' by shifting the binary value one digit to the left. (SLA = Shift left arithmetic)

Critical hit modifiers for GS are handled on line 3151 of pret/pokegold/master/engine/battle/effect_commands.asm as:
Code:
.CriticalMultiplier:
    ld a, [wCriticalHit]
    and a
    ret z
; x2
    ldh a, [hQuotient + 3]
    sla a
    ldh [hQuotient + 3], a

    ldh a, [hQuotient + 2]
    rl a
    ldh [hQuotient + 2], a
This .CriticalMultiplier function is called on line 3061, after the /50 operation but before the +2 of the damage capping operations and doubles the running total damage value 'a'. The doubling of the level variable 'e' to my knowledge does not occur in the GS code.

What gives me cause for concern, and makes me think I could be incorrect is that the function for determining the damage boosts received from items (i.e. Magnet, Charcoal) is called immediately before the CriticialMultiplier function. Line 3021:
Code:
; Item boosts
    call GetUserItem

    ld a, b
    and a
    jr z, .DoneItem

    ld hl, TypeBoostItems

.NextItem:
    ld a, [hli]
    cp -1
    jr z, .DoneItem

; Item effect
    cp b
    ld a, [hli]
    jr nz, .NextItem

; Type
    ld b, a
    ld a, BATTLE_VARS_MOVE_TYPE
    call GetBattleVar
    cp b
    jr nz, .DoneItem

; * 100 + item effect amount
    ld a, c
    add 100
    ldh [hMultiplier], a
    call Multiply

; / 100
    ld a, 100
    ldh [hDivisor], a
    ld b, 4
    call Divide
This code finds what item the user is holding, checks its effect, compares if the move selected benefits from the boosting item, then applies an item multiplier to 'a'.

This leads me to believe that the true damage formula is:
Code:
(floor(floor(((floor((level * 2) / 5) + 2) * basePower * attack) / defense) / 50) * critModifier * Item boost + 2) * Modifiers
Not that it made any difference in the SPL case, but I would like someone to confirm this as it is a minor nerf to the type boosting items, dropping damage by 1 or 2 HP.

I can say with some degree of certainty that in GSC games the PS! calc inaccurately doubles the user's level when calculating critical hits instead of applying the multiplier later.

Please let me know if you spot any errors in this analysis.
 
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
Please let me know if you spot any errors in this analysis.
Yeah, your assessment is correct. I think what happened is Joim implemented Gen 1 first and then ported everything over to Gen 2.
Would also explain why the weather modifiers were completely absent for two years. :psynervous:

From UPC:
This is the damage calculation process for the second generation. The game performs each step in the following order.
  • In battles in which Exp. Points can be gained, the badges have the appropriate stat multiplied by 9 and divided by 8 for Pokémon controlled by the player (the Zephyr Badge increases Attack, the Plain Badge increases Speed, the Mineral Badge increases Defense, and the Glacier Badge increases Special Attack).* (This calculation is done in advance rather than during damage calculation.)
  • Stat stage modifying attacks (see below) modify the appropriate stat (Attack or Defense).* (This calculation is done in advance rather than during damage calculation.)
  • If the attacker is burned, halve the Attack value.* (This calculation is done in advance rather than during damage calculation.)
  • If the attack is Selfdestruct or Explosion, divide the opponent's Defense by 2.
  • If Reflect is in effect for the opponent, double the Defense value.*
  • If Light Screen is in effect for the opponent, double the Special Defense value.*
  • If the attacker's original species is Pikachu and the attacker is holding Light Ball, Special Attack is doubled.
  • If the attacker's original species is Cubone/Marowak and the attacker is holding Thick Club, Attack is doubled.
  • If the Attack/Special Attack and/or Defense/Special Defense stat exceeds 255, divide both stats by 4 (In Gold/Silver/Crystal, the result is then truncated to an 8-bit integer; for example, 0x0123 in hexadecimal becomes 0x0023).
  • If the opponent's original species is Ditto and the opponent is holding Metal Powder, both Defense and Special Defense are multiplied by 1.5.
  • If the Attack/Special Attack and/or Defense/Special Defense is 0, it becomes 1.
  • The damage is equal to:
    int(int(int(2×L ÷ 5+2)×A×P ÷ D)/50)
    where L is the attacker's level, A is the attacker's Attack/Special Attack value, P is the attack's power, and D is the opponent's Defense/Special Defense value. For physical attack types (Normal, Fighting, Flying, Poison, Ground, Rock, Bug, Ghost, Steel), use the Attack and Defense values. For special attack types (Fire, Water, Electric, Grass, Ice, Psychic, Dragon, Dark), use the Special Attack and Special Defense values.
  • When the attack does a critical hit (see above), the calculated damage is doubled.
  • If the attacker is holding certain items like Pink Bow and Charcoal, multiply the calculated damage by 1.1 (multiply by 110, divide by 100) if the attacker is using an attack of the appropriate type.
  • If the damage calculated is greater than 997, it becomes 997.
  • Add 2 to the calculated damage.
  • Weather. Sunny Day increases the damage of Fire-type attacks by 50% and decreases the damage of Water-type attacks by 50%. Rain Dance increases the damage of Water-type attacks by 50%, decreases the damage of Fire-type attacks by 50%, and halves the damage done by Solarbeam.
  • Badges. In the Gold/Silver/Crystal version, in battles in which Exp. Points can be gained, the Johto and Kanto badges multiply damage of the appropriate attack type by 9/8 for Pokémon controlled by the player, as shown here: Zephyr Badge: Flying; Hive Badge: Bug; Plain Badge: Normal; Mineral Badge: Steel; Glacier Badge: Ice; Fog Badge: Ghost; Storm Badge: Fighting; Rising Badge: Dragon; Soul Badge: Poison; Volcano Badge: Fire; Boulder Badge: Rock; Rainbow Badge: Grass; Marsh Badge: Psychic; Earth Badge: Ground; Thunder Badge: Electric; Cascade Badge: Water.
  • Same Type Attack Bonus. If the attack type shares a type with one of the user's types, the damage is multiplied by 1.5.
  • Types of attacker and defender. The damage calculated is multiplied by a multiplier that depends on the attacker's and the opponent's types (see the Battle Chart, below). As an exception, after Foresight is used against the opponent, normal and fighting attacks against the opponent have normal effectiveness against the Ghost type.
  • Finally, in a process called "damage variance", a random number from 217 through 255 is multiplied in the currently calculated damage, and divided by 255.
* This effect is ignored if the attack does a critical hit and the attacker's Attack/Special Attack stat stage is less than or equal to the opponent's Defense/Special Defense stat stage.
I'll look into moving the crit mod to the right place and then moving type boost items from power modifiers to damage modifiers.
Thanks Earthworm and Siatam for noticing these errors! :blobthumbsup:

Edit: Alright, will be fixed next update. If I import the input log of the battle Earthworm linked and play out the relevant turn with this PS version, the Hidden Power crit now deals 336 damage to Forretress, which is within the damage calc range. Like Bughouse mentioned, it was very close to the minimum roll.
336.png
 
Last edited:
Hi all, Encore Phanpy and Encore Donphan are considered legal in Showdown, but they are exclusive from the Japanese Pokémon Centers, which mean they should not be allowed in Showdown matches because those only take into account International events (take the example of Dragon Rage Magikarp which was also exclusive of Japan in Gen 1 and was recently banned due to that). For those that don't believe me, here is the list of all the New York City Event moves for Gen 2, Encore Phanpy and Encore Donphan are not among them: https://bulbapedia.bulbagarden.net/wiki/List_of_Gotta_Catch_'Em_All_event_Pokémon

Now here is the list of the Japanese Event moves: https://bulbapedia.bulbagarden.net/..._event_Pokémon_distributions_in_Generation_II

That's all for now, see you around friends.
 

Plague von Karma

Banned deucer.
Hi all, Encore Phanpy and Encore Donphan are considered legal in Showdown, but they are exclusive from the Japanese Pokémon Centers, which mean they should not be allowed in Showdown matches because those only take into account International events (take the example of Dragon Rage Magikarp which was also exclusive of Japan in Gen 1 and was recently banned due to that). For those that don't believe me, here is the list of all the New York City Event moves for Gen 2, Encore Phanpy and Encore Donphan are not among them: https://bulbapedia.bulbagarden.net/wiki/List_of_Gotta_Catch_'Em_All_event_Pokémon

Now here is the list of the Japanese Event moves: https://bulbapedia.bulbagarden.net/..._event_Pokémon_distributions_in_Generation_II

That's all for now, see you around friends.
Since the same method for banning the JP Gen 1 events can be done for Gen 2, it was relatively easy to make a Pull Request for this. This should likely be merged at some point unless I have horrifically fucked up (which is likely, I'm not very smart...)

Thanks to Zarel for telling me this post existed:psynervous:

EDIT: This has been merged and should be live within the next day.
 
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
Hm, it looks like only the Phanpy was updated. Were there any other Japan-exclusive events we should be marking?
 
I saw a replay that Mean Look is missed by opponent's Protect.
https://replay.pokemonshowdown.com/gen2ou-1304271175-4t9kvqypw86hxz0xb40vhw1pum9uizxpw

This is incorrect in Gen2.
Bulbapedia says:
https://m.bulbapedia.bulbagarden.net/wiki/Mean_Look_(move)
Generation II
Mean Look prevents the target from switching out or fleeing (including via Teleport). It bypasses accuracy checks to always hit, unless the target is in the semi-invulnerable turn of a move such as Dig or Fly. The effect only applies as long as the Pokémon that used it remains in battle.

It will hit the target even if it has used Protect or Detect.
 
Tested and verified the interaction on the Silver VC.
Could you test if Ancient Power gives boosts when it KOs the opponent? I never saw that happening on Pokémon Stadium 2 and I'm sure that it doesn't do it on Cartridge either.

For the test to work, your opponent should have at least two pokémon. You KO the first with Ancient Power, see if the boosts occur and then your opponent brings his last pokémon.
 

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
Could you test if Ancient Power gives boosts when it KOs the opponent?
It doesn't, and this has been implemented for a long time. Check out the disassembly: https://pret.github.io/pokecrystal/...e-your-stats-do-not-increase-stats-after-a-ko

I saw a replay that Mean Look is missed by opponent's Protect.
https://replay.pokemonshowdown.com/gen2ou-1304271175-4t9kvqypw86hxz0xb40vhw1pum9uizxpw

This is incorrect in Gen2.
Bulbapedia says:
https://m.bulbapedia.bulbagarden.net/wiki/Mean_Look_(move)
Tested and verified the interaction on the Silver VC.
Good catch, I fixed this yesterday. This also didn't really require an in-game test since move effects that don't call `checkhit` don't run the code that checks for Protect. But it's nice to have footage anyway, thanks!

References
https://github.com/pret/pokecrystal...8321324376/data/moves/effects.asm#L1450-L1455
https://github.com/pret/pokecrystal...engine/battle/effect_commands.asm#L1559-L1566
 
:gs/meganium: :gs/marowak:

I may have found an error on showdown. Currently on ladder Meganium and Marowak are allowed to use ancientpower + swords dance onto the same moveset in GSC (Gen 2) when these two moves are seemingly not compatible.

:gs/feraligatr: :gs/charizard: :gs/venusaur: :gs/tyranitar:

Meganium gets access to ancientpower from breeding with Feraligatr, Charizard, Venusaur, Tyranitar or Marowak, however, the problem is that none of these mons naturally learn swords dance through level up. Charizard, Venusaur, as well as Marowak get swords dance from either from TM03 in RBY (a gen where ancientpower didn't exist) or through breeding while Feraligatr and Tyranitar don't get this move at all.

So unless I'm missing an important piece of the puzzle, this seems to be an oversight.
 
Last edited:

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

Top