@pkmn/sim 0.5.23 → 0.5.26
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.
- package/LICENSE +1 -1
- package/build/config/formats.js +323 -197
- package/build/config/formats.js.map +1 -1
- package/build/data/aliases.js +7 -3
- package/build/data/aliases.js.map +1 -1
- package/build/data/formats-data.js +823 -20
- package/build/data/formats-data.js.map +1 -1
- package/build/data/learnsets.js +64 -39
- package/build/data/learnsets.js.map +1 -1
- package/build/data/mods/gen1/formats-data.js +0 -5
- package/build/data/mods/gen1/formats-data.js.map +1 -1
- package/build/data/mods/gen1/moves.js +54 -22
- package/build/data/mods/gen1/moves.js.map +1 -1
- package/build/data/mods/gen2/moves.js +0 -5
- package/build/data/mods/gen2/moves.js.map +1 -1
- package/build/data/mods/gen2/rulesets.js +7 -1
- package/build/data/mods/gen2/rulesets.js.map +1 -1
- package/build/data/mods/gen3/rulesets.js +1 -1
- package/build/data/mods/gen3/rulesets.js.map +1 -1
- package/build/data/mods/gen4/rulesets.js +1 -1
- package/build/data/mods/gen4/rulesets.js.map +1 -1
- package/build/data/mods/gen5/rulesets.js +1 -1
- package/build/data/mods/gen5/rulesets.js.map +1 -1
- package/build/data/mods/gen6/formats-data.js +14 -14
- package/build/data/mods/gen6/formats-data.js.map +1 -1
- package/build/data/mods/gen7/pokedex.js +4 -5
- package/build/data/mods/gen7/pokedex.js.map +1 -1
- package/build/data/mods/gen7/rulesets.js +1 -1
- package/build/data/mods/gen7/rulesets.js.map +1 -1
- package/build/data/pokedex.js +8 -8
- package/build/data/pokedex.js.map +1 -1
- package/build/data/rulesets.js +125 -3
- package/build/data/rulesets.js.map +1 -1
- package/build/data/tags.js +26 -9
- package/build/data/tags.js.map +1 -1
- package/build/lib/utils.d.ts +4 -0
- package/build/lib/utils.js +20 -1
- package/build/lib/utils.js.map +1 -1
- package/build/sim/battle.d.ts +1 -1
- package/build/sim/battle.js.map +1 -1
- package/build/sim/dex-conditions.d.ts +1 -0
- package/build/sim/dex-conditions.js.map +1 -1
- package/build/sim/dex-species.d.ts +5 -0
- package/build/sim/dex-species.js +11 -3
- package/build/sim/dex-species.js.map +1 -1
- package/build/sim/exported-global-types.d.ts +2 -0
- package/build/sim/global-types.d.ts +2 -0
- package/build/sim/team-validator.js +14 -3
- package/build/sim/team-validator.js.map +1 -1
- package/config/formats.ts +328 -199
- package/data/aliases.ts +7 -3
- package/data/formats-data.ts +823 -20
- package/data/learnsets.ts +64 -39
- package/data/mods/gen1/formats-data.ts +0 -5
- package/data/mods/gen1/moves.ts +54 -23
- package/data/mods/gen2/moves.ts +0 -5
- package/data/mods/gen2/rulesets.ts +8 -1
- package/data/mods/gen3/rulesets.ts +1 -1
- package/data/mods/gen4/rulesets.ts +1 -1
- package/data/mods/gen5/rulesets.ts +1 -1
- package/data/mods/gen6/formats-data.ts +14 -14
- package/data/mods/gen7/pokedex.ts +4 -5
- package/data/mods/gen7/rulesets.ts +1 -1
- package/data/pokedex.ts +8 -8
- package/data/rulesets.ts +121 -3
- package/data/tags.ts +27 -9
- package/lib/utils.ts +16 -0
- package/package.json +2 -2
- package/sim/battle.ts +1 -1
- package/sim/dex-conditions.ts +1 -0
- package/sim/dex-species.ts +15 -3
- package/sim/exported-global-types.ts +2 -0
- package/sim/global-types.ts +2 -0
- package/sim/team-validator.ts +15 -3
package/build/data/rulesets.js
CHANGED
|
@@ -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',
|
|
@@ -987,7 +1013,7 @@ exports.Rulesets = {
|
|
|
987
1013
|
if (status.id === 'slp') {
|
|
988
1014
|
for (const pokemon of target.side.pokemon) {
|
|
989
1015
|
if (pokemon.hp && pokemon.status === 'slp') {
|
|
990
|
-
this.add('-message', "Sleep Clause activated. (In
|
|
1016
|
+
this.add('-message', "Sleep Clause activated. (In Nintendo formats, Sleep Clause activates if any of the opponent's Pokemon are asleep, even if self-inflicted from Rest)");
|
|
991
1017
|
return false;
|
|
992
1018
|
}
|
|
993
1019
|
}
|
|
@@ -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', '')
|
|
@@ -1909,7 +1936,6 @@ exports.Rulesets = {
|
|
|
1909
1936
|
effectType: "Rule",
|
|
1910
1937
|
name: "Re-Evolution Mod",
|
|
1911
1938
|
desc: "Pokémon gain the stat changes they would gain from evolving again.",
|
|
1912
|
-
ruleset: ['Overflow Stat Mod'],
|
|
1913
1939
|
onBegin() {
|
|
1914
1940
|
this.add('rule', 'Re-Evolution Mod: Pok\u00e9mon gain the boosts they would gain from evolving again');
|
|
1915
1941
|
},
|
|
@@ -2035,5 +2061,101 @@ exports.Rulesets = {
|
|
|
2035
2061
|
}
|
|
2036
2062
|
},
|
|
2037
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
|
+
},
|
|
2038
2160
|
};
|
|
2039
2161
|
//# sourceMappingURL=rulesets.js.map
|