@pkmn/sim 0.7.29 → 0.7.30

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 (88) hide show
  1. package/build/cjs/config/formats.js +24 -36
  2. package/build/cjs/config/formats.js.map +1 -1
  3. package/build/cjs/data/abilities.js +10 -13
  4. package/build/cjs/data/abilities.js.map +1 -1
  5. package/build/cjs/data/formats-data.js +7 -11
  6. package/build/cjs/data/formats-data.js.map +1 -1
  7. package/build/cjs/data/items.js +6 -11
  8. package/build/cjs/data/items.js.map +1 -1
  9. package/build/cjs/data/mods/gen2/moves.js +10 -6
  10. package/build/cjs/data/mods/gen2/moves.js.map +1 -1
  11. package/build/cjs/data/mods/gen3/moves.js +16 -10
  12. package/build/cjs/data/mods/gen3/moves.js.map +1 -1
  13. package/build/cjs/data/mods/gen3/scripts.js +1 -1
  14. package/build/cjs/data/mods/gen3/scripts.js.map +1 -1
  15. package/build/cjs/data/mods/gen4/items.js +1 -1
  16. package/build/cjs/data/mods/gen4/items.js.map +1 -1
  17. package/build/cjs/data/mods/gen4/moves.js +22 -51
  18. package/build/cjs/data/mods/gen4/moves.js.map +1 -1
  19. package/build/cjs/data/mods/gen5/moves.js +28 -37
  20. package/build/cjs/data/mods/gen5/moves.js.map +1 -1
  21. package/build/cjs/data/mods/gen6/moves.js +25 -2
  22. package/build/cjs/data/mods/gen6/moves.js.map +1 -1
  23. package/build/cjs/data/mods/gen7/moves.js +1 -1
  24. package/build/cjs/data/mods/gen7/moves.js.map +1 -1
  25. package/build/cjs/data/mods/gen8/abilities.js +2 -2
  26. package/build/cjs/data/mods/gen8/abilities.js.map +1 -1
  27. package/build/cjs/data/mods/gen8/moves.js +55 -0
  28. package/build/cjs/data/mods/gen8/moves.js.map +1 -1
  29. package/build/cjs/data/moves.js +153 -179
  30. package/build/cjs/data/moves.js.map +1 -1
  31. package/build/cjs/data/text/abilities.js +16 -4
  32. package/build/cjs/data/text/abilities.js.map +1 -1
  33. package/build/cjs/data/text/moves.js +44 -11
  34. package/build/cjs/data/text/moves.js.map +1 -1
  35. package/build/cjs/sim/battle-actions.js +2 -1
  36. package/build/cjs/sim/battle-actions.js.map +1 -1
  37. package/build/cjs/sim/battle.js +1 -1
  38. package/build/cjs/sim/battle.js.map +1 -1
  39. package/build/cjs/sim/dex-moves.js.map +1 -1
  40. package/build/cjs/sim/pokemon.js +7 -13
  41. package/build/cjs/sim/pokemon.js.map +1 -1
  42. package/build/cjs/sim/team-validator.js +1 -1
  43. package/build/cjs/sim/team-validator.js.map +1 -1
  44. package/build/esm/config/formats.mjs +24 -36
  45. package/build/esm/config/formats.mjs.map +1 -1
  46. package/build/esm/data/abilities.mjs +10 -13
  47. package/build/esm/data/abilities.mjs.map +1 -1
  48. package/build/esm/data/formats-data.mjs +7 -11
  49. package/build/esm/data/formats-data.mjs.map +1 -1
  50. package/build/esm/data/items.mjs +6 -11
  51. package/build/esm/data/items.mjs.map +1 -1
  52. package/build/esm/data/mods/gen2/moves.mjs +10 -6
  53. package/build/esm/data/mods/gen2/moves.mjs.map +1 -1
  54. package/build/esm/data/mods/gen3/moves.mjs +16 -10
  55. package/build/esm/data/mods/gen3/moves.mjs.map +1 -1
  56. package/build/esm/data/mods/gen3/scripts.mjs +1 -1
  57. package/build/esm/data/mods/gen3/scripts.mjs.map +1 -1
  58. package/build/esm/data/mods/gen4/items.mjs +1 -1
  59. package/build/esm/data/mods/gen4/items.mjs.map +1 -1
  60. package/build/esm/data/mods/gen4/moves.mjs +22 -51
  61. package/build/esm/data/mods/gen4/moves.mjs.map +1 -1
  62. package/build/esm/data/mods/gen5/moves.mjs +28 -37
  63. package/build/esm/data/mods/gen5/moves.mjs.map +1 -1
  64. package/build/esm/data/mods/gen6/moves.mjs +25 -2
  65. package/build/esm/data/mods/gen6/moves.mjs.map +1 -1
  66. package/build/esm/data/mods/gen7/moves.mjs +1 -1
  67. package/build/esm/data/mods/gen7/moves.mjs.map +1 -1
  68. package/build/esm/data/mods/gen8/abilities.mjs +2 -2
  69. package/build/esm/data/mods/gen8/abilities.mjs.map +1 -1
  70. package/build/esm/data/mods/gen8/moves.mjs +55 -0
  71. package/build/esm/data/mods/gen8/moves.mjs.map +1 -1
  72. package/build/esm/data/moves.mjs +153 -179
  73. package/build/esm/data/moves.mjs.map +1 -1
  74. package/build/esm/data/text/abilities.mjs +16 -4
  75. package/build/esm/data/text/abilities.mjs.map +1 -1
  76. package/build/esm/data/text/moves.mjs +44 -11
  77. package/build/esm/data/text/moves.mjs.map +1 -1
  78. package/build/esm/sim/battle-actions.mjs +2 -1
  79. package/build/esm/sim/battle-actions.mjs.map +1 -1
  80. package/build/esm/sim/battle.mjs +1 -1
  81. package/build/esm/sim/battle.mjs.map +1 -1
  82. package/build/esm/sim/dex-moves.mjs.map +1 -1
  83. package/build/esm/sim/pokemon.mjs +7 -13
  84. package/build/esm/sim/pokemon.mjs.map +1 -1
  85. package/build/esm/sim/team-validator.mjs +1 -1
  86. package/build/esm/sim/team-validator.mjs.map +1 -1
  87. package/build/types/sim/dex-moves.d.ts +12 -2
  88. package/package.json +1 -1
@@ -1,32 +1,4 @@
1
- /*
2
-
3
- List of flags and their descriptions:
4
-
5
- bypasssub: Ignores a target's substitute.
6
- bite: Power is multiplied by 1.5 when used by a Pokemon with the Strong Jaw Ability.
7
- bullet: Has no effect on Pokemon with the Bulletproof Ability.
8
- charge: The user is unable to make a move between turns.
9
- contact: Makes contact.
10
- dance: When used by a Pokemon, other Pokemon with the Dancer Ability can attempt to execute the same move.
11
- defrost: Thaws the user if executed successfully while the user is frozen.
12
- distance: Can target a Pokemon positioned anywhere in a Triple Battle.
13
- gravity: Prevented from being executed or selected during Gravity's effect.
14
- heal: Prevented from being executed or selected during Heal Block's effect.
15
- mirror: Can be copied by Mirror Move.
16
- allyanim: Animates when used against allies
17
- nonsky: Prevented from being executed or selected in a Sky Battle.
18
- powder: Has no effect on Grass-type Pokemon, Pokemon with the Overcoat Ability, and Pokemon holding Safety Goggles.
19
- protect: Blocked by Detect, Protect, Spiky Shield, and if not a Status move, King's Shield.
20
- pulse: Power is multiplied by 1.5 when used by a Pokemon with the Mega Launcher Ability.
21
- punch: Power is multiplied by 1.2 when used by a Pokemon with the Iron Fist Ability.
22
- recharge: If this move is successful, the user must recharge on the following turn and cannot make a move.
23
- reflectable: Bounced back to the original user by Magic Coat or the Magic Bounce Ability.
24
- slicing: Power is multiplied by 1.5 when used by a Pokemon with the Ability Sharpness.
25
- snatch: Can be stolen from the original user and instead used by another Pokemon using Snatch.
26
- sound: Has no effect on Pokemon with the Soundproof Ability.
27
- wind: Activates the Wind Power and Wind Rider Abilities.
28
-
29
- */
1
+ // List of flags and their descriptions can be found in sim/dex-moves.ts
30
2
  export const Moves = {
31
3
  "10000000voltthunderbolt": {
32
4
  num: 719,
@@ -618,21 +590,16 @@ export const Moves = {
618
590
  name: "Assist",
619
591
  pp: 20,
620
592
  priority: 0,
621
- flags: {},
593
+ flags: { failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
622
594
  onHit(target) {
623
- const noAssist = [
624
- 'assist', 'banefulbunker', 'beakblast', 'belch', 'bestow', 'blazingtorque', 'bounce', 'celebrate', 'chatter', 'circlethrow', 'combattorque', 'copycat', 'counter', 'covet', 'destinybond', 'detect', 'dig', 'dive', 'dragontail', 'endure', 'feint', 'fly', 'focuspunch', 'followme', 'helpinghand', 'holdhands', 'kingsshield', 'magicaltorque', 'matblock', 'mefirst', 'metronome', 'mimic', 'mirrorcoat', 'mirrormove', 'naturepower', 'noxioustorque', 'phantomforce', 'protect', 'ragepowder', 'roar', 'shadowforce', 'shelltrap', 'sketch', 'skydrop', 'sleeptalk', 'snatch', 'spikyshield', 'spotlight', 'struggle', 'switcheroo', 'thief', 'transform', 'trick', 'whirlwind', 'wickedtorque',
625
- ];
626
595
  const moves = [];
627
596
  for (const pokemon of target.side.pokemon) {
628
597
  if (pokemon === target)
629
598
  continue;
630
599
  for (const moveSlot of pokemon.moveSlots) {
631
600
  const moveid = moveSlot.id;
632
- if (noAssist.includes(moveid))
633
- continue;
634
601
  const move = this.dex.moves.get(moveid);
635
- if (move.isZ || move.isMax) {
602
+ if (move.flags['noassist'] || move.isZ || move.isMax) {
636
603
  continue;
637
604
  }
638
605
  moves.push(moveid);
@@ -996,7 +963,7 @@ export const Moves = {
996
963
  name: "Baddy Bad",
997
964
  pp: 15,
998
965
  priority: 0,
999
- flags: { protect: 1 },
966
+ flags: { protect: 1, mirror: 1 },
1000
967
  self: {
1001
968
  sideCondition: 'reflect',
1002
969
  },
@@ -1013,7 +980,7 @@ export const Moves = {
1013
980
  name: "Baneful Bunker",
1014
981
  pp: 10,
1015
982
  priority: 4,
1016
- flags: {},
983
+ flags: { noassist: 1, failcopycat: 1 },
1017
984
  stallingMove: true,
1018
985
  volatileStatus: 'banefulbunker',
1019
986
  onPrepareHit(pokemon) {
@@ -1160,7 +1127,7 @@ export const Moves = {
1160
1127
  name: "Beak Blast",
1161
1128
  pp: 15,
1162
1129
  priority: -3,
1163
- flags: { bullet: 1, protect: 1 },
1130
+ flags: { bullet: 1, protect: 1, noassist: 1, failmefirst: 1, nosleeptalk: 1, failcopycat: 1, failinstruct: 1 },
1164
1131
  priorityChargeCallback(pokemon) {
1165
1132
  pokemon.addVolatile('beakblast');
1166
1133
  },
@@ -1216,7 +1183,7 @@ export const Moves = {
1216
1183
  name: "Behemoth Bash",
1217
1184
  pp: 5,
1218
1185
  priority: 0,
1219
- flags: { contact: 1, protect: 1, mirror: 1 },
1186
+ flags: { contact: 1, protect: 1, mirror: 1, failcopycat: 1, failmimic: 1 },
1220
1187
  secondary: null,
1221
1188
  target: "normal",
1222
1189
  type: "Steel",
@@ -1229,7 +1196,7 @@ export const Moves = {
1229
1196
  name: "Behemoth Blade",
1230
1197
  pp: 5,
1231
1198
  priority: 0,
1232
- flags: { contact: 1, protect: 1, mirror: 1, slicing: 1 },
1199
+ flags: { contact: 1, protect: 1, mirror: 1, slicing: 1, failcopycat: 1, failmimic: 1 },
1233
1200
  secondary: null,
1234
1201
  target: "normal",
1235
1202
  type: "Steel",
@@ -1242,7 +1209,7 @@ export const Moves = {
1242
1209
  name: "Belch",
1243
1210
  pp: 10,
1244
1211
  priority: 0,
1245
- flags: { protect: 1 },
1212
+ flags: { protect: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
1246
1213
  onDisableMove(pokemon) {
1247
1214
  if (!pokemon.ateBerry)
1248
1215
  pokemon.disableMove('belch');
@@ -1283,7 +1250,7 @@ export const Moves = {
1283
1250
  name: "Bestow",
1284
1251
  pp: 15,
1285
1252
  priority: 0,
1286
- flags: { mirror: 1, bypasssub: 1, allyanim: 1 },
1253
+ flags: { mirror: 1, bypasssub: 1, allyanim: 1, noassist: 1, failcopycat: 1 },
1287
1254
  onHit(target, source, move) {
1288
1255
  if (target.item) {
1289
1256
  return false;
@@ -1312,7 +1279,7 @@ export const Moves = {
1312
1279
  name: "Bide",
1313
1280
  pp: 10,
1314
1281
  priority: 1,
1315
- flags: { contact: 1, protect: 1 },
1282
+ flags: { contact: 1, protect: 1, nosleeptalk: 1, failinstruct: 1 },
1316
1283
  volatileStatus: 'bide',
1317
1284
  ignoreImmunity: true,
1318
1285
  beforeMoveCallback(pokemon) {
@@ -1503,7 +1470,9 @@ export const Moves = {
1503
1470
  name: "Blazing Torque",
1504
1471
  pp: 10,
1505
1472
  priority: 0,
1506
- flags: { protect: 1 },
1473
+ flags: {
1474
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
1475
+ },
1507
1476
  secondary: {
1508
1477
  chance: 30,
1509
1478
  status: 'brn',
@@ -1748,7 +1717,9 @@ export const Moves = {
1748
1717
  name: "Bounce",
1749
1718
  pp: 5,
1750
1719
  priority: 0,
1751
- flags: { contact: 1, charge: 1, protect: 1, mirror: 1, gravity: 1, distance: 1 },
1720
+ flags: {
1721
+ contact: 1, charge: 1, protect: 1, mirror: 1, gravity: 1, distance: 1, nosleeptalk: 1, noassist: 1, failinstruct: 1,
1722
+ },
1752
1723
  onTryMove(attacker, defender, move) {
1753
1724
  if (attacker.removeVolatile(move.id)) {
1754
1725
  return;
@@ -1791,7 +1762,7 @@ export const Moves = {
1791
1762
  name: "Bouncy Bubble",
1792
1763
  pp: 20,
1793
1764
  priority: 0,
1794
- flags: { protect: 1, heal: 1 },
1765
+ flags: { protect: 1, mirror: 1, heal: 1 },
1795
1766
  drain: [1, 2],
1796
1767
  secondary: null,
1797
1768
  target: "normal",
@@ -2124,7 +2095,7 @@ export const Moves = {
2124
2095
  name: "Buzzy Buzz",
2125
2096
  pp: 20,
2126
2097
  priority: 0,
2127
- flags: { protect: 1 },
2098
+ flags: { protect: 1, mirror: 1 },
2128
2099
  secondary: {
2129
2100
  chance: 100,
2130
2101
  status: 'par',
@@ -2253,7 +2224,7 @@ export const Moves = {
2253
2224
  name: "Celebrate",
2254
2225
  pp: 40,
2255
2226
  priority: 0,
2256
- flags: {},
2227
+ flags: { nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
2257
2228
  onTryHit(target, source) {
2258
2229
  this.add('-activate', target, 'move: Celebrate');
2259
2230
  },
@@ -2368,7 +2339,10 @@ export const Moves = {
2368
2339
  name: "Chatter",
2369
2340
  pp: 20,
2370
2341
  priority: 0,
2371
- flags: { protect: 1, mirror: 1, sound: 1, distance: 1, bypasssub: 1 },
2342
+ flags: {
2343
+ protect: 1, mirror: 1, sound: 1, distance: 1, bypasssub: 1, nosleeptalk: 1, noassist: 1,
2344
+ failcopycat: 1, failinstruct: 1, failmimic: 1,
2345
+ },
2372
2346
  noSketch: true,
2373
2347
  secondary: {
2374
2348
  chance: 100,
@@ -2463,7 +2437,7 @@ export const Moves = {
2463
2437
  name: "Circle Throw",
2464
2438
  pp: 10,
2465
2439
  priority: -6,
2466
- flags: { contact: 1, protect: 1, mirror: 1 },
2440
+ flags: { contact: 1, protect: 1, mirror: 1, noassist: 1, failcopycat: 1 },
2467
2441
  forceSwitch: true,
2468
2442
  target: "normal",
2469
2443
  type: "Fighting",
@@ -2670,7 +2644,9 @@ export const Moves = {
2670
2644
  name: "Combat Torque",
2671
2645
  pp: 10,
2672
2646
  priority: 0,
2673
- flags: { protect: 1 },
2647
+ flags: {
2648
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
2649
+ },
2674
2650
  secondary: {
2675
2651
  chance: 30,
2676
2652
  status: 'par',
@@ -2710,7 +2686,7 @@ export const Moves = {
2710
2686
  name: "Comeuppance",
2711
2687
  pp: 10,
2712
2688
  priority: 0,
2713
- flags: { contact: 1, protect: 1, mirror: 1 },
2689
+ flags: { contact: 1, protect: 1, mirror: 1, failmefirst: 1 },
2714
2690
  onTry(source) {
2715
2691
  const lastDamagedBy = source.getLastDamagedBy(true);
2716
2692
  if (lastDamagedBy === undefined || !lastDamagedBy.thisTurn)
@@ -2882,17 +2858,14 @@ export const Moves = {
2882
2858
  name: "Copycat",
2883
2859
  pp: 20,
2884
2860
  priority: 0,
2885
- flags: {},
2861
+ flags: { failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
2886
2862
  onHit(pokemon) {
2887
- const noCopycat = [
2888
- 'assist', 'banefulbunker', 'beakblast', 'behemothbash', 'behemothblade', 'belch', 'bestow', 'celebrate', 'chatter', 'circlethrow', 'copycat', 'counter', 'covet', 'craftyshield', 'destinybond', 'detect', 'dragontail', 'dynamaxcannon', 'endure', 'feint', 'focuspunch', 'followme', 'helpinghand', 'holdhands', 'kingsshield', 'matblock', 'mefirst', 'metronome', 'mimic', 'mirrorcoat', 'mirrormove', 'naturepower', 'obstruct', 'protect', 'ragepowder', 'roar', 'shelltrap', 'sketch', 'sleeptalk', 'snatch', 'spikyshield', 'spotlight', 'struggle', 'switcheroo', 'thief', 'transform', 'trick', 'whirlwind',
2889
- ];
2890
2863
  let move = this.lastMove;
2891
2864
  if (!move)
2892
2865
  return;
2893
2866
  if (move.isMax && move.baseMove)
2894
2867
  move = this.dex.moves.get(move.baseMove);
2895
- if (noCopycat.includes(move.id) || move.isZ || move.isMax) {
2868
+ if (move.flags['failcopycat'] || move.isZ || move.isMax) {
2896
2869
  return false;
2897
2870
  }
2898
2871
  this.actions.useMove(move.id, pokemon);
@@ -3040,7 +3013,7 @@ export const Moves = {
3040
3013
  name: "Counter",
3041
3014
  pp: 20,
3042
3015
  priority: -5,
3043
- flags: { contact: 1, protect: 1 },
3016
+ flags: { contact: 1, protect: 1, failmefirst: 1, noassist: 1, failcopycat: 1 },
3044
3017
  beforeTurnCallback(pokemon) {
3045
3018
  pokemon.addVolatile('counter');
3046
3019
  },
@@ -3164,7 +3137,7 @@ export const Moves = {
3164
3137
  name: "Covet",
3165
3138
  pp: 25,
3166
3139
  priority: 0,
3167
- flags: { contact: 1, protect: 1, mirror: 1 },
3140
+ flags: { contact: 1, protect: 1, mirror: 1, failmefirst: 1, noassist: 1, failcopycat: 1 },
3168
3141
  onAfterHit(target, source, move) {
3169
3142
  if (source.item || source.volatiles['gem']) {
3170
3143
  return;
@@ -3571,7 +3544,7 @@ export const Moves = {
3571
3544
  name: "Destiny Bond",
3572
3545
  pp: 5,
3573
3546
  priority: 0,
3574
- flags: { bypasssub: 1 },
3547
+ flags: { bypasssub: 1, noassist: 1, failcopycat: 1 },
3575
3548
  volatileStatus: 'destinybond',
3576
3549
  onPrepareHit(pokemon) {
3577
3550
  return !pokemon.removeVolatile('destinybond');
@@ -3583,7 +3556,7 @@ export const Moves = {
3583
3556
  onFaint(target, source, effect) {
3584
3557
  if (!source || !effect || target.isAlly(source))
3585
3558
  return;
3586
- if (effect.effectType === 'Move' && !effect.isFutureMove) {
3559
+ if (effect.effectType === 'Move' && !effect.flags['futuremove']) {
3587
3560
  if (source.volatiles['dynamax']) {
3588
3561
  this.add('-hint', "Dynamaxed Pokémon are immune to Destiny Bond.");
3589
3562
  return;
@@ -3617,7 +3590,7 @@ export const Moves = {
3617
3590
  name: "Detect",
3618
3591
  pp: 5,
3619
3592
  priority: 4,
3620
- flags: {},
3593
+ flags: { noassist: 1, failcopycat: 1 },
3621
3594
  stallingMove: true,
3622
3595
  volatileStatus: 'protect',
3623
3596
  onPrepareHit(pokemon) {
@@ -3678,7 +3651,7 @@ export const Moves = {
3678
3651
  name: "Dig",
3679
3652
  pp: 10,
3680
3653
  priority: 0,
3681
- flags: { contact: 1, charge: 1, protect: 1, mirror: 1, nonsky: 1 },
3654
+ flags: { contact: 1, charge: 1, protect: 1, mirror: 1, nonsky: 1, nosleeptalk: 1, noassist: 1, failinstruct: 1 },
3682
3655
  onTryMove(attacker, defender, move) {
3683
3656
  if (attacker.removeVolatile(move.id)) {
3684
3657
  return;
@@ -3849,7 +3822,9 @@ export const Moves = {
3849
3822
  name: "Dive",
3850
3823
  pp: 10,
3851
3824
  priority: 0,
3852
- flags: { contact: 1, charge: 1, protect: 1, mirror: 1, nonsky: 1, allyanim: 1 },
3825
+ flags: {
3826
+ contact: 1, charge: 1, protect: 1, mirror: 1, nonsky: 1, allyanim: 1, nosleeptalk: 1, noassist: 1, failinstruct: 1,
3827
+ },
3853
3828
  onTryMove(attacker, defender, move) {
3854
3829
  if (attacker.removeVolatile(move.id)) {
3855
3830
  return;
@@ -3950,8 +3925,7 @@ export const Moves = {
3950
3925
  name: "Doom Desire",
3951
3926
  pp: 5,
3952
3927
  priority: 0,
3953
- flags: {},
3954
- isFutureMove: true,
3928
+ flags: { futuremove: 1 },
3955
3929
  onTry(source, target) {
3956
3930
  if (!target.side.addSlotCondition(target, 'futuremove'))
3957
3931
  return false;
@@ -3965,9 +3939,8 @@ export const Moves = {
3965
3939
  basePower: 140,
3966
3940
  category: "Special",
3967
3941
  priority: 0,
3968
- flags: {},
3942
+ flags: { futuremove: 1 },
3969
3943
  effectType: 'Move',
3970
- isFutureMove: true,
3971
3944
  type: 'Steel',
3972
3945
  },
3973
3946
  });
@@ -4205,7 +4178,7 @@ export const Moves = {
4205
4178
  name: "Dragon Darts",
4206
4179
  pp: 10,
4207
4180
  priority: 0,
4208
- flags: { protect: 1, mirror: 1 },
4181
+ flags: { protect: 1, mirror: 1, noparentalbond: 1 },
4209
4182
  multihit: 2,
4210
4183
  smartTarget: true,
4211
4184
  secondary: null,
@@ -4301,7 +4274,7 @@ export const Moves = {
4301
4274
  name: "Dragon Tail",
4302
4275
  pp: 10,
4303
4276
  priority: -6,
4304
- flags: { contact: 1, protect: 1, mirror: 1 },
4277
+ flags: { contact: 1, protect: 1, mirror: 1, noassist: 1, failcopycat: 1 },
4305
4278
  forceSwitch: true,
4306
4279
  target: "normal",
4307
4280
  type: "Dragon",
@@ -4442,7 +4415,7 @@ export const Moves = {
4442
4415
  name: "Dynamax Cannon",
4443
4416
  pp: 5,
4444
4417
  priority: 0,
4445
- flags: { protect: 1 },
4418
+ flags: { protect: 1, failencore: 1, nosleeptalk: 1, noparentalbond: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
4446
4419
  secondary: null,
4447
4420
  target: "normal",
4448
4421
  type: "Dragon",
@@ -4810,22 +4783,19 @@ export const Moves = {
4810
4783
  name: "Encore",
4811
4784
  pp: 5,
4812
4785
  priority: 0,
4813
- flags: { protect: 1, reflectable: 1, mirror: 1, bypasssub: 1 },
4786
+ flags: { protect: 1, reflectable: 1, mirror: 1, bypasssub: 1, failencore: 1 },
4814
4787
  volatileStatus: 'encore',
4815
4788
  condition: {
4816
4789
  duration: 3,
4817
4790
  noCopy: true,
4818
4791
  onStart(target) {
4819
- const noEncore = [
4820
- 'assist', 'copycat', 'dynamaxcannon', 'encore', 'mefirst', 'metronome', 'mimic', 'mirrormove', 'naturepower', 'sketch', 'sleeptalk', 'struggle', 'transform',
4821
- ];
4822
4792
  let move = target.lastMove;
4823
4793
  if (!move || target.volatiles['dynamax'])
4824
4794
  return false;
4825
4795
  if (move.isMax && move.baseMove)
4826
4796
  move = this.dex.moves.get(move.baseMove);
4827
4797
  const moveIndex = target.moves.indexOf(move.id);
4828
- if (move.isZ || noEncore.includes(move.id) || !target.moveSlots[moveIndex] || target.moveSlots[moveIndex].pp <= 0) {
4798
+ if (move.isZ || move.flags['failencore'] || !target.moveSlots[moveIndex] || target.moveSlots[moveIndex].pp <= 0) {
4829
4799
  // it failed
4830
4800
  return false;
4831
4801
  }
@@ -4878,7 +4848,7 @@ export const Moves = {
4878
4848
  name: "Endeavor",
4879
4849
  pp: 5,
4880
4850
  priority: 0,
4881
- flags: { contact: 1, protect: 1, mirror: 1 },
4851
+ flags: { contact: 1, protect: 1, mirror: 1, noparentalbond: 1 },
4882
4852
  onTryImmunity(target, pokemon) {
4883
4853
  return pokemon.hp < target.hp;
4884
4854
  },
@@ -4897,7 +4867,7 @@ export const Moves = {
4897
4867
  name: "Endure",
4898
4868
  pp: 10,
4899
4869
  priority: 4,
4900
- flags: {},
4870
+ flags: { noassist: 1, failcopycat: 1 },
4901
4871
  stallingMove: true,
4902
4872
  volatileStatus: 'endure',
4903
4873
  onPrepareHit(pokemon) {
@@ -5072,7 +5042,7 @@ export const Moves = {
5072
5042
  name: "Explosion",
5073
5043
  pp: 5,
5074
5044
  priority: 0,
5075
- flags: { protect: 1, mirror: 1 },
5045
+ flags: { protect: 1, mirror: 1, noparentalbond: 1 },
5076
5046
  selfdestruct: "always",
5077
5047
  secondary: null,
5078
5048
  target: "allAdjacent",
@@ -5290,7 +5260,7 @@ export const Moves = {
5290
5260
  name: "Feint",
5291
5261
  pp: 10,
5292
5262
  priority: 2,
5293
- flags: { mirror: 1 },
5263
+ flags: { mirror: 1, noassist: 1, failcopycat: 1 },
5294
5264
  breaksProtect: true,
5295
5265
  // Breaking protection implemented in scripts.js
5296
5266
  secondary: null,
@@ -5411,7 +5381,7 @@ export const Moves = {
5411
5381
  name: "Final Gambit",
5412
5382
  pp: 5,
5413
5383
  priority: 0,
5414
- flags: { protect: 1 },
5384
+ flags: { protect: 1, noparentalbond: 1 },
5415
5385
  secondary: null,
5416
5386
  target: "normal",
5417
5387
  type: "Fighting",
@@ -5491,7 +5461,7 @@ export const Moves = {
5491
5461
  name: "Fire Pledge",
5492
5462
  pp: 10,
5493
5463
  priority: 0,
5494
- flags: { protect: 1, mirror: 1, nonsky: 1 },
5464
+ flags: { protect: 1, mirror: 1, nonsky: 1, pledgecombo: 1 },
5495
5465
  onPrepareHit(target, source, move) {
5496
5466
  for (const action of this.queue.list) {
5497
5467
  if (!action.move || !action.pokemon?.isActive ||
@@ -5852,7 +5822,7 @@ export const Moves = {
5852
5822
  name: "Fling",
5853
5823
  pp: 10,
5854
5824
  priority: 0,
5855
- flags: { protect: 1, mirror: 1, allyanim: 1 },
5825
+ flags: { protect: 1, mirror: 1, allyanim: 1, noparentalbond: 1 },
5856
5826
  onPrepareHit(target, source, move) {
5857
5827
  if (source.ignoringItem())
5858
5828
  return false;
@@ -5928,7 +5898,7 @@ export const Moves = {
5928
5898
  name: "Floaty Fall",
5929
5899
  pp: 15,
5930
5900
  priority: 0,
5931
- flags: { contact: 1, protect: 1, gravity: 1 },
5901
+ flags: { contact: 1, protect: 1, mirror: 1, gravity: 1 },
5932
5902
  secondary: {
5933
5903
  chance: 30,
5934
5904
  volatileStatus: 'flinch',
@@ -6024,7 +5994,9 @@ export const Moves = {
6024
5994
  name: "Fly",
6025
5995
  pp: 15,
6026
5996
  priority: 0,
6027
- flags: { contact: 1, charge: 1, protect: 1, mirror: 1, gravity: 1, distance: 1 },
5997
+ flags: {
5998
+ contact: 1, charge: 1, protect: 1, mirror: 1, gravity: 1, distance: 1, nosleeptalk: 1, noassist: 1, failinstruct: 1,
5999
+ },
6028
6000
  onTryMove(attacker, defender, move) {
6029
6001
  if (attacker.removeVolatile(move.id)) {
6030
6002
  return;
@@ -6132,7 +6104,7 @@ export const Moves = {
6132
6104
  name: "Focus Punch",
6133
6105
  pp: 20,
6134
6106
  priority: -3,
6135
- flags: { contact: 1, protect: 1, punch: 1 },
6107
+ flags: { contact: 1, protect: 1, punch: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1 },
6136
6108
  priorityChargeCallback(pokemon) {
6137
6109
  pokemon.addVolatile('focuspunch');
6138
6110
  },
@@ -6170,7 +6142,7 @@ export const Moves = {
6170
6142
  name: "Follow Me",
6171
6143
  pp: 20,
6172
6144
  priority: 2,
6173
- flags: {},
6145
+ flags: { noassist: 1, failcopycat: 1 },
6174
6146
  volatileStatus: 'followme',
6175
6147
  onTry(source) {
6176
6148
  return this.activePerHalf > 1;
@@ -6322,7 +6294,7 @@ export const Moves = {
6322
6294
  name: "Freeze Shock",
6323
6295
  pp: 5,
6324
6296
  priority: 0,
6325
- flags: { charge: 1, protect: 1, mirror: 1 },
6297
+ flags: { charge: 1, protect: 1, mirror: 1, nosleeptalk: 1, failinstruct: 1 },
6326
6298
  onTryMove(attacker, defender, move) {
6327
6299
  if (attacker.removeVolatile(move.id)) {
6328
6300
  return;
@@ -6367,7 +6339,7 @@ export const Moves = {
6367
6339
  name: "Freezy Frost",
6368
6340
  pp: 10,
6369
6341
  priority: 0,
6370
- flags: { protect: 1 },
6342
+ flags: { protect: 1, mirror: 1 },
6371
6343
  onHit() {
6372
6344
  this.add('-clearallboost');
6373
6345
  for (const pokemon of this.getAllActive()) {
@@ -6546,9 +6518,8 @@ export const Moves = {
6546
6518
  name: "Future Sight",
6547
6519
  pp: 10,
6548
6520
  priority: 0,
6549
- flags: {},
6521
+ flags: { allyanim: 1, futuremove: 1 },
6550
6522
  ignoreImmunity: true,
6551
- isFutureMove: true,
6552
6523
  onTry(source, target) {
6553
6524
  if (!target.side.addSlotCondition(target, 'futuremove'))
6554
6525
  return false;
@@ -6563,10 +6534,9 @@ export const Moves = {
6563
6534
  basePower: 120,
6564
6535
  category: "Special",
6565
6536
  priority: 0,
6566
- flags: {},
6537
+ flags: { allyanim: 1, futuremove: 1 },
6567
6538
  ignoreImmunity: false,
6568
6539
  effectType: 'Move',
6569
- isFutureMove: true,
6570
6540
  type: 'Psychic',
6571
6541
  },
6572
6542
  });
@@ -6693,7 +6663,7 @@ export const Moves = {
6693
6663
  name: "Geomancy",
6694
6664
  pp: 10,
6695
6665
  priority: 0,
6696
- flags: { charge: 1, nonsky: 1 },
6666
+ flags: { charge: 1, nonsky: 1, nosleeptalk: 1, failinstruct: 1 },
6697
6667
  onTryMove(attacker, defender, move) {
6698
6668
  if (attacker.removeVolatile(move.id)) {
6699
6669
  return;
@@ -6882,7 +6852,7 @@ export const Moves = {
6882
6852
  name: "Glitzy Glow",
6883
6853
  pp: 15,
6884
6854
  priority: 0,
6885
- flags: { protect: 1 },
6855
+ flags: { protect: 1, mirror: 1 },
6886
6856
  self: {
6887
6857
  sideCondition: 'lightscreen',
6888
6858
  },
@@ -7834,7 +7804,7 @@ export const Moves = {
7834
7804
  name: "Grass Pledge",
7835
7805
  pp: 10,
7836
7806
  priority: 0,
7837
- flags: { protect: 1, mirror: 1, nonsky: 1 },
7807
+ flags: { protect: 1, mirror: 1, nonsky: 1, pledgecombo: 1 },
7838
7808
  onPrepareHit(target, source, move) {
7839
7809
  for (const action of this.queue.list) {
7840
7810
  if (!action.move || !action.pokemon?.isActive ||
@@ -7904,7 +7874,7 @@ export const Moves = {
7904
7874
  name: "Grassy Glide",
7905
7875
  pp: 20,
7906
7876
  priority: 0,
7907
- flags: { contact: 1, protect: 1 },
7877
+ flags: { contact: 1, protect: 1, mirror: 1 },
7908
7878
  onModifyPriority(priority, source, target, move) {
7909
7879
  if (this.field.isTerrain('grassyterrain') && source.isGrounded()) {
7910
7880
  return priority + 1;
@@ -8149,7 +8119,7 @@ export const Moves = {
8149
8119
  onFaint(target, source, effect) {
8150
8120
  if (!source || source.fainted || !effect)
8151
8121
  return;
8152
- if (effect.effectType === 'Move' && !effect.isFutureMove && source.lastMove) {
8122
+ if (effect.effectType === 'Move' && !effect.flags['futuremove'] && source.lastMove) {
8153
8123
  let move = source.lastMove;
8154
8124
  if (move.isMax && move.baseMove)
8155
8125
  move = this.dex.moves.get(move.baseMove);
@@ -8817,7 +8787,7 @@ export const Moves = {
8817
8787
  name: "Helping Hand",
8818
8788
  pp: 20,
8819
8789
  priority: 5,
8820
- flags: { bypasssub: 1 },
8790
+ flags: { bypasssub: 1, noassist: 1, failcopycat: 1 },
8821
8791
  volatileStatus: 'helpinghand',
8822
8792
  onTryHit(target) {
8823
8793
  if (!target.newlySwitched && !this.queue.willMove(target))
@@ -9200,7 +9170,7 @@ export const Moves = {
9200
9170
  name: "Hold Hands",
9201
9171
  pp: 40,
9202
9172
  priority: 0,
9203
- flags: { bypasssub: 1 },
9173
+ flags: { bypasssub: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
9204
9174
  secondary: null,
9205
9175
  target: "adjacentAlly",
9206
9176
  type: "Normal",
@@ -9537,7 +9507,7 @@ export const Moves = {
9537
9507
  name: "Ice Ball",
9538
9508
  pp: 20,
9539
9509
  priority: 0,
9540
- flags: { bullet: 1, contact: 1, protect: 1, mirror: 1 },
9510
+ flags: { bullet: 1, contact: 1, protect: 1, mirror: 1, noparentalbond: 1, failinstruct: 1 },
9541
9511
  onModifyMove(move, pokemon, target) {
9542
9512
  if (pokemon.volatiles['iceball'] || pokemon.status === 'slp' || !target)
9543
9513
  return;
@@ -9605,7 +9575,7 @@ export const Moves = {
9605
9575
  name: "Ice Burn",
9606
9576
  pp: 5,
9607
9577
  priority: 0,
9608
- flags: { charge: 1, protect: 1, mirror: 1 },
9578
+ flags: { charge: 1, protect: 1, mirror: 1, nosleeptalk: 1, failinstruct: 1 },
9609
9579
  onTryMove(attacker, defender, move) {
9610
9580
  if (attacker.removeVolatile(move.id)) {
9611
9581
  return;
@@ -9777,7 +9747,7 @@ export const Moves = {
9777
9747
  name: "Imprison",
9778
9748
  pp: 10,
9779
9749
  priority: 0,
9780
- flags: { snatch: 1, bypasssub: 1 },
9750
+ flags: { snatch: 1, bypasssub: 1, mustpressure: 1 },
9781
9751
  volatileStatus: 'imprison',
9782
9752
  condition: {
9783
9753
  noCopy: true,
@@ -9801,7 +9771,6 @@ export const Moves = {
9801
9771
  },
9802
9772
  },
9803
9773
  secondary: null,
9804
- pressureTarget: "foeSide",
9805
9774
  target: "self",
9806
9775
  type: "Psychic",
9807
9776
  zMove: { boost: { spd: 2 } },
@@ -9938,16 +9907,13 @@ export const Moves = {
9938
9907
  name: "Instruct",
9939
9908
  pp: 15,
9940
9909
  priority: 0,
9941
- flags: { protect: 1, bypasssub: 1, allyanim: 1 },
9910
+ flags: { protect: 1, bypasssub: 1, allyanim: 1, failinstruct: 1 },
9942
9911
  onHit(target, source) {
9943
9912
  if (!target.lastMove || target.volatiles['dynamax'])
9944
9913
  return false;
9945
9914
  const lastMove = target.lastMove;
9946
9915
  const moveIndex = target.moves.indexOf(lastMove.id);
9947
- const noInstruct = [
9948
- 'assist', 'beakblast', 'belch', 'bide', 'celebrate', 'copycat', 'dynamaxcannon', 'focuspunch', 'iceball', 'instruct', 'kingsshield', 'mefirst', 'metronome', 'mimic', 'mirrormove', 'naturepower', 'obstruct', 'outrage', 'petaldance', 'rollout', 'shelltrap', 'sketch', 'sleeptalk', 'struggle', 'thrash', 'transform', 'uproar',
9949
- ];
9950
- if (noInstruct.includes(lastMove.id) || lastMove.isZ || lastMove.isMax ||
9916
+ if (lastMove.flags['failinstruct'] || lastMove.isZ || lastMove.isMax ||
9951
9917
  lastMove.flags['charge'] || lastMove.flags['recharge'] ||
9952
9918
  target.volatiles['beakblast'] || target.volatiles['focuspunch'] || target.volatiles['shelltrap'] ||
9953
9919
  (target.moveSlots[moveIndex] && target.moveSlots[moveIndex].pp <= 0)) {
@@ -10186,7 +10152,7 @@ export const Moves = {
10186
10152
  name: "King's Shield",
10187
10153
  pp: 10,
10188
10154
  priority: 4,
10189
- flags: {},
10155
+ flags: { noassist: 1, failcopycat: 1, failinstruct: 1 },
10190
10156
  stallingMove: true,
10191
10157
  volatileStatus: 'kingsshield',
10192
10158
  onPrepareHit(pokemon) {
@@ -10996,7 +10962,9 @@ export const Moves = {
10996
10962
  name: "Magical Torque",
10997
10963
  pp: 10,
10998
10964
  priority: 0,
10999
- flags: { protect: 1 },
10965
+ flags: {
10966
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
10967
+ },
11000
10968
  secondary: {
11001
10969
  chance: 30,
11002
10970
  volatileStatus: 'confusion',
@@ -11305,7 +11273,7 @@ export const Moves = {
11305
11273
  name: "Mat Block",
11306
11274
  pp: 10,
11307
11275
  priority: 0,
11308
- flags: { snatch: 1, nonsky: 1 },
11276
+ flags: { snatch: 1, nonsky: 1, noassist: 1, failcopycat: 1 },
11309
11277
  stallingMove: true,
11310
11278
  sideCondition: 'matblock',
11311
11279
  onTry(source) {
@@ -11862,20 +11830,20 @@ export const Moves = {
11862
11830
  name: "Me First",
11863
11831
  pp: 20,
11864
11832
  priority: 0,
11865
- flags: { protect: 1, bypasssub: 1 },
11833
+ flags: {
11834
+ protect: 1, bypasssub: 1,
11835
+ failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
11836
+ },
11866
11837
  onTryHit(target, pokemon) {
11867
11838
  const action = this.queue.willMove(target);
11868
11839
  if (!action)
11869
11840
  return false;
11870
- const noMeFirst = [
11871
- 'beakblast', 'chatter', 'counter', 'covet', 'focuspunch', 'mefirst', 'metalburst', 'mirrorcoat', 'shelltrap', 'struggle', 'thief',
11872
- ];
11873
11841
  const move = this.dex.getActiveMove(action.move.id);
11874
11842
  if (action.zmove || move.isZ || move.isMax)
11875
11843
  return false;
11876
11844
  if (target.volatiles['mustrecharge'])
11877
11845
  return false;
11878
- if (move.category === 'Status' || noMeFirst.includes(move.id))
11846
+ if (move.category === 'Status' || move.flags['failmefirst'])
11879
11847
  return false;
11880
11848
  pokemon.addVolatile('mefirst');
11881
11849
  this.actions.useMove(move, pokemon, target);
@@ -12004,7 +11972,7 @@ export const Moves = {
12004
11972
  name: "Metal Burst",
12005
11973
  pp: 10,
12006
11974
  priority: 0,
12007
- flags: { protect: 1, mirror: 1 },
11975
+ flags: { protect: 1, mirror: 1, failmefirst: 1 },
12008
11976
  onTry(source) {
12009
11977
  const lastDamagedBy = source.getLastDamagedBy(true);
12010
11978
  if (lastDamagedBy === undefined || !lastDamagedBy.thisTurn)
@@ -12069,7 +12037,7 @@ export const Moves = {
12069
12037
  name: "Meteor Assault",
12070
12038
  pp: 5,
12071
12039
  priority: 0,
12072
- flags: { protect: 1, recharge: 1, mirror: 1 },
12040
+ flags: { protect: 1, recharge: 1, mirror: 1, failinstruct: 1 },
12073
12041
  self: {
12074
12042
  volatileStatus: 'mustrecharge',
12075
12043
  },
@@ -12131,7 +12099,7 @@ export const Moves = {
12131
12099
  name: "Metronome",
12132
12100
  pp: 10,
12133
12101
  priority: 0,
12134
- flags: {},
12102
+ flags: { failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
12135
12103
  noMetronome: [
12136
12104
  "After You", "Apple Acid", "Armor Cannon", "Assist", "Astral Barrage", "Aura Wheel", "Baneful Bunker", "Beak Blast", "Behemoth Bash", "Behemoth Blade", "Belch", "Bestow", "Blazing Torque", "Body Press", "Branch Poke", "Breaking Swipe", "Celebrate", "Chatter", "Chilling Water", "Chilly Reception", "Clangorous Soul", "Collision Course", "Combat Torque", "Comeuppance", "Copycat", "Counter", "Covet", "Crafty Shield", "Decorate", "Destiny Bond", "Detect", "Diamond Storm", "Doodle", "Double Iron Bash", "Double Shock", "Dragon Ascent", "Dragon Energy", "Drum Beating", "Dynamax Cannon", "Electro Drift", "Endure", "Eternabeam", "False Surrender", "Feint", "Fiery Wrath", "Fillet Away", "Fleur Cannon", "Focus Punch", "Follow Me", "Freeze Shock", "Freezing Glare", "Glacial Lance", "Grav Apple", "Helping Hand", "Hold Hands", "Hyper Drill", "Hyperspace Fury", "Hyperspace Hole", "Ice Burn", "Instruct", "Jet Punch", "Jungle Healing", "King's Shield", "Life Dew", "Light of Ruin", "Magical Torque", "Make It Rain", "Mat Block", "Me First", "Meteor Assault", "Metronome", "Mimic", "Mind Blown", "Mirror Coat", "Mirror Move", "Moongeist Beam", "Nature Power", "Nature's Madness", "Noxious Torque", "Obstruct", "Order Up", "Origin Pulse", "Overdrive", "Photon Geyser", "Plasma Fists", "Population Bomb", "Pounce", "Power Shift", "Precipice Blades", "Protect", "Pyro Ball", "Quash", "Quick Guard", "Rage Fist", "Rage Powder", "Raging Bull", "Raging Fury", "Relic Song", "Revival Blessing", "Ruination", "Salt Cure", "Secret Sword", "Shed Tail", "Shell Trap", "Silk Trap", "Sketch", "Sleep Talk", "Snap Trap", "Snarl", "Snatch", "Snore", "Snowscape", "Spectral Thief", "Spicy Extract", "Spiky Shield", "Spirit Break", "Spotlight", "Springtide Storm", "Steam Eruption", "Steel Beam", "Strange Steam", "Struggle", "Sunsteel Strike", "Surging Strikes", "Switcheroo", "Techno Blast", "Thief", "Thousand Arrows", "Thousand Waves", "Thunder Cage", "Thunderous Kick", "Tidy Up", "Trailblaze", "Transform", "Trick", "Twin Beam", "V-create", "Wicked Blow", "Wicked Torque", "Wide Guard",
12137
12105
  ],
@@ -12179,13 +12147,13 @@ export const Moves = {
12179
12147
  name: "Mimic",
12180
12148
  pp: 10,
12181
12149
  priority: 0,
12182
- flags: { protect: 1, bypasssub: 1, allyanim: 1 },
12150
+ flags: {
12151
+ protect: 1, bypasssub: 1, allyanim: 1,
12152
+ failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
12153
+ },
12183
12154
  onHit(target, source) {
12184
- const disallowedMoves = [
12185
- 'behemothbash', 'behemothblade', 'chatter', 'dynamaxcannon', 'mimic', 'sketch', 'struggle', 'transform',
12186
- ];
12187
12155
  const move = target.lastMove;
12188
- if (source.transformed || !move || disallowedMoves.includes(move.id) || source.moves.includes(move.id)) {
12156
+ if (source.transformed || !move || move.flags['failmimic'] || source.moves.includes(move.id)) {
12189
12157
  return false;
12190
12158
  }
12191
12159
  if (move.isZ || move.isMax)
@@ -12349,7 +12317,7 @@ export const Moves = {
12349
12317
  name: "Mirror Coat",
12350
12318
  pp: 20,
12351
12319
  priority: -5,
12352
- flags: { protect: 1 },
12320
+ flags: { protect: 1, failmefirst: 1, noassist: 1 },
12353
12321
  beforeTurnCallback(pokemon) {
12354
12322
  pokemon.addVolatile('mirrorcoat');
12355
12323
  },
@@ -12395,7 +12363,7 @@ export const Moves = {
12395
12363
  name: "Mirror Move",
12396
12364
  pp: 20,
12397
12365
  priority: 0,
12398
- flags: {},
12366
+ flags: { failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
12399
12367
  onTryHit(target, pokemon) {
12400
12368
  const move = target.lastMove;
12401
12369
  if (!move?.flags['mirror'] || move.isZ || move.isMax) {
@@ -12985,7 +12953,7 @@ export const Moves = {
12985
12953
  name: "Nature Power",
12986
12954
  pp: 20,
12987
12955
  priority: 0,
12988
- flags: {},
12956
+ flags: { failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
12989
12957
  onTryHit(target, pokemon) {
12990
12958
  let move = 'triattack';
12991
12959
  if (this.field.isTerrain('electricterrain')) {
@@ -13203,7 +13171,9 @@ export const Moves = {
13203
13171
  name: "Noxious Torque",
13204
13172
  pp: 10,
13205
13173
  priority: 0,
13206
- flags: { protect: 1 },
13174
+ flags: {
13175
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
13176
+ },
13207
13177
  secondary: {
13208
13178
  chance: 30,
13209
13179
  status: 'psn',
@@ -13253,7 +13223,7 @@ export const Moves = {
13253
13223
  name: "Obstruct",
13254
13224
  pp: 10,
13255
13225
  priority: 4,
13256
- flags: {},
13226
+ flags: { failinstruct: 1 },
13257
13227
  stallingMove: true,
13258
13228
  volatileStatus: 'obstruct',
13259
13229
  onPrepareHit(pokemon) {
@@ -13477,7 +13447,7 @@ export const Moves = {
13477
13447
  name: "Outrage",
13478
13448
  pp: 10,
13479
13449
  priority: 0,
13480
- flags: { contact: 1, protect: 1, mirror: 1 },
13450
+ flags: { contact: 1, protect: 1, mirror: 1, failinstruct: 1 },
13481
13451
  self: {
13482
13452
  volatileStatus: 'lockedmove',
13483
13453
  },
@@ -13726,7 +13696,7 @@ export const Moves = {
13726
13696
  name: "Petal Dance",
13727
13697
  pp: 10,
13728
13698
  priority: 0,
13729
- flags: { contact: 1, protect: 1, mirror: 1, dance: 1 },
13699
+ flags: { contact: 1, protect: 1, mirror: 1, dance: 1, failinstruct: 1 },
13730
13700
  self: {
13731
13701
  volatileStatus: 'lockedmove',
13732
13702
  },
@@ -13748,7 +13718,7 @@ export const Moves = {
13748
13718
  name: "Phantom Force",
13749
13719
  pp: 10,
13750
13720
  priority: 0,
13751
- flags: { contact: 1, charge: 1, mirror: 1 },
13721
+ flags: { contact: 1, charge: 1, mirror: 1, nosleeptalk: 1, noassist: 1, failinstruct: 1 },
13752
13722
  breaksProtect: true,
13753
13723
  onTryMove(attacker, defender, move) {
13754
13724
  if (attacker.removeVolatile(move.id)) {
@@ -13804,7 +13774,7 @@ export const Moves = {
13804
13774
  name: "Pika Papow",
13805
13775
  pp: 20,
13806
13776
  priority: 0,
13807
- flags: { protect: 1 },
13777
+ flags: { protect: 1, mirror: 1 },
13808
13778
  secondary: null,
13809
13779
  target: "normal",
13810
13780
  type: "Electric",
@@ -14424,7 +14394,7 @@ export const Moves = {
14424
14394
  name: "Protect",
14425
14395
  pp: 10,
14426
14396
  priority: 4,
14427
- flags: {},
14397
+ flags: { noassist: 1, failcopycat: 1 },
14428
14398
  stallingMove: true,
14429
14399
  volatileStatus: 'protect',
14430
14400
  onPrepareHit(pokemon) {
@@ -15085,7 +15055,7 @@ export const Moves = {
15085
15055
  name: "Rage Powder",
15086
15056
  pp: 20,
15087
15057
  priority: 2,
15088
- flags: { powder: 1 },
15058
+ flags: { powder: 1, noassist: 1, failcopycat: 1 },
15089
15059
  volatileStatus: 'ragepowder',
15090
15060
  onTry(source) {
15091
15061
  return this.activePerHalf > 1;
@@ -15276,7 +15246,7 @@ export const Moves = {
15276
15246
  name: "Razor Wind",
15277
15247
  pp: 10,
15278
15248
  priority: 0,
15279
- flags: { charge: 1, protect: 1, mirror: 1 },
15249
+ flags: { charge: 1, protect: 1, mirror: 1, nosleeptalk: 1, failinstruct: 1 },
15280
15250
  onTryMove(attacker, defender, move) {
15281
15251
  if (attacker.removeVolatile(move.id)) {
15282
15252
  return;
@@ -15677,7 +15647,7 @@ export const Moves = {
15677
15647
  name: "Roar",
15678
15648
  pp: 20,
15679
15649
  priority: -6,
15680
- flags: { reflectable: 1, mirror: 1, sound: 1, bypasssub: 1, allyanim: 1 },
15650
+ flags: { reflectable: 1, mirror: 1, sound: 1, bypasssub: 1, allyanim: 1, noassist: 1, failcopycat: 1 },
15681
15651
  forceSwitch: true,
15682
15652
  secondary: null,
15683
15653
  target: "normal",
@@ -15922,7 +15892,7 @@ export const Moves = {
15922
15892
  name: "Rollout",
15923
15893
  pp: 20,
15924
15894
  priority: 0,
15925
- flags: { contact: 1, protect: 1, mirror: 1 },
15895
+ flags: { contact: 1, protect: 1, mirror: 1, noparentalbond: 1, failinstruct: 1 },
15926
15896
  onModifyMove(move, pokemon, target) {
15927
15897
  if (pokemon.volatiles['rollout'] || pokemon.status === 'slp' || !target)
15928
15898
  return;
@@ -16287,7 +16257,7 @@ export const Moves = {
16287
16257
  name: "Sappy Seed",
16288
16258
  pp: 10,
16289
16259
  priority: 0,
16290
- flags: { protect: 1, reflectable: 1 },
16260
+ flags: { protect: 1, reflectable: 1, mirror: 1 },
16291
16261
  onHit(target, source) {
16292
16262
  if (target.hasType('Grass'))
16293
16263
  return null;
@@ -16581,7 +16551,7 @@ export const Moves = {
16581
16551
  name: "Self-Destruct",
16582
16552
  pp: 5,
16583
16553
  priority: 0,
16584
- flags: { protect: 1, mirror: 1 },
16554
+ flags: { protect: 1, mirror: 1, noparentalbond: 1 },
16585
16555
  selfdestruct: "always",
16586
16556
  secondary: null,
16587
16557
  target: "allAdjacent",
@@ -16650,7 +16620,7 @@ export const Moves = {
16650
16620
  name: "Shadow Force",
16651
16621
  pp: 5,
16652
16622
  priority: 0,
16653
- flags: { contact: 1, charge: 1, mirror: 1 },
16623
+ flags: { contact: 1, charge: 1, mirror: 1, nosleeptalk: 1, noassist: 1, failinstruct: 1 },
16654
16624
  breaksProtect: true,
16655
16625
  onTryMove(attacker, defender, move) {
16656
16626
  if (attacker.removeVolatile(move.id)) {
@@ -16885,7 +16855,7 @@ export const Moves = {
16885
16855
  name: "Shell Trap",
16886
16856
  pp: 5,
16887
16857
  priority: -3,
16888
- flags: { protect: 1 },
16858
+ flags: { protect: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1 },
16889
16859
  priorityChargeCallback(pokemon) {
16890
16860
  pokemon.addVolatile('shelltrap');
16891
16861
  },
@@ -17163,7 +17133,7 @@ export const Moves = {
17163
17133
  name: "Sizzly Slide",
17164
17134
  pp: 20,
17165
17135
  priority: 0,
17166
- flags: { contact: 1, protect: 1, defrost: 1 },
17136
+ flags: { contact: 1, protect: 1, mirror: 1, defrost: 1 },
17167
17137
  secondary: {
17168
17138
  chance: 100,
17169
17139
  status: 'brn',
@@ -17182,7 +17152,9 @@ export const Moves = {
17182
17152
  pp: 1,
17183
17153
  noPPBoosts: true,
17184
17154
  priority: 0,
17185
- flags: { bypasssub: 1, allyanim: 1 },
17155
+ flags: {
17156
+ bypasssub: 1, allyanim: 1, failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
17157
+ },
17186
17158
  onHit(target, source) {
17187
17159
  const disallowedMoves = ['chatter', 'sketch', 'struggle'];
17188
17160
  const move = target.lastMove;
@@ -17292,7 +17264,7 @@ export const Moves = {
17292
17264
  name: "Skull Bash",
17293
17265
  pp: 10,
17294
17266
  priority: 0,
17295
- flags: { contact: 1, charge: 1, protect: 1, mirror: 1 },
17267
+ flags: { contact: 1, charge: 1, protect: 1, mirror: 1, nosleeptalk: 1, failinstruct: 1 },
17296
17268
  onTryMove(attacker, defender, move) {
17297
17269
  if (attacker.removeVolatile(move.id)) {
17298
17270
  return;
@@ -17318,7 +17290,7 @@ export const Moves = {
17318
17290
  name: "Sky Attack",
17319
17291
  pp: 5,
17320
17292
  priority: 0,
17321
- flags: { charge: 1, protect: 1, mirror: 1, distance: 1 },
17293
+ flags: { charge: 1, protect: 1, mirror: 1, distance: 1, nosleeptalk: 1, failinstruct: 1 },
17322
17294
  critRatio: 2,
17323
17295
  onTryMove(attacker, defender, move) {
17324
17296
  if (attacker.removeVolatile(move.id)) {
@@ -17348,7 +17320,9 @@ export const Moves = {
17348
17320
  name: "Sky Drop",
17349
17321
  pp: 10,
17350
17322
  priority: 0,
17351
- flags: { contact: 1, charge: 1, protect: 1, mirror: 1, gravity: 1, distance: 1 },
17323
+ flags: {
17324
+ contact: 1, charge: 1, protect: 1, mirror: 1, gravity: 1, distance: 1, nosleeptalk: 1, noassist: 1, failinstruct: 1,
17325
+ },
17352
17326
  onModifyMove(move, source) {
17353
17327
  if (!source.volatiles['skydrop']) {
17354
17328
  move.accuracy = true;
@@ -17540,22 +17514,19 @@ export const Moves = {
17540
17514
  name: "Sleep Talk",
17541
17515
  pp: 10,
17542
17516
  priority: 0,
17543
- flags: {},
17517
+ flags: { failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
17544
17518
  sleepUsable: true,
17545
17519
  onTry(source) {
17546
17520
  return source.status === 'slp' || source.hasAbility('comatose');
17547
17521
  },
17548
17522
  onHit(pokemon) {
17549
- const noSleepTalk = [
17550
- 'assist', 'beakblast', 'belch', 'bide', 'celebrate', 'chatter', 'copycat', 'dynamaxcannon', 'focuspunch', 'mefirst', 'metronome', 'mimic', 'mirrormove', 'naturepower', 'shelltrap', 'sketch', 'sleeptalk', 'uproar',
17551
- ];
17552
17523
  const moves = [];
17553
17524
  for (const moveSlot of pokemon.moveSlots) {
17554
17525
  const moveid = moveSlot.id;
17555
17526
  if (!moveid)
17556
17527
  continue;
17557
17528
  const move = this.dex.moves.get(moveid);
17558
- if (noSleepTalk.includes(moveid) || move.flags['charge'] || (move.isZ && move.basePower !== 1) || move.isMax) {
17529
+ if (move.flags['nosleeptalk'] || move.flags['charge'] || (move.isZ && move.basePower !== 1) || move.isMax) {
17559
17530
  continue;
17560
17531
  }
17561
17532
  moves.push(moveid);
@@ -17793,7 +17764,7 @@ export const Moves = {
17793
17764
  name: "Snatch",
17794
17765
  pp: 10,
17795
17766
  priority: 4,
17796
- flags: { bypasssub: 1 },
17767
+ flags: { bypasssub: 1, mustpressure: 1, noassist: 1, failcopycat: 1 },
17797
17768
  volatileStatus: 'snatch',
17798
17769
  condition: {
17799
17770
  duration: 1,
@@ -17815,7 +17786,6 @@ export const Moves = {
17815
17786
  },
17816
17787
  },
17817
17788
  secondary: null,
17818
- pressureTarget: "foeSide",
17819
17789
  target: "self",
17820
17790
  type: "Dark",
17821
17791
  zMove: { boost: { spe: 2 } },
@@ -17919,7 +17889,7 @@ export const Moves = {
17919
17889
  name: "Solar Beam",
17920
17890
  pp: 10,
17921
17891
  priority: 0,
17922
- flags: { charge: 1, protect: 1, mirror: 1 },
17892
+ flags: { charge: 1, protect: 1, mirror: 1, nosleeptalk: 1, failinstruct: 1 },
17923
17893
  onTryMove(attacker, defender, move) {
17924
17894
  if (attacker.removeVolatile(move.id)) {
17925
17895
  return;
@@ -17956,7 +17926,7 @@ export const Moves = {
17956
17926
  name: "Solar Blade",
17957
17927
  pp: 10,
17958
17928
  priority: 0,
17959
- flags: { contact: 1, charge: 1, protect: 1, mirror: 1, slicing: 1 },
17929
+ flags: { contact: 1, charge: 1, protect: 1, mirror: 1, slicing: 1, nosleeptalk: 1, failinstruct: 1 },
17960
17930
  onTryMove(attacker, defender, move) {
17961
17931
  if (attacker.removeVolatile(move.id)) {
17962
17932
  return;
@@ -18084,7 +18054,7 @@ export const Moves = {
18084
18054
  name: "Sparkly Swirl",
18085
18055
  pp: 5,
18086
18056
  priority: 0,
18087
- flags: { protect: 1 },
18057
+ flags: { protect: 1, mirror: 1 },
18088
18058
  self: {
18089
18059
  onHit(pokemon, source, move) {
18090
18060
  this.add('-activate', source, 'move: Aromatherapy');
@@ -18200,7 +18170,7 @@ export const Moves = {
18200
18170
  name: "Spikes",
18201
18171
  pp: 20,
18202
18172
  priority: 0,
18203
- flags: { reflectable: 1, nonsky: 1 },
18173
+ flags: { reflectable: 1, nonsky: 1, mustpressure: 1 },
18204
18174
  sideCondition: 'spikes',
18205
18175
  condition: {
18206
18176
  // this is a side condition
@@ -18235,7 +18205,7 @@ export const Moves = {
18235
18205
  name: "Spiky Shield",
18236
18206
  pp: 10,
18237
18207
  priority: 4,
18238
- flags: {},
18208
+ flags: { noassist: 1, failcopycat: 1 },
18239
18209
  stallingMove: true,
18240
18210
  volatileStatus: 'spikyshield',
18241
18211
  onPrepareHit(pokemon) {
@@ -18451,7 +18421,7 @@ export const Moves = {
18451
18421
  name: "Splishy Splash",
18452
18422
  pp: 15,
18453
18423
  priority: 0,
18454
- flags: { protect: 1 },
18424
+ flags: { protect: 1, mirror: 1 },
18455
18425
  secondary: {
18456
18426
  chance: 30,
18457
18427
  status: 'par',
@@ -18485,7 +18455,7 @@ export const Moves = {
18485
18455
  name: "Spotlight",
18486
18456
  pp: 15,
18487
18457
  priority: 3,
18488
- flags: { protect: 1, reflectable: 1, allyanim: 1 },
18458
+ flags: { protect: 1, reflectable: 1, allyanim: 1, noassist: 1, failcopycat: 1 },
18489
18459
  volatileStatus: 'spotlight',
18490
18460
  onTryHit(target) {
18491
18461
  if (this.activePerHalf === 1)
@@ -18537,7 +18507,7 @@ export const Moves = {
18537
18507
  name: "Stealth Rock",
18538
18508
  pp: 20,
18539
18509
  priority: 0,
18540
- flags: { reflectable: 1 },
18510
+ flags: { reflectable: 1, mustpressure: 1 },
18541
18511
  sideCondition: 'stealthrock',
18542
18512
  condition: {
18543
18513
  // this is a side condition
@@ -18681,7 +18651,6 @@ export const Moves = {
18681
18651
  },
18682
18652
  },
18683
18653
  secondary: null,
18684
- pressureTarget: "self",
18685
18654
  target: "foeSide",
18686
18655
  type: "Bug",
18687
18656
  zMove: { boost: { spe: 1 } },
@@ -18959,7 +18928,10 @@ export const Moves = {
18959
18928
  pp: 1,
18960
18929
  noPPBoosts: true,
18961
18930
  priority: 0,
18962
- flags: { contact: 1, protect: 1 },
18931
+ flags: {
18932
+ contact: 1, protect: 1,
18933
+ failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
18934
+ },
18963
18935
  noSketch: true,
18964
18936
  onModifyMove(move, pokemon, target) {
18965
18937
  move.type = '???';
@@ -19402,7 +19374,7 @@ export const Moves = {
19402
19374
  name: "Switcheroo",
19403
19375
  pp: 10,
19404
19376
  priority: 0,
19405
- flags: { protect: 1, mirror: 1, allyanim: 1 },
19377
+ flags: { protect: 1, mirror: 1, allyanim: 1, noassist: 1, failcopycat: 1 },
19406
19378
  onTryImmunity(target) {
19407
19379
  return !target.hasAbility('stickyhold');
19408
19380
  },
@@ -19926,7 +19898,7 @@ export const Moves = {
19926
19898
  name: "Tera Blast",
19927
19899
  pp: 10,
19928
19900
  priority: 0,
19929
- flags: { protect: 1, mirror: 1 },
19901
+ flags: { protect: 1, mirror: 1, mustpressure: 1 },
19930
19902
  onModifyType(move, pokemon, target) {
19931
19903
  if (pokemon.terastallized) {
19932
19904
  move.type = pokemon.teraType;
@@ -19988,7 +19960,7 @@ export const Moves = {
19988
19960
  name: "Thief",
19989
19961
  pp: 25,
19990
19962
  priority: 0,
19991
- flags: { contact: 1, protect: 1, mirror: 1 },
19963
+ flags: { contact: 1, protect: 1, mirror: 1, failmefirst: 1, noassist: 1, failcopycat: 1 },
19992
19964
  onAfterHit(target, source, move) {
19993
19965
  if (source.item || source.volatiles['gem']) {
19994
19966
  return;
@@ -20066,7 +20038,7 @@ export const Moves = {
20066
20038
  name: "Thrash",
20067
20039
  pp: 10,
20068
20040
  priority: 0,
20069
- flags: { contact: 1, protect: 1, mirror: 1 },
20041
+ flags: { contact: 1, protect: 1, mirror: 1, failinstruct: 1 },
20070
20042
  self: {
20071
20043
  volatileStatus: 'lockedmove',
20072
20044
  },
@@ -20442,7 +20414,7 @@ export const Moves = {
20442
20414
  name: "Toxic Spikes",
20443
20415
  pp: 20,
20444
20416
  priority: 0,
20445
- flags: { reflectable: 1, nonsky: 1 },
20417
+ flags: { reflectable: 1, nonsky: 1, mustpressure: 1 },
20446
20418
  sideCondition: 'toxicspikes',
20447
20419
  condition: {
20448
20420
  // this is a side condition
@@ -20529,7 +20501,7 @@ export const Moves = {
20529
20501
  name: "Transform",
20530
20502
  pp: 10,
20531
20503
  priority: 0,
20532
- flags: { allyanim: 1 },
20504
+ flags: { allyanim: 1, failencore: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1 },
20533
20505
  onHit(target, pokemon) {
20534
20506
  if (!pokemon.transformInto(target)) {
20535
20507
  return false;
@@ -20577,7 +20549,7 @@ export const Moves = {
20577
20549
  name: "Trick",
20578
20550
  pp: 10,
20579
20551
  priority: 0,
20580
- flags: { protect: 1, mirror: 1, allyanim: 1 },
20552
+ flags: { protect: 1, mirror: 1, allyanim: 1, noassist: 1, failcopycat: 1 },
20581
20553
  onTryImmunity(target) {
20582
20554
  return !target.hasAbility('stickyhold');
20583
20555
  },
@@ -20932,7 +20904,7 @@ export const Moves = {
20932
20904
  name: "Uproar",
20933
20905
  pp: 10,
20934
20906
  priority: 0,
20935
- flags: { protect: 1, mirror: 1, sound: 1, bypasssub: 1 },
20907
+ flags: { protect: 1, mirror: 1, sound: 1, bypasssub: 1, nosleeptalk: 1, failinstruct: 1 },
20936
20908
  self: {
20937
20909
  volatileStatus: 'uproar',
20938
20910
  },
@@ -21036,7 +21008,7 @@ export const Moves = {
21036
21008
  name: "Veevee Volley",
21037
21009
  pp: 20,
21038
21010
  priority: 0,
21039
- flags: { contact: 1, protect: 1 },
21011
+ flags: { contact: 1, protect: 1, mirror: 1 },
21040
21012
  secondary: null,
21041
21013
  target: "normal",
21042
21014
  type: "Normal",
@@ -21250,7 +21222,7 @@ export const Moves = {
21250
21222
  name: "Water Pledge",
21251
21223
  pp: 10,
21252
21224
  priority: 0,
21253
- flags: { protect: 1, mirror: 1, nonsky: 1 },
21225
+ flags: { protect: 1, mirror: 1, nonsky: 1, pledgecombo: 1 },
21254
21226
  onPrepareHit(target, source, move) {
21255
21227
  for (const action of this.queue) {
21256
21228
  if (action.choice !== 'move')
@@ -21494,7 +21466,7 @@ export const Moves = {
21494
21466
  name: "Whirlwind",
21495
21467
  pp: 20,
21496
21468
  priority: -6,
21497
- flags: { reflectable: 1, mirror: 1, bypasssub: 1, allyanim: 1, wind: 1 },
21469
+ flags: { reflectable: 1, mirror: 1, bypasssub: 1, allyanim: 1, wind: 1, noassist: 1, failcopycat: 1 },
21498
21470
  forceSwitch: true,
21499
21471
  secondary: null,
21500
21472
  target: "normal",
@@ -21525,7 +21497,9 @@ export const Moves = {
21525
21497
  name: "Wicked Torque",
21526
21498
  pp: 10,
21527
21499
  priority: 0,
21528
- flags: { protect: 1 },
21500
+ flags: {
21501
+ protect: 1, failencore: 1, failmefirst: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
21502
+ },
21529
21503
  secondary: {
21530
21504
  chance: 10,
21531
21505
  status: 'slp',
@@ -21965,7 +21939,7 @@ export const Moves = {
21965
21939
  name: "Zippy Zap",
21966
21940
  pp: 10,
21967
21941
  priority: 2,
21968
- flags: { contact: 1, protect: 1 },
21942
+ flags: { contact: 1, protect: 1, mirror: 1 },
21969
21943
  secondary: {
21970
21944
  chance: 100,
21971
21945
  self: {