@pkmn/sim 0.5.8 → 0.5.11
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/build/config/formats.js +390 -238
- package/build/config/formats.js.map +1 -1
- package/build/data/aliases.js +1 -2
- package/build/data/aliases.js.map +1 -1
- package/build/data/formats-data.js +3 -3
- package/build/data/formats-data.js.map +1 -1
- package/build/data/learnsets.js +5 -6
- package/build/data/learnsets.js.map +1 -1
- package/build/data/mods/gen3/formats-data.js +1 -1
- package/build/data/mods/gen3/formats-data.js.map +1 -1
- package/build/data/mods/gen7/formats-data.js +1 -1
- package/build/data/mods/gen7/formats-data.js.map +1 -1
- package/build/data/mods/gen7/pokedex.js +1 -0
- package/build/data/mods/gen7/pokedex.js.map +1 -1
- package/build/data/pokedex.js +2 -2
- package/build/data/rulesets.js +0 -139
- package/build/data/rulesets.js.map +1 -1
- package/build/data/tags.js +4 -4
- package/build/data/tags.js.map +1 -1
- package/build/lib/index.js +5 -1
- package/build/lib/index.js.map +1 -1
- package/build/lib/streams.js +5 -1
- package/build/lib/streams.js.map +1 -1
- package/build/sim/battle-actions.js +0 -6
- package/build/sim/battle-actions.js.map +1 -1
- package/build/sim/battle-queue.js +1 -3
- package/build/sim/battle-queue.js.map +1 -1
- package/build/sim/dex.js +5 -1
- package/build/sim/dex.js.map +1 -1
- package/build/sim/index.js +5 -1
- package/build/sim/index.js.map +1 -1
- package/build/sim/teams.js +5 -1
- package/build/sim/teams.js.map +1 -1
- package/build/sim/tools/index.js +5 -1
- package/build/sim/tools/index.js.map +1 -1
- package/build/sim/tools/runner.js +5 -1
- package/build/sim/tools/runner.js.map +1 -1
- package/config/formats.ts +376 -237
- package/data/aliases.ts +1 -2
- package/data/formats-data.ts +3 -3
- package/data/learnsets.ts +5 -6
- package/data/mods/gen3/formats-data.ts +1 -1
- package/data/mods/gen7/formats-data.ts +1 -1
- package/data/mods/gen7/pokedex.ts +1 -0
- package/data/pokedex.ts +2 -2
- package/data/rulesets.ts +0 -125
- package/data/tags.ts +4 -4
- package/package.json +2 -2
- package/sim/battle-actions.ts +0 -7
- package/sim/battle-queue.ts +1 -3
package/data/aliases.ts
CHANGED
|
@@ -67,8 +67,7 @@ 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
|
-
|
|
71
|
-
lcotm: "[Gen 8] Linked",
|
|
70
|
+
mayhem: "[Gen 8] Random Battle Mayhem",
|
|
72
71
|
|
|
73
72
|
// mega evos
|
|
74
73
|
fabio: "Ampharos-Mega",
|
package/data/formats-data.ts
CHANGED
|
@@ -1226,7 +1226,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
|
|
|
1226
1226
|
randomBattleLevel: 82,
|
|
1227
1227
|
randomDoubleBattleMoves: ["calmmind", "dazzlinggleam", "morningsun", "protect", "psychic", "shadowball"],
|
|
1228
1228
|
randomDoubleBattleLevel: 84,
|
|
1229
|
-
tier: "
|
|
1229
|
+
tier: "PUBL",
|
|
1230
1230
|
doublesTier: "(DUU)",
|
|
1231
1231
|
},
|
|
1232
1232
|
umbreon: {
|
|
@@ -4708,7 +4708,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
|
|
|
4708
4708
|
tier: "Illegal",
|
|
4709
4709
|
},
|
|
4710
4710
|
yveltal: {
|
|
4711
|
-
randomBattleMoves: ["
|
|
4711
|
+
randomBattleMoves: ["defog", "heatwave", "knockoff", "oblivionwing", "roost", "suckerpunch", "taunt"],
|
|
4712
4712
|
randomBattleLevel: 69,
|
|
4713
4713
|
randomDoubleBattleMoves: ["darkpulse", "heatwave", "knockoff", "oblivionwing", "roost", "suckerpunch", "tailwind", "uturn"],
|
|
4714
4714
|
randomDoubleBattleLevel: 71,
|
|
@@ -5465,7 +5465,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
|
|
|
5465
5465
|
},
|
|
5466
5466
|
magearna: {
|
|
5467
5467
|
randomBattleMoves: ["agility", "calmmind", "flashcannon", "fleurcannon"],
|
|
5468
|
-
randomBattleLevel:
|
|
5468
|
+
randomBattleLevel: 76,
|
|
5469
5469
|
randomDoubleBattleMoves: ["agility", "aurasphere", "dazzlinggleam", "flashcannon", "fleurcannon", "protect", "trick"],
|
|
5470
5470
|
randomDoubleBattleLevel: 72,
|
|
5471
5471
|
tier: "Uber",
|
package/data/learnsets.ts
CHANGED
|
@@ -20325,12 +20325,12 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
20325
20325
|
coaching: ["8T"],
|
|
20326
20326
|
counter: ["8L55"],
|
|
20327
20327
|
detect: ["8L60"],
|
|
20328
|
-
drillpeck: ["8L35", "8S0"],
|
|
20328
|
+
drillpeck: ["8L35", "8S0", "8S1"],
|
|
20329
20329
|
dualwingbeat: ["8T"],
|
|
20330
20330
|
endure: ["8M"],
|
|
20331
20331
|
facade: ["8M"],
|
|
20332
20332
|
fly: ["8M"],
|
|
20333
|
-
focusenergy: ["8M", "8L1", "8S0"],
|
|
20333
|
+
focusenergy: ["8M", "8L1", "8S0", "8S1"],
|
|
20334
20334
|
gigaimpact: ["8M"],
|
|
20335
20335
|
hurricane: ["8M"],
|
|
20336
20336
|
hyperbeam: ["8M"],
|
|
@@ -20346,7 +20346,7 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
20346
20346
|
rest: ["8M"],
|
|
20347
20347
|
retaliate: ["8M"],
|
|
20348
20348
|
revenge: ["8M"],
|
|
20349
|
-
reversal: ["8M", "8L70", "8S0"],
|
|
20349
|
+
reversal: ["8M", "8L70", "8S0", "8S1"],
|
|
20350
20350
|
rocksmash: ["8L5"],
|
|
20351
20351
|
round: ["8M"],
|
|
20352
20352
|
scaryface: ["8M"],
|
|
@@ -20360,11 +20360,12 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
20360
20360
|
swift: ["8M"],
|
|
20361
20361
|
taunt: ["8M"],
|
|
20362
20362
|
throatchop: ["8M"],
|
|
20363
|
-
thunderouskick: ["8L45", "8S0"],
|
|
20363
|
+
thunderouskick: ["8L45", "8S0", "8S1"],
|
|
20364
20364
|
uturn: ["8M"],
|
|
20365
20365
|
},
|
|
20366
20366
|
eventData: [
|
|
20367
20367
|
{generation: 8, level: 70, moves: ["thunderouskick", "drillpeck", "reversal", "focusenergy"]},
|
|
20368
|
+
{generation: 8, level: 70, shiny: true, moves: ["thunderouskick", "drillpeck", "reversal", "focusenergy"], pokeball: "cherishball"},
|
|
20368
20369
|
],
|
|
20369
20370
|
eventOnly: true,
|
|
20370
20371
|
},
|
|
@@ -79514,7 +79515,6 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
79514
79515
|
scorchingsands: ["8T"],
|
|
79515
79516
|
secretpower: ["7M", "4M"],
|
|
79516
79517
|
seedbomb: ["8M", "8L32", "7L23", "4T"],
|
|
79517
|
-
slackoff: ["8L1"],
|
|
79518
79518
|
sleeptalk: ["8M", "7M", "4M"],
|
|
79519
79519
|
snore: ["8M", "4T"],
|
|
79520
79520
|
solarbeam: ["8M", "7M", "4M"],
|
|
@@ -82844,7 +82844,6 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
82844
82844
|
snore: ["8M"],
|
|
82845
82845
|
stealthrock: ["8M"],
|
|
82846
82846
|
substitute: ["8M"],
|
|
82847
|
-
swordsdance: ["8M"],
|
|
82848
82847
|
thunderwave: ["8M"],
|
|
82849
82848
|
toxic: ["8L1"],
|
|
82850
82849
|
uturn: ["8M"],
|
|
@@ -835,7 +835,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
|
|
|
835
835
|
tier: "UU",
|
|
836
836
|
},
|
|
837
837
|
skarmory: {
|
|
838
|
-
randomBattleMoves: ["drillpeck", "protect", "rest", "roar", "sleeptalk", "spikes", "toxic"],
|
|
838
|
+
randomBattleMoves: ["doubleedge", "drillpeck", "protect", "rest", "roar", "sleeptalk", "spikes", "toxic"],
|
|
839
839
|
tier: "OU",
|
|
840
840
|
},
|
|
841
841
|
houndour: {
|
|
@@ -405,7 +405,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
|
|
|
405
405
|
doublesTier: "(DUU)",
|
|
406
406
|
},
|
|
407
407
|
politoed: {
|
|
408
|
-
randomBattleMoves: ["encore", "
|
|
408
|
+
randomBattleMoves: ["encore", "icebeam", "protect", "rest", "scald", "toxic"],
|
|
409
409
|
randomDoubleBattleMoves: ["encore", "helpinghand", "hypnosis", "icywind", "protect", "scald"],
|
|
410
410
|
tier: "(PU)",
|
|
411
411
|
doublesTier: "DOU",
|
|
@@ -158,6 +158,7 @@ export const Pokedex: {[k: string]: ModdedSpeciesData} = {
|
|
|
158
158
|
},
|
|
159
159
|
pyroak: {
|
|
160
160
|
inherit: true,
|
|
161
|
+
baseStats: {hp: 120, atk: 70, def: 105, spa: 95, spd: 90, spe: 60},
|
|
161
162
|
abilities: {0: "Rock Head", 1: "Battle Armor", H: "White Smoke"},
|
|
162
163
|
},
|
|
163
164
|
voodoom: {
|
package/data/pokedex.ts
CHANGED
|
@@ -16529,7 +16529,7 @@ 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:
|
|
16532
|
+
baseStats: {hp: 120, atk: 70, def: 105, spa: 75, spd: 90, spe: 60},
|
|
16533
16533
|
abilities: {0: "Rock Head", 1: "Battle Armor", H: "Contrary"},
|
|
16534
16534
|
heightm: 2.1,
|
|
16535
16535
|
weightkg: 168,
|
|
@@ -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:
|
|
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
|
@@ -1725,131 +1725,6 @@ export const Rulesets: {[k: string]: FormatData} = {
|
|
|
1725
1725
|
return pokemon;
|
|
1726
1726
|
},
|
|
1727
1727
|
},
|
|
1728
|
-
crossevolutionmod: {
|
|
1729
|
-
effectType: "Rule",
|
|
1730
|
-
name: "Cross Evolution Mod",
|
|
1731
|
-
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.",
|
|
1732
|
-
ruleset: ['Overflow Stat Mod'],
|
|
1733
|
-
onValidateTeam(team) {
|
|
1734
|
-
const names = new Set<ID>();
|
|
1735
|
-
for (const set of team) {
|
|
1736
|
-
const name = set.name;
|
|
1737
|
-
if (names.has(this.dex.toID(name))) {
|
|
1738
|
-
return [
|
|
1739
|
-
`Your Pok\u00e9mon must have different nicknames.`,
|
|
1740
|
-
`(You have more than one Pok\u00e9mon named '${name}')`,
|
|
1741
|
-
];
|
|
1742
|
-
}
|
|
1743
|
-
names.add(this.dex.toID(name));
|
|
1744
|
-
}
|
|
1745
|
-
if (!names.size) {
|
|
1746
|
-
return [
|
|
1747
|
-
`${this.format.name} works using nicknames; your team has 0 nicknamed Pok\u00e9mon.`,
|
|
1748
|
-
`(If this was intentional, add a nickname to one Pok\u00e9mon that isn't the name of a Pok\u00e9mon species.)`,
|
|
1749
|
-
];
|
|
1750
|
-
}
|
|
1751
|
-
},
|
|
1752
|
-
checkCanLearn(move, species, lsetData, set) {
|
|
1753
|
-
// @ts-ignore
|
|
1754
|
-
if (!set.sp?.exists || !set.crossSpecies?.exists) {
|
|
1755
|
-
return this.checkCanLearn(move, species, lsetData, set);
|
|
1756
|
-
}
|
|
1757
|
-
// @ts-ignore
|
|
1758
|
-
const problem = this.checkCanLearn(move, set.sp);
|
|
1759
|
-
if (!problem) return null;
|
|
1760
|
-
// @ts-ignore
|
|
1761
|
-
if (!set.crossMovesLeft) return problem;
|
|
1762
|
-
// @ts-ignore
|
|
1763
|
-
if (this.checkCanLearn(move, set.crossSpecies)) return problem;
|
|
1764
|
-
// @ts-ignore
|
|
1765
|
-
set.crossMovesLeft--;
|
|
1766
|
-
return null;
|
|
1767
|
-
},
|
|
1768
|
-
validateSet(set, teamHas) {
|
|
1769
|
-
const crossSpecies = this.dex.species.get(set.name);
|
|
1770
|
-
const onChangeSet = this.dex.formats.get('Pokemon').onChangeSet;
|
|
1771
|
-
let problems = onChangeSet?.call(this, set, this.format) || null;
|
|
1772
|
-
if (Array.isArray(problems) && problems.length) return problems;
|
|
1773
|
-
const crossNonstandard = !this.ruleTable.has('standardnatdex') && crossSpecies.isNonstandard === 'Past';
|
|
1774
|
-
const crossIsCap = !this.ruleTable.has('+pokemontag:cap') && crossSpecies.isNonstandard === 'CAP';
|
|
1775
|
-
if (!crossSpecies.exists || crossNonstandard || crossIsCap) return this.validateSet(set, teamHas);
|
|
1776
|
-
const species = this.dex.species.get(set.species);
|
|
1777
|
-
const check = this.checkSpecies(set, species, species, {});
|
|
1778
|
-
if (check) return [check];
|
|
1779
|
-
const nonstandard = !this.ruleTable.has('standardnatdex') && species.isNonstandard === 'Past';
|
|
1780
|
-
const isCap = !this.ruleTable.has('+pokemontag:cap') && species.isNonstandard === 'CAP';
|
|
1781
|
-
if (!species.exists || nonstandard || isCap || species === crossSpecies) return this.validateSet(set, teamHas);
|
|
1782
|
-
if (!species.nfe) return [`${species.name} cannot cross evolve because it doesn't evolve.`];
|
|
1783
|
-
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
1784
|
-
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) {
|
|
1785
|
-
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it isn't an evolution.`];
|
|
1786
|
-
}
|
|
1787
|
-
if (this.ruleTable.isRestrictedSpecies(crossSpecies)) {
|
|
1788
|
-
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it is banned.`];
|
|
1789
|
-
}
|
|
1790
|
-
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
1791
|
-
if (!crossPrevoSpecies.prevo !== !species.prevo) {
|
|
1792
|
-
return [
|
|
1793
|
-
`${species.name} cannot cross evolve into ${crossSpecies.name} because they are not consecutive evolution stages.`,
|
|
1794
|
-
];
|
|
1795
|
-
}
|
|
1796
|
-
const ability = this.dex.abilities.get(set.ability);
|
|
1797
|
-
if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
|
|
1798
|
-
set.species = crossSpecies.name;
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
// @ts-ignore
|
|
1802
|
-
set.sp = species;
|
|
1803
|
-
// @ts-ignore
|
|
1804
|
-
set.crossSpecies = crossSpecies;
|
|
1805
|
-
// @ts-ignore
|
|
1806
|
-
set.crossMovesLeft = 2;
|
|
1807
|
-
problems = this.validateSet(set, teamHas);
|
|
1808
|
-
set.name = crossSpecies.name;
|
|
1809
|
-
set.species = species.name;
|
|
1810
|
-
return problems;
|
|
1811
|
-
},
|
|
1812
|
-
onModifySpecies(species, target, source, effect) {
|
|
1813
|
-
if (!target) return; // chat
|
|
1814
|
-
if (effect && ['imposter', 'transform'].includes(effect.id)) return;
|
|
1815
|
-
if (target.set.name === target.set.species) return;
|
|
1816
|
-
const crossSpecies = this.dex.species.get(target.set.name);
|
|
1817
|
-
if (!crossSpecies.exists) return;
|
|
1818
|
-
if (species.battleOnly || !species.nfe) return;
|
|
1819
|
-
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
1820
|
-
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) return;
|
|
1821
|
-
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
1822
|
-
if (!crossPrevoSpecies.prevo !== !species.prevo) return;
|
|
1823
|
-
|
|
1824
|
-
const mixedSpecies = this.dex.deepClone(species);
|
|
1825
|
-
mixedSpecies.baseSpecies = mixedSpecies.name = `${species.name}-${crossSpecies.name}`;
|
|
1826
|
-
mixedSpecies.weightkg =
|
|
1827
|
-
Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
|
|
1828
|
-
mixedSpecies.nfe = false;
|
|
1829
|
-
mixedSpecies.evos = [];
|
|
1830
|
-
mixedSpecies.eggGroups = crossSpecies.eggGroups;
|
|
1831
|
-
mixedSpecies.abilities = crossSpecies.abilities;
|
|
1832
|
-
mixedSpecies.bst = 0;
|
|
1833
|
-
let i: StatID;
|
|
1834
|
-
for (i in species.baseStats) {
|
|
1835
|
-
const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
|
|
1836
|
-
mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
|
|
1837
|
-
mixedSpecies.bst += mixedSpecies.baseStats[i];
|
|
1838
|
-
}
|
|
1839
|
-
if (crossSpecies.types[0] !== crossPrevoSpecies.types[0]) mixedSpecies.types[0] = crossSpecies.types[0];
|
|
1840
|
-
if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
|
|
1841
|
-
mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
|
|
1842
|
-
}
|
|
1843
|
-
if (mixedSpecies.types[0] === mixedSpecies.types[1]) mixedSpecies.types = [mixedSpecies.types[0]];
|
|
1844
|
-
|
|
1845
|
-
return mixedSpecies;
|
|
1846
|
-
},
|
|
1847
|
-
onBegin() {
|
|
1848
|
-
for (const pokemon of this.getAllPokemon()) {
|
|
1849
|
-
pokemon.baseSpecies = pokemon.species;
|
|
1850
|
-
}
|
|
1851
|
-
},
|
|
1852
|
-
},
|
|
1853
1728
|
revelationmonsmod: {
|
|
1854
1729
|
effectType: "Rule",
|
|
1855
1730
|
name: "Revelationmons Mod",
|
package/data/tags.ts
CHANGED
|
@@ -197,10 +197,10 @@ export const Tags: {[id: string]: TagData} = {
|
|
|
197
197
|
nduubl: {
|
|
198
198
|
name: "ND UUBL",
|
|
199
199
|
speciesFilter: species => [
|
|
200
|
-
'Aerodactyl-Mega', 'Blacephalon', 'Diancie-Mega', 'Gallade-Mega', 'Gardevoir-Mega', 'Gengar', 'Gyarados',
|
|
201
|
-
'Hawlucha', 'Heracross-Mega', 'Hoopa-Unbound', 'Hydreigon', 'Jirachi', 'Latias', 'Latias-Mega', 'Latios', 'Latios-Mega',
|
|
202
|
-
'Medicham-Mega', 'Mew', 'Pinsir-Mega', 'Sableye-Mega', 'Slowbro-Mega', 'Slowking-Galar', 'Thundurus', 'Thundurus-Therian',
|
|
203
|
-
'Xurkitree', 'Zapdos-Galar',
|
|
200
|
+
'Aerodactyl-Mega', 'Alakazam', 'Blacephalon', 'Blaziken', 'Diancie-Mega', 'Gallade-Mega', 'Gardevoir-Mega', 'Gengar', 'Gyarados',
|
|
201
|
+
'Gyarados-Mega', 'Hawlucha', 'Heracross-Mega', 'Hoopa-Unbound', 'Hydreigon', 'Jirachi', 'Latias', 'Latias-Mega', 'Latios', 'Latios-Mega',
|
|
202
|
+
'Manaphy', 'Medicham-Mega', 'Mew', 'Pinsir-Mega', 'Sableye-Mega', 'Slowbro-Mega', 'Slowking-Galar', 'Thundurus', 'Thundurus-Therian',
|
|
203
|
+
'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.
|
|
3
|
+
"version": "0.5.11",
|
|
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.
|
|
34
|
+
"mocha": "^9.2.2"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"compile": "tsc -p .",
|
package/sim/battle-actions.ts
CHANGED
|
@@ -1779,13 +1779,6 @@ export class BattleActions {
|
|
|
1779
1779
|
const speciesid = pokemon.canMegaEvo || pokemon.canUltraBurst;
|
|
1780
1780
|
if (!speciesid) return false;
|
|
1781
1781
|
|
|
1782
|
-
// Pokémon affected by Sky Drop cannot mega evolve. Enforce it here for now.
|
|
1783
|
-
for (const foeActive of pokemon.foes()) {
|
|
1784
|
-
if (foeActive.volatiles['skydrop']?.source === pokemon) {
|
|
1785
|
-
return false;
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
1782
|
pokemon.formeChange(speciesid, pokemon.getItem(), true);
|
|
1790
1783
|
|
|
1791
1784
|
// Limit one mega evolution
|
package/sim/battle-queue.ts
CHANGED
|
@@ -203,9 +203,7 @@ export class BattleQueue {
|
|
|
203
203
|
choice: 'beforeTurnMove', pokemon: action.pokemon, move: action.move, targetLoc: action.targetLoc,
|
|
204
204
|
}));
|
|
205
205
|
}
|
|
206
|
-
if (action.mega) {
|
|
207
|
-
// TODO: Check that the Pokémon is not affected by Sky Drop.
|
|
208
|
-
// (This is currently being done in `runMegaEvo`).
|
|
206
|
+
if (action.mega && !action.pokemon.isSkyDropped()) {
|
|
209
207
|
actions.unshift(...this.resolveAction({
|
|
210
208
|
choice: 'megaEvo',
|
|
211
209
|
pokemon: action.pokemon,
|