Add picnic mechanics to Cap Pikachu (#10345)

This commit is contained in:
dot-Comfey 2024-06-20 16:46:02 -07:00 committed by GitHub
parent afa8c084d0
commit d91ffce482
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 20 deletions

View File

@ -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"],

View File

@ -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;
}

View File

@ -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;

View File

@ -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');
});