@pkmn/sim 0.7.46 → 0.7.48

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 (97) hide show
  1. package/build/cjs/config/formats.js +228 -134
  2. package/build/cjs/config/formats.js.map +1 -1
  3. package/build/cjs/data/abilities.js +9 -6
  4. package/build/cjs/data/abilities.js.map +1 -1
  5. package/build/cjs/data/aliases.js +3 -3
  6. package/build/cjs/data/aliases.js.map +1 -1
  7. package/build/cjs/data/formats-data.js +185 -174
  8. package/build/cjs/data/formats-data.js.map +1 -1
  9. package/build/cjs/data/items.js +25 -4
  10. package/build/cjs/data/items.js.map +1 -1
  11. package/build/cjs/data/learnsets.js +157 -4
  12. package/build/cjs/data/learnsets.js.map +1 -1
  13. package/build/cjs/data/legality.js +260 -50
  14. package/build/cjs/data/legality.js.map +1 -1
  15. package/build/cjs/data/mods/gen2/scripts.js +3 -3
  16. package/build/cjs/data/mods/gen2/scripts.js.map +1 -1
  17. package/build/cjs/data/mods/gen3/formats-data.js +2 -2
  18. package/build/cjs/data/mods/gen3/formats-data.js.map +1 -1
  19. package/build/cjs/data/mods/gen3/scripts.js +1 -1
  20. package/build/cjs/data/mods/gen3/scripts.js.map +1 -1
  21. package/build/cjs/data/mods/gen4/moves.js +4 -4
  22. package/build/cjs/data/mods/gen4/moves.js.map +1 -1
  23. package/build/cjs/data/mods/gen5/formats-data.js +1 -1
  24. package/build/cjs/data/mods/gen5/formats-data.js.map +1 -1
  25. package/build/cjs/data/mods/gen5/moves.js +1 -1
  26. package/build/cjs/data/mods/gen5/moves.js.map +1 -1
  27. package/build/cjs/data/moves.js +13 -18
  28. package/build/cjs/data/moves.js.map +1 -1
  29. package/build/cjs/data/pokedex.js +39 -3
  30. package/build/cjs/data/pokedex.js.map +1 -1
  31. package/build/cjs/data/pokemongo.js +987 -0
  32. package/build/cjs/data/pokemongo.js.map +1 -0
  33. package/build/cjs/data/rulesets.js +51 -0
  34. package/build/cjs/data/rulesets.js.map +1 -1
  35. package/build/cjs/sim/battle-actions.js +8 -7
  36. package/build/cjs/sim/battle-actions.js.map +1 -1
  37. package/build/cjs/sim/dex-species.js +4 -0
  38. package/build/cjs/sim/dex-species.js.map +1 -1
  39. package/build/cjs/sim/dex.js +3 -2
  40. package/build/cjs/sim/dex.js.map +1 -1
  41. package/build/cjs/sim/pokemon.js +3 -0
  42. package/build/cjs/sim/pokemon.js.map +1 -1
  43. package/build/cjs/sim/team-validator.js +389 -67
  44. package/build/cjs/sim/team-validator.js.map +1 -1
  45. package/build/esm/config/formats.mjs +228 -134
  46. package/build/esm/config/formats.mjs.map +1 -1
  47. package/build/esm/data/abilities.mjs +9 -6
  48. package/build/esm/data/abilities.mjs.map +1 -1
  49. package/build/esm/data/aliases.mjs +3 -3
  50. package/build/esm/data/aliases.mjs.map +1 -1
  51. package/build/esm/data/formats-data.mjs +185 -174
  52. package/build/esm/data/formats-data.mjs.map +1 -1
  53. package/build/esm/data/items.mjs +25 -4
  54. package/build/esm/data/items.mjs.map +1 -1
  55. package/build/esm/data/learnsets.mjs +157 -4
  56. package/build/esm/data/learnsets.mjs.map +1 -1
  57. package/build/esm/data/legality.mjs +260 -50
  58. package/build/esm/data/legality.mjs.map +1 -1
  59. package/build/esm/data/mods/gen2/scripts.mjs +3 -3
  60. package/build/esm/data/mods/gen2/scripts.mjs.map +1 -1
  61. package/build/esm/data/mods/gen3/formats-data.mjs +2 -2
  62. package/build/esm/data/mods/gen3/formats-data.mjs.map +1 -1
  63. package/build/esm/data/mods/gen3/scripts.mjs +1 -1
  64. package/build/esm/data/mods/gen3/scripts.mjs.map +1 -1
  65. package/build/esm/data/mods/gen4/moves.mjs +4 -4
  66. package/build/esm/data/mods/gen4/moves.mjs.map +1 -1
  67. package/build/esm/data/mods/gen5/formats-data.mjs +1 -1
  68. package/build/esm/data/mods/gen5/formats-data.mjs.map +1 -1
  69. package/build/esm/data/mods/gen5/moves.mjs +1 -1
  70. package/build/esm/data/mods/gen5/moves.mjs.map +1 -1
  71. package/build/esm/data/moves.mjs +13 -18
  72. package/build/esm/data/moves.mjs.map +1 -1
  73. package/build/esm/data/pokedex.mjs +39 -3
  74. package/build/esm/data/pokedex.mjs.map +1 -1
  75. package/build/esm/data/pokemongo.mjs +984 -0
  76. package/build/esm/data/pokemongo.mjs.map +1 -0
  77. package/build/esm/data/rulesets.mjs +51 -0
  78. package/build/esm/data/rulesets.mjs.map +1 -1
  79. package/build/esm/sim/battle-actions.mjs +8 -7
  80. package/build/esm/sim/battle-actions.mjs.map +1 -1
  81. package/build/esm/sim/dex-species.mjs +4 -0
  82. package/build/esm/sim/dex-species.mjs.map +1 -1
  83. package/build/esm/sim/dex.mjs +3 -2
  84. package/build/esm/sim/dex.mjs.map +1 -1
  85. package/build/esm/sim/pokemon.mjs +3 -0
  86. package/build/esm/sim/pokemon.mjs.map +1 -1
  87. package/build/esm/sim/team-validator.mjs +389 -67
  88. package/build/esm/sim/team-validator.mjs.map +1 -1
  89. package/build/types/data/pokemongo.d.ts +31 -0
  90. package/build/types/sim/battle-actions.d.ts +1 -1
  91. package/build/types/sim/dex-species.d.ts +12 -0
  92. package/build/types/sim/dex.d.ts +3 -2
  93. package/build/types/sim/exported-global-types.d.ts +16 -2
  94. package/build/types/sim/global-types.d.ts +16 -2
  95. package/build/types/sim/pokemon.d.ts +2 -0
  96. package/build/types/sim/team-validator.d.ts +24 -1
  97. package/package.json +1 -1
@@ -204,6 +204,8 @@ export declare class Pokemon {
204
204
  activeMoveActions: number;
205
205
  previouslySwitchedIn: number;
206
206
  truantTurn: boolean;
207
+ swordBoost: boolean;
208
+ shieldBoost: boolean;
207
209
  /** Have this pokemon's Start events run yet? (Start events run every switch-in) */
208
210
  isStarted: boolean;
209
211
  duringMove: boolean;
@@ -61,6 +61,22 @@ export declare class PokemonSources {
61
61
  * `undefined` = the current move may or may not be a limited egg move
62
62
  */
63
63
  limitedEggMoves?: ID[] | null;
64
+ /**
65
+ * Moves that should be in limitedEggMoves that would otherwise be skipped
66
+ * because they can be learned via Gen 1-2 tradeback
67
+ */
68
+ possiblyLimitedEggMoves?: ID[] | null;
69
+ /**
70
+ * Moves that can be learned via Pomeg glitch and does not require a
71
+ * particular parent to learn
72
+ */
73
+ pomegEggMoves?: ID[] | null;
74
+ /**
75
+ * Event egg source that may be used with the Pomeg glitch
76
+ *
77
+ * `null` = definitely not an event egg that can be used with the Pomeg glitch
78
+ */
79
+ pomegEventEgg?: string | null;
64
80
  /**
65
81
  * Some Pokemon evolve by having a move in their learnset (like Piloswine
66
82
  * with Ancient Power). These can only carry three other moves from their
@@ -73,6 +89,8 @@ export declare class PokemonSources {
73
89
  sketchMove?: string;
74
90
  dreamWorldMoveCount: number;
75
91
  hm?: string;
92
+ isFromPokemonGo?: boolean;
93
+ pokemonGoSource?: string;
76
94
  restrictiveMoves?: string[];
77
95
  /** Obscure learn methods */
78
96
  restrictedMove?: ID;
@@ -114,7 +132,7 @@ export declare class TeamValidator {
114
132
  } | null;
115
133
  getValidationSpecies(set: PokemonSet): [Species, Species];
116
134
  validateSet(set: PokemonSet, teamHas: AnyObject): string[] | null;
117
- validateStats(set: PokemonSet, species: Species, setSources: PokemonSources): string[];
135
+ validateStats(set: PokemonSet, species: Species, setSources: PokemonSources, pokemonGoProblems: string[] | null): string[];
118
136
  /**
119
137
  * Not exhaustive, just checks Atk and Spe, which are the only competitively
120
138
  * relevant IVs outside of extremely obscure situations.
@@ -156,6 +174,11 @@ export declare class TeamValidator {
156
174
  validateMoves(species: Species, moves: string[], setSources: PokemonSources, set?: Partial<PokemonSet>, name?: string, moveLegalityWhitelist?: {
157
175
  [k: string]: true | undefined;
158
176
  }): string[];
177
+ /**
178
+ * Returns a list of problems regarding a Pokemon's avilability in Pokemon GO (empty list if no problems)
179
+ * If the Pokemon cannot be obtained from Pokemon GO, returns null
180
+ */
181
+ validatePokemonGo(species: Species, set: Partial<PokemonSet>, setSources: PokemonSources, name?: string): string[] | null;
159
182
  omCheckCanLearn(move: Move, s: Species, setSources?: PokemonSources, set?: Partial<PokemonSet>, problem?: string): string | null;
160
183
  /** Returns null if you can learn the move, or a string explaining why you can't learn it */
161
184
  checkCanLearn(move: Move, s: Species, setSources?: PokemonSources, set?: Partial<PokemonSet>): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pkmn/sim",
3
- "version": "0.7.46",
3
+ "version": "0.7.48",
4
4
  "description": "An automatically generated extraction of just the simulator portion of Pokémon Showdown",
5
5
  "repository": "github:pkmn/ps",
6
6
  "homepage": "https://psim.us",