@pkmn/sim 0.5.9 → 0.5.12

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 (73) hide show
  1. package/README.md +5 -0
  2. package/build/config/formats.js +364 -296
  3. package/build/config/formats.js.map +1 -1
  4. package/build/data/abilities.js +7 -7
  5. package/build/data/abilities.js.map +1 -1
  6. package/build/data/aliases.js +3 -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 +36 -35
  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/learnsets.js +5 -4
  15. package/build/data/learnsets.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 +2 -2
  19. package/build/data/mods/gen3/formats-data.js.map +1 -1
  20. package/build/data/mods/gen7/formats-data.js +1 -1
  21. package/build/data/mods/gen7/formats-data.js.map +1 -1
  22. package/build/data/moves.js +14 -12
  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/tags.js +4 -4
  27. package/build/data/tags.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/lib/index.js +5 -1
  31. package/build/lib/index.js.map +1 -1
  32. package/build/lib/streams.js +5 -1
  33. package/build/lib/streams.js.map +1 -1
  34. package/build/sim/battle-actions.js +0 -6
  35. package/build/sim/battle-actions.js.map +1 -1
  36. package/build/sim/battle-queue.js +1 -3
  37. package/build/sim/battle-queue.js.map +1 -1
  38. package/build/sim/battle.js +13 -11
  39. package/build/sim/battle.js.map +1 -1
  40. package/build/sim/dex-conditions.js +10 -3
  41. package/build/sim/dex-conditions.js.map +1 -1
  42. package/build/sim/dex.js +5 -1
  43. package/build/sim/dex.js.map +1 -1
  44. package/build/sim/index.js +5 -1
  45. package/build/sim/index.js.map +1 -1
  46. package/build/sim/team-validator.js +1 -1
  47. package/build/sim/team-validator.js.map +1 -1
  48. package/build/sim/teams.js +5 -1
  49. package/build/sim/teams.js.map +1 -1
  50. package/build/sim/tools/index.js +5 -1
  51. package/build/sim/tools/index.js.map +1 -1
  52. package/build/sim/tools/runner.js +5 -1
  53. package/build/sim/tools/runner.js.map +1 -1
  54. package/config/formats.ts +350 -280
  55. package/data/abilities.ts +7 -7
  56. package/data/aliases.ts +3 -0
  57. package/data/conditions.ts +8 -10
  58. package/data/formats-data.ts +36 -35
  59. package/data/items.ts +1 -1
  60. package/data/learnsets.ts +5 -4
  61. package/data/mods/gen1/moves.ts +2 -4
  62. package/data/mods/gen3/formats-data.ts +2 -2
  63. package/data/mods/gen7/formats-data.ts +1 -1
  64. package/data/moves.ts +13 -12
  65. package/data/pokedex.ts +2 -2
  66. package/data/tags.ts +4 -4
  67. package/data/text/moves.ts +2 -0
  68. package/package.json +2 -2
  69. package/sim/battle-actions.ts +0 -7
  70. package/sim/battle-queue.ts +1 -3
  71. package/sim/battle.ts +4 -1
  72. package/sim/dex-conditions.ts +9 -3
  73. package/sim/team-validator.ts +1 -1
@@ -676,10 +676,10 @@ exports.Moves = {
676
676
  this.debug('Attract event failed');
677
677
  return false;
678
678
  }
679
- if (effect.id === 'cutecharm') {
679
+ if (effect.name === 'Cute Charm') {
680
680
  this.add('-start', pokemon, 'Attract', '[from] ability: Cute Charm', '[of] ' + source);
681
681
  }
682
- else if (effect.id === 'destinyknot') {
682
+ else if (effect.name === 'Destiny Knot') {
683
683
  this.add('-start', pokemon, 'Attract', '[from] item: Destiny Knot', '[of] ' + source);
684
684
  }
685
685
  else {
@@ -4163,7 +4163,7 @@ exports.Moves = {
4163
4163
  },
4164
4164
  onFieldStart(field, source, effect) {
4165
4165
  if (effect?.effectType === 'Ability') {
4166
- this.add('-fieldstart', 'move: Electric Terrain', '[from] ability: ' + effect, '[of] ' + source);
4166
+ this.add('-fieldstart', 'move: Electric Terrain', '[from] ability: ' + effect.name, '[of] ' + source);
4167
4167
  }
4168
4168
  else {
4169
4169
  this.add('-fieldstart', 'move: Electric Terrain');
@@ -7295,7 +7295,7 @@ exports.Moves = {
7295
7295
  },
7296
7296
  onFieldStart(field, source, effect) {
7297
7297
  if (effect?.effectType === 'Ability') {
7298
- this.add('-fieldstart', 'move: Grassy Terrain', '[from] ability: ' + effect, '[of] ' + source);
7298
+ this.add('-fieldstart', 'move: Grassy Terrain', '[from] ability: ' + effect.name, '[of] ' + source);
7299
7299
  }
7300
7300
  else {
7301
7301
  this.add('-fieldstart', 'move: Grassy Terrain');
@@ -11613,7 +11613,7 @@ exports.Moves = {
11613
11613
  },
11614
11614
  onFieldStart(field, source, effect) {
11615
11615
  if (effect?.effectType === 'Ability') {
11616
- this.add('-fieldstart', 'move: Misty Terrain', '[from] ability: ' + effect, '[of] ' + source);
11616
+ this.add('-fieldstart', 'move: Misty Terrain', '[from] ability: ' + effect.name, '[of] ' + source);
11617
11617
  }
11618
11618
  else {
11619
11619
  this.add('-fieldstart', 'move: Misty Terrain');
@@ -13436,7 +13436,7 @@ exports.Moves = {
13436
13436
  },
13437
13437
  onFieldStart(field, source, effect) {
13438
13438
  if (effect?.effectType === 'Ability') {
13439
- this.add('-fieldstart', 'move: Psychic Terrain', '[from] ability: ' + effect, '[of] ' + source);
13439
+ this.add('-fieldstart', 'move: Psychic Terrain', '[from] ability: ' + effect.name, '[of] ' + source);
13440
13440
  }
13441
13441
  else {
13442
13442
  this.add('-fieldstart', 'move: Psychic Terrain');
@@ -14331,17 +14331,19 @@ exports.Moves = {
14331
14331
  num: 804,
14332
14332
  accuracy: 100,
14333
14333
  basePower: 70,
14334
+ basePowerCallback(source, target, move) {
14335
+ if (this.field.isTerrain('electricterrain') && target.isGrounded()) {
14336
+ if (!source.isAlly(target))
14337
+ this.hint(`${move.name}'s BP doubled on grounded target.`);
14338
+ return move.basePower * 2;
14339
+ }
14340
+ return move.basePower;
14341
+ },
14334
14342
  category: "Special",
14335
14343
  name: "Rising Voltage",
14336
14344
  pp: 20,
14337
14345
  priority: 0,
14338
14346
  flags: { protect: 1, mirror: 1 },
14339
- onBasePower(basePower, pokemon, target) {
14340
- if (this.field.isTerrain('electricterrain') && target.isGrounded()) {
14341
- this.debug('terrain buff');
14342
- return this.chainModify(2);
14343
- }
14344
- },
14345
14347
  secondary: null,
14346
14348
  target: "normal",
14347
14349
  type: "Electric",