@pkmn/sim 0.5.18 → 0.5.21

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 (59) hide show
  1. package/build/config/formats.js +487 -432
  2. package/build/config/formats.js.map +1 -1
  3. package/build/data/aliases.js +2 -2
  4. package/build/data/aliases.js.map +1 -1
  5. package/build/data/formats-data.js +17 -13
  6. package/build/data/formats-data.js.map +1 -1
  7. package/build/data/learnsets.js +77 -9
  8. package/build/data/learnsets.js.map +1 -1
  9. package/build/data/mods/gen1/conditions.js +4 -0
  10. package/build/data/mods/gen1/conditions.js.map +1 -1
  11. package/build/data/mods/gen1/formats-data.js +3 -3
  12. package/build/data/mods/gen1/formats-data.js.map +1 -1
  13. package/build/data/mods/gen1/moves.js +2 -10
  14. package/build/data/mods/gen1/moves.js.map +1 -1
  15. package/build/data/mods/gen2/learnsets.js +2 -2
  16. package/build/data/mods/gen2/learnsets.js.map +1 -1
  17. package/build/data/mods/gen2/scripts.js +16 -0
  18. package/build/data/mods/gen2/scripts.js.map +1 -1
  19. package/build/data/mods/gen4/formats-data.js +1 -1
  20. package/build/data/mods/gen4/formats-data.js.map +1 -1
  21. package/build/data/mods/gen6/formats-data.js +1 -1
  22. package/build/data/mods/gen6/formats-data.js.map +1 -1
  23. package/build/data/mods/gen6/learnsets.js +0 -75
  24. package/build/data/mods/gen6/learnsets.js.map +1 -1
  25. package/build/data/mods/gen7/formats-data.js +1 -1
  26. package/build/data/mods/gen7/formats-data.js.map +1 -1
  27. package/build/data/moves.js +2 -4
  28. package/build/data/moves.js.map +1 -1
  29. package/build/data/pokedex.js +20 -1
  30. package/build/data/pokedex.js.map +1 -1
  31. package/build/data/rulesets.js +29 -0
  32. package/build/data/rulesets.js.map +1 -1
  33. package/build/data/tags.js +2 -2
  34. package/build/data/tags.js.map +1 -1
  35. package/build/sim/battle.js +1 -7
  36. package/build/sim/battle.js.map +1 -1
  37. package/build/sim/state.d.ts +1 -1
  38. package/build/sim/state.js +6 -6
  39. package/build/sim/state.js.map +1 -1
  40. package/build/sim/teams.d.ts +2 -2
  41. package/config/formats.ts +352 -302
  42. package/data/aliases.ts +2 -2
  43. package/data/formats-data.ts +17 -13
  44. package/data/learnsets.ts +77 -9
  45. package/data/mods/gen1/conditions.ts +4 -0
  46. package/data/mods/gen1/formats-data.ts +3 -3
  47. package/data/mods/gen1/moves.ts +2 -9
  48. package/data/mods/gen2/learnsets.ts +2 -2
  49. package/data/mods/gen2/scripts.ts +16 -0
  50. package/data/mods/gen4/formats-data.ts +1 -1
  51. package/data/mods/gen6/formats-data.ts +1 -1
  52. package/data/mods/gen6/learnsets.ts +0 -75
  53. package/data/mods/gen7/formats-data.ts +1 -1
  54. package/data/moves.ts +2 -4
  55. package/data/pokedex.ts +20 -1
  56. package/data/rulesets.ts +28 -0
  57. package/data/tags.ts +2 -2
  58. package/package.json +1 -1
  59. package/sim/battle.ts +1 -7
package/data/aliases.ts CHANGED
@@ -68,8 +68,8 @@ export const Aliases: {[alias: string]: string} = {
68
68
  gen6ag: "[Gen 6] Anything Goes",
69
69
  crossevo: "[Gen 8] Cross Evolution",
70
70
  mayhem: "[Gen 8] Random Battle Mayhem",
71
- omotm: "[Gen 8] Crazyhouse",
72
- lcotm: "[Gen 8] Pokebilities AAA",
71
+ omotm: "[Gen 8] Broken Record",
72
+ lcotm: "[Gen 8] Inheritance",
73
73
 
74
74
  // mega evos
75
75
  fabio: "Ampharos-Mega",
@@ -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",
@@ -4082,7 +4082,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4082
4082
  tier: "Illegal",
4083
4083
  },
4084
4084
  vullaby: {
4085
- tier: "NFE",
4085
+ tier: "LC",
4086
4086
  },
4087
4087
  mandibuzz: {
4088
4088
  randomBattleMoves: ["bravebird", "defog", "foulplay", "roost", "toxic"],
@@ -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: {
@@ -4453,7 +4453,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4453
4453
  randomBattleLevel: 80,
4454
4454
  randomDoubleBattleMoves: ["flashcannon", "kingsshield", "shadowball", "shadowsneak"],
4455
4455
  randomDoubleBattleLevel: 84,
4456
- tier: "UU",
4456
+ tier: "UUBL",
4457
4457
  doublesTier: "(DUU)",
4458
4458
  },
4459
4459
  aegislashblade: {
@@ -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: "PU",
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: {
@@ -5433,7 +5433,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5433
5433
  randomBattleLevel: 84,
5434
5434
  randomDoubleBattleMoves: ["dracometeor", "fireblast", "knockoff", "protect", "sludgebomb"],
5435
5435
  randomDoubleBattleLevel: 88,
5436
- tier: "NU",
5436
+ tier: "PU",
5437
5437
  doublesTier: "(DUU)",
5438
5438
  },
5439
5439
  necrozma: {
@@ -5594,7 +5594,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5594
5594
  randomBattleLevel: 80,
5595
5595
  randomDoubleBattleMoves: ["airslash", "hydropump", "icebeam", "muddywater", "shadowball", "uturn"],
5596
5596
  randomDoubleBattleLevel: 84,
5597
- tier: "NU",
5597
+ tier: "PU",
5598
5598
  doublesTier: "(DUU)",
5599
5599
  },
5600
5600
  inteleongmax: {
@@ -6531,6 +6531,10 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
6531
6531
  isNonstandard: "CAP",
6532
6532
  tier: "CAP",
6533
6533
  },
6534
+ saharaja: {
6535
+ isNonstandard: "CAP",
6536
+ tier: "CAP",
6537
+ },
6534
6538
  pokestarsmeargle: {
6535
6539
  isNonstandard: "Custom",
6536
6540
  tier: "Illegal",
package/data/learnsets.ts CHANGED
@@ -82819,35 +82819,103 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
82819
82819
  },
82820
82820
  venomicon: {
82821
82821
  learnset: {
82822
- acidarmor: ["8L1"],
82822
+ aircutter: ["8L15"],
82823
+ airslash: ["8M"],
82824
+ assurance: ["8M"],
82823
82825
  attract: ["8M"],
82824
82826
  bodypress: ["8M"],
82827
+ bodyslam: ["8M"],
82825
82828
  bravebird: ["8M"],
82826
- coil: ["8L1"],
82827
- discharge: ["8L1"],
82828
- drillpeck: ["8L1"],
82829
+ clearsmog: ["8E"],
82830
+ coil: ["8L50"],
82831
+ confuseray: ["8L10"],
82832
+ darkpulse: ["8M"],
82833
+ drillpeck: ["8L35"],
82834
+ dualwingbeat: ["8T"],
82829
82835
  earthpower: ["8M"],
82830
82836
  endure: ["8M"],
82831
82837
  facade: ["8M"],
82838
+ fly: ["8M"],
82839
+ focusenergy: ["8M"],
82840
+ foulplay: ["8M"],
82841
+ gigaimpact: ["8M"],
82842
+ guardswap: ["8M"],
82832
82843
  gunkshot: ["8M"],
82833
- hurricane: ["8M"],
82844
+ hex: ["8M", "8L25"],
82845
+ hurricane: ["8M", "8L55"],
82846
+ hyperbeam: ["8M"],
82834
82847
  imprison: ["8M"],
82835
- knockoff: ["8L1"],
82848
+ irondefense: ["8M"],
82849
+ knockoff: ["8E"],
82850
+ lashout: ["8T"],
82851
+ magicroom: ["8M"],
82852
+ magicalleaf: ["8M"],
82853
+ meanlook: ["8E"],
82854
+ memento: ["8E"],
82836
82855
  mysticalfire: ["8M"],
82837
82856
  nastyplot: ["8M"],
82838
- poisonjab: ["8M"],
82857
+ payback: ["8M"],
82858
+ peck: ["8L1"],
82859
+ phantomforce: ["8M"],
82860
+ poisonjab: ["8M", "8L40"],
82861
+ poisonsting: ["8L1"],
82862
+ powerswap: ["8M"],
82839
82863
  protect: ["8M"],
82864
+ psychic: ["8M"],
82865
+ psyshock: ["8M"],
82840
82866
  rest: ["8M"],
82841
- roost: ["8L1"],
82867
+ retaliate: ["8M"],
82868
+ roost: ["8L45"],
82842
82869
  round: ["8M"],
82870
+ safeguard: ["8M"],
82871
+ scaryface: ["8M"],
82872
+ shadowball: ["8M"],
82873
+ skillswap: ["8M"],
82843
82874
  sleeptalk: ["8M"],
82844
82875
  sludgebomb: ["8M"],
82876
+ sludgewave: ["8M"],
82845
82877
  snore: ["8M"],
82846
82878
  stealthrock: ["8M"],
82879
+ steelwing: ["8M"],
82847
82880
  substitute: ["8M"],
82881
+ swift: ["8M"],
82848
82882
  thunderwave: ["8M"],
82849
- toxic: ["8L1"],
82883
+ toxic: ["8L30"],
82884
+ toxicspikes: ["8M"],
82885
+ trick: ["8M"],
82850
82886
  uturn: ["8M"],
82887
+ venomdrench: ["8M"],
82888
+ venoshock: ["8M", "8L20"],
82889
+ withdraw: ["8L5"],
82890
+ },
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"],
82851
82919
  },
82852
82920
  },
82853
82921
  pokestarsmeargle: {
@@ -78,6 +78,7 @@ export const Conditions: {[id: string]: ModdedConditionData} = {
78
78
  pokemon.lastMove = null;
79
79
  return false;
80
80
  },
81
+ onAfterMoveSelfPriority: 3,
81
82
  onAfterMoveSelf(pokemon) {
82
83
  if (pokemon.statusState.time <= 0) pokemon.cureStatus();
83
84
  },
@@ -164,6 +165,9 @@ export const Conditions: {[id: string]: ModdedConditionData} = {
164
165
  flinch: {
165
166
  name: 'flinch',
166
167
  duration: 1,
168
+ onStart(target) {
169
+ target.removeVolatile('mustrecharge');
170
+ },
167
171
  onBeforeMovePriority: 4,
168
172
  onBeforeMove(pokemon) {
169
173
  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"],
@@ -414,7 +414,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
414
414
  slowbro: {
415
415
  randomBattleMoves: ["amnesia", "surf", "thunderwave"],
416
416
  exclusiveMoves: ["blizzard", "psychic", "rest", "rest"],
417
- tier: "OU",
417
+ tier: "UUBL",
418
418
  },
419
419
  magnemite: {
420
420
  randomBattleMoves: ["thunder", "thunderbolt", "thunderwave"],
@@ -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"],
@@ -425,17 +425,13 @@ export const Moves: {[k: string]: ModdedMoveData} = {
425
425
  highjumpkick: {
426
426
  inherit: true,
427
427
  onMoveFail(target, source, move) {
428
- if (!target.types.includes('Ghost')) {
429
- this.directDamage(1, source, target);
430
- }
428
+ this.directDamage(1, source, target);
431
429
  },
432
430
  },
433
431
  jumpkick: {
434
432
  inherit: true,
435
433
  onMoveFail(target, source, move) {
436
- if (!target.types.includes('Ghost')) {
437
- this.directDamage(1, source, target);
438
- }
434
+ this.directDamage(1, source, target);
439
435
  },
440
436
  },
441
437
  karatechop: {
@@ -542,15 +538,12 @@ export const Moves: {[k: string]: ModdedMoveData} = {
542
538
  onBoost(boost, target, source, effect) {
543
539
  if (effect.effectType === 'Move' && effect.category !== 'Status') return;
544
540
  if (source && target !== source) {
545
- let showMsg = false;
546
541
  let i: BoostID;
547
542
  for (i in boost) {
548
543
  if (boost[i]! < 0) {
549
544
  delete boost[i];
550
- showMsg = true;
551
545
  }
552
546
  }
553
- if (showMsg) this.add('-activate', target, 'move: Mist');
554
547
  }
555
548
  },
556
549
  },
@@ -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]');
@@ -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"],
@@ -3918,7 +3918,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
3918
3918
  volcanion: {
3919
3919
  randomBattleMoves: ["earthpower", "fireblast", "hiddenpowerice", "sludgewave", "steameruption", "substitute", "superpower"],
3920
3920
  randomDoubleBattleMoves: ["earthquake", "heatwave", "protect", "rockslide", "sludgebomb", "steameruption", "substitute"],
3921
- tier: "(OU)",
3921
+ tier: "OU",
3922
3922
  doublesTier: "DOU",
3923
3923
  },
3924
3924
  };
@@ -172,79 +172,4 @@ export const Learnsets: {[k: string]: ModdedLearnsetData} = {
172
172
  zenheadbutt: ["7T", "5T"],
173
173
  },
174
174
  },
175
- crucibelle: {
176
- inherit: true,
177
- learnset: {
178
- acidarmor: ["7L32", "6L32"],
179
- astonish: ["7L1", "6L1"],
180
- attract: ["7M", "6M"],
181
- block: ["6T"],
182
- coil: ["7E", "6E"],
183
- confuseray: ["7L16", "6L16"],
184
- confusion: ["7L14", "6L14"],
185
- defensecurl: ["7E", "6E"],
186
- doubleteam: ["7M", "6M"],
187
- embargo: ["7M", "6M"],
188
- endure: ["7L1", "6L1"],
189
- explosion: ["7M", "7L60", "6M", "6L60"],
190
- facade: ["7M", "6M"],
191
- faketears: ["7L10", "6L10"],
192
- frustration: ["7M", "6M"],
193
- gigaimpact: ["7M", "6M"],
194
- grassknot: ["7M", "6M"],
195
- gravity: ["6T"],
196
- gunkshot: ["7L56", "6T", "6L56"],
197
- headsmash: ["6L1"],
198
- helpinghand: ["6T"],
199
- hex: ["7L44", "6L44"],
200
- hiddenpower: ["7M", "6M"],
201
- hyperbeam: ["7M", "6M"],
202
- infestation: ["7M", "6M"],
203
- ironhead: ["6T"],
204
- lowkick: ["6T"],
205
- magicroom: ["6T"],
206
- payback: ["7M", "6M"],
207
- poisonjab: ["7M", "6M"],
208
- protect: ["7M", "7L1", "6M", "6L1"],
209
- psybeam: ["7L40", "6L40"],
210
- psychic: ["7M", "6M"],
211
- reflect: ["7M", "7L25", "6M", "6L25"],
212
- rest: ["7M", "6M"],
213
- return: ["7M", "6M"],
214
- rockblast: ["7L52", "6L52"],
215
- rockpolish: ["7M", "6M"],
216
- rockslide: ["7M", "7L36", "6M", "6L36"],
217
- rocksmash: ["7M", "6M"],
218
- rockthrow: ["7L5", "6L5"],
219
- rocktomb: ["7M", "6M"],
220
- rollout: ["7E", "6E"],
221
- round: ["7M", "6M"],
222
- safeguard: ["7M", "6M"],
223
- sandstorm: ["7M", "6M"],
224
- secretpower: ["7M"],
225
- shadowball: ["7M", "6M"],
226
- skillswap: ["6T"],
227
- sleeptalk: ["7M", "6M"],
228
- sludge: ["7L28", "6L28"],
229
- sludgebomb: ["7M", "6M"],
230
- sludgewave: ["7M", "6M"],
231
- smackdown: ["7M", "7L23", "6M", "6L23"],
232
- snatch: ["6T"],
233
- snore: ["6T"],
234
- stealthrock: ["6T"],
235
- stoneedge: ["7M", "6M"],
236
- substitute: ["7M", "6M"],
237
- swagger: ["7M", "6M"],
238
- torment: ["7M", "7L48", "6M", "6L48"],
239
- toxic: ["7M", "7L7", "6M", "6L7"],
240
- toxicspikes: ["7L19", "6L19"],
241
- trick: ["6T"],
242
- uturn: ["7M", "6M"],
243
- venoshock: ["7M", "6M"],
244
- withdraw: ["7L1", "6L1"],
245
- wonderroom: ["6T"],
246
- woodhammer: ["7E", "6E"],
247
- zenheadbutt: ["6T"],
248
- },
249
- },
250
175
  };
@@ -2284,7 +2284,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
2284
2284
  doublesTier: "DUber",
2285
2285
  },
2286
2286
  rayquaza: {
2287
- randomBattleMoves: ["dracometeor", "dragondance", "earthquake", "extremespeed", "outrage", "vcreate"],
2287
+ randomBattleMoves: ["dracometeor", "dragonascent", "dragondance", "earthquake", "extremespeed", "outrage", "vcreate"],
2288
2288
  randomDoubleBattleMoves: ["dracometeor", "dragonclaw", "dragondance", "earthquake", "extremespeed", "protect", "tailwind", "vcreate"],
2289
2289
  tier: "Uber",
2290
2290
  doublesTier: "DUber",
package/data/moves.ts CHANGED
@@ -7815,9 +7815,8 @@ export const Moves: {[moveid: string]: MoveData} = {
7815
7815
  pp: 10,
7816
7816
  priority: 0,
7817
7817
  flags: {snatch: 1, heal: 1},
7818
- onHit(target, source, move) {
7818
+ onTryHit(source) {
7819
7819
  if (!this.canSwitch(source.side)) {
7820
- delete move.selfdestruct;
7821
7820
  this.attrLastMove('[still]');
7822
7821
  this.add('-fail', source);
7823
7822
  return this.NOT_FAIL;
@@ -9911,9 +9910,8 @@ export const Moves: {[moveid: string]: MoveData} = {
9911
9910
  pp: 10,
9912
9911
  priority: 0,
9913
9912
  flags: {snatch: 1, heal: 1, dance: 1},
9914
- onHit(target, source, move) {
9913
+ onTryHit(source) {
9915
9914
  if (!this.canSwitch(source.side)) {
9916
- delete move.selfdestruct;
9917
9915
  this.attrLastMove('[still]');
9918
9916
  this.add('-fail', source);
9919
9917
  return this.NOT_FAIL;
package/data/pokedex.ts CHANGED
@@ -459,6 +459,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
459
459
  color: "Black",
460
460
  prevo: "Rattata-Alola",
461
461
  evoLevel: 20,
462
+ evoCondition: "at night",
462
463
  eggGroups: ["Field"],
463
464
  },
464
465
  raticatealolatotem: {
@@ -2391,6 +2392,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
2391
2392
  color: "Purple",
2392
2393
  prevo: "Cubone",
2393
2394
  evoLevel: 28,
2395
+ evoCondition: "at night",
2394
2396
  eggGroups: ["Monster"],
2395
2397
  },
2396
2398
  marowakalolatotem: {
@@ -8096,6 +8098,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
8096
8098
  prevo: "Sneasel",
8097
8099
  evoType: "levelHold",
8098
8100
  evoItem: "Razor Claw",
8101
+ evoCondition: "at night",
8099
8102
  eggGroups: ["Field"],
8100
8103
  },
8101
8104
  magnezone: {
@@ -12224,6 +12227,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
12224
12227
  color: "Red",
12225
12228
  prevo: "Tyrunt",
12226
12229
  evoLevel: 39,
12230
+ evoCondition: "during the day",
12227
12231
  eggGroups: ["Monster", "Dragon"],
12228
12232
  },
12229
12233
  amaura: {
@@ -12251,6 +12255,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
12251
12255
  color: "Blue",
12252
12256
  prevo: "Amaura",
12253
12257
  evoLevel: 39,
12258
+ evoCondition: "at night",
12254
12259
  eggGroups: ["Monster"],
12255
12260
  },
12256
12261
  sylveon: {
@@ -12970,6 +12975,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
12970
12975
  color: "Brown",
12971
12976
  prevo: "Yungoos",
12972
12977
  evoLevel: 20,
12978
+ evoCondition: "during the day",
12973
12979
  eggGroups: ["Field"],
12974
12980
  otherFormes: ["Gumshoos-Totem"],
12975
12981
  formeOrder: ["Gumshoos", "Gumshoos-Totem"],
@@ -13212,7 +13218,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
13212
13218
  color: "Red",
13213
13219
  prevo: "Rockruff",
13214
13220
  evoLevel: 25,
13215
- evoCondition: "during the night",
13221
+ evoCondition: "at night",
13216
13222
  eggGroups: ["Field"],
13217
13223
  },
13218
13224
  lycanrocdusk: {
@@ -16400,6 +16406,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
16400
16406
  prevo: "Sneasel-Hisui",
16401
16407
  evoType: "useItem",
16402
16408
  evoItem: "Razor Claw",
16409
+ evoCondition: "during the day",
16403
16410
  eggGroups: ["Field"],
16404
16411
  },
16405
16412
  overqwil: {
@@ -17412,6 +17419,18 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
17412
17419
  changesFrom: "Venomicon",
17413
17420
  gen: 8,
17414
17421
  },
17422
+ saharaja: {
17423
+ num: -68,
17424
+ name: "Saharaja",
17425
+ types: ["Ground"],
17426
+ baseStats: {hp: 70, atk: 120, def: 105, spa: 65, spd: 130, spe: 90},
17427
+ abilities: {0: "Water Absorb", 1: "Serene Grace"},
17428
+ heightm: 2.3,
17429
+ weightkg: 303.9,
17430
+ color: "White",
17431
+ eggGroups: ["Undiscovered"],
17432
+ gen: 8,
17433
+ },
17415
17434
  // NOTE: PokeStar "formes" are not actually formes and thus do not have a formeOrder
17416
17435
  pokestarsmeargle: {
17417
17436
  num: -5000,
package/data/rulesets.ts CHANGED
@@ -1585,6 +1585,12 @@ export const Rulesets: {[k: string]: FormatData} = {
1585
1585
  desc: "Prevents Pok\u00e9mon from having moves that would only be obtainable in Pok\u00e9mon Crystal.",
1586
1586
  // Implemented in mods/gen2/rulesets.ts
1587
1587
  },
1588
+ aptclause: {
1589
+ effectType: 'ValidatorRule',
1590
+ name: 'APT Clause',
1591
+ desc: "Bans the combination of Agility and partial trapping moves like Wrap.",
1592
+ banlist: ['Agility + Wrap', 'Agility + Fire Spin', 'Agility + Bind', 'Agility + Clamp'],
1593
+ },
1588
1594
  nintendocup1997movelegality: {
1589
1595
  effectType: 'ValidatorRule',
1590
1596
  name: "Nintendo Cup 1997 Move Legality",
@@ -1824,4 +1830,26 @@ export const Rulesets: {[k: string]: FormatData} = {
1824
1830
  }
1825
1831
  },
1826
1832
  },
1833
+ reevolutionmod: {
1834
+ effectType: "Rule",
1835
+ name: "Re-Evolution Mod",
1836
+ desc: "Pok&eacute;mon gain the boosts they would gain from evolving again",
1837
+ ruleset: ['Overflow Stat Mod'],
1838
+ onBegin() {
1839
+ this.add('rule', 'Re-Evolution Mod: Pok\u00e9mon gain the boosts they would gain from evolving again');
1840
+ },
1841
+ onModifySpecies(species, target) {
1842
+ const newSpecies = this.dex.deepClone(species);
1843
+ if (!newSpecies.prevo) return;
1844
+ const prevoSpecies = this.dex.species.get(newSpecies.prevo);
1845
+ let statid: StatID;
1846
+ newSpecies.bst = 0;
1847
+ for (statid in prevoSpecies.baseStats) {
1848
+ const change = newSpecies.baseStats[statid] - prevoSpecies.baseStats[statid];
1849
+ newSpecies.baseStats[statid] = this.clampIntRange(newSpecies.baseStats[statid] + change, 1, 255);
1850
+ newSpecies.bst += newSpecies.baseStats[statid];
1851
+ }
1852
+ return newSpecies;
1853
+ },
1854
+ },
1827
1855
  };
package/data/tags.ts CHANGED
@@ -199,8 +199,8 @@ export const Tags: {[id: string]: TagData} = {
199
199
  speciesFilter: species => [
200
200
  'Aerodactyl-Mega', 'Alakazam', 'Blacephalon', 'Blaziken', 'Diancie-Mega', 'Gallade-Mega', 'Gardevoir-Mega', 'Gengar', 'Gyarados',
201
201
  'Gyarados-Mega', 'Hawlucha', 'Heracross-Mega', 'Hoopa-Unbound', 'Hydreigon', 'Jirachi', 'Latias', 'Latias-Mega', 'Latios',
202
- 'Latios-Mega', 'Manaphy', 'Medicham-Mega', 'Melmetal', 'Mew', 'Pinsir-Mega', 'Sableye-Mega', 'Slowbro-Mega', 'Slowking-Galar',
203
- 'Thundurus', 'Thundurus-Therian', 'Venusaur-Mega', 'Xurkitree', 'Zapdos-Galar',
202
+ 'Latios-Mega', 'Manaphy', 'Medicham-Mega', 'Melmetal', 'Mew', 'Moltres-Galar', 'Pinsir-Mega', 'Sableye-Mega', 'Slowbro-Mega',
203
+ 'Slowking-Galar', 'Thundurus', 'Thundurus-Therian', 'Venusaur-Mega', 'Xurkitree', 'Zapdos-Galar',
204
204
  ].includes(species.name),
205
205
  },
206
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pkmn/sim",
3
- "version": "0.5.18",
3
+ "version": "0.5.21",
4
4
  "description": "An automatically generated extraction of just the simulator portion of Pokémon Showdown",
5
5
  "homepage": "https://psim.us",
6
6
  "main": "build/sim/index.js",
package/sim/battle.ts CHANGED
@@ -2078,13 +2078,7 @@ export class Battle {
2078
2078
  denominator = numerator[1];
2079
2079
  numerator = numerator[0];
2080
2080
  }
2081
- let nextMod = 0;
2082
- if (this.event.ceilModifier) {
2083
- nextMod = Math.ceil(numerator * 4096 / (denominator || 1));
2084
- } else {
2085
- nextMod = this.trunc(numerator * 4096 / (denominator || 1));
2086
- }
2087
-
2081
+ const nextMod = this.trunc(numerator * 4096 / (denominator || 1));
2088
2082
  this.event.modifier = ((previousMod * nextMod + 2048) >> 12) / 4096;
2089
2083
  }
2090
2084