@pkmn/sim 0.9.9 → 0.9.11

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 (107) hide show
  1. package/build/cjs/config/formats.js +111 -48
  2. package/build/cjs/config/formats.js.map +1 -1
  3. package/build/cjs/data/abilities.js +4 -2
  4. package/build/cjs/data/abilities.js.map +1 -1
  5. package/build/cjs/data/aliases.js +2 -2
  6. package/build/cjs/data/aliases.js.map +1 -1
  7. package/build/cjs/data/formats-data.js +7 -7
  8. package/build/cjs/data/formats-data.js.map +1 -1
  9. package/build/cjs/data/learnsets.js +8 -11
  10. package/build/cjs/data/learnsets.js.map +1 -1
  11. package/build/cjs/data/mods/gen1/formats-data.js +2 -2
  12. package/build/cjs/data/mods/gen1/formats-data.js.map +1 -1
  13. package/build/cjs/data/mods/gen2/formats-data.js +2 -2
  14. package/build/cjs/data/mods/gen2/formats-data.js.map +1 -1
  15. package/build/cjs/data/mods/gen2/moves.js +8 -12
  16. package/build/cjs/data/mods/gen2/moves.js.map +1 -1
  17. package/build/cjs/data/mods/gen3/formats-data.js +9 -9
  18. package/build/cjs/data/mods/gen3/formats-data.js.map +1 -1
  19. package/build/cjs/data/mods/gen3/moves.js +2 -2
  20. package/build/cjs/data/mods/gen3/moves.js.map +1 -1
  21. package/build/cjs/data/mods/gen4/abilities.js +3 -4
  22. package/build/cjs/data/mods/gen4/abilities.js.map +1 -1
  23. package/build/cjs/data/mods/gen4/moves.js +8 -5
  24. package/build/cjs/data/mods/gen4/moves.js.map +1 -1
  25. package/build/cjs/data/mods/gen5/abilities.js +1 -1
  26. package/build/cjs/data/mods/gen5/abilities.js.map +1 -1
  27. package/build/cjs/data/mods/gen5/moves.js +4 -1
  28. package/build/cjs/data/mods/gen5/moves.js.map +1 -1
  29. package/build/cjs/data/mods/gen7/items.js +2 -2
  30. package/build/cjs/data/mods/gen7/items.js.map +1 -1
  31. package/build/cjs/data/mods/gen8/formats-data.js +1 -2
  32. package/build/cjs/data/mods/gen8/formats-data.js.map +1 -1
  33. package/build/cjs/data/mods/gen8/moves.js +3 -3
  34. package/build/cjs/data/mods/gen8/moves.js.map +1 -1
  35. package/build/cjs/data/moves.js +27 -30
  36. package/build/cjs/data/moves.js.map +1 -1
  37. package/build/cjs/data/text/abilities.js +1 -0
  38. package/build/cjs/data/text/abilities.js.map +1 -1
  39. package/build/cjs/data/text/moves.js +5 -2
  40. package/build/cjs/data/text/moves.js.map +1 -1
  41. package/build/cjs/sim/battle-actions.js +2 -0
  42. package/build/cjs/sim/battle-actions.js.map +1 -1
  43. package/build/cjs/sim/dex-moves.d.ts +1 -3
  44. package/build/cjs/sim/dex-moves.js +0 -1
  45. package/build/cjs/sim/dex-moves.js.map +1 -1
  46. package/build/cjs/sim/dex-species.js +1 -1
  47. package/build/cjs/sim/dex-species.js.map +1 -1
  48. package/build/cjs/sim/exported-global-types.d.ts +1 -0
  49. package/build/cjs/sim/global-types.d.ts +1 -0
  50. package/build/cjs/sim/pokemon.js +5 -3
  51. package/build/cjs/sim/pokemon.js.map +1 -1
  52. package/build/cjs/sim/team-validator.js +12 -3
  53. package/build/cjs/sim/team-validator.js.map +1 -1
  54. package/build/esm/config/formats.mjs +111 -48
  55. package/build/esm/config/formats.mjs.map +1 -1
  56. package/build/esm/data/abilities.mjs +4 -2
  57. package/build/esm/data/abilities.mjs.map +1 -1
  58. package/build/esm/data/aliases.mjs +2 -2
  59. package/build/esm/data/aliases.mjs.map +1 -1
  60. package/build/esm/data/formats-data.mjs +7 -7
  61. package/build/esm/data/formats-data.mjs.map +1 -1
  62. package/build/esm/data/learnsets.mjs +8 -11
  63. package/build/esm/data/learnsets.mjs.map +1 -1
  64. package/build/esm/data/mods/gen1/formats-data.mjs +2 -2
  65. package/build/esm/data/mods/gen1/formats-data.mjs.map +1 -1
  66. package/build/esm/data/mods/gen2/formats-data.mjs +2 -2
  67. package/build/esm/data/mods/gen2/formats-data.mjs.map +1 -1
  68. package/build/esm/data/mods/gen2/moves.mjs +8 -12
  69. package/build/esm/data/mods/gen2/moves.mjs.map +1 -1
  70. package/build/esm/data/mods/gen3/formats-data.mjs +9 -9
  71. package/build/esm/data/mods/gen3/formats-data.mjs.map +1 -1
  72. package/build/esm/data/mods/gen3/moves.mjs +2 -2
  73. package/build/esm/data/mods/gen3/moves.mjs.map +1 -1
  74. package/build/esm/data/mods/gen4/abilities.mjs +3 -4
  75. package/build/esm/data/mods/gen4/abilities.mjs.map +1 -1
  76. package/build/esm/data/mods/gen4/moves.mjs +8 -5
  77. package/build/esm/data/mods/gen4/moves.mjs.map +1 -1
  78. package/build/esm/data/mods/gen5/abilities.mjs +1 -1
  79. package/build/esm/data/mods/gen5/abilities.mjs.map +1 -1
  80. package/build/esm/data/mods/gen5/moves.mjs +4 -1
  81. package/build/esm/data/mods/gen5/moves.mjs.map +1 -1
  82. package/build/esm/data/mods/gen7/items.mjs +2 -2
  83. package/build/esm/data/mods/gen7/items.mjs.map +1 -1
  84. package/build/esm/data/mods/gen8/formats-data.mjs +1 -2
  85. package/build/esm/data/mods/gen8/formats-data.mjs.map +1 -1
  86. package/build/esm/data/mods/gen8/moves.mjs +3 -3
  87. package/build/esm/data/mods/gen8/moves.mjs.map +1 -1
  88. package/build/esm/data/moves.mjs +27 -30
  89. package/build/esm/data/moves.mjs.map +1 -1
  90. package/build/esm/data/text/abilities.mjs +1 -0
  91. package/build/esm/data/text/abilities.mjs.map +1 -1
  92. package/build/esm/data/text/moves.mjs +5 -2
  93. package/build/esm/data/text/moves.mjs.map +1 -1
  94. package/build/esm/sim/battle-actions.mjs +2 -0
  95. package/build/esm/sim/battle-actions.mjs.map +1 -1
  96. package/build/esm/sim/dex-moves.d.mts +1 -3
  97. package/build/esm/sim/dex-moves.mjs +0 -1
  98. package/build/esm/sim/dex-moves.mjs.map +1 -1
  99. package/build/esm/sim/dex-species.mjs +1 -1
  100. package/build/esm/sim/dex-species.mjs.map +1 -1
  101. package/build/esm/sim/exported-global-types.d.mts +1 -0
  102. package/build/esm/sim/global-types.d.mts +1 -0
  103. package/build/esm/sim/pokemon.mjs +5 -3
  104. package/build/esm/sim/pokemon.mjs.map +1 -1
  105. package/build/esm/sim/team-validator.mjs +12 -3
  106. package/build/esm/sim/team-validator.mjs.map +1 -1
  107. package/package.json +2 -2
@@ -1514,9 +1514,9 @@ export const Moves = {
1514
1514
  pp: 10,
1515
1515
  priority: 0,
1516
1516
  flags: {
1517
- protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failmimic: 1, failinstruct: 1,
1517
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1,
1518
+ failcopycat: 1, failmimic: 1, failinstruct: 1, nosketch: 1,
1518
1519
  },
1519
- noSketch: true,
1520
1520
  secondary: {
1521
1521
  chance: 30,
1522
1522
  status: 'brn',
@@ -2469,7 +2469,6 @@ export const Moves = {
2469
2469
  protect: 1, mirror: 1, sound: 1, distance: 1, bypasssub: 1,
2470
2470
  nosleeptalk: 1, noassist: 1, failcopycat: 1, failmimic: 1, failinstruct: 1,
2471
2471
  },
2472
- noSketch: true,
2473
2472
  secondary: {
2474
2473
  chance: 100,
2475
2474
  volatileStatus: 'confusion',
@@ -2759,9 +2758,9 @@ export const Moves = {
2759
2758
  pp: 10,
2760
2759
  priority: 0,
2761
2760
  flags: {
2762
- protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failmimic: 1, failinstruct: 1,
2761
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1,
2762
+ failcopycat: 1, failmimic: 1, failinstruct: 1, nosketch: 1,
2763
2763
  },
2764
- noSketch: true,
2765
2764
  secondary: {
2766
2765
  chance: 30,
2767
2766
  status: 'par',
@@ -3517,7 +3516,7 @@ export const Moves = {
3517
3516
  name: "Dark Void",
3518
3517
  pp: 10,
3519
3518
  priority: 0,
3520
- flags: { protect: 1, reflectable: 1, mirror: 1, metronome: 1 },
3519
+ flags: { protect: 1, reflectable: 1, mirror: 1, metronome: 1, nosketch: 1 },
3521
3520
  status: 'slp',
3522
3521
  onTry(source, target, move) {
3523
3522
  if (source.species.name === 'Darkrai' || move.hasBounced) {
@@ -3527,7 +3526,6 @@ export const Moves = {
3527
3526
  this.hint("Only a Pokemon whose form is Darkrai can use this move.");
3528
3527
  return null;
3529
3528
  },
3530
- noSketch: true,
3531
3529
  secondary: null,
3532
3530
  target: "allAdjacentFoes",
3533
3531
  type: "Dark",
@@ -9614,7 +9612,7 @@ export const Moves = {
9614
9612
  name: "Hyperspace Fury",
9615
9613
  pp: 5,
9616
9614
  priority: 0,
9617
- flags: { mirror: 1, bypasssub: 1 },
9615
+ flags: { mirror: 1, bypasssub: 1, nosketch: 1 },
9618
9616
  breaksProtect: true,
9619
9617
  onTry(source) {
9620
9618
  if (source.species.name === 'Hoopa-Unbound') {
@@ -9635,7 +9633,6 @@ export const Moves = {
9635
9633
  def: -1,
9636
9634
  },
9637
9635
  },
9638
- noSketch: true,
9639
9636
  secondary: null,
9640
9637
  target: "normal",
9641
9638
  type: "Dark",
@@ -11204,9 +11201,9 @@ export const Moves = {
11204
11201
  pp: 10,
11205
11202
  priority: 0,
11206
11203
  flags: {
11207
- protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failmimic: 1, failinstruct: 1,
11204
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1,
11205
+ failcopycat: 1, failmimic: 1, failinstruct: 1, nosketch: 1,
11208
11206
  },
11209
- noSketch: true,
11210
11207
  secondary: {
11211
11208
  chance: 30,
11212
11209
  volatileStatus: 'confusion',
@@ -13462,9 +13459,9 @@ export const Moves = {
13462
13459
  pp: 10,
13463
13460
  priority: 0,
13464
13461
  flags: {
13465
- protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failmimic: 1, failinstruct: 1,
13462
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1,
13463
+ failcopycat: 1, failmimic: 1, failinstruct: 1, nosketch: 1,
13466
13464
  },
13467
- noSketch: true,
13468
13465
  secondary: {
13469
13466
  chance: 30,
13470
13467
  status: 'psn',
@@ -14792,12 +14789,14 @@ export const Moves = {
14792
14789
  for (i in target.boosts) {
14793
14790
  source.boosts[i] = target.boosts[i];
14794
14791
  }
14795
- const volatilesToCopy = ['focusenergy', 'gmaxchistrike', 'laserfocus'];
14792
+ const volatilesToCopy = ['dragoncheer', 'focusenergy', 'gmaxchistrike', 'laserfocus'];
14796
14793
  for (const volatile of volatilesToCopy) {
14797
14794
  if (target.volatiles[volatile]) {
14798
14795
  source.addVolatile(volatile);
14799
14796
  if (volatile === 'gmaxchistrike')
14800
14797
  source.volatiles[volatile].layers = target.volatiles[volatile].layers;
14798
+ if (volatile === 'dragoncheer')
14799
+ source.volatiles[volatile].hasDragonType = target.volatiles[volatile].hasDragonType;
14801
14800
  }
14802
14801
  else {
14803
14802
  source.removeVolatile(volatile);
@@ -15837,11 +15836,12 @@ export const Moves = {
15837
15836
  priority: 0,
15838
15837
  flags: { protect: 1, mirror: 1, dance: 1, metronome: 1 },
15839
15838
  onModifyType(move, pokemon) {
15840
- let type = pokemon.getTypes()[0];
15841
- if (type === "Bird")
15842
- type = "???";
15843
- if (type === "Stellar")
15844
- type = pokemon.getTypes(false, true)[0];
15839
+ const types = pokemon.getTypes();
15840
+ let type = types[0];
15841
+ if (type === 'Bird')
15842
+ type = '???';
15843
+ if (type === '???' && types[1])
15844
+ type = types[1];
15845
15845
  move.type = type;
15846
15846
  },
15847
15847
  secondary: null,
@@ -15920,7 +15920,7 @@ export const Moves = {
15920
15920
  pp: 1,
15921
15921
  noPPBoosts: true,
15922
15922
  priority: 0,
15923
- flags: { heal: 1 },
15923
+ flags: { heal: 1, nosketch: 1 },
15924
15924
  onTryHit(source) {
15925
15925
  if (!source.side.pokemon.filter(ally => ally.fainted).length) {
15926
15926
  return false;
@@ -15935,7 +15935,6 @@ export const Moves = {
15935
15935
  duration: 1,
15936
15936
  // reviving implemented in side.ts, kind of
15937
15937
  },
15938
- noSketch: true,
15939
15938
  secondary: null,
15940
15939
  target: "self",
15941
15940
  type: "Normal",
@@ -17468,13 +17467,14 @@ export const Moves = {
17468
17467
  noPPBoosts: true,
17469
17468
  priority: 0,
17470
17469
  flags: {
17471
- bypasssub: 1, allyanim: 1, failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failmimic: 1, failinstruct: 1,
17470
+ bypasssub: 1, allyanim: 1, failencore: 1, nosleeptalk: 1, noassist: 1,
17471
+ failcopycat: 1, failmimic: 1, failinstruct: 1, nosketch: 1,
17472
17472
  },
17473
17473
  onHit(target, source) {
17474
17474
  const move = target.lastMove;
17475
17475
  if (source.transformed || !move || source.moves.includes(move.id))
17476
17476
  return false;
17477
- if (move.noSketch || move.isZ || move.isMax)
17477
+ if (move.flags['nosketch'] || move.isZ || move.isMax)
17478
17478
  return false;
17479
17479
  const sketchIndex = source.moves.indexOf('sketch');
17480
17480
  if (sketchIndex < 0)
@@ -17492,7 +17492,6 @@ export const Moves = {
17492
17492
  source.baseMoveSlots[sketchIndex] = sketchedMove;
17493
17493
  this.add('-activate', source, 'move: Sketch', move.name);
17494
17494
  },
17495
- noSketch: true,
17496
17495
  secondary: null,
17497
17496
  target: "normal",
17498
17497
  type: "Normal",
@@ -19246,9 +19245,8 @@ export const Moves = {
19246
19245
  priority: 0,
19247
19246
  flags: {
19248
19247
  contact: 1, protect: 1,
19249
- failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failmimic: 1, failinstruct: 1,
19248
+ failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failmimic: 1, failinstruct: 1, nosketch: 1,
19250
19249
  },
19251
- noSketch: true,
19252
19250
  onModifyMove(move, pokemon, target) {
19253
19251
  move.type = '???';
19254
19252
  this.add('-activate', pokemon, 'move: Struggle');
@@ -20339,7 +20337,7 @@ export const Moves = {
20339
20337
  name: "Tera Starstorm",
20340
20338
  pp: 5,
20341
20339
  priority: 0,
20342
- flags: { protect: 1, mirror: 1, noassist: 1, failcopycat: 1, failmimic: 1 },
20340
+ flags: { protect: 1, mirror: 1, noassist: 1, failcopycat: 1, failmimic: 1, nosketch: 1 },
20343
20341
  onModifyType(move, pokemon) {
20344
20342
  if (pokemon.species.name === 'Terapagos-Stellar') {
20345
20343
  move.type = 'Stellar';
@@ -20353,7 +20351,6 @@ export const Moves = {
20353
20351
  move.target = 'allAdjacentFoes';
20354
20352
  }
20355
20353
  },
20356
- noSketch: true,
20357
20354
  secondary: null,
20358
20355
  target: "normal",
20359
20356
  type: "Normal",
@@ -21983,9 +21980,9 @@ export const Moves = {
21983
21980
  pp: 10,
21984
21981
  priority: 0,
21985
21982
  flags: {
21986
- protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failmimic: 1, failinstruct: 1,
21983
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1,
21984
+ failcopycat: 1, failmimic: 1, failinstruct: 1, nosketch: 1,
21987
21985
  },
21988
- noSketch: true,
21989
21986
  secondary: {
21990
21987
  chance: 10,
21991
21988
  status: 'slp',