@pkmn/sim 0.5.11 → 0.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +5 -0
  2. package/build/config/formats.js +356 -288
  3. package/build/config/formats.js.map +1 -1
  4. package/build/data/abilities.js +9 -9
  5. package/build/data/abilities.js.map +1 -1
  6. package/build/data/aliases.js +2 -0
  7. package/build/data/aliases.js.map +1 -1
  8. package/build/data/conditions.js +8 -12
  9. package/build/data/conditions.js.map +1 -1
  10. package/build/data/formats-data.js +33 -32
  11. package/build/data/formats-data.js.map +1 -1
  12. package/build/data/items.js +1 -1
  13. package/build/data/items.js.map +1 -1
  14. package/build/data/mods/gen1/formats-data.js +38 -36
  15. package/build/data/mods/gen1/formats-data.js.map +1 -1
  16. package/build/data/mods/gen1/moves.js +2 -4
  17. package/build/data/mods/gen1/moves.js.map +1 -1
  18. package/build/data/mods/gen3/formats-data.js +1 -1
  19. package/build/data/mods/gen3/formats-data.js.map +1 -1
  20. package/build/data/mods/gen6/formats-data.js +3 -3
  21. package/build/data/mods/gen6/formats-data.js.map +1 -1
  22. package/build/data/moves.js +34 -19
  23. package/build/data/moves.js.map +1 -1
  24. package/build/data/pokedex.js +2 -2
  25. package/build/data/pokedex.js.map +1 -1
  26. package/build/data/rulesets.js +1 -1
  27. package/build/data/rulesets.js.map +1 -1
  28. package/build/data/text/moves.js +1 -0
  29. package/build/data/text/moves.js.map +1 -1
  30. package/build/sim/battle.js +13 -11
  31. package/build/sim/battle.js.map +1 -1
  32. package/build/sim/dex-conditions.js +11 -3
  33. package/build/sim/dex-conditions.js.map +1 -1
  34. package/build/sim/dex-data.js +1 -0
  35. package/build/sim/dex-data.js.map +1 -1
  36. package/build/sim/dex-formats.js +1 -0
  37. package/build/sim/dex-formats.js.map +1 -1
  38. package/build/sim/dex-items.js +1 -0
  39. package/build/sim/dex-items.js.map +1 -1
  40. package/build/sim/dex-moves.js +1 -0
  41. package/build/sim/dex-moves.js.map +1 -1
  42. package/build/sim/dex-species.js +1 -0
  43. package/build/sim/dex-species.js.map +1 -1
  44. package/build/sim/team-validator.js +1 -1
  45. package/build/sim/team-validator.js.map +1 -1
  46. package/config/formats.ts +343 -272
  47. package/data/abilities.ts +9 -9
  48. package/data/aliases.ts +2 -0
  49. package/data/conditions.ts +8 -10
  50. package/data/formats-data.ts +33 -32
  51. package/data/items.ts +1 -1
  52. package/data/mods/gen1/formats-data.ts +38 -36
  53. package/data/mods/gen1/moves.ts +2 -4
  54. package/data/mods/gen3/formats-data.ts +1 -1
  55. package/data/mods/gen6/formats-data.ts +3 -3
  56. package/data/moves.ts +33 -19
  57. package/data/pokedex.ts +2 -2
  58. package/data/rulesets.ts +1 -1
  59. package/data/text/moves.ts +2 -0
  60. package/package.json +2 -2
  61. package/sim/battle.ts +4 -1
  62. package/sim/dex-conditions.ts +10 -3
  63. package/sim/dex-data.ts +1 -0
  64. package/sim/dex-formats.ts +1 -0
  65. package/sim/dex-items.ts +1 -0
  66. package/sim/dex-moves.ts +1 -0
  67. package/sim/dex-species.ts +1 -0
  68. package/sim/team-validator.ts +1 -1
package/README.md CHANGED
@@ -116,6 +116,11 @@ Pokémon Showdown's `sim/` directory has been modified in the following ways:
116
116
  added** for what Pokémon Showdown calls `Pokedex` and `TypeChart` respectively. However, it is
117
117
  important to **note that the types in `@pkmn/sim` do not match the stricter `@pkmn/dex-types`**
118
118
  directly, you must simply cast the `@pkmn/sim` `Dex` and trust that it will work.
119
+ - **`DexConditions` has been modified to behave like the client (and `@pkmn/dex`)**. If an effect
120
+ is prefixed with a type (e.g. `'move: ...'`) then the type will be used to determine which API
121
+ to search. The two differences with Pokémon Showdown's simulator is that the input is more lenient
122
+ (the simulator expects `'move:<ID>'`, where the client allows for `'move: <Name>'`) and the
123
+ returned object's ID is actually a legal ID (the simulator returns `'move:<ID>' as ID`).
119
124
 
120
125
  ## License
121
126