@pkmn/sim 0.5.8 → 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.
- package/build/config/formats.js +368 -219
- package/build/config/formats.js.map +1 -1
- package/build/data/aliases.js +0 -2
- package/build/data/aliases.js.map +1 -1
- package/build/data/learnsets.js +0 -2
- package/build/data/learnsets.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/config/formats.ts +353 -217
- package/data/aliases.ts +0 -2
- package/data/learnsets.ts +0 -2
- package/data/mods/gen7/pokedex.ts +1 -0
- package/data/pokedex.ts +2 -2
- package/data/rulesets.ts +0 -125
- package/package.json +1 -1
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",
|
package/data/learnsets.ts
CHANGED
|
@@ -79514,7 +79514,6 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
79514
79514
|
scorchingsands: ["8T"],
|
|
79515
79515
|
secretpower: ["7M", "4M"],
|
|
79516
79516
|
seedbomb: ["8M", "8L32", "7L23", "4T"],
|
|
79517
|
-
slackoff: ["8L1"],
|
|
79518
79517
|
sleeptalk: ["8M", "7M", "4M"],
|
|
79519
79518
|
snore: ["8M", "4T"],
|
|
79520
79519
|
solarbeam: ["8M", "7M", "4M"],
|
|
@@ -82844,7 +82843,6 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
82844
82843
|
snore: ["8M"],
|
|
82845
82844
|
stealthrock: ["8M"],
|
|
82846
82845
|
substitute: ["8M"],
|
|
82847
|
-
swordsdance: ["8M"],
|
|
82848
82846
|
thunderwave: ["8M"],
|
|
82849
82847
|
toxic: ["8L1"],
|
|
82850
82848
|
uturn: ["8M"],
|
|
@@ -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/package.json
CHANGED