smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.77k stars 2.79k forks source link

Wrong winner when last 2 pokemons faint at the same time #8061

Closed BarbzYHOOL closed 3 years ago

BarbzYHOOL commented 3 years ago

When 2 players have 1 last pokemon with 1hp, if a pokemon gets killed by opposing counter damage, the winner is the guy who received the damage. Example: if you kill the opposite pokemon and he deals damage to you with rocky helmet while dying, you lose. All similar abilities/items apply.

I verified on google and found at least two posts describing it in the real game, + it makes sense, it's logic. Unless it was changed in new gen? https://www.reddit.com/r/pokemon/comments/29tjqu/wtf_can_someone_explain_this/

https://replay.pokemonshowdown.com/gen8natureswap-1277310323 look at the end of the replay, i laughed hard coz normally the guy who u-turned should have lost after being killed by the rocky helmet, but it went the other way

Zarel commented 3 years ago

@DaWoblefet do you know what's going on here?

DaWoblefet commented 3 years ago

Rocky Helmet had weird behavior in the original Sun/Moon where the Rocky Helmet winner won in 1.0, but after 1.1 it was updated to reflect the behavior of other effects like Rough Skin (so the Rocky Helmet user lost). The Rocky Helmet user lost in this replay and so far as I know, this hasn't changed in Gen 8. The reddit thread from 6 years ago likely reflects the fact that 2015 was still Gen 6 era.

This sounds like a good candidate to have tests written for though! I'll include that with my next batch.

BarbzYHOOL commented 3 years ago

also found this but it's also from an old post

If a Pokémon’s Ability (such as Rough Skin, Aftermath, Liquid Ooze, or Iron Barbs) or held item (such as Rocky Helmet) results in each player’s final Pokémon fainting, the player whose Pokémon had the Ability or held item wins the game.

btw if you die while rapid spinning, the rapid spin doesn't occur, so it follows the same logic as my suggestion, but if gamefreak did intend it to be the opposite when both pokemon faint, then I can't fight :D

DaWoblefet commented 3 years ago

The behavior is correct and extra tests were written in https://github.com/smogon/pokemon-showdown/pull/8313