@pkmn/sim 0.5.6 → 0.5.9

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 (52) hide show
  1. package/build/config/formats.js +482 -283
  2. package/build/config/formats.js.map +1 -1
  3. package/build/data/aliases.js +0 -2
  4. package/build/data/aliases.js.map +1 -1
  5. package/build/data/formats-data.js +12 -12
  6. package/build/data/formats-data.js.map +1 -1
  7. package/build/data/items.js +2 -2
  8. package/build/data/items.js.map +1 -1
  9. package/build/data/learnsets.js +5 -6
  10. package/build/data/learnsets.js.map +1 -1
  11. package/build/data/mods/gen2/moves.js +13 -1
  12. package/build/data/mods/gen2/moves.js.map +1 -1
  13. package/build/data/mods/gen3/formats-data.js +2 -2
  14. package/build/data/mods/gen3/formats-data.js.map +1 -1
  15. package/build/data/mods/gen4/formats-data.js +4 -4
  16. package/build/data/mods/gen4/formats-data.js.map +1 -1
  17. package/build/data/mods/gen4/moves.js +7 -5
  18. package/build/data/mods/gen4/moves.js.map +1 -1
  19. package/build/data/mods/gen5/moves.js +6 -4
  20. package/build/data/mods/gen5/moves.js.map +1 -1
  21. package/build/data/mods/gen6/items.js +2 -2
  22. package/build/data/mods/gen6/items.js.map +1 -1
  23. package/build/data/mods/gen7/moves.js +3 -3
  24. package/build/data/mods/gen7/moves.js.map +1 -1
  25. package/build/data/mods/gen7/pokedex.js +5 -0
  26. package/build/data/mods/gen7/pokedex.js.map +1 -1
  27. package/build/data/moves.js +6 -5
  28. package/build/data/moves.js.map +1 -1
  29. package/build/data/pokedex.js +3 -3
  30. package/build/data/pokedex.js.map +1 -1
  31. package/build/data/rulesets.js +23 -139
  32. package/build/data/rulesets.js.map +1 -1
  33. package/build/sim/team-validator.js +11 -0
  34. package/build/sim/team-validator.js.map +1 -1
  35. package/config/formats.ts +464 -279
  36. package/data/aliases.ts +0 -2
  37. package/data/formats-data.ts +12 -12
  38. package/data/items.ts +2 -2
  39. package/data/learnsets.ts +5 -6
  40. package/data/mods/gen2/moves.ts +13 -1
  41. package/data/mods/gen3/formats-data.ts +2 -2
  42. package/data/mods/gen4/formats-data.ts +4 -4
  43. package/data/mods/gen4/moves.ts +6 -4
  44. package/data/mods/gen5/moves.ts +6 -4
  45. package/data/mods/gen6/items.ts +2 -2
  46. package/data/mods/gen7/moves.ts +3 -3
  47. package/data/mods/gen7/pokedex.ts +5 -0
  48. package/data/moves.ts +6 -5
  49. package/data/pokedex.ts +3 -3
  50. package/data/rulesets.ts +21 -125
  51. package/package.json +2 -2
  52. package/sim/team-validator.ts +13 -0
package/data/aliases.ts CHANGED
@@ -67,8 +67,6 @@ export const Aliases: {[alias: string]: string} = {
67
67
  gen6mono: "[Gen 6] Monotype",
68
68
  gen6ag: "[Gen 6] Anything Goes",
69
69
  crossevo: "[Gen 8] Cross Evolution",
70
- omotm: "[Gen 8] Trademarked",
71
- lcotm: "[Gen 8] Linked",
72
70
 
73
71
  // mega evos
74
72
  fabio: "Ampharos-Mega",
@@ -979,7 +979,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
979
979
  randomBattleMoves: ["seismictoss", "softboiled", "stealthrock", "teleport", "toxic"],
980
980
  randomBattleLevel: 83,
981
981
  randomDoubleBattleMoves: ["allyswitch", "protect", "seismictoss", "softboiled", "thunderwave", "toxic"],
982
- randomDoubleBattleLevel: 87,
982
+ randomDoubleBattleLevel: 88,
983
983
  tier: "OU",
984
984
  doublesTier: "(DUU)",
985
985
  },
@@ -2635,7 +2635,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2635
2635
  randomBattleMoves: ["dragondance", "dualwingbeat", "earthquake", "outrage", "roost"],
2636
2636
  randomBattleLevel: 76,
2637
2637
  randomDoubleBattleMoves: ["dragonclaw", "fireblast", "hurricane", "protect", "tailwind"],
2638
- randomDoubleBattleLevel: 80,
2638
+ randomDoubleBattleLevel: 79,
2639
2639
  tier: "UU",
2640
2640
  doublesTier: "(DUU)",
2641
2641
  },
@@ -2653,7 +2653,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
2653
2653
  randomBattleMoves: ["agility", "bulletpunch", "earthquake", "explosion", "meteormash", "stealthrock", "thunderpunch"],
2654
2654
  randomBattleLevel: 79,
2655
2655
  randomDoubleBattleMoves: ["agility", "bulletpunch", "icepunch", "meteormash", "stompingtantrum", "trick", "zenheadbutt"],
2656
- randomDoubleBattleLevel: 83,
2656
+ randomDoubleBattleLevel: 82,
2657
2657
  tier: "RU",
2658
2658
  doublesTier: "DOU",
2659
2659
  },
@@ -3483,7 +3483,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
3483
3483
  },
3484
3484
  audino: {
3485
3485
  randomBattleMoves: ["healbell", "knockoff", "protect", "toxic", "wish"],
3486
- randomBattleLevel: 90,
3486
+ randomBattleLevel: 91,
3487
3487
  randomDoubleBattleMoves: ["bodyslam", "healpulse", "helpinghand", "knockoff", "protect", "thunderwave"],
3488
3488
  randomDoubleBattleLevel: 90,
3489
3489
  tier: "PU",
@@ -4020,7 +4020,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4020
4020
  tier: "LC",
4021
4021
  },
4022
4022
  mienshao: {
4023
- randomBattleMoves: ["closecombat", "fakeout", "knockoff", "poisonjab", "swordsdance", "uturn"],
4023
+ randomBattleMoves: ["closecombat", "fakeout", "knockoff", "poisonjab", "stoneedge", "swordsdance", "uturn"],
4024
4024
  randomBattleLevel: 82,
4025
4025
  randomDoubleBattleMoves: ["closecombat", "fakeout", "knockoff", "poisonjab", "protect", "uturn"],
4026
4026
  randomDoubleBattleLevel: 84,
@@ -4599,7 +4599,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
4599
4599
  randomBattleLevel: 82,
4600
4600
  randomDoubleBattleMoves: ["breakingswipe", "dracometeor", "fireblast", "muddywater", "powerwhip", "protect", "sludgebomb", "thunderbolt"],
4601
4601
  randomDoubleBattleLevel: 85,
4602
- tier: "NU",
4602
+ tier: "NUBL",
4603
4603
  doublesTier: "(DUU)",
4604
4604
  },
4605
4605
  goodrahisui: {
@@ -5343,7 +5343,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5343
5343
  randomBattleMoves: ["closecombat", "hornleech", "megahorn", "stoneedge", "swordsdance", "woodhammer"],
5344
5344
  randomBattleLevel: 82,
5345
5345
  randomDoubleBattleMoves: ["closecombat", "highhorsepower", "hornleech", "protect", "stoneedge", "swordsdance", "woodhammer"],
5346
- randomDoubleBattleLevel: 81,
5346
+ randomDoubleBattleLevel: 83,
5347
5347
  tier: "UU",
5348
5348
  doublesTier: "DUU",
5349
5349
  },
@@ -5379,7 +5379,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5379
5379
  },
5380
5380
  nihilego: {
5381
5381
  randomBattleMoves: ["grassknot", "powergem", "sludgewave", "stealthrock", "thunderbolt", "toxicspikes"],
5382
- randomBattleLevel: 80,
5382
+ randomBattleLevel: 79,
5383
5383
  randomDoubleBattleMoves: ["grassknot", "meteorbeam", "protect", "sludgebomb", "thunderbolt"],
5384
5384
  randomDoubleBattleLevel: 81,
5385
5385
  tier: "UU",
@@ -5440,7 +5440,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5440
5440
  randomBattleLevel: 80,
5441
5441
  randomDoubleBattleMoves: ["calmmind", "earthpower", "heatwave", "moonlight", "photongeyser", "protect"],
5442
5442
  randomDoubleBattleLevel: 80,
5443
- tier: "RU",
5443
+ tier: "RUBL",
5444
5444
  doublesTier: "DOU",
5445
5445
  },
5446
5446
  necrozmaduskmane: {
@@ -5661,7 +5661,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5661
5661
  randomBattleMoves: ["darkpulse", "foulplay", "grassknot", "nastyplot", "partingshot", "psychic"],
5662
5662
  randomBattleLevel: 86,
5663
5663
  randomDoubleBattleMoves: ["faketears", "foulplay", "partingshot", "snarl", "taunt"],
5664
- randomDoubleBattleLevel: 88,
5664
+ randomDoubleBattleLevel: 89,
5665
5665
  tier: "(PU)",
5666
5666
  doublesTier: "(DUU)",
5667
5667
  },
@@ -5970,7 +5970,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5970
5970
  },
5971
5971
  indeedee: {
5972
5972
  randomBattleMoves: ["calmmind", "expandingforce", "hypervoice", "mysticalfire", "trick"],
5973
- randomBattleLevel: 82,
5973
+ randomBattleLevel: 83,
5974
5974
  randomDoubleBattleMoves: ["encore", "expandingforce", "hypervoice", "mysticalfire", "protect", "trick"],
5975
5975
  randomDoubleBattleLevel: 80,
5976
5976
  tier: "NUBL",
@@ -5978,7 +5978,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
5978
5978
  },
5979
5979
  indeedeef: {
5980
5980
  randomBattleMoves: ["calmmind", "expandingforce", "healingwish", "hypervoice", "mysticalfire"],
5981
- randomBattleLevel: 84,
5981
+ randomBattleLevel: 85,
5982
5982
  randomDoubleBattleMoves: ["expandingforce", "followme", "healpulse", "helpinghand", "protect"],
5983
5983
  randomDoubleBattleLevel: 80,
5984
5984
  tier: "NU",
package/data/items.ts CHANGED
@@ -2585,7 +2585,7 @@ export const Items: {[itemid: string]: ItemData} = {
2585
2585
  type: "Dragon",
2586
2586
  },
2587
2587
  onDamagingHit(damage, target, source, move) {
2588
- if (move.category === 'Physical' && source.hp && source.isActive) {
2588
+ if (move.category === 'Physical' && source.hp && source.isActive && !source.hasAbility('magicguard')) {
2589
2589
  if (target.eatItem()) {
2590
2590
  this.damage(source.baseMaxhp / (target.hasAbility('ripen') ? 4 : 8), source, target);
2591
2591
  }
@@ -4643,7 +4643,7 @@ export const Items: {[itemid: string]: ItemData} = {
4643
4643
  type: "Dark",
4644
4644
  },
4645
4645
  onDamagingHit(damage, target, source, move) {
4646
- if (move.category === 'Special' && source.hp && source.isActive) {
4646
+ if (move.category === 'Special' && source.hp && source.isActive && !source.hasAbility('magicguard')) {
4647
4647
  if (target.eatItem()) {
4648
4648
  this.damage(source.baseMaxhp / (target.hasAbility('ripen') ? 4 : 8), source, target);
4649
4649
  }
package/data/learnsets.ts CHANGED
@@ -20168,12 +20168,12 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
20168
20168
  expandingforce: ["8T"],
20169
20169
  facade: ["8M"],
20170
20170
  fly: ["8M"],
20171
- freezingglare: ["8L45", "8S0"],
20171
+ freezingglare: ["8L45", "8S0", "8S1"],
20172
20172
  futuresight: ["8M", "8L65"],
20173
20173
  gigaimpact: ["8M"],
20174
20174
  guardswap: ["8M"],
20175
20175
  gust: ["8L1"],
20176
- hurricane: ["8M", "8L55", "8S0"],
20176
+ hurricane: ["8M", "8L55", "8S0", "8S1"],
20177
20177
  hyperbeam: ["8M"],
20178
20178
  hypervoice: ["8M"],
20179
20179
  hypnosis: ["8L15"],
@@ -20183,8 +20183,8 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
20183
20183
  powerswap: ["8M"],
20184
20184
  protect: ["8M"],
20185
20185
  psychic: ["8M"],
20186
- psychocut: ["8M", "8L35", "8S0"],
20187
- psychoshift: ["8L1", "8S0"],
20186
+ psychocut: ["8M", "8L35", "8S0", "8S1"],
20187
+ psychoshift: ["8L1", "8S0", "8S1"],
20188
20188
  psyshock: ["8M"],
20189
20189
  recover: ["8L40"],
20190
20190
  reflect: ["8M", "8L10"],
@@ -20205,6 +20205,7 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
20205
20205
  },
20206
20206
  eventData: [
20207
20207
  {generation: 8, level: 70, moves: ["freezingglare", "hurricane", "psychocut", "psychoshift"]},
20208
+ {generation: 8, level: 70, shiny: true, moves: ["freezingglare", "hurricane", "psychocut", "psychoshift"], pokeball: "cherishball"},
20208
20209
  ],
20209
20210
  eventOnly: true,
20210
20211
  },
@@ -79487,7 +79488,6 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
79487
79488
  ironhead: ["8M", "7T"],
79488
79489
  irontail: ["8M", "7T", "4M"],
79489
79490
  lavaplume: ["8L48", "7L50", "4L54"],
79490
- leafstorm: ["8M"],
79491
79491
  leechseed: ["8L1", "7L10", "4L13"],
79492
79492
  lightscreen: ["8M", "7M", "4M"],
79493
79493
  lowkick: ["8M", "7T", "4T"],
@@ -82843,7 +82843,6 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
82843
82843
  snore: ["8M"],
82844
82844
  stealthrock: ["8M"],
82845
82845
  substitute: ["8M"],
82846
- swordsdance: ["8M"],
82847
82846
  thunderwave: ["8M"],
82848
82847
  toxic: ["8L1"],
82849
82848
  uturn: ["8M"],
@@ -307,11 +307,17 @@ export const Moves: {[k: string]: ModdedMoveData} = {
307
307
  },
308
308
  },
309
309
  },
310
+ frustration: {
311
+ inherit: true,
312
+ basePowerCallback(pokemon) {
313
+ return Math.floor(((255 - pokemon.happiness) * 10) / 25) || null;
314
+ },
315
+ },
310
316
  healbell: {
311
317
  inherit: true,
312
318
  onHit(target, source) {
313
319
  this.add('-cureteam', source, '[from] move: Heal Bell');
314
- for (const pokemon of source.side.pokemon) {
320
+ for (const pokemon of target.side.pokemon) {
315
321
  pokemon.clearStatus();
316
322
  }
317
323
  },
@@ -674,6 +680,12 @@ export const Moves: {[k: string]: ModdedMoveData} = {
674
680
  },
675
681
  secondary: null,
676
682
  },
683
+ return: {
684
+ inherit: true,
685
+ basePowerCallback(pokemon) {
686
+ return Math.floor((pokemon.happiness * 10) / 25) || null;
687
+ },
688
+ },
677
689
  reversal: {
678
690
  inherit: true,
679
691
  noDamageVariance: true,
@@ -17,7 +17,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
17
17
  },
18
18
  charizard: {
19
19
  randomBattleMoves: ["bellydrum", "dragondance", "earthquake", "fireblast", "hiddenpowerflying", "substitute"],
20
- tier: "UUBL",
20
+ tier: "OU",
21
21
  },
22
22
  squirtle: {
23
23
  tier: "LC",
@@ -544,7 +544,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
544
544
  },
545
545
  porygon2: {
546
546
  randomBattleMoves: ["icebeam", "recover", "return", "thunderbolt", "thunderwave", "toxic"],
547
- tier: "OU",
547
+ tier: "UUBL",
548
548
  },
549
549
  omanyte: {
550
550
  tier: "LC",
@@ -164,7 +164,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
164
164
  tier: "NFE",
165
165
  },
166
166
  vileplume: {
167
- randomBattleMoves: ["energyball", "moonlight", "sleeppowder", "sludgebomb", "solarbeam", "sunnyday"],
167
+ randomBattleMoves: ["energyball", "hiddenpowerfire", "moonlight", "sleeppowder", "sludgebomb", "solarbeam", "sunnyday"],
168
168
  tier: "NU",
169
169
  },
170
170
  bellossom: {
@@ -474,7 +474,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
474
474
  tier: "LC",
475
475
  },
476
476
  starmie: {
477
- randomBattleMoves: ["hydropump", "icebeam", "rapidspin", "recover", "surf", "thunderbolt"],
477
+ randomBattleMoves: ["hydropump", "icebeam", "psychic", "rapidspin", "recover", "surf", "thunderbolt"],
478
478
  tier: "OU",
479
479
  },
480
480
  mimejr: {
@@ -987,7 +987,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
987
987
  tier: "NFE",
988
988
  },
989
989
  blaziken: {
990
- randomBattleMoves: ["agility", "fireblast", "flareblitz", "hiddenpowerice", "lowkick", "stoneedge", "superpower", "thunderpunch", "vacuumwave"],
990
+ randomBattleMoves: ["agility", "fireblast", "flareblitz", "stoneedge", "superpower", "thunderpunch", "vacuumwave"],
991
991
  tier: "UU",
992
992
  },
993
993
  mudkip: {
@@ -1666,7 +1666,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
1666
1666
  tier: "NU",
1667
1667
  },
1668
1668
  garchomp: {
1669
- randomBattleMoves: ["dragonclaw", "earthquake", "firefang", "outrage", "stealthrock", "stoneedge", "substitute", "swordsdance"],
1669
+ randomBattleMoves: ["dragonclaw", "earthquake", "fireblast", "outrage", "stealthrock", "stoneedge", "substitute", "swordsdance"],
1670
1670
  tier: "Uber",
1671
1671
  },
1672
1672
  riolu: {
@@ -27,8 +27,9 @@ export const Moves: {[k: string]: ModdedMoveData} = {
27
27
  inherit: true,
28
28
  onHit(target, source) {
29
29
  this.add('-cureteam', source, '[from] move: Aromatherapy');
30
- for (const pokemon of source.side.pokemon) {
31
- pokemon.clearStatus();
30
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
31
+ for (const ally of allies) {
32
+ ally.clearStatus();
32
33
  }
33
34
  },
34
35
  },
@@ -698,8 +699,9 @@ export const Moves: {[k: string]: ModdedMoveData} = {
698
699
  inherit: true,
699
700
  onHit(target, source) {
700
701
  this.add('-activate', source, 'move: Heal Bell');
701
- for (const pokemon of source.side.pokemon) {
702
- if (!pokemon.hasAbility('soundproof')) pokemon.cureStatus(true);
702
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
703
+ for (const ally of allies) {
704
+ if (!ally.hasAbility('soundproof')) ally.cureStatus(true);
703
705
  }
704
706
  },
705
707
  },
@@ -19,8 +19,9 @@ export const Moves: {[k: string]: ModdedMoveData} = {
19
19
  inherit: true,
20
20
  onHit(target, source) {
21
21
  this.add('-activate', source, 'move: Aromatherapy');
22
- for (const pokemon of source.side.pokemon) {
23
- pokemon.cureStatus();
22
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
23
+ for (const ally of allies) {
24
+ ally.cureStatus();
24
25
  }
25
26
  },
26
27
  },
@@ -352,8 +353,9 @@ export const Moves: {[k: string]: ModdedMoveData} = {
352
353
  flags: {snatch: 1, sound: 1},
353
354
  onHit(target, source) {
354
355
  this.add('-activate', source, 'move: Heal Bell');
355
- for (const pokemon of source.side.pokemon) {
356
- pokemon.cureStatus();
356
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
357
+ for (const ally of allies) {
358
+ ally.cureStatus();
357
359
  }
358
360
  },
359
361
  },
@@ -56,7 +56,7 @@ export const Items: {[k: string]: ModdedItemData} = {
56
56
  jabocaberry: {
57
57
  inherit: true,
58
58
  onDamagingHit(damage, target, source, move) {
59
- if (move.category === 'Physical') {
59
+ if (move.category === 'Physical' && !source.hasAbility('magicguard')) {
60
60
  if (target.eatItem()) {
61
61
  this.damage(source.baseMaxhp / 8, source, target, null, true);
62
62
  }
@@ -128,7 +128,7 @@ export const Items: {[k: string]: ModdedItemData} = {
128
128
  rowapberry: {
129
129
  inherit: true,
130
130
  onDamagingHit(damage, target, source, move) {
131
- if (move.category === 'Special') {
131
+ if (move.category === 'Special' && !source.hasAbility('magicguard')) {
132
132
  if (target.eatItem()) {
133
133
  this.damage(source.baseMaxhp / 8, source, target, null, true);
134
134
  }
@@ -344,11 +344,11 @@ export const Moves: {[k: string]: ModdedMoveData} = {
344
344
  },
345
345
  healbell: {
346
346
  inherit: true,
347
- onHit(pokemon, source) {
347
+ onHit(target, source) {
348
348
  this.add('-activate', source, 'move: Heal Bell');
349
- const side = pokemon.side;
350
349
  let success = false;
351
- for (const ally of side.pokemon) {
350
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
351
+ for (const ally of allies) {
352
352
  if (ally.hasAbility('soundproof')) continue;
353
353
  if (ally.cureStatus()) success = true;
354
354
  }
@@ -156,6 +156,11 @@ export const Pokedex: {[k: string]: ModdedSpeciesData} = {
156
156
  inherit: true,
157
157
  abilities: {0: "Misty Surge"},
158
158
  },
159
+ pyroak: {
160
+ inherit: true,
161
+ baseStats: {hp: 120, atk: 70, def: 105, spa: 95, spd: 90, spe: 60},
162
+ abilities: {0: "Rock Head", 1: "Battle Armor", H: "White Smoke"},
163
+ },
159
164
  voodoom: {
160
165
  inherit: true,
161
166
  baseStats: {hp: 90, atk: 85, def: 80, spa: 105, spd: 80, spe: 110},
package/data/moves.ts CHANGED
@@ -500,10 +500,11 @@ export const Moves: {[moveid: string]: MoveData} = {
500
500
  pp: 5,
501
501
  priority: 0,
502
502
  flags: {snatch: 1, distance: 1},
503
- onHit(pokemon, source, move) {
503
+ onHit(target, source, move) {
504
504
  this.add('-activate', source, 'move: Aromatherapy');
505
505
  let success = false;
506
- for (const ally of pokemon.side.pokemon) {
506
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
507
+ for (const ally of allies) {
507
508
  if (ally !== source && ((ally.hasAbility('sapsipper')) ||
508
509
  (ally.volatiles['substitute'] && !move.infiltrates))) {
509
510
  continue;
@@ -7710,11 +7711,11 @@ export const Moves: {[moveid: string]: MoveData} = {
7710
7711
  pp: 5,
7711
7712
  priority: 0,
7712
7713
  flags: {snatch: 1, sound: 1, distance: 1, bypasssub: 1},
7713
- onHit(pokemon, source) {
7714
+ onHit(target, source) {
7714
7715
  this.add('-activate', source, 'move: Heal Bell');
7715
- const side = pokemon.side;
7716
7716
  let success = false;
7717
- for (const ally of side.pokemon) {
7717
+ const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
7718
+ for (const ally of allies) {
7718
7719
  if (ally !== source && ally.hasAbility('soundproof')) continue;
7719
7720
  if (ally.cureStatus()) success = true;
7720
7721
  }
package/data/pokedex.ts CHANGED
@@ -16529,8 +16529,8 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
16529
16529
  num: -6,
16530
16530
  name: "Pyroak",
16531
16531
  types: ["Fire", "Grass"],
16532
- baseStats: {hp: 120, atk: 70, def: 105, spa: 95, spd: 90, spe: 60},
16533
- abilities: {0: "Rock Head", 1: "Battle Armor", H: "White Smoke"},
16532
+ baseStats: {hp: 120, atk: 70, def: 105, spa: 75, spd: 90, spe: 60},
16533
+ abilities: {0: "Rock Head", 1: "Battle Armor", H: "Contrary"},
16534
16534
  heightm: 2.1,
16535
16535
  weightkg: 168,
16536
16536
  color: "Brown",
@@ -17402,7 +17402,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
17402
17402
  forme: "Epilogue",
17403
17403
  types: ["Poison", "Flying"],
17404
17404
  gender: "N",
17405
- baseStats: {hp: 85, atk: 110, def: 85, spa: 55, spd: 85, spe: 120},
17405
+ baseStats: {hp: 85, atk: 102, def: 85, spa: 63, spd: 85, spe: 120},
17406
17406
  abilities: {0: "Tinted Lens"},
17407
17407
  heightm: 0.8,
17408
17408
  weightkg: 12.4,
package/data/rulesets.ts CHANGED
@@ -1219,6 +1219,27 @@ export const Rulesets: {[k: string]: FormatData} = {
1219
1219
  }
1220
1220
  },
1221
1221
  },
1222
+ camomonsmod: {
1223
+ effectType: 'Rule',
1224
+ name: 'Camomons Mod',
1225
+ desc: `Pokémon have their types set to match their first two moves.`,
1226
+ onBegin() {
1227
+ this.add('rule', 'Camomons Mod: Pok\u00e9mon have their types set to match their first two moves.');
1228
+ },
1229
+ onModifySpeciesPriority: 2,
1230
+ onModifySpecies(species, target, source, effect) {
1231
+ if (!target) return; // Chat command
1232
+ if (effect && ['imposter', 'transform'].includes(effect.id)) return;
1233
+ const types = [...new Set(target.baseMoveSlots.slice(0, 2).map(move => this.dex.moves.get(move.id).type))];
1234
+ return {...species, types: types};
1235
+ },
1236
+ onSwitchIn(pokemon) {
1237
+ this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
1238
+ },
1239
+ onAfterMega(pokemon) {
1240
+ this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
1241
+ },
1242
+ },
1222
1243
  allowtradeback: {
1223
1244
  effectType: 'ValidatorRule',
1224
1245
  name: 'Allow Tradeback',
@@ -1704,131 +1725,6 @@ export const Rulesets: {[k: string]: FormatData} = {
1704
1725
  return pokemon;
1705
1726
  },
1706
1727
  },
1707
- crossevolutionmod: {
1708
- effectType: "Rule",
1709
- name: "Cross Evolution Mod",
1710
- desc: "Give a Pokémon a Pokémon name of the next evolution stage as a nickname to inherit stat changes, typing, abilities, and up to 2 moves from the next stage Pokémon.",
1711
- ruleset: ['Overflow Stat Mod'],
1712
- onValidateTeam(team) {
1713
- const names = new Set<ID>();
1714
- for (const set of team) {
1715
- const name = set.name;
1716
- if (names.has(this.dex.toID(name))) {
1717
- return [
1718
- `Your Pok\u00e9mon must have different nicknames.`,
1719
- `(You have more than one Pok\u00e9mon named '${name}')`,
1720
- ];
1721
- }
1722
- names.add(this.dex.toID(name));
1723
- }
1724
- if (!names.size) {
1725
- return [
1726
- `${this.format.name} works using nicknames; your team has 0 nicknamed Pok\u00e9mon.`,
1727
- `(If this was intentional, add a nickname to one Pok\u00e9mon that isn't the name of a Pok\u00e9mon species.)`,
1728
- ];
1729
- }
1730
- },
1731
- checkCanLearn(move, species, lsetData, set) {
1732
- // @ts-ignore
1733
- if (!set.sp?.exists || !set.crossSpecies?.exists) {
1734
- return this.checkCanLearn(move, species, lsetData, set);
1735
- }
1736
- // @ts-ignore
1737
- const problem = this.checkCanLearn(move, set.sp);
1738
- if (!problem) return null;
1739
- // @ts-ignore
1740
- if (!set.crossMovesLeft) return problem;
1741
- // @ts-ignore
1742
- if (this.checkCanLearn(move, set.crossSpecies)) return problem;
1743
- // @ts-ignore
1744
- set.crossMovesLeft--;
1745
- return null;
1746
- },
1747
- validateSet(set, teamHas) {
1748
- const crossSpecies = this.dex.species.get(set.name);
1749
- const onChangeSet = this.dex.formats.get('Pokemon').onChangeSet;
1750
- let problems = onChangeSet?.call(this, set, this.format) || null;
1751
- if (Array.isArray(problems) && problems.length) return problems;
1752
- const crossNonstandard = !this.ruleTable.has('standardnatdex') && crossSpecies.isNonstandard === 'Past';
1753
- const crossIsCap = !this.ruleTable.has('+pokemontag:cap') && crossSpecies.isNonstandard === 'CAP';
1754
- if (!crossSpecies.exists || crossNonstandard || crossIsCap) return this.validateSet(set, teamHas);
1755
- const species = this.dex.species.get(set.species);
1756
- const check = this.checkSpecies(set, species, species, {});
1757
- if (check) return [check];
1758
- const nonstandard = !this.ruleTable.has('standardnatdex') && species.isNonstandard === 'Past';
1759
- const isCap = !this.ruleTable.has('+pokemontag:cap') && species.isNonstandard === 'CAP';
1760
- if (!species.exists || nonstandard || isCap || species === crossSpecies) return this.validateSet(set, teamHas);
1761
- if (!species.nfe) return [`${species.name} cannot cross evolve because it doesn't evolve.`];
1762
- const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
1763
- if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) {
1764
- return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it isn't an evolution.`];
1765
- }
1766
- if (this.ruleTable.isRestrictedSpecies(crossSpecies)) {
1767
- return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it is banned.`];
1768
- }
1769
- const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
1770
- if (!crossPrevoSpecies.prevo !== !species.prevo) {
1771
- return [
1772
- `${species.name} cannot cross evolve into ${crossSpecies.name} because they are not consecutive evolution stages.`,
1773
- ];
1774
- }
1775
- const ability = this.dex.abilities.get(set.ability);
1776
- if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
1777
- set.species = crossSpecies.name;
1778
- }
1779
-
1780
- // @ts-ignore
1781
- set.sp = species;
1782
- // @ts-ignore
1783
- set.crossSpecies = crossSpecies;
1784
- // @ts-ignore
1785
- set.crossMovesLeft = 2;
1786
- problems = this.validateSet(set, teamHas);
1787
- set.name = crossSpecies.name;
1788
- set.species = species.name;
1789
- return problems;
1790
- },
1791
- onModifySpecies(species, target, source, effect) {
1792
- if (!target) return; // chat
1793
- if (effect && ['imposter', 'transform'].includes(effect.id)) return;
1794
- if (target.set.name === target.set.species) return;
1795
- const crossSpecies = this.dex.species.get(target.set.name);
1796
- if (!crossSpecies.exists) return;
1797
- if (species.battleOnly || !species.nfe) return;
1798
- const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
1799
- if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) return;
1800
- const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
1801
- if (!crossPrevoSpecies.prevo !== !species.prevo) return;
1802
-
1803
- const mixedSpecies = this.dex.deepClone(species);
1804
- mixedSpecies.baseSpecies = mixedSpecies.name = `${species.name}-${crossSpecies.name}`;
1805
- mixedSpecies.weightkg =
1806
- Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
1807
- mixedSpecies.nfe = false;
1808
- mixedSpecies.evos = [];
1809
- mixedSpecies.eggGroups = crossSpecies.eggGroups;
1810
- mixedSpecies.abilities = crossSpecies.abilities;
1811
- mixedSpecies.bst = 0;
1812
- let i: StatID;
1813
- for (i in species.baseStats) {
1814
- const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
1815
- mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
1816
- mixedSpecies.bst += mixedSpecies.baseStats[i];
1817
- }
1818
- if (crossSpecies.types[0] !== crossPrevoSpecies.types[0]) mixedSpecies.types[0] = crossSpecies.types[0];
1819
- if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
1820
- mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
1821
- }
1822
- if (mixedSpecies.types[0] === mixedSpecies.types[1]) mixedSpecies.types = [mixedSpecies.types[0]];
1823
-
1824
- return mixedSpecies;
1825
- },
1826
- onBegin() {
1827
- for (const pokemon of this.getAllPokemon()) {
1828
- pokemon.baseSpecies = pokemon.species;
1829
- }
1830
- },
1831
- },
1832
1728
  revelationmonsmod: {
1833
1729
  effectType: "Rule",
1834
1730
  name: "Revelationmons Mod",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pkmn/sim",
3
- "version": "0.5.6",
3
+ "version": "0.5.9",
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",
@@ -31,7 +31,7 @@
31
31
  "@pkmn/streams": "^1.0.0"
32
32
  },
33
33
  "devDependencies": {
34
- "mocha": "^9.2.0"
34
+ "mocha": "^9.2.1"
35
35
  },
36
36
  "scripts": {
37
37
  "compile": "tsc -p .",
@@ -1564,6 +1564,19 @@ export class TeamValidator {
1564
1564
 
1565
1565
  setHas['ability:' + ability.id] = true;
1566
1566
 
1567
+ if (this.format.id === 'gen8pokebilities') {
1568
+ const species = dex.species.get(set.species);
1569
+ const unSeenAbilities = Object.keys(species.abilities)
1570
+ .filter(key => key !== 'S' && (key !== 'H' || !species.unreleasedHidden))
1571
+ .map(key => species.abilities[key as "0" | "1" | "H" | "S"]);
1572
+
1573
+ if (ability.id !== this.toID(species.abilities['S'])) {
1574
+ for (const abilityName of unSeenAbilities) {
1575
+ setHas['ability:' + toID(abilityName)] = true;
1576
+ }
1577
+ }
1578
+ }
1579
+
1567
1580
  let banReason = ruleTable.check('ability:' + ability.id);
1568
1581
  if (banReason) {
1569
1582
  return `${set.name}'s ability ${ability.name} is ${banReason}.`;