@pkmn/sim 0.5.20 → 0.5.23

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 (102) hide show
  1. package/build/config/formats.js +149 -126
  2. package/build/config/formats.js.map +1 -1
  3. package/build/data/abilities.js +1 -3
  4. package/build/data/abilities.js.map +1 -1
  5. package/build/data/aliases.js +4 -4
  6. package/build/data/aliases.js.map +1 -1
  7. package/build/data/conditions.js +5 -2
  8. package/build/data/conditions.js.map +1 -1
  9. package/build/data/formats-data.js +20 -17
  10. package/build/data/formats-data.js.map +1 -1
  11. package/build/data/learnsets.js +29 -0
  12. package/build/data/learnsets.js.map +1 -1
  13. package/build/data/mods/gen1/conditions.js +7 -0
  14. package/build/data/mods/gen1/conditions.js.map +1 -1
  15. package/build/data/mods/gen1/formats-data.js +2 -2
  16. package/build/data/mods/gen1/formats-data.js.map +1 -1
  17. package/build/data/mods/gen1/moves.js +2 -3
  18. package/build/data/mods/gen1/moves.js.map +1 -1
  19. package/build/data/mods/gen1/scripts.js +4 -2
  20. package/build/data/mods/gen1/scripts.js.map +1 -1
  21. package/build/data/mods/gen2/conditions.js +3 -0
  22. package/build/data/mods/gen2/conditions.js.map +1 -1
  23. package/build/data/mods/gen2/learnsets.js +2 -2
  24. package/build/data/mods/gen2/learnsets.js.map +1 -1
  25. package/build/data/mods/gen2/scripts.js +16 -0
  26. package/build/data/mods/gen2/scripts.js.map +1 -1
  27. package/build/data/mods/gen3/conditions.js +3 -0
  28. package/build/data/mods/gen3/conditions.js.map +1 -1
  29. package/build/data/mods/gen3/formats-data.js +3 -3
  30. package/build/data/mods/gen3/formats-data.js.map +1 -1
  31. package/build/data/mods/gen4/abilities.js +1 -1
  32. package/build/data/mods/gen4/abilities.js.map +1 -1
  33. package/build/data/mods/gen4/conditions.js +3 -0
  34. package/build/data/mods/gen4/conditions.js.map +1 -1
  35. package/build/data/mods/gen4/formats-data.js +1 -1
  36. package/build/data/mods/gen4/formats-data.js.map +1 -1
  37. package/build/data/mods/gen4/moves.js +9 -2
  38. package/build/data/mods/gen4/moves.js.map +1 -1
  39. package/build/data/mods/gen5/moves.js +4 -7
  40. package/build/data/mods/gen5/moves.js.map +1 -1
  41. package/build/data/mods/gen5/pokedex.js +24 -0
  42. package/build/data/mods/gen5/pokedex.js.map +1 -1
  43. package/build/data/mods/gen6/formats-data.js +65 -65
  44. package/build/data/mods/gen6/formats-data.js.map +1 -1
  45. package/build/data/mods/gen6/learnsets.js +0 -75
  46. package/build/data/mods/gen6/learnsets.js.map +1 -1
  47. package/build/data/mods/gen7/abilities.js +8 -0
  48. package/build/data/mods/gen7/abilities.js.map +1 -1
  49. package/build/data/mods/gen7/moves.js +2 -2
  50. package/build/data/mods/gen7/moves.js.map +1 -1
  51. package/build/data/moves.js +8 -3
  52. package/build/data/moves.js.map +1 -1
  53. package/build/data/pokedex.js +12 -0
  54. package/build/data/pokedex.js.map +1 -1
  55. package/build/data/rulesets.js +175 -0
  56. package/build/data/rulesets.js.map +1 -1
  57. package/build/data/tags.js +2 -2
  58. package/build/data/tags.js.map +1 -1
  59. package/build/sim/battle-stream.js +3 -0
  60. package/build/sim/battle-stream.js.map +1 -1
  61. package/build/sim/exported-global-types.d.ts +2 -0
  62. package/build/sim/global-types.d.ts +2 -0
  63. package/build/sim/pokemon.d.ts +1 -0
  64. package/build/sim/pokemon.js +9 -2
  65. package/build/sim/pokemon.js.map +1 -1
  66. package/build/sim/side.js +21 -0
  67. package/build/sim/side.js.map +1 -1
  68. package/config/formats.ts +152 -130
  69. package/data/abilities.ts +1 -3
  70. package/data/aliases.ts +4 -4
  71. package/data/conditions.ts +6 -2
  72. package/data/formats-data.ts +20 -17
  73. package/data/learnsets.ts +29 -0
  74. package/data/mods/gen1/conditions.ts +8 -0
  75. package/data/mods/gen1/formats-data.ts +2 -2
  76. package/data/mods/gen1/moves.ts +3 -2
  77. package/data/mods/gen1/scripts.ts +3 -2
  78. package/data/mods/gen2/conditions.ts +4 -0
  79. package/data/mods/gen2/learnsets.ts +2 -2
  80. package/data/mods/gen2/scripts.ts +16 -0
  81. package/data/mods/gen3/conditions.ts +4 -0
  82. package/data/mods/gen3/formats-data.ts +3 -3
  83. package/data/mods/gen4/abilities.ts +1 -1
  84. package/data/mods/gen4/conditions.ts +4 -0
  85. package/data/mods/gen4/formats-data.ts +1 -1
  86. package/data/mods/gen4/moves.ts +9 -2
  87. package/data/mods/gen5/moves.ts +4 -7
  88. package/data/mods/gen5/pokedex.ts +24 -0
  89. package/data/mods/gen6/formats-data.ts +65 -65
  90. package/data/mods/gen6/learnsets.ts +0 -75
  91. package/data/mods/gen7/abilities.ts +8 -0
  92. package/data/mods/gen7/moves.ts +2 -2
  93. package/data/moves.ts +8 -3
  94. package/data/pokedex.ts +12 -0
  95. package/data/rulesets.ts +155 -0
  96. package/data/tags.ts +2 -2
  97. package/package.json +2 -2
  98. package/sim/battle-stream.ts +3 -0
  99. package/sim/exported-global-types.ts +2 -0
  100. package/sim/global-types.ts +2 -0
  101. package/sim/pokemon.ts +9 -2
  102. package/sim/side.ts +20 -0
@@ -57,6 +57,10 @@ export const Conditions: {[k: string]: ConditionData} = {
57
57
  // 1-3 turns
58
58
  this.effectState.startTime = this.random(2, 5);
59
59
  this.effectState.time = this.effectState.startTime;
60
+
61
+ if (target.removeVolatile('nightmare')) {
62
+ this.add('-end', target, 'Nightmare', '[silent]');
63
+ }
60
64
  },
61
65
  onBeforeMovePriority: 10,
62
66
  onBeforeMove(pokemon, target, move) {
@@ -101,7 +105,7 @@ export const Conditions: {[k: string]: ConditionData} = {
101
105
  onModifyMove(move, pokemon) {
102
106
  if (move.flags['defrost']) {
103
107
  this.add('-curestatus', pokemon, 'frz', '[from] move: ' + move);
104
- pokemon.setStatus('');
108
+ pokemon.clearStatus();
105
109
  }
106
110
  },
107
111
  onAfterMoveSecondary(target, source, move) {
@@ -712,7 +716,7 @@ export const Conditions: {[k: string]: ConditionData} = {
712
716
  if (pokemon.baseSpecies.name === 'Shedinja') return;
713
717
 
714
718
  // Changes based on dynamax level, 2 is max (at LVL 10)
715
- const ratio = 2; // TODO: Implement Dynamax levels
719
+ const ratio = 1.5 + (pokemon.dynamaxLevel * 0.05);
716
720
 
717
721
  pokemon.maxhp = Math.floor(pokemon.maxhp * ratio);
718
722
  pokemon.hp = Math.floor(pokemon.hp * ratio);
@@ -949,7 +949,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
949
949
  randomDoubleBattleMoves: ["clearsmog", "defog", "fireblast", "painsplit", "strangesteam", "toxicspikes", "willowisp"],
950
950
  randomDoubleBattleLevel: 89,
951
951
  tier: "RU",
952
- doublesTier: "DUU",
952
+ doublesTier: "(DUU)",
953
953
  },
954
954
  rhyhorn: {
955
955
  tier: "LC",
@@ -2153,7 +2153,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2153
2153
  randomBattleLevel: 86,
2154
2154
  randomDoubleBattleMoves: ["acrobatics", "defog", "leechlife", "protect", "swordsdance"],
2155
2155
  randomDoubleBattleLevel: 88,
2156
- tier: "PU",
2156
+ tier: "(PU)",
2157
2157
  doublesTier: "(DUU)",
2158
2158
  },
2159
2159
  shedinja: {
@@ -2494,7 +2494,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2494
2494
  randomDoubleBattleMoves: ["coil", "hypnosis", "muddywater", "recover"],
2495
2495
  randomDoubleBattleLevel: 80,
2496
2496
  tier: "RU",
2497
- doublesTier: "DOU",
2497
+ doublesTier: "DUU",
2498
2498
  },
2499
2499
  castform: {
2500
2500
  isNonstandard: "Past",
@@ -2932,7 +2932,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2932
2932
  randomBattleLevel: 84,
2933
2933
  randomDoubleBattleMoves: ["clearsmog", "earthpower", "icywind", "protect", "recover", "scald", "yawn"],
2934
2934
  randomDoubleBattleLevel: 80,
2935
- tier: "RU",
2935
+ tier: "NU",
2936
2936
  doublesTier: "DOU",
2937
2937
  },
2938
2938
  drifloon: {
@@ -2989,7 +2989,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2989
2989
  randomDoubleBattleMoves: ["allyswitch", "bodypress", "explosion", "ironhead", "trickroom"],
2990
2990
  randomDoubleBattleLevel: 88,
2991
2991
  tier: "RU",
2992
- doublesTier: "DUU",
2992
+ doublesTier: "(DUU)",
2993
2993
  },
2994
2994
  chatot: {
2995
2995
  isNonstandard: "Past",
@@ -3594,7 +3594,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
3594
3594
  tier: "Illegal",
3595
3595
  },
3596
3596
  basculin: {
3597
- randomBattleMoves: ["aquajet", "crunch", "flipturn", "headsmash", "liquidation", "psychicfangs"],
3597
+ randomBattleMoves: ["aquajet", "crunch", "flipturn", "liquidation", "psychicfangs", "superpower"],
3598
3598
  randomBattleLevel: 86,
3599
3599
  randomDoubleBattleMoves: ["flipturn", "headsmash", "icebeam", "liquidation", "muddywater", "protect", "psychicfangs", "superpower"],
3600
3600
  randomDoubleBattleLevel: 86,
@@ -3602,7 +3602,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
3602
3602
  doublesTier: "(DUU)",
3603
3603
  },
3604
3604
  basculinbluestriped: {
3605
- randomBattleMoves: ["aquajet", "crunch", "flipturn", "headsmash", "liquidation", "psychicfangs"],
3605
+ randomBattleMoves: ["aquajet", "crunch", "flipturn", "liquidation", "psychicfangs", "superpower"],
3606
3606
  randomBattleLevel: 86,
3607
3607
  randomDoubleBattleMoves: ["aquajet", "flipturn", "headsmash", "icebeam", "liquidation", "protect", "psychicfangs", "superpower"],
3608
3608
  randomDoubleBattleLevel: 86,
@@ -4029,7 +4029,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4029
4029
  doublesTier: "(DUU)",
4030
4030
  },
4031
4031
  druddigon: {
4032
- randomBattleMoves: ["earthquake", "glare", "outrage", "stealthrock", "suckerpunch", "superpower"],
4032
+ randomBattleMoves: ["earthquake", "glare", "gunkshot", "outrage", "stealthrock", "suckerpunch", "superpower"],
4033
4033
  randomBattleLevel: 84,
4034
4034
  randomDoubleBattleMoves: ["firepunch", "glare", "gunkshot", "protect", "scaleshot", "suckerpunch"],
4035
4035
  randomDoubleBattleLevel: 87,
@@ -4070,7 +4070,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4070
4070
  tier: "NFE",
4071
4071
  },
4072
4072
  braviary: {
4073
- randomBattleMoves: ["bravebird", "bulkup", "closecombat", "retaliate", "roost", "uturn"],
4073
+ randomBattleMoves: ["bravebird", "bulkup", "closecombat", "roost"],
4074
4074
  randomBattleLevel: 82,
4075
4075
  randomDoubleBattleMoves: ["bravebird", "closecombat", "protect", "roost", "tailwind"],
4076
4076
  randomDoubleBattleLevel: 82,
@@ -4445,7 +4445,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4445
4445
  doublade: {
4446
4446
  randomBattleMoves: ["closecombat", "ironhead", "shadowclaw", "shadowsneak", "swordsdance"],
4447
4447
  randomBattleLevel: 82,
4448
- tier: "NU",
4448
+ tier: "PU",
4449
4449
  doublesTier: "NFE",
4450
4450
  },
4451
4451
  aegislash: {
@@ -4514,7 +4514,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4514
4514
  randomBattleLevel: 86,
4515
4515
  randomDoubleBattleMoves: ["dracometeor", "dragonpulse", "focusblast", "protect", "sludgebomb"],
4516
4516
  randomDoubleBattleLevel: 86,
4517
- tier: "NU",
4517
+ tier: "NUBL",
4518
4518
  doublesTier: "(DUU)",
4519
4519
  },
4520
4520
  clauncher: {
@@ -4962,7 +4962,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4962
4962
  randomBattleLevel: 80,
4963
4963
  randomDoubleBattleMoves: ["leechlife", "liquidation", "lunge", "protect", "stickyweb", "wideguard"],
4964
4964
  randomDoubleBattleLevel: 84,
4965
- tier: "NU",
4965
+ tier: "PUBL",
4966
4966
  doublesTier: "DUU",
4967
4967
  },
4968
4968
  araquanidtotem: {
@@ -5078,7 +5078,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5078
5078
  randomBattleLevel: 86,
5079
5079
  randomDoubleBattleMoves: ["hypnosis", "protect", "scorchingsands", "shadowball", "shoreup", "stealthrock"],
5080
5080
  randomDoubleBattleLevel: 88,
5081
- tier: "PU",
5081
+ tier: "(PU)",
5082
5082
  doublesTier: "(DUU)",
5083
5083
  },
5084
5084
  pyukumuku: {
@@ -5159,11 +5159,10 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5159
5159
  doublesTier: "(DUU)",
5160
5160
  },
5161
5161
  silvallyflying: {
5162
- randomBattleMoves: ["firefang", "ironhead", "multiattack", "rockslide", "swordsdance"],
5162
+ randomBattleMoves: ["flamecharge", "ironhead", "multiattack", "rockslide", "swordsdance"],
5163
5163
  randomBattleLevel: 84,
5164
5164
  randomDoubleBattleMoves: ["firefang", "ironhead", "multiattack", "swordsdance", "tailwind"],
5165
5165
  randomDoubleBattleLevel: 86,
5166
- randomBattleNoDynamaxMoves: ["flamecharge", "ironhead", "multiattack", "rockslide", "swordsdance"],
5167
5166
  tier: "(PU)",
5168
5167
  doublesTier: "(DUU)",
5169
5168
  },
@@ -5433,7 +5432,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5433
5432
  randomBattleLevel: 84,
5434
5433
  randomDoubleBattleMoves: ["dracometeor", "fireblast", "knockoff", "protect", "sludgebomb"],
5435
5434
  randomDoubleBattleLevel: 88,
5436
- tier: "NU",
5435
+ tier: "PUBL",
5437
5436
  doublesTier: "(DUU)",
5438
5437
  },
5439
5438
  necrozma: {
@@ -5594,7 +5593,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5594
5593
  randomBattleLevel: 80,
5595
5594
  randomDoubleBattleMoves: ["airslash", "hydropump", "icebeam", "muddywater", "shadowball", "uturn"],
5596
5595
  randomDoubleBattleLevel: 84,
5597
- tier: "NU",
5596
+ tier: "PUBL",
5598
5597
  doublesTier: "(DUU)",
5599
5598
  },
5600
5599
  inteleongmax: {
@@ -6531,6 +6530,10 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
6531
6530
  isNonstandard: "CAP",
6532
6531
  tier: "CAP",
6533
6532
  },
6533
+ saharaja: {
6534
+ isNonstandard: "CAP",
6535
+ tier: "CAP",
6536
+ },
6534
6537
  pokestarsmeargle: {
6535
6538
  isNonstandard: "Custom",
6536
6539
  tier: "Illegal",
package/data/learnsets.ts CHANGED
@@ -82889,6 +82889,35 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
82889
82889
  withdraw: ["8L5"],
82890
82890
  },
82891
82891
  },
82892
+ saharaja: {
82893
+ learnset: {
82894
+ attract: ["8M"],
82895
+ bodypress: ["8M"],
82896
+ diamondstorm: ["8L1"],
82897
+ earthquake: ["8M"],
82898
+ endure: ["8M"],
82899
+ facade: ["8M"],
82900
+ healbell: ["8L1"],
82901
+ hornleech: ["8L1"],
82902
+ leechseed: ["8L1"],
82903
+ painsplit: ["8L1"],
82904
+ poisonjab: ["8M"],
82905
+ powerwhip: ["8M"],
82906
+ protect: ["8M"],
82907
+ rapidspin: ["8L1"],
82908
+ rest: ["8M"],
82909
+ rockslide: ["8M"],
82910
+ round: ["8M"],
82911
+ sleeptalk: ["8M"],
82912
+ snore: ["8M"],
82913
+ stealthrock: ["8M"],
82914
+ substitute: ["8M"],
82915
+ suckerpunch: ["8L1"],
82916
+ swordsdance: ["8M"],
82917
+ taunt: ["8M"],
82918
+ thunderwave: ["8M"],
82919
+ },
82920
+ },
82892
82921
  pokestarsmeargle: {
82893
82922
  eventData: [
82894
82923
  {generation: 5, level: 60, gender: "M", abilities: ["owntempo"], moves: ["mindreader", "guillotine", "tailwhip", "gastroacid"]},
@@ -68,6 +68,10 @@ export const Conditions: {[id: string]: ModdedConditionData} = {
68
68
  // 1-7 turns
69
69
  this.effectState.startTime = this.random(1, 8);
70
70
  this.effectState.time = this.effectState.startTime;
71
+
72
+ if (target.removeVolatile('nightmare')) {
73
+ this.add('-end', target, 'Nightmare', '[silent]');
74
+ }
71
75
  },
72
76
  onBeforeMovePriority: 10,
73
77
  onBeforeMove(pokemon, target, move) {
@@ -78,6 +82,7 @@ export const Conditions: {[id: string]: ModdedConditionData} = {
78
82
  pokemon.lastMove = null;
79
83
  return false;
80
84
  },
85
+ onAfterMoveSelfPriority: 3,
81
86
  onAfterMoveSelf(pokemon) {
82
87
  if (pokemon.statusState.time <= 0) pokemon.cureStatus();
83
88
  },
@@ -164,6 +169,9 @@ export const Conditions: {[id: string]: ModdedConditionData} = {
164
169
  flinch: {
165
170
  name: 'flinch',
166
171
  duration: 1,
172
+ onStart(target) {
173
+ target.removeVolatile('mustrecharge');
174
+ },
167
175
  onBeforeMovePriority: 4,
168
176
  onBeforeMove(pokemon) {
169
177
  if (!this.runEvent('Flinch', pokemon)) {
@@ -370,7 +370,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
370
370
  randomBattleMoves: ["bodyslam", "sleeppowder", "stunspore"],
371
371
  essentialMove: "razorleaf",
372
372
  comboMoves: ["hyperbeam", "swordsdance"],
373
- tier: "(OU)",
373
+ tier: "UU",
374
374
  },
375
375
  tentacool: {
376
376
  randomBattleMoves: ["barrier", "hydropump", "surf"],
@@ -667,7 +667,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
667
667
  randomBattleMoves: ["bodyslam", "confuseray", "rest", "sing", "surf"],
668
668
  essentialMove: "blizzard",
669
669
  exclusiveMoves: ["thunderbolt", "thunderbolt"],
670
- tier: "(OU)",
670
+ tier: "UUBL",
671
671
  },
672
672
  ditto: {
673
673
  randomBattleMoves: ["transform"],
@@ -546,7 +546,9 @@ export const Moves: {[k: string]: ModdedMoveData} = {
546
546
  showMsg = true;
547
547
  }
548
548
  }
549
- if (showMsg) this.add('-activate', target, 'move: Mist');
549
+ if (showMsg && !(effect as ActiveMove).secondaries) {
550
+ this.add('-activate', target, 'move: Mist');
551
+ }
550
552
  }
551
553
  },
552
554
  },
@@ -762,7 +764,6 @@ export const Moves: {[k: string]: ModdedMoveData} = {
762
764
  }
763
765
  // We only prevent when hp is less than one quarter.
764
766
  // If you use substitute at exactly one quarter, you faint.
765
- if (target.hp === target.maxhp / 4) target.faint();
766
767
  if (target.hp < target.maxhp / 4) {
767
768
  this.add('-fail', target, 'move: Substitute', '[weak]');
768
769
  return null;
@@ -467,8 +467,9 @@ export const Scripts: ModdedBattleScriptsData = {
467
467
  return false;
468
468
  }
469
469
  if (moveData.boosts && target.hp) {
470
- if (!this.battle.boost(moveData.boosts, target, pokemon, move)) {
471
- this.battle.add('-fail', target);
470
+ const willBoost = this.battle.boost(moveData.boosts, target, pokemon, move);
471
+ if (!willBoost) {
472
+ if (willBoost === false) this.battle.add('-fail', target);
472
473
  return false;
473
474
  }
474
475
  didSomething = true;
@@ -35,6 +35,10 @@ export const Conditions: {[k: string]: ModdedConditionData} = {
35
35
  }
36
36
  // 1-6 turns
37
37
  this.effectState.time = this.random(2, 8);
38
+
39
+ if (target.removeVolatile('nightmare')) {
40
+ this.add('-end', target, 'Nightmare', '[silent]');
41
+ }
38
42
  },
39
43
  onBeforeMovePriority: 10,
40
44
  onBeforeMove(pokemon, target, move) {
@@ -7593,11 +7593,11 @@ export const Learnsets: {[k: string]: ModdedLearnsetData} = {
7593
7593
  dragonrage: ["1S0"],
7594
7594
  flail: ["2L30"],
7595
7595
  reversal: ["2S2"],
7596
- splash: ["2L1", "2S2", "2S1", "1L1"],
7596
+ splash: ["2L1", "2S2", "2S1", "1L1", "1S0"],
7597
7597
  tackle: ["2L15", "1L15"],
7598
7598
  },
7599
7599
  eventData: [
7600
- {generation: 1, level: 5, moves: ["dragonrage"], japan: true},
7600
+ {generation: 1, level: 15, moves: ["splash", "dragonrage"], japan: true},
7601
7601
  {generation: 2, level: 5, shiny: 1, moves: ["splash", "bubble"]},
7602
7602
  {generation: 2, level: 5, shiny: 1, moves: ["splash", "reversal"]},
7603
7603
  ],
@@ -160,6 +160,22 @@ export const Scripts: ModdedBattleScriptsData = {
160
160
  return false;
161
161
  }
162
162
 
163
+ if (move.target === 'all' || move.target === 'foeSide' || move.target === 'allySide' || move.target === 'allyTeam') {
164
+ if (move.target === 'all') {
165
+ hitResult = this.battle.runEvent('TryHitField', target, pokemon, move);
166
+ } else {
167
+ hitResult = this.battle.runEvent('TryHitSide', target, pokemon, move);
168
+ }
169
+ if (!hitResult) {
170
+ if (hitResult === false) {
171
+ this.battle.add('-fail', pokemon);
172
+ this.battle.attrLastMove('[still]');
173
+ }
174
+ return false;
175
+ }
176
+ return this.moveHit(target, pokemon, move);
177
+ }
178
+
163
179
  hitResult = this.battle.runEvent('Invulnerability', target, pokemon, move);
164
180
  if (hitResult === false) {
165
181
  this.battle.attrLastMove('[miss]');
@@ -12,6 +12,10 @@ export const Conditions: {[k: string]: ModdedConditionData} = {
12
12
  this.effectState.time = this.random(2, 6);
13
13
  // Turns spent using Sleep Talk/Snore immediately before switching out while asleep
14
14
  this.effectState.skippedTime = 0;
15
+
16
+ if (target.removeVolatile('nightmare')) {
17
+ this.add('-end', target, 'Nightmare', '[silent]');
18
+ }
15
19
  },
16
20
  onSwitchIn(target) {
17
21
  this.effectState.time += this.effectState.skippedTime;
@@ -411,7 +411,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
411
411
  tier: "LC",
412
412
  },
413
413
  weezing: {
414
- randomBattleMoves: ["explosion", "fireblast", "flamethrower", "haze", "painsplit", "sludgebomb", "toxic", "willowisp"],
414
+ randomBattleMoves: ["explosion", "fireblast", "haze", "painsplit", "sludgebomb", "toxic", "willowisp"],
415
415
  tier: "UUBL",
416
416
  },
417
417
  rhyhorn: {
@@ -835,7 +835,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
835
835
  tier: "UU",
836
836
  },
837
837
  skarmory: {
838
- randomBattleMoves: ["doubleedge", "drillpeck", "protect", "rest", "roar", "sleeptalk", "spikes", "toxic"],
838
+ randomBattleMoves: ["drillpeck", "hiddenpowerground", "protect", "rest", "roar", "sleeptalk", "spikes", "toxic"],
839
839
  tier: "OU",
840
840
  },
841
841
  houndour: {
@@ -1368,7 +1368,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1368
1368
  tier: "Uber",
1369
1369
  },
1370
1370
  groudon: {
1371
- randomBattleMoves: ["earthquake", "hiddenpowerghost", "overheat", "rockslide", "substitute", "swordsdance", "thunderwave"],
1371
+ randomBattleMoves: ["earthquake", "hiddenpowerbug", "overheat", "rockslide", "substitute", "swordsdance", "thunderwave"],
1372
1372
  tier: "Uber",
1373
1373
  },
1374
1374
  rayquaza: {
@@ -281,7 +281,7 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
281
281
  // in gen 3-4, Natural Cure's curing is always known to both players
282
282
 
283
283
  this.add('-curestatus', pokemon, pokemon.status, '[from] ability: Natural Cure');
284
- pokemon.setStatus('');
284
+ pokemon.clearStatus();
285
285
  },
286
286
  },
287
287
  normalize: {
@@ -30,6 +30,10 @@ export const Conditions: {[k: string]: ModdedConditionData} = {
30
30
  }
31
31
  // 1-4 turns
32
32
  this.effectState.time = this.random(2, 6);
33
+
34
+ if (target.removeVolatile('nightmare')) {
35
+ this.add('-end', target, 'Nightmare', '[silent]');
36
+ }
33
37
  },
34
38
  onBeforeMovePriority: 10,
35
39
  onBeforeMove(pokemon, target, move) {
@@ -882,7 +882,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
882
882
  },
883
883
  mamoswine: {
884
884
  randomBattleMoves: ["earthquake", "endeavor", "iceshard", "stealthrock", "stoneedge", "superpower"],
885
- tier: "OU",
885
+ tier: "(OU)",
886
886
  },
887
887
  corsola: {
888
888
  randomBattleMoves: ["recover", "reflect", "stealthrock", "surf", "toxic"],
@@ -759,7 +759,7 @@ export const Moves: {[k: string]: ModdedMoveData} = {
759
759
  onSwitchIn(target) {
760
760
  if (target.hp > 0) {
761
761
  target.heal(target.maxhp);
762
- target.setStatus('');
762
+ target.clearStatus();
763
763
  this.add('-heal', target, target.getHealth, '[from] move: Healing Wish');
764
764
  target.side.removeSlotCondition(target, 'healingwish');
765
765
  target.lastMove = this.lastMove;
@@ -940,7 +940,7 @@ export const Moves: {[k: string]: ModdedMoveData} = {
940
940
  }
941
941
  if (target.hp > 0) {
942
942
  target.heal(target.maxhp);
943
- target.setStatus('');
943
+ target.clearStatus();
944
944
  for (const moveSlot of target.moveSlots) {
945
945
  moveSlot.pp = moveSlot.maxpp;
946
946
  }
@@ -1395,6 +1395,13 @@ export const Moves: {[k: string]: ModdedMoveData} = {
1395
1395
  inherit: true,
1396
1396
  accuracy: 90,
1397
1397
  },
1398
+ secretpower: {
1399
+ inherit: true,
1400
+ secondary: {
1401
+ chance: 30,
1402
+ status: 'par',
1403
+ },
1404
+ },
1398
1405
  sketch: {
1399
1406
  inherit: true,
1400
1407
  onHit(target, source) {
@@ -753,13 +753,10 @@ export const Moves: {[k: string]: ModdedMoveData} = {
753
753
  },
754
754
  secretpower: {
755
755
  inherit: true,
756
- condition: {
757
- duration: 1,
758
- onAfterMoveSecondarySelf(source, target, move) {
759
- if (this.randomChance(3, 10)) {
760
- this.boost({accuracy: -1}, target, source);
761
- }
762
- source.removeVolatile('secretpower');
756
+ secondary: {
757
+ chance: 30,
758
+ boosts: {
759
+ accuracy: -1,
763
760
  },
764
761
  },
765
762
  },
@@ -422,6 +422,30 @@ export const Pokedex: {[k: string]: ModdedSpeciesData} = {
422
422
  inherit: true,
423
423
  baseStats: {hp: 85, atk: 100, def: 90, spa: 45, spd: 90, spe: 80},
424
424
  },
425
+ pansage: {
426
+ inherit: true,
427
+ maleOnlyHidden: true,
428
+ },
429
+ simisage: {
430
+ inherit: true,
431
+ maleOnlyHidden: true,
432
+ },
433
+ pansear: {
434
+ inherit: true,
435
+ maleOnlyHidden: true,
436
+ },
437
+ simisear: {
438
+ inherit: true,
439
+ maleOnlyHidden: true,
440
+ },
441
+ panpour: {
442
+ inherit: true,
443
+ maleOnlyHidden: true,
444
+ },
445
+ simipour: {
446
+ inherit: true,
447
+ maleOnlyHidden: true,
448
+ },
425
449
  unfezant: {
426
450
  inherit: true,
427
451
  baseStats: {hp: 80, atk: 105, def: 80, spa: 65, spd: 55, spe: 93},