Skip to content

Commit

Permalink
Mew and Skymin ability
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaD173 committed Sep 10, 2024
1 parent b4820d6 commit ce28066
Show file tree
Hide file tree
Showing 8 changed files with 134 additions and 61 deletions.
79 changes: 65 additions & 14 deletions data/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5654,6 +5654,7 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = {

// GAY
triplethreat: {
onModifyMovePriority: -2,
onModifyMove(move) {
if (move.secondaries) {
this.debug('halving secondary chance');
Expand Down Expand Up @@ -6513,7 +6514,7 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = {
onSwitchIn(pokemon) {
const target = pokemon.side.foe.active[pokemon.side.foe.active.length - 1 - pokemon.position];
if (target) {
this.actions.useMove(Dex.moves.get('psychup'), pokemon, {target: target});
this.actions.useMove(Dex.moves.get('copycat'), pokemon);
}
},
name: "Copy Core",
Expand All @@ -6525,7 +6526,7 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = {
onSwitchIn(pokemon) {
const target = pokemon.side.foe.active[pokemon.side.foe.active.length - 1 - pokemon.position];
if (target) {
this.actions.useMove(Dex.moves.get('hiddenpower'), pokemon, {target: target});
this.actions.useMove(Dex.moves.get('confusion'), pokemon, {target: target});
}
},
name: "Onslaught Core",
Expand Down Expand Up @@ -6558,33 +6559,83 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = {
num: -58,
},
megashiftx: {
onSourceAfterFaint(length, target, source, effect) {
if (effect?.effectType !== 'Move') {
return;
onSwitchOut(pokemon) {
if (pokemon.baseSpecies.baseSpecies !== 'Mewtwo') return;
if (pokemon.species.name !== 'Mewtwo-Mega-X') {
pokemon.formeChange('Mewtwo-Mega-X', this.effect, true);
}
if (source.species.id === 'mewtwo' && source.hp && !source.transformed && source.side.foePokemonLeft()) {
this.add('-activate', source, 'ability: Mega Shift X');
source.formeChange('Mewtwo-Mega-X', this.effect, true);
},
onSwitchIn() {
this.effectState.switchingIn = true;
},
onStart(pokemon) {
if (!this.effectState.switchingIn) return;
this.effectState.switchingIn = false;
if (pokemon.baseSpecies.baseSpecies !== 'Mewtwo') return;
if (!this.effectState.heroMessageDisplayed && pokemon.species.name === 'Mewtwo-Mega-X') {
this.add('-activate', pokemon, 'ability: Mega Shift X');
this.effectState.heroMessageDisplayed = true;
}
},
flags: {failroleplay: 1, noreceiver: 1, noentrain: 1, notrace: 1, failskillswap: 1, cantsuppress: 1, notransform: 1},
name: "Mega Shift X",
isNonstandard: "CAP",
rating: 4,
num: -59,
},
megashifty: {
onSourceAfterFaint(length, target, source, effect) {
if (effect?.effectType !== 'Move') {
return;
onSwitchOut(pokemon) {
if (pokemon.baseSpecies.baseSpecies !== 'Mewtwo') return;
if (pokemon.species.name !== 'Mewtwo-Mega-Y') {
pokemon.formeChange('Mewtwo-Mega-Y', this.effect, true);
}
if (source.species.id === 'mewtwo' && source.hp && !source.transformed && source.side.foePokemonLeft()) {
this.add('-activate', source, 'ability: Mega Shift Y');
source.formeChange('Mewtwo-Mega-Y', this.effect, true);
},
onSwitchIn() {
this.effectState.switchingIn = true;
},
onStart(pokemon) {
if (!this.effectState.switchingIn) return;
this.effectState.switchingIn = false;
if (pokemon.baseSpecies.baseSpecies !== 'Mewtwo') return;
if (!this.effectState.heroMessageDisplayed && pokemon.species.name === 'Mewtwo-Mega-Y') {
this.add('-activate', pokemon, 'ability: Mega Shift Y');
this.effectState.heroMessageDisplayed = true;
}
},
flags: {failroleplay: 1, noreceiver: 1, noentrain: 1, notrace: 1, failskillswap: 1, cantsuppress: 1, notransform: 1},
name: "Mega Shift Y",
isNonstandard: "CAP",
rating: 4,
num: -60,
},
ancestor: {
onPrepareHit(source, target, move) {
if (move.hasBounced || move.flags['futuremove'] || move.sourceEffect === 'snatch' || move.callsMove) return;
const type = move.type;
if (type && type !== '???' && source.getTypes().join() !== type) {
if (!source.setType(type)) return;
this.add('-start', source, 'typechange', type, '[from] ability: Ancestor');
}
},
flags: {},
name: "Ancestor",
rating: 4,
num: -61,
},
serenegracidea: {
onModifyMovePriority: -2,
onModifyMove(move) {
if (move.secondaries) {
this.debug('2.5x secondary chance');
for (const secondary of move.secondaries) {
if (secondary.chance) secondary.chance *= 2.5;
}
}
if (move.self?.chance) move.self.chance *= 2.5;
},
flags: {},
name: "Serene Gracidea",
rating: 4,
num: -62,
},
};
4 changes: 2 additions & 2 deletions data/mods/gen9vgcgay/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1264,11 +1264,11 @@ export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTa
// As One now gives Symbioisis
asoneglastrier: {
inherit: true,
shortDesc: "Combination of the Symbiosis and Chilling Neigh Abilities.",
onPreStart(pokemon) {
},
onStart(pokemon) {
this.add('-ability', pokemon, 'As One');
this.add('-ability', pokemon, 'Unnerve');
},
onEnd() {
},
Expand All @@ -1292,11 +1292,11 @@ export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTa
},
asonespectrier: {
inherit: true,
shortDesc: "Combination of the Symbiosis and Grim Neigh Abilities.",
onPreStart(pokemon) {
},
onStart(pokemon) {
this.add('-ability', pokemon, 'As One');
this.add('-ability', pokemon, 'Unnerve');
},
onEnd() {
},
Expand Down
6 changes: 3 additions & 3 deletions data/mods/gen9vgcgay/formats-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2525,8 +2525,8 @@ export const FormatsData: import('../../../sim/dex-species').ModdedSpeciesFormat
"tier": "Uber"
},
"shaymin": {
"isNonstandard": null,
"tier": "OU"
"isNonstandard": "Past",
"tier": "Illegal"
},
"shayminsky": {
"isNonstandard": null,
Expand Down Expand Up @@ -3294,7 +3294,7 @@ export const FormatsData: import('../../../sim/dex-species').ModdedSpeciesFormat
},
"kyuremwhite": {
"isNonstandard": null,
"tier": "Uber"
"tier": "OU"
},
"keldeo": {
"isNonstandard": null,
Expand Down
6 changes: 3 additions & 3 deletions data/mods/gen9vgcgay/learnsets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148836,6 +148836,9 @@ export const Learnsets: import('../../../sim/dex-species').ModdedLearnsetDataTab
],
"terablast": [
"9M"
],
"attackorder": [
"9M"
]
}
},
Expand Down Expand Up @@ -153139,9 +153142,6 @@ export const Learnsets: import('../../../sim/dex-species').ModdedLearnsetDataTab
],
"return": [
"9M"
],
"terablast": [
"9M"
]
}
}
Expand Down
19 changes: 19 additions & 0 deletions data/mods/gen9vgcgay/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,25 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
isNonstandard: null,
basePower: 100,
},
darkvoid: {
inherit: true,
isNonstandard: null,
accuracy: 75,
},
hyperspacehole: {
inherit: true,
isNonstandard: null,
basePower: 90,
},
confusion: {
inherit: true,
basePower: 30,
shortDesc: "Uses Highest attacking stat. Exists mainly for Deoxys-A",
secondary: {},
onModifyMove(move, pokemon) {
if (pokemon.getStat('atk', false, true) > pokemon.getStat('spa', false, true)) move.category = 'Physical';
},
},
// Origin forme changes
roaroftime: {
inherit: true,
Expand Down
21 changes: 2 additions & 19 deletions data/mods/gen9vgcgay/pokedex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11599,7 +11599,7 @@ export const Pokedex: import('../../../sim/dex-species').ModdedSpeciesDataTable
},
"abilities": {
"0": "Synchronize",
"H": "Protean"
"H": "Ancestor"
},
"inherit": true
},
Expand Down Expand Up @@ -11960,23 +11960,6 @@ export const Pokedex: import('../../../sim/dex-species').ModdedSpeciesDataTable
},
"inherit": true
},
"shaymin": {
"types": [
"Grass"
],
"baseStats": {
"hp": 100,
"atk": 100,
"def": 100,
"spa": 100,
"spd": 100,
"spe": 100
},
"abilities": {
"0": "Natural Cure"
},
"inherit": true
},
"shayminsky": {
"types": [
"Grass",
Expand All @@ -11991,7 +11974,7 @@ export const Pokedex: import('../../../sim/dex-species').ModdedSpeciesDataTable
"spe": 127
},
"abilities": {
"0": "Serene Grace"
"0": "Serene Gracidea"
},
"inherit": true
},
Expand Down
31 changes: 19 additions & 12 deletions data/mods/gen9vgcgay/random-teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class RandomGayTeams extends RandomTeams {
} else if (CONSISTENT.includes(species.name)) {
return 50;
} else if (BITCHES.includes(species.name)) {
return 49;
return 50;
} else {
return 50;
}
Expand Down Expand Up @@ -144,14 +144,6 @@ export class RandomGayTeams extends RandomTeams {
// const abilities = new Set(Object.values(species.abilities));
// if (species.unreleasedHidden) abilities.delete(species.abilities.H);

// Get moves
// const moves = this.randomMoveset(types, abilities, teamDetails, species, isLead, isDoubles, movePool, teraType, role);
const moves = new Set<string>();
for (const moveid of movePool) {
moves.add(moveid);
}
// moves = set["movepool"];
// const counter = this.queryMoves(moves, species, teraType, abilities);

// Shouldn't need to do this?
// let hasHiddenPower = false;
Expand Down Expand Up @@ -185,6 +177,7 @@ export class RandomGayTeams extends RandomTeams {
item = this.sample(USEFUL_ITEMS.concat(set["items"]).filter(i => !this.items.includes(i)));
}
this.items.push(item);

// First, the priority items
// item = this.getPriorityItem(ability, types, moves, counter, teamDetails, species, isLead, isDoubles, teraType, role);
// if (item === undefined) {
Expand All @@ -195,9 +188,23 @@ export class RandomGayTeams extends RandomTeams {
// }
// }

// if (species.baseSpecies === 'Pikachu') {
// forme = 'Pikachu' + this.sample(['', '-Original', '-Hoenn', '-Sinnoh', '-Unova', '-Kalos', '-Alola', '-Partner', '-World']);
// }
// Get moves
// const moves = this.randomMoveset(types, abilities, teamDetails, species, isLead, isDoubles, movePool, teraType, role);
// If not choiced, add weather moves into moveset
if (!["Choice Band", "Choice Scarf", "Choice Specs", "Assault Vest"].includes(item)) {
if (["Chlorophyll", "Flower Gift", "Solar Power"].includes(ability) && !["Jumpluff"].includes(forme)) {
movePool[3] = "Sunny Day";
}
if (["Swift Swim"].includes(ability)) {
movePool[3] = "Rain Dance";
}
}
const moves = new Set<string>();
for (const moveid of movePool) {
moves.add(moveid);
}
// moves = set["movepool"];
// const counter = this.queryMoves(moves, species, teraType, abilities);

// Get level
const level = this.getLevel(species, isDoubles);
Expand Down
29 changes: 21 additions & 8 deletions data/text/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2485,13 +2485,13 @@ export const AbilitiesText: {[id: IDEntry]: AbilityText} = {
},
copycore: {
name: "Copy Core",
desc: "User uses Psych Up on opposite Pokemon on switch in.",
shortDesc: "User uses Psych Up on opposite Pokemon on switch in.",
desc: "User uses Copycat on opposite Pokemon on switch in.",
shortDesc: "User uses Copycat on opposite Pokemon on switch in.",
},
onslaughtcore: {
name: "Onslaught Core",
desc: "User uses Hidden Power on opposite Pokemon on switch in.",
shortDesc: "User uses Hidden Power on opposite Pokemon on switch in.",
desc: "User uses Confusion on opposite Pokemon on switch in.",
shortDesc: "User uses Confusion on opposite Pokemon on switch in.",
},
barriercore: {
name: "Barrier Core",
Expand All @@ -2510,16 +2510,29 @@ export const AbilitiesText: {[id: IDEntry]: AbilityText} = {
},
megashiftx: {
name: "Mega Shift X",
desc: "If this Pokemon is a Mewtwo, it transforms into Mewtwo-Mega-X if it attacks and knocks out another Pokemon.",
shortDesc: "After KOing a Pokemon: becomes Mewtwo-Mega-X.",
desc: "Upon switching out, Mewtwo Mega Evolves into its X form",
shortDesc: "Upon switching out, Mewtwo Mega Evolves into its X form",
activate: " [POKEMON] became fully charged due to its bond with its Trainer!",
transform: "[POKEMON] Mega Evolved into Mewtwo-Mega-X!",
},
megashifty: {
name: "Mega Shift Y",
desc: "If this Pokemon is a Mewtwo, it transforms into Mewtwo-Mega-Y if it attacks and knocks out another Pokemon.",
shortDesc: "After KOing a Pokemon: becomes Mewtwo-Mega-Y.",
desc: "Upon switching out, Mewtwo Mega Evolves into its Y form",
shortDesc: "Upon switching out, Mewtwo Mega Evolves into its Y form",
activate: " [POKEMON] became fully charged due to its bond with its Trainer!",
transform: "[POKEMON] Mega Evolved into Mewtwo-Mega-Y!",
},
ancestor: {
name: "Ancestor",
desc: "This Pokemon's type changes to match the type of the move it is about to use. This effect comes after all effects that change a move's type.",
shortDesc: "This Pokemon's type changes to match the type of the move it is about to use.",
},
serenegracidea: {
name: "Serene Grace",
desc: "This Pokemon's moves have their secondary effect chance doubled. This effect stacks with the Rainbow effect, except for secondary effects that cause the target to flinch.",
shortDesc: "This Pokemon's moves have their secondary effect chance 2.5x.",
gen4: {
desc: "This Pokemon's moves have their secondary effect chance 2.5x.",
},
},
};

0 comments on commit ce28066

Please sign in to comment.