diff --git a/data/learnsets.ts b/data/learnsets.ts index 35cb913b03f3a..f22f78cb11d74 100644 --- a/data/learnsets.ts +++ b/data/learnsets.ts @@ -30302,29 +30302,23 @@ export const Learnsets: {[k: string]: LearnsetData} = { ursalunabloodmoon: { learnset: { avalanche: ["9M"], - bellydrum: ["9E"], bloodmoon: ["9L70", "9S0"], bodypress: ["9M"], bodyslam: ["9M"], brickbreak: ["9M"], bulldoze: ["9M"], calmmind: ["9M", "9S0"], - closecombat: ["9E"], - counter: ["9E"], - crosschop: ["9E"], - crunch: ["9M", "9E"], + crunch: ["9M"], dig: ["9M"], - doubleedge: ["9M", "9E"], + doubleedge: ["9M"], earthpower: ["9M", "9L48", "9S0"], earthquake: ["9M"], endure: ["9M"], facade: ["9M"], - faketears: ["9E"], firepunch: ["9M"], fling: ["9M"], focusblast: ["9M"], focuspunch: ["9M"], - furycutter: ["9E"], furyswipes: ["9L8"], gigaimpact: ["9M"], gunkshot: ["9M"], @@ -30341,11 +30335,10 @@ export const Learnsets: {[k: string]: LearnsetData} = { leer: ["9L1"], lick: ["9L1"], lowkick: ["9M"], - metalclaw: ["9M", "9E"], + metalclaw: ["9M"], moonblast: ["9L56"], moonlight: ["9L1"], mudshot: ["9M"], - nightslash: ["9E"], payback: ["9L13"], playnice: ["9L25"], protect: ["9M"], @@ -30357,7 +30350,6 @@ export const Learnsets: {[k: string]: LearnsetData} = { scaryface: ["9M", "9L35"], scratch: ["9L1"], seedbomb: ["9M"], - seismictoss: ["9E"], shadowclaw: ["9M"], slash: ["9L22", "9S0"], sleeptalk: ["9M"], @@ -30378,7 +30370,6 @@ export const Learnsets: {[k: string]: LearnsetData} = { trailblaze: ["9M"], uproar: ["9M"], vacuumwave: ["9M"], - yawn: ["9E"], }, eventData: [ {generation: 9, level: 70, nature: "Hardy", perfectIVs: 3, moves: ["bloodmoon", "earthpower", "slash", "calmmind"]}, @@ -68363,7 +68354,6 @@ export const Learnsets: {[k: string]: LearnsetData} = { bubble: ["7L1"], chillingwater: ["9M"], confide: ["7M"], - counter: ["9E"], darkpulse: ["9M", "7M"], dig: ["9M"], doubleteam: ["9L56", "7M", "7L56", "7S0"], @@ -68401,7 +68391,6 @@ export const Learnsets: {[k: string]: LearnsetData} = { quickattack: ["9L1", "7L1"], raindance: ["9M", "7M"], rest: ["9M", "7M"], - retaliate: ["9E"], return: ["7M"], rockslide: ["9M", "7M"], rocktomb: ["9M", "7M"], @@ -68416,7 +68405,7 @@ export const Learnsets: {[k: string]: LearnsetData} = { snatch: ["7T"], snore: ["7T"], snowscape: ["9M"], - spikes: ["9M", "9L28", "9E", "7L28"], + spikes: ["9M", "9L28", "7L28"], spite: ["7T"], substitute: ["9M", "9L42", "7M", "7L42"], surf: ["9M", "7M"], @@ -68429,7 +68418,7 @@ export const Learnsets: {[k: string]: LearnsetData} = { terablast: ["9M"], thief: ["9M", "7M"], toxic: ["7M"], - toxicspikes: ["9M", "9E"], + toxicspikes: ["9M"], trailblaze: ["9M"], upperhand: ["9M"], uturn: ["9M", "7M"], diff --git a/sim/dex-species.ts b/sim/dex-species.ts index c82e4a9fa533b..97c1c258cfee3 100644 --- a/sim/dex-species.ts +++ b/sim/dex-species.ts @@ -592,7 +592,7 @@ export class DexSpecies { const learnset = this.getLearnsetData(species.id); if (learnset.learnset) { out.push(learnset as any); - species = this.learnsetParent(species); + species = this.learnsetParent(species, true); continue; } @@ -623,7 +623,7 @@ export class DexSpecies { return out; } - learnsetParent(species: Species) { + learnsetParent(species: Species, checkingMoves = false) { // Own Tempo Rockruff and Battle Bond Greninja are special event formes // that are visually indistinguishable from their base forme but have // different learnsets. To prevent a leak, we make them show up as their @@ -633,8 +633,6 @@ export class DexSpecies { return this.get(species.baseSpecies); } else if (species.name === 'Lycanroc-Dusk') { return this.get('Rockruff-Dusk'); - } else if (species.name === 'Greninja-Bond') { - return null; } else if (species.prevo) { // there used to be a check for Hidden Ability here, but apparently it's unnecessary // Shed Skin Pupitar can definitely evolve into Unnerve Tyranitar @@ -644,6 +642,15 @@ export class DexSpecies { } else if (species.changesFrom && species.baseSpecies !== 'Kyurem') { // For Pokemon like Rotom and Necrozma whose movesets are extensions are their base formes return this.get(species.changesFrom); + } else if ( + checkingMoves && !species.prevo && species.baseSpecies && this.get(species.baseSpecies).prevo + ) { + // For Pokemon like Cap Pikachu, who should be able to have egg moves in Gen 9 + let baseEvo = this.get(species.baseSpecies); + while (baseEvo.prevo) { + baseEvo = this.get(baseEvo.prevo); + } + return baseEvo; } return null; } diff --git a/sim/team-validator.ts b/sim/team-validator.ts index 775a8365f04eb..5fae396679180 100644 --- a/sim/team-validator.ts +++ b/sim/team-validator.ts @@ -2421,6 +2421,8 @@ export class TeamValidator { } } + if (checkingPrevo && !originalSpecies.prevo && dex.gen < 9) break; + let sources = learnset[moveid] || []; if (moveid === 'sketch') { sketch = true; @@ -2468,6 +2470,8 @@ export class TeamValidator { continue; } + if (checkingPrevo && !originalSpecies.prevo && (learned.charAt(1) !== 'E' || learnedGen < 9)) continue; + // redundant if (learnedGen <= moveSources.sourcesBefore) continue; diff --git a/test/sim/team-validator/breeding.js b/test/sim/team-validator/breeding.js index a39178c7d3241..98a7572c47505 100644 --- a/test/sim/team-validator/breeding.js +++ b/test/sim/team-validator/breeding.js @@ -233,6 +233,7 @@ describe('Team Validator', function () { team = [ {species: 'ursalunabloodmoon', ability: 'mindseye', moves: ['yawn', 'bellydrum'], evs: {hp: 1}}, {species: 'greninjabond', ability: 'battlebond', moves: ['counter', 'switcheroo'], evs: {hp: 1}}, + {species: 'pikachualola', ability: 'static', moves: ['wish', 'fakeout'], evs: {hp: 1}}, ]; assert.legalTeam(team, 'gen9anythinggoes'); });