smogon / pokemon-showdown

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

Insufficient documentation for natures in packed team format #5919

Closed davidstone closed 4 years ago

davidstone commented 4 years ago

https://github.com/Zarel/Pokemon-Showdown/blob/master/PROTOCOL.md#team-format

There is no entry for "Nature" in that list, and the example shows it as being blank. I'm assuming no nature means that some default nature is picked, but a brief look at the reference implementation did not reveal anything to me. Running Dex.fastUnpackTeam is also not helpful, as it says the nature is '', which is obviously not a nature.

Slayer95 commented 4 years ago

In fact, PS accepts empty nature as a valid neutral nature in any generation.

That's arguably wrong behavior though.

Zarel commented 4 years ago

A Nature of "" is assumed to be Serious, but yes, this should probably be documented.

Slayer95 commented 4 years ago

@Zarel , nothing in the sim code makes it Serious as opposed to Hardy, Docile, Bashful or Quirky.

Zarel commented 4 years ago

@Slayer95 The client will display it as Serious. Nothing in the sim code makes it not Serious.

Zarel commented 4 years ago

Fixed in 1376cd1bea3ca7a797e514630bfa5a32acec24d1

Zarel commented 4 years ago

In other words: The sim doesn't contain any code that needs to treat Serious differently from other natures, but if it did, it would treat '' as Serious.

The client does contain code that treats Serious differently from other natures, and it does treat '' as Serious.

Slayer95 commented 4 years ago

@Zarel , an event-only move may be restricted to Pokémon with Serious nature, but empty nature won't be accepted by the validator.

Zarel commented 4 years ago

That should probably be fixed in-sim, then.

davidstone commented 4 years ago

Also berries like https://www.smogon.com/dex/sm/items/aguav-berry/ . They cause confusion based on whether the nature subtracts from some state, and all of the neutral natures are +Stat -Stat for purposes of confusion berries (at least I believe that was the behavior in Generation 4, not sure if that was maintained in later generations).