@pkmn/sim 0.5.5 → 0.5.8

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 (71) hide show
  1. package/build/config/formats.js +325 -254
  2. package/build/config/formats.js.map +1 -1
  3. package/build/data/aliases.js +4 -4
  4. package/build/data/aliases.js.map +1 -1
  5. package/build/data/formats-data.js +130 -17
  6. package/build/data/formats-data.js.map +1 -1
  7. package/build/data/items.js +2 -2
  8. package/build/data/items.js.map +1 -1
  9. package/build/data/learnsets.js +6 -5
  10. package/build/data/learnsets.js.map +1 -1
  11. package/build/data/mods/gen2/moves.js +13 -1
  12. package/build/data/mods/gen2/moves.js.map +1 -1
  13. package/build/data/mods/gen3/formats-data.js +3 -3
  14. package/build/data/mods/gen3/formats-data.js.map +1 -1
  15. package/build/data/mods/gen4/formats-data.js +4 -4
  16. package/build/data/mods/gen4/formats-data.js.map +1 -1
  17. package/build/data/mods/gen4/moves.js +7 -5
  18. package/build/data/mods/gen4/moves.js.map +1 -1
  19. package/build/data/mods/gen5/formats-data.js +1 -1
  20. package/build/data/mods/gen5/formats-data.js.map +1 -1
  21. package/build/data/mods/gen5/moves.js +6 -4
  22. package/build/data/mods/gen5/moves.js.map +1 -1
  23. package/build/data/mods/gen6/formats-data.js +3 -2
  24. package/build/data/mods/gen6/formats-data.js.map +1 -1
  25. package/build/data/mods/gen6/items.js +2 -2
  26. package/build/data/mods/gen6/items.js.map +1 -1
  27. package/build/data/mods/gen7/formats-data.js +2 -1
  28. package/build/data/mods/gen7/formats-data.js.map +1 -1
  29. package/build/data/mods/gen7/moves.js +3 -3
  30. package/build/data/mods/gen7/moves.js.map +1 -1
  31. package/build/data/mods/gen7/pokedex.js +4 -0
  32. package/build/data/mods/gen7/pokedex.js.map +1 -1
  33. package/build/data/moves.js +6 -5
  34. package/build/data/moves.js.map +1 -1
  35. package/build/data/pokedex.js +480 -11
  36. package/build/data/pokedex.js.map +1 -1
  37. package/build/data/rulesets.js +26 -1
  38. package/build/data/rulesets.js.map +1 -1
  39. package/build/sim/battle.js +23 -22
  40. package/build/sim/battle.js.map +1 -1
  41. package/build/sim/dex-species.js +5 -2
  42. package/build/sim/dex-species.js.map +1 -1
  43. package/build/sim/exported-global-types.d.ts +1 -0
  44. package/build/sim/global-types.d.ts +1 -0
  45. package/build/sim/team-validator.js +11 -0
  46. package/build/sim/team-validator.js.map +1 -1
  47. package/config/formats.ts +327 -257
  48. package/data/aliases.ts +4 -4
  49. package/data/formats-data.ts +130 -17
  50. package/data/items.ts +2 -2
  51. package/data/learnsets.ts +6 -5
  52. package/data/mods/gen2/moves.ts +13 -1
  53. package/data/mods/gen3/formats-data.ts +3 -3
  54. package/data/mods/gen4/formats-data.ts +4 -4
  55. package/data/mods/gen4/moves.ts +6 -4
  56. package/data/mods/gen5/formats-data.ts +1 -1
  57. package/data/mods/gen5/moves.ts +6 -4
  58. package/data/mods/gen6/formats-data.ts +3 -2
  59. package/data/mods/gen6/items.ts +2 -2
  60. package/data/mods/gen7/formats-data.ts +2 -1
  61. package/data/mods/gen7/moves.ts +3 -3
  62. package/data/mods/gen7/pokedex.ts +4 -0
  63. package/data/moves.ts +6 -5
  64. package/data/pokedex.ts +480 -11
  65. package/data/rulesets.ts +23 -1
  66. package/package.json +2 -2
  67. package/sim/battle.ts +24 -23
  68. package/sim/dex-species.ts +5 -2
  69. package/sim/exported-global-types.ts +1 -0
  70. package/sim/global-types.ts +1 -0
  71. package/sim/team-validator.ts +13 -0
@@ -717,11 +717,12 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
717
717
  tier: "LC",
718
718
  },
719
719
  rhydon: {
720
+ randomBattleMoves: ["earthquake", "megahorn", "rockblast", "stealthrock", "stoneedge", "toxic"],
720
721
  tier: "NU",
721
722
  doublesTier: "NFE",
722
723
  },
723
724
  rhyperior: {
724
- randomBattleMoves: ["dragontail", "earthquake", "icepunch", "megahorn", "rockblast", "rockpolish", "stealthrock", "stoneedge"],
725
+ randomBattleMoves: ["dragontail", "earthquake", "icepunch", "megahorn", "rockblast", "rockpolish", "stoneedge"],
725
726
  randomDoubleBattleMoves: ["earthquake", "icepunch", "megahorn", "protect", "rockslide", "stealthrock", "stoneedge"],
726
727
  tier: "RU",
727
728
  doublesTier: "(DUU)",
@@ -344,11 +344,11 @@ export const Moves: {[k: string]: ModdedMoveData} = {
344
344
  },
345
345
  healbell: {
346
346
  inherit: true,
347
- onHit(pokemon, source) {
347
+ onHit(target, source) {
348
348
  this.add('-activate', source, 'move: Heal Bell');
349
- const side = pokemon.side;
350
349
  let success = false;
351
- for (const ally of side.pokemon) {
350
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
351
+ for (const ally of allies) {
352
352
  if (ally.hasAbility('soundproof')) continue;
353
353
  if (ally.cureStatus()) success = true;
354
354
  }
@@ -156,6 +156,10 @@ export const Pokedex: {[k: string]: ModdedSpeciesData} = {
156
156
  inherit: true,
157
157
  abilities: {0: "Misty Surge"},
158
158
  },
159
+ pyroak: {
160
+ inherit: true,
161
+ abilities: {0: "Rock Head", 1: "Battle Armor", H: "White Smoke"},
162
+ },
159
163
  voodoom: {
160
164
  inherit: true,
161
165
  baseStats: {hp: 90, atk: 85, def: 80, spa: 105, spd: 80, spe: 110},
package/data/moves.ts CHANGED
@@ -500,10 +500,11 @@ export const Moves: {[moveid: string]: MoveData} = {
500
500
  pp: 5,
501
501
  priority: 0,
502
502
  flags: {snatch: 1, distance: 1},
503
- onHit(pokemon, source, move) {
503
+ onHit(target, source, move) {
504
504
  this.add('-activate', source, 'move: Aromatherapy');
505
505
  let success = false;
506
- for (const ally of pokemon.side.pokemon) {
506
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
507
+ for (const ally of allies) {
507
508
  if (ally !== source && ((ally.hasAbility('sapsipper')) ||
508
509
  (ally.volatiles['substitute'] && !move.infiltrates))) {
509
510
  continue;
@@ -7710,11 +7711,11 @@ export const Moves: {[moveid: string]: MoveData} = {
7710
7711
  pp: 5,
7711
7712
  priority: 0,
7712
7713
  flags: {snatch: 1, sound: 1, distance: 1, bypasssub: 1},
7713
- onHit(pokemon, source) {
7714
+ onHit(target, source) {
7714
7715
  this.add('-activate', source, 'move: Heal Bell');
7715
- const side = pokemon.side;
7716
7716
  let success = false;
7717
- for (const ally of side.pokemon) {
7717
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
7718
+ for (const ally of allies) {
7718
7719
  if (ally !== source && ally.hasAbility('soundproof')) continue;
7719
7720
  if (ally.cureStatus()) success = true;
7720
7721
  }