@pkmn/sim 0.5.22 → 0.5.25

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 (86) hide show
  1. package/LICENSE +1 -1
  2. package/build/config/formats.js +581 -481
  3. package/build/config/formats.js.map +1 -1
  4. package/build/data/aliases.js +9 -5
  5. package/build/data/aliases.js.map +1 -1
  6. package/build/data/conditions.js +1 -1
  7. package/build/data/conditions.js.map +1 -1
  8. package/build/data/formats-data.js +830 -28
  9. package/build/data/formats-data.js.map +1 -1
  10. package/build/data/learnsets.js +64 -39
  11. package/build/data/learnsets.js.map +1 -1
  12. package/build/data/mods/gen1/formats-data.js +1 -1
  13. package/build/data/mods/gen1/formats-data.js.map +1 -1
  14. package/build/data/mods/gen1/moves.js +5 -0
  15. package/build/data/mods/gen1/moves.js.map +1 -1
  16. package/build/data/mods/gen1/scripts.js +4 -2
  17. package/build/data/mods/gen1/scripts.js.map +1 -1
  18. package/build/data/mods/gen2/moves.js +0 -5
  19. package/build/data/mods/gen2/moves.js.map +1 -1
  20. package/build/data/mods/gen2/rulesets.js +7 -1
  21. package/build/data/mods/gen2/rulesets.js.map +1 -1
  22. package/build/data/mods/gen3/formats-data.js +3 -3
  23. package/build/data/mods/gen3/formats-data.js.map +1 -1
  24. package/build/data/mods/gen3/rulesets.js +1 -1
  25. package/build/data/mods/gen3/rulesets.js.map +1 -1
  26. package/build/data/mods/gen4/rulesets.js +1 -1
  27. package/build/data/mods/gen4/rulesets.js.map +1 -1
  28. package/build/data/mods/gen5/rulesets.js +1 -1
  29. package/build/data/mods/gen5/rulesets.js.map +1 -1
  30. package/build/data/mods/gen6/formats-data.js +64 -64
  31. package/build/data/mods/gen6/formats-data.js.map +1 -1
  32. package/build/data/mods/gen7/rulesets.js +1 -1
  33. package/build/data/mods/gen7/rulesets.js.map +1 -1
  34. package/build/data/pokedex.js +1 -1
  35. package/build/data/rulesets.js +232 -3
  36. package/build/data/rulesets.js.map +1 -1
  37. package/build/data/tags.js +26 -9
  38. package/build/data/tags.js.map +1 -1
  39. package/build/lib/utils.d.ts +4 -0
  40. package/build/lib/utils.js +20 -1
  41. package/build/lib/utils.js.map +1 -1
  42. package/build/sim/battle-stream.js +3 -0
  43. package/build/sim/battle-stream.js.map +1 -1
  44. package/build/sim/battle.d.ts +1 -1
  45. package/build/sim/battle.js.map +1 -1
  46. package/build/sim/dex-conditions.d.ts +1 -0
  47. package/build/sim/dex-conditions.js.map +1 -1
  48. package/build/sim/dex-species.d.ts +5 -0
  49. package/build/sim/dex-species.js +11 -3
  50. package/build/sim/dex-species.js.map +1 -1
  51. package/build/sim/exported-global-types.d.ts +4 -0
  52. package/build/sim/global-types.d.ts +4 -0
  53. package/build/sim/pokemon.d.ts +1 -0
  54. package/build/sim/pokemon.js +1 -0
  55. package/build/sim/pokemon.js.map +1 -1
  56. package/build/sim/team-validator.js +5 -1
  57. package/build/sim/team-validator.js.map +1 -1
  58. package/config/formats.ts +575 -466
  59. package/data/aliases.ts +9 -5
  60. package/data/conditions.ts +1 -1
  61. package/data/formats-data.ts +830 -28
  62. package/data/learnsets.ts +64 -39
  63. package/data/mods/gen1/formats-data.ts +1 -1
  64. package/data/mods/gen1/moves.ts +5 -0
  65. package/data/mods/gen1/scripts.ts +3 -2
  66. package/data/mods/gen2/moves.ts +0 -5
  67. package/data/mods/gen2/rulesets.ts +8 -1
  68. package/data/mods/gen3/formats-data.ts +3 -3
  69. package/data/mods/gen3/rulesets.ts +1 -1
  70. package/data/mods/gen4/rulesets.ts +1 -1
  71. package/data/mods/gen5/rulesets.ts +1 -1
  72. package/data/mods/gen6/formats-data.ts +64 -64
  73. package/data/mods/gen7/rulesets.ts +1 -1
  74. package/data/pokedex.ts +1 -1
  75. package/data/rulesets.ts +212 -3
  76. package/data/tags.ts +27 -9
  77. package/lib/utils.ts +16 -0
  78. package/package.json +2 -2
  79. package/sim/battle-stream.ts +3 -0
  80. package/sim/battle.ts +1 -1
  81. package/sim/dex-conditions.ts +1 -0
  82. package/sim/dex-species.ts +15 -3
  83. package/sim/exported-global-types.ts +4 -0
  84. package/sim/global-types.ts +4 -0
  85. package/sim/pokemon.ts +2 -0
  86. package/sim/team-validator.ts +6 -1
@@ -4,7 +4,7 @@ exports.Rulesets = void 0;
4
4
  exports.Rulesets = {
5
5
  standard: {
6
6
  inherit: true,
7
- ruleset: ['Obtainable', 'Team Preview', 'Sleep Clause Mod', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Moody Clause', 'Evasion Moves Clause', 'Endless Battle Clause', 'HP Percentage Mod', 'Cancel Mod'],
7
+ ruleset: ['Obtainable', 'Team Preview', 'Sleep Clause Mod', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Moody Clause', 'Evasion Items Clause', 'Evasion Moves Clause', 'Endless Battle Clause', 'HP Percentage Mod', 'Cancel Mod'],
8
8
  },
9
9
  standarddoubles: {
10
10
  inherit: true,
@@ -1 +1 @@
1
- {"version":3,"file":"rulesets.js","sourceRoot":"","sources":["../../../../data/mods/gen7/rulesets.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAoC;IACxD,QAAQ,EAAE;QACT,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,YAAY,CAAC;KACnN;IACD,eAAe,EAAE;QAChB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,YAAY,CAAC;KACnP;IACD,eAAe,EAAE;QAChB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE;YACR,sCAAsC;YACtC,oCAAoC;YACp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E,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;aACvE;YACD,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QACjC,CAAC;KACD;CACD,CAAC"}
@@ -16539,7 +16539,7 @@ exports.Pokedex = {
16539
16539
  num: -6,
16540
16540
  name: "Pyroak",
16541
16541
  types: ["Fire", "Grass"],
16542
- baseStats: { hp: 120, atk: 70, def: 105, spa: 75, spd: 90, spe: 60 },
16542
+ baseStats: { hp: 120, atk: 70, def: 105, spa: 70, spd: 65, spe: 60 },
16543
16543
  abilities: { 0: "Rock Head", 1: "Battle Armor", H: "Contrary" },
16544
16544
  heightm: 2.1,
16545
16545
  weightkg: 168,
@@ -13,7 +13,7 @@ exports.Rulesets = {
13
13
  name: 'Standard',
14
14
  desc: "The standard ruleset for all offical Smogon singles tiers (Ubers, OU, etc.)",
15
15
  ruleset: [
16
- 'Obtainable', 'Team Preview', 'Sleep Clause Mod', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Evasion Moves Clause', 'Endless Battle Clause', 'HP Percentage Mod', 'Cancel Mod',
16
+ 'Obtainable', 'Team Preview', 'Sleep Clause Mod', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Evasion Items Clause', 'Evasion Moves Clause', 'Endless Battle Clause', 'HP Percentage Mod', 'Cancel Mod',
17
17
  ],
18
18
  },
19
19
  standardnext: {
@@ -72,6 +72,14 @@ exports.Rulesets = {
72
72
  'Obtainable', 'Team Preview', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Evasion Moves Clause', 'Gravity Sleep Clause', 'Endless Battle Clause', 'HP Percentage Mod', 'Cancel Mod',
73
73
  ],
74
74
  },
75
+ standardoms: {
76
+ effectType: 'ValidatorRule',
77
+ name: 'Standard OMs',
78
+ desc: "The standard ruleset for all Smogon OMs (Almost Any Ability, STABmons, etc.)",
79
+ ruleset: [
80
+ 'Obtainable', 'Team Preview', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Evasion Moves Clause', 'Endless Battle Clause', 'Dynamax Clause', 'HP Percentage Mod', 'Cancel Mod', 'Overflow Stat Mod',
81
+ ],
82
+ },
75
83
  standardnatdex: {
76
84
  effectType: 'ValidatorRule',
77
85
  name: 'Standard NatDex',
@@ -654,6 +662,15 @@ exports.Rulesets = {
654
662
  return problems;
655
663
  },
656
664
  },
665
+ evasionclause: {
666
+ effectType: 'ValidatorRule',
667
+ name: 'Evasion Clause',
668
+ desc: "Bans abilities, items, and moves that boost Evasion",
669
+ ruleset: ['Evasion Abilities Clause', 'Evasion Items Clause', 'Evasion Moves Clause'],
670
+ onBegin() {
671
+ this.add('rule', 'Evasion Clause: Evasion abilities, items, and moves are banned');
672
+ },
673
+ },
657
674
  evasionabilitiesclause: {
658
675
  effectType: 'ValidatorRule',
659
676
  name: 'Evasion Abilities Clause',
@@ -663,6 +680,15 @@ exports.Rulesets = {
663
680
  this.add('rule', 'Evasion Abilities Clause: Evasion abilities are banned');
664
681
  },
665
682
  },
683
+ evasionitemsclause: {
684
+ effectType: 'ValidatorRule',
685
+ name: 'Evasion Items Clause',
686
+ desc: "Bans moves that lower the accuracy of moves used against the user",
687
+ banlist: ['Bright Powder', 'Lax Incense'],
688
+ onBegin() {
689
+ this.add('rule', 'Evasion Items Clause: Evasion items are banned');
690
+ },
691
+ },
666
692
  evasionmovesclause: {
667
693
  effectType: 'ValidatorRule',
668
694
  name: 'Evasion Moves Clause',
@@ -1437,6 +1463,7 @@ exports.Rulesets = {
1437
1463
  name: 'Team Type Preview',
1438
1464
  desc: "Allows each player to see the Pokémon on their opponent's team and those Pokémon's types before they choose their lead Pokémon",
1439
1465
  onTeamPreview() {
1466
+ this.add('clearpoke');
1440
1467
  for (const side of this.sides) {
1441
1468
  for (const pokemon of side.pokemon) {
1442
1469
  const details = pokemon.details.replace(', shiny', '')
@@ -1908,8 +1935,7 @@ exports.Rulesets = {
1908
1935
  reevolutionmod: {
1909
1936
  effectType: "Rule",
1910
1937
  name: "Re-Evolution Mod",
1911
- desc: "Pokémon gain the boosts they would gain from evolving again",
1912
- ruleset: ['Overflow Stat Mod'],
1938
+ desc: "Pokémon gain the stat changes they would gain from evolving again.",
1913
1939
  onBegin() {
1914
1940
  this.add('rule', 'Re-Evolution Mod: Pok\u00e9mon gain the boosts they would gain from evolving again');
1915
1941
  },
@@ -1928,5 +1954,208 @@ exports.Rulesets = {
1928
1954
  return newSpecies;
1929
1955
  },
1930
1956
  },
1957
+ brokenrecordmod: {
1958
+ effectType: "Rule",
1959
+ name: "Broken Record Mod",
1960
+ desc: `Pokémon can hold a TR to use that move in battle.`,
1961
+ onValidateSet(set) {
1962
+ if (!set.item)
1963
+ return;
1964
+ const item = this.dex.items.get(set.item);
1965
+ if (!/^tr\d\d/i.test(item.name))
1966
+ return;
1967
+ const moveName = item.desc.split('move ')[1].split('.')[0];
1968
+ if (set.moves.map(this.toID).includes(this.toID(moveName))) {
1969
+ return [
1970
+ `${set.species} can't run ${item.name} (${moveName}) as its item because it already has that move in its moveset.`,
1971
+ ];
1972
+ }
1973
+ },
1974
+ onValidateTeam(team) {
1975
+ const trs = new Set();
1976
+ for (const set of team) {
1977
+ if (!set.item)
1978
+ continue;
1979
+ const item = this.dex.items.get(set.item).name;
1980
+ if (!/^tr\d\d/i.test(item))
1981
+ continue;
1982
+ if (trs.has(item)) {
1983
+ return [`Your team already has a Pok\u00e9mon with ${item}.`];
1984
+ }
1985
+ trs.add(item);
1986
+ }
1987
+ },
1988
+ onTakeItem(item) {
1989
+ return !/^tr\d\d/i.test(item.name);
1990
+ },
1991
+ onModifyMove(move) {
1992
+ if (move.id === 'knockoff') {
1993
+ move.onBasePower = function (basePower, source, target, m) {
1994
+ const item = target.getItem();
1995
+ if (!this.singleEvent('TakeItem', item, target.itemState, target, target, m, item))
1996
+ return;
1997
+ // Very hardcode but I'd prefer to not make a mod for one damage calculation change
1998
+ if (item.id && !/^tr\d\d/i.test(item.id)) {
1999
+ return this.chainModify(1.5);
2000
+ }
2001
+ };
2002
+ }
2003
+ else if (move.id === 'fling') {
2004
+ move.onPrepareHit = function (target, source, m) {
2005
+ if (source.ignoringItem())
2006
+ return false;
2007
+ const item = source.getItem();
2008
+ if (!this.singleEvent('TakeItem', item, source.itemState, source, source, m, item))
2009
+ return false;
2010
+ if (!item.fling)
2011
+ return false;
2012
+ if (/^tr\d\d/i.test(item.id))
2013
+ return false;
2014
+ m.basePower = item.fling.basePower;
2015
+ if (item.isBerry) {
2016
+ m.onHit = function (foe) {
2017
+ if (this.singleEvent('Eat', item, null, foe, null, null)) {
2018
+ this.runEvent('EatItem', foe, null, null, item);
2019
+ if (item.id === 'leppaberry')
2020
+ foe.staleness = 'external';
2021
+ }
2022
+ if (item.onEat)
2023
+ foe.ateBerry = true;
2024
+ };
2025
+ }
2026
+ else if (item.fling.effect) {
2027
+ m.onHit = item.fling.effect;
2028
+ }
2029
+ else {
2030
+ if (!m.secondaries)
2031
+ m.secondaries = [];
2032
+ if (item.fling.status) {
2033
+ m.secondaries.push({ status: item.fling.status });
2034
+ }
2035
+ else if (item.fling.volatileStatus) {
2036
+ m.secondaries.push({ volatileStatus: item.fling.volatileStatus });
2037
+ }
2038
+ }
2039
+ source.addVolatile('fling');
2040
+ };
2041
+ }
2042
+ },
2043
+ onBegin() {
2044
+ for (const pokemon of this.getAllPokemon()) {
2045
+ const item = pokemon.getItem();
2046
+ if (/^tr\d\d/i.test(item.name)) {
2047
+ const move = this.dex.moves.get(item.desc.split('move ')[1].split('.')[0]);
2048
+ pokemon.moveSlots = pokemon.baseMoveSlots = [
2049
+ ...pokemon.baseMoveSlots, {
2050
+ id: move.id,
2051
+ move: move.name,
2052
+ pp: move.pp * 8 / 5,
2053
+ maxpp: move.pp * 8 / 5,
2054
+ target: move.target,
2055
+ disabled: false,
2056
+ disabledSource: '',
2057
+ used: false,
2058
+ },
2059
+ ];
2060
+ }
2061
+ }
2062
+ },
2063
+ },
2064
+ categoryswapmod: {
2065
+ effectType: 'Rule',
2066
+ name: 'Category Swap Mod',
2067
+ desc: `All physical moves become special, and all special moves become physical.`,
2068
+ onBegin() {
2069
+ this.add('rule', 'Category Swap Mod: All physical moves become special, and vice versa');
2070
+ },
2071
+ onModifyMove(move, pokemon, target) {
2072
+ if (move.category === "Status")
2073
+ return;
2074
+ if (move.category === "Physical") {
2075
+ move.category = "Special";
2076
+ }
2077
+ else if (move.category === "Special") {
2078
+ move.category = "Physical";
2079
+ }
2080
+ switch (move.id) {
2081
+ case 'doomdesire': {
2082
+ move.onTry = function (source, subtarget) {
2083
+ if (!subtarget.side.addSlotCondition(subtarget, 'futuremove'))
2084
+ return false;
2085
+ Object.assign(subtarget.side.slotConditions[subtarget.position]['futuremove'], {
2086
+ move: 'doomdesire',
2087
+ source: source,
2088
+ moveData: {
2089
+ id: 'doomdesire',
2090
+ name: "Doom Desire",
2091
+ accuracy: 100,
2092
+ basePower: 140,
2093
+ category: "Physical",
2094
+ priority: 0,
2095
+ flags: {},
2096
+ effectType: 'Move',
2097
+ isFutureMove: true,
2098
+ type: 'Steel',
2099
+ },
2100
+ });
2101
+ this.add('-start', source, 'Doom Desire');
2102
+ return this.NOT_FAIL;
2103
+ };
2104
+ break;
2105
+ }
2106
+ case 'futuresight': {
2107
+ move.onTry = function (source, subtarget) {
2108
+ if (!subtarget.side.addSlotCondition(subtarget, 'futuremove'))
2109
+ return false;
2110
+ Object.assign(subtarget.side.slotConditions[subtarget.position]['futuremove'], {
2111
+ duration: 3,
2112
+ move: 'futuresight',
2113
+ source: source,
2114
+ moveData: {
2115
+ id: 'futuresight',
2116
+ name: "Future Sight",
2117
+ accuracy: 100,
2118
+ basePower: 120,
2119
+ category: "Physical",
2120
+ priority: 0,
2121
+ flags: {},
2122
+ ignoreImmunity: false,
2123
+ effectType: 'Move',
2124
+ isFutureMove: true,
2125
+ type: 'Psychic',
2126
+ },
2127
+ });
2128
+ this.add('-start', source, 'move: Future Sight');
2129
+ return this.NOT_FAIL;
2130
+ };
2131
+ break;
2132
+ }
2133
+ // Moves with dynamic categories will always be physical if not special-cased
2134
+ case 'lightthatburnsthesky':
2135
+ case 'photongeyser': {
2136
+ move.category = 'Special';
2137
+ if (pokemon.getStat('atk', false, true) > pokemon.getStat('spa', false, true))
2138
+ move.category = 'Physical';
2139
+ break;
2140
+ }
2141
+ case 'shellsidearm': {
2142
+ if (!target)
2143
+ return;
2144
+ move.category = 'Special';
2145
+ const atk = pokemon.getStat('atk', false, true);
2146
+ const spa = pokemon.getStat('spa', false, true);
2147
+ const def = target.getStat('def', false, true);
2148
+ const spd = target.getStat('spd', false, true);
2149
+ const physical = Math.floor(Math.floor(Math.floor(Math.floor(2 * pokemon.level / 5 + 2) * 90 * atk) / def) / 50);
2150
+ const special = Math.floor(Math.floor(Math.floor(Math.floor(2 * pokemon.level / 5 + 2) * 90 * spa) / spd) / 50);
2151
+ if (physical > special || (physical === special && this.random(2) === 0)) {
2152
+ move.category = 'Physical';
2153
+ move.flags.contact = 1;
2154
+ }
2155
+ break;
2156
+ }
2157
+ }
2158
+ },
2159
+ },
1931
2160
  };
1932
2161
  //# sourceMappingURL=rulesets.js.map