@pkmn/sim 0.5.23 → 0.5.24

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.
@@ -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',
@@ -1909,7 +1935,6 @@ exports.Rulesets = {
1909
1935
  effectType: "Rule",
1910
1936
  name: "Re-Evolution Mod",
1911
1937
  desc: "Pokémon gain the stat changes they would gain from evolving again.",
1912
- ruleset: ['Overflow Stat Mod'],
1913
1938
  onBegin() {
1914
1939
  this.add('rule', 'Re-Evolution Mod: Pok\u00e9mon gain the boosts they would gain from evolving again');
1915
1940
  },
@@ -2035,5 +2060,101 @@ exports.Rulesets = {
2035
2060
  }
2036
2061
  },
2037
2062
  },
2063
+ categoryswapmod: {
2064
+ effectType: 'Rule',
2065
+ name: 'Category Swap Mod',
2066
+ desc: `All physical moves become special, and all special moves become physical.`,
2067
+ onBegin() {
2068
+ this.add('rule', 'Category Swap Mod: All physical moves become special, and vice versa');
2069
+ },
2070
+ onModifyMove(move, pokemon, target) {
2071
+ if (move.category === "Status")
2072
+ return;
2073
+ if (move.category === "Physical") {
2074
+ move.category = "Special";
2075
+ }
2076
+ else if (move.category === "Special") {
2077
+ move.category = "Physical";
2078
+ }
2079
+ switch (move.id) {
2080
+ case 'doomdesire': {
2081
+ move.onTry = function (source, subtarget) {
2082
+ if (!subtarget.side.addSlotCondition(subtarget, 'futuremove'))
2083
+ return false;
2084
+ Object.assign(subtarget.side.slotConditions[subtarget.position]['futuremove'], {
2085
+ move: 'doomdesire',
2086
+ source: source,
2087
+ moveData: {
2088
+ id: 'doomdesire',
2089
+ name: "Doom Desire",
2090
+ accuracy: 100,
2091
+ basePower: 140,
2092
+ category: "Physical",
2093
+ priority: 0,
2094
+ flags: {},
2095
+ effectType: 'Move',
2096
+ isFutureMove: true,
2097
+ type: 'Steel',
2098
+ },
2099
+ });
2100
+ this.add('-start', source, 'Doom Desire');
2101
+ return this.NOT_FAIL;
2102
+ };
2103
+ break;
2104
+ }
2105
+ case 'futuresight': {
2106
+ move.onTry = function (source, subtarget) {
2107
+ if (!subtarget.side.addSlotCondition(subtarget, 'futuremove'))
2108
+ return false;
2109
+ Object.assign(subtarget.side.slotConditions[subtarget.position]['futuremove'], {
2110
+ duration: 3,
2111
+ move: 'futuresight',
2112
+ source: source,
2113
+ moveData: {
2114
+ id: 'futuresight',
2115
+ name: "Future Sight",
2116
+ accuracy: 100,
2117
+ basePower: 120,
2118
+ category: "Physical",
2119
+ priority: 0,
2120
+ flags: {},
2121
+ ignoreImmunity: false,
2122
+ effectType: 'Move',
2123
+ isFutureMove: true,
2124
+ type: 'Psychic',
2125
+ },
2126
+ });
2127
+ this.add('-start', source, 'move: Future Sight');
2128
+ return this.NOT_FAIL;
2129
+ };
2130
+ break;
2131
+ }
2132
+ // Moves with dynamic categories will always be physical if not special-cased
2133
+ case 'lightthatburnsthesky':
2134
+ case 'photongeyser': {
2135
+ move.category = 'Special';
2136
+ if (pokemon.getStat('atk', false, true) > pokemon.getStat('spa', false, true))
2137
+ move.category = 'Physical';
2138
+ break;
2139
+ }
2140
+ case 'shellsidearm': {
2141
+ if (!target)
2142
+ return;
2143
+ move.category = 'Special';
2144
+ const atk = pokemon.getStat('atk', false, true);
2145
+ const spa = pokemon.getStat('spa', false, true);
2146
+ const def = target.getStat('def', false, true);
2147
+ const spd = target.getStat('spd', false, true);
2148
+ const physical = Math.floor(Math.floor(Math.floor(Math.floor(2 * pokemon.level / 5 + 2) * 90 * atk) / def) / 50);
2149
+ const special = Math.floor(Math.floor(Math.floor(Math.floor(2 * pokemon.level / 5 + 2) * 90 * spa) / spd) / 50);
2150
+ if (physical > special || (physical === special && this.random(2) === 0)) {
2151
+ move.category = 'Physical';
2152
+ move.flags.contact = 1;
2153
+ }
2154
+ break;
2155
+ }
2156
+ }
2157
+ },
2158
+ },
2038
2159
  };
2039
2160
  //# sourceMappingURL=rulesets.js.map