@pkmn/sim 0.5.3 → 0.5.7

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 (80) hide show
  1. package/build/config/formats.js +402 -332
  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 +183 -70
  6. package/build/data/formats-data.js.map +1 -1
  7. package/build/data/mods/gen1/formats-data.js +190 -190
  8. package/build/data/mods/gen1/formats-data.js.map +1 -1
  9. package/build/data/mods/gen1/moves.js +1 -2
  10. package/build/data/mods/gen1/moves.js.map +1 -1
  11. package/build/data/mods/gen2/formats-data.js +1 -1
  12. package/build/data/mods/gen2/formats-data.js.map +1 -1
  13. package/build/data/mods/gen3/formats-data.js +13 -13
  14. package/build/data/mods/gen3/formats-data.js.map +1 -1
  15. package/build/data/mods/gen4/moves.js +22 -0
  16. package/build/data/mods/gen4/moves.js.map +1 -1
  17. package/build/data/mods/gen5/formats-data.js +173 -156
  18. package/build/data/mods/gen5/formats-data.js.map +1 -1
  19. package/build/data/mods/gen6/formats-data.js +4 -3
  20. package/build/data/mods/gen6/formats-data.js.map +1 -1
  21. package/build/data/mods/gen7/formats-data.js +3 -2
  22. package/build/data/mods/gen7/formats-data.js.map +1 -1
  23. package/build/data/mods/gen7/moves.js +154 -0
  24. package/build/data/mods/gen7/moves.js.map +1 -1
  25. package/build/data/moves.js +38 -7
  26. package/build/data/moves.js.map +1 -1
  27. package/build/data/pokedex.js +480 -11
  28. package/build/data/pokedex.js.map +1 -1
  29. package/build/data/rulesets.js +12 -1
  30. package/build/data/rulesets.js.map +1 -1
  31. package/build/data/tags.d.ts +1 -0
  32. package/build/data/tags.js +4 -3
  33. package/build/data/tags.js.map +1 -1
  34. package/build/data/text/abilities.js +4 -4
  35. package/build/data/text/abilities.js.map +1 -1
  36. package/build/data/text/moves.js +18 -18
  37. package/build/data/text/moves.js.map +1 -1
  38. package/build/sim/battle-actions.js +4 -1
  39. package/build/sim/battle-actions.js.map +1 -1
  40. package/build/sim/battle.js +23 -22
  41. package/build/sim/battle.js.map +1 -1
  42. package/build/sim/dex-formats.d.ts +1 -0
  43. package/build/sim/dex-formats.js +3 -2
  44. package/build/sim/dex-formats.js.map +1 -1
  45. package/build/sim/dex-species.js +5 -2
  46. package/build/sim/dex-species.js.map +1 -1
  47. package/build/sim/exported-global-types.d.ts +1 -0
  48. package/build/sim/global-types.d.ts +1 -0
  49. package/build/sim/index.d.ts +1 -0
  50. package/build/sim/index.js +3 -1
  51. package/build/sim/index.js.map +1 -1
  52. package/build/sim/team-validator.js +13 -0
  53. package/build/sim/team-validator.js.map +1 -1
  54. package/config/formats.ts +422 -352
  55. package/data/aliases.ts +4 -4
  56. package/data/formats-data.ts +183 -70
  57. package/data/mods/gen1/formats-data.ts +190 -190
  58. package/data/mods/gen1/moves.ts +1 -2
  59. package/data/mods/gen2/formats-data.ts +1 -1
  60. package/data/mods/gen3/formats-data.ts +13 -13
  61. package/data/mods/gen4/moves.ts +21 -0
  62. package/data/mods/gen5/formats-data.ts +173 -156
  63. package/data/mods/gen6/formats-data.ts +4 -3
  64. package/data/mods/gen7/formats-data.ts +3 -2
  65. package/data/mods/gen7/moves.ts +150 -0
  66. package/data/moves.ts +37 -7
  67. package/data/pokedex.ts +480 -11
  68. package/data/rulesets.ts +11 -1
  69. package/data/tags.ts +6 -3
  70. package/data/text/abilities.ts +4 -4
  71. package/data/text/moves.ts +18 -18
  72. package/package.json +2 -2
  73. package/sim/battle-actions.ts +4 -1
  74. package/sim/battle.ts +24 -23
  75. package/sim/dex-formats.ts +4 -1
  76. package/sim/dex-species.ts +5 -2
  77. package/sim/exported-global-types.ts +1 -0
  78. package/sim/global-types.ts +1 -0
  79. package/sim/index.ts +1 -0
  80. package/sim/team-validator.ts +12 -0
@@ -407,8 +407,7 @@ export const Moves: {[k: string]: ModdedMoveData} = {
407
407
  pokemon.clearBoosts();
408
408
 
409
409
  if (pokemon !== source) {
410
- // Clears the status from the opponent
411
- pokemon.setStatus('');
410
+ pokemon.cureStatus(true);
412
411
  }
413
412
  if (pokemon.status === 'tox') {
414
413
  pokemon.setStatus('psn');
@@ -885,7 +885,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
885
885
  tier: "Uber",
886
886
  },
887
887
  hooh: {
888
- randomBattleMoves: ["curse", "earthquake", "hiddenpowerflying", "sacredfire", "recover", "thunder", "thunderbolt"],
888
+ randomBattleMoves: ["curse", "earthquake", "hiddenpowerflying", "recover", "sacredfire", "thunder", "thunderbolt"],
889
889
  tier: "Uber",
890
890
  },
891
891
  celebi: {
@@ -215,7 +215,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
215
215
  tier: "LC",
216
216
  },
217
217
  arcanine: {
218
- randomBattleMoves: ["fireblast", "flamethrower", "extremespeed", "hiddenpowergrass", "rest", "sleeptalk", "toxic"],
218
+ randomBattleMoves: ["extremespeed", "fireblast", "flamethrower", "hiddenpowergrass", "rest", "sleeptalk", "toxic"],
219
219
  tier: "UUBL",
220
220
  },
221
221
  poliwag: {
@@ -294,14 +294,14 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
294
294
  tier: "UUBL",
295
295
  },
296
296
  slowking: {
297
- randomBattleMoves: ["calmmind", "flamethrower", "icebeam", "psychic", "surf", "rest", "sleeptalk", "thunderwave"],
297
+ randomBattleMoves: ["calmmind", "flamethrower", "icebeam", "psychic", "rest", "sleeptalk", "surf", "thunderwave"],
298
298
  tier: "UU",
299
299
  },
300
300
  magnemite: {
301
301
  tier: "LC",
302
302
  },
303
303
  magneton: {
304
- randomBattleMoves: ["hiddenpowergrass", "hiddenpowerice", "rest", "sleeptalk", "substitute", "thunderbolt", "thunderwave", "toxic"],
304
+ randomBattleMoves: ["hiddenpowergrass", "hiddenpowerice", "rest", "sleeptalk", "thunderbolt", "toxic"],
305
305
  tier: "OU",
306
306
  },
307
307
  farfetchd: {
@@ -326,14 +326,14 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
326
326
  tier: "LC",
327
327
  },
328
328
  muk: {
329
- randomBattleMoves: ["curse", "brickbreak", "explosion", "fireblast", "hiddenpowerghost", "rest", "sludgebomb"],
329
+ randomBattleMoves: ["brickbreak", "curse", "explosion", "fireblast", "hiddenpowerghost", "rest", "sludgebomb"],
330
330
  tier: "UU",
331
331
  },
332
332
  shellder: {
333
333
  tier: "LC",
334
334
  },
335
335
  cloyster: {
336
- randomBattleMoves: ["explosion", "icebeam", "surf", "rapidspin", "spikes", "toxic"],
336
+ randomBattleMoves: ["explosion", "icebeam", "rapidspin", "spikes", "surf", "toxic"],
337
337
  tier: "OU",
338
338
  },
339
339
  gastly: {
@@ -565,7 +565,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
565
565
  tier: "OU",
566
566
  },
567
567
  snorlax: {
568
- randomBattleMoves: ["bodyslam", "curse", "earthquake", "return", "rest", "selfdestruct", "shadowball", "sleeptalk"],
568
+ randomBattleMoves: ["bodyslam", "curse", "earthquake", "rest", "return", "selfdestruct", "shadowball", "sleeptalk"],
569
569
  tier: "OU",
570
570
  },
571
571
  articuno: {
@@ -764,7 +764,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
764
764
  tier: "OU",
765
765
  },
766
766
  dunsparce: {
767
- randomBattleMoves: ["bodyslam", "curse", "headbutt", "rockslide", "rest", "shadowball", "thunderwave"],
767
+ randomBattleMoves: ["bodyslam", "curse", "headbutt", "rest", "rockslide", "shadowball", "thunderwave"],
768
768
  tier: "NU",
769
769
  },
770
770
  gligar: {
@@ -831,7 +831,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
831
831
  tier: "NU",
832
832
  },
833
833
  mantine: {
834
- randomBattleMoves: ["haze", "hiddenpowergrass", "icebeam", "surf", "raindance", "rest", "sleeptalk", "toxic"],
834
+ randomBattleMoves: ["haze", "hiddenpowergrass", "icebeam", "raindance", "rest", "sleeptalk", "surf", "toxic"],
835
835
  tier: "UU",
836
836
  },
837
837
  skarmory: {
@@ -891,7 +891,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
891
891
  tier: "Uber",
892
892
  },
893
893
  hooh: {
894
- randomBattleMoves: ["calmmind", "earthquake", "sacredfire", "thunderbolt", "recover", "substitute", "toxic"],
894
+ randomBattleMoves: ["calmmind", "earthquake", "recover", "sacredfire", "substitute", "thunderbolt", "toxic"],
895
895
  tier: "Uber",
896
896
  },
897
897
  celebi: {
@@ -1053,7 +1053,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1053
1053
  tier: "LC",
1054
1054
  },
1055
1055
  hariyama: {
1056
- randomBattleMoves: ["bulkup", "crosschop", "fakeout", "focuspunch", "hiddenpowerghost", "rockslide", "substitute", "rest", "sleeptalk"],
1056
+ randomBattleMoves: ["bulkup", "crosschop", "fakeout", "hiddenpowerghost", "rest", "rockslide", "sleeptalk"],
1057
1057
  tier: "UUBL",
1058
1058
  },
1059
1059
  nosepass: {
@@ -1206,7 +1206,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1206
1206
  tier: "LC",
1207
1207
  },
1208
1208
  whiscash: {
1209
- randomBattleMoves: ["earthquake", "hiddenpowerbug", "icebeam", "rockslide", "rest", "sleeptalk", "spark", "surf", "toxic"],
1209
+ randomBattleMoves: ["earthquake", "hiddenpowerbug", "icebeam", "rest", "rockslide", "sleeptalk", "spark", "surf", "toxic"],
1210
1210
  tier: "NU",
1211
1211
  },
1212
1212
  corphish: {
@@ -1241,7 +1241,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1241
1241
  tier: "LC",
1242
1242
  },
1243
1243
  milotic: {
1244
- randomBattleMoves: ["icebeam", "mirrorcoat", "recover", "rest", "sleeptalk", "surf", "toxic"],
1244
+ randomBattleMoves: ["icebeam", "mirrorcoat", "recover", "surf", "toxic"],
1245
1245
  tier: "OU",
1246
1246
  },
1247
1247
  castform: {
@@ -1352,7 +1352,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1352
1352
  tier: "UUBL",
1353
1353
  },
1354
1354
  registeel: {
1355
- randomBattleMoves: ["protect", "rest", "seismictoss", "sleeptalk", "toxic"],
1355
+ randomBattleMoves: ["rest", "seismictoss", "sleeptalk", "toxic"],
1356
1356
  tier: "UUBL",
1357
1357
  },
1358
1358
  latias: {
@@ -1433,6 +1433,27 @@ export const Moves: {[k: string]: ModdedMoveData} = {
1433
1433
  return !pokemon.volatiles['choicelock'] && !pokemon.volatiles['encore'];
1434
1434
  },
1435
1435
  },
1436
+ snatch: {
1437
+ inherit: true,
1438
+ condition: {
1439
+ duration: 1,
1440
+ onStart(pokemon) {
1441
+ this.add('-singleturn', pokemon, 'Snatch');
1442
+ },
1443
+ onAnyPrepareHitPriority: -1,
1444
+ onAnyPrepareHit(source, target, move) {
1445
+ const snatchUser = this.effectState.source;
1446
+ if (snatchUser.isSkyDropped()) return;
1447
+ if (!move || move.isZ || move.isMax || !move.flags['snatch']) {
1448
+ return;
1449
+ }
1450
+ snatchUser.removeVolatile('snatch');
1451
+ this.add('-activate', snatchUser, 'move: Snatch', '[of] ' + source);
1452
+ this.actions.useMove(move.id, snatchUser);
1453
+ return null;
1454
+ },
1455
+ },
1456
+ },
1436
1457
  spikes: {
1437
1458
  inherit: true,
1438
1459
  flags: {},