Skip to content

Commit

Permalink
Fix machine learning
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaD173 committed Nov 17, 2023
1 parent 7b06ba3 commit 1b54a1c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 36 deletions.
8 changes: 6 additions & 2 deletions data/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5731,13 +5731,17 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
if (this.effectState.lastBoost === 'P') {
this.boost({def: -1});
}
this.boost({spd: 1});
if (this.effectState.lastBoost !== 'S') {
this.boost({spd: 1});
}
this.effectState.lastBoost = "S";
} else if (move.category === "Physical") {
if (this.effectState.lastBoost === 'S') {
this.boost({spd: -1});
}
this.boost({def: 1});
if (this.effectState.lastBoost !== 'P') {
this.boost({spd: 1});
}
this.effectState.lastBoost = "P";
}
},
Expand Down
2 changes: 1 addition & 1 deletion data/mods/gen4/formats-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
tier: "9U",
},
weepinbell: {
tier: "SU",
tier: "IU",
},
victreebel: {
tier: "PU",
Expand Down
60 changes: 30 additions & 30 deletions data/mods/gen9vgcgay/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,32 +552,32 @@ export const Moves: {[k: string]: ModdedMoveData} = {
inherit: true,
accuracy: 80,
},
snatch: {
inherit: true,
isNonstandard: null,
shortDesc: "User steals certain support moves for it and allies to use.",
condition: {
duration: 1,
onStart(pokemon) {
this.add('-singleturn', pokemon, 'Snatch');
},
onAnyPrepareHitPriority: -1,
onAnyPrepareHit(source, target, move) {
const snatchUser = this.effectState.source;
if (snatchUser.isSkyDropped()) return;
if (!move || move.isZ || move.isMax || !move.flags['snatch'] || move.sourceEffect === 'snatch') {
return;
}
snatchUser.removeVolatile('snatch');
this.add('-activate', snatchUser, 'move: Snatch', '[of] ' + source);
this.actions.useMove(move.id, snatchUser);
for (const ally of (snatchUser as Pokemon).adjacentAllies()) {
this.actions.useMove(move.id, ally);
}
return null;
},
},
},
// snatch: {
// inherit: true,
// isNonstandard: null,
// shortDesc: "User steals certain support moves for it and allies to use.",
// condition: {
// duration: 1,
// onStart(pokemon) {
// this.add('-singleturn', pokemon, 'Snatch');
// },
// onAnyPrepareHitPriority: -1,
// onAnyPrepareHit(source, target, move) {
// const snatchUser = this.effectState.source;
// if (snatchUser.isSkyDropped()) return;
// if (!move || move.isZ || move.isMax || !move.flags['snatch'] || move.sourceEffect === 'snatch') {
// return;
// }
// snatchUser.removeVolatile('snatch');
// this.add('-activate', snatchUser, 'move: Snatch', '[of] ' + source);
// this.actions.useMove(move.id, snatchUser);
// for (const ally of (snatchUser as Pokemon).adjacentAllies()) {
// this.actions.useMove(move.id, ally);
// }
// return null;
// },
// },
// },
// Fang Buff
hyperfang: {
inherit: true,
Expand Down Expand Up @@ -1849,10 +1849,10 @@ export const Moves: {[k: string]: ModdedMoveData} = {
inherit: true,
isNonstandard: null,
},
firewall: {
inherit: true,
isNonstandard: null,
},
// firewall: {
// inherit: true,
// isNonstandard: null,
// },
stalacbite: {
inherit: true,
isNonstandard: null,
Expand Down
6 changes: 3 additions & 3 deletions data/text/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2427,9 +2427,9 @@ export const AbilitiesText: {[k: string]: AbilityText} = {
shortDesc: "When any pokemon uses a Wind move, this pokemon uses Echoed Voice.",
},
machinelearning: {
name: "",
desc: "On switch-in, this Pokemon's Attack or Special Attack is raised by 1 stage based on the weaker combined defensive stat of all opposing Pokemon. Attack is raised if their Defense is lower, and Special Attack is raised if their Special Defense is the same or lower.",
shortDesc: "On switch-in, Attack or Sp. Atk is raised 1 stage based on the foes' weaker Defense.",
name: "Machine Learning",
desc: "Boosts Def on physical damage, boosts SpD on special damage. Resets on new hit.",
shortDesc: "Boosts Def on physical damage, boosts SpD on special damage.",
// boost: " [POKEMON] learned to boost [STAT]!",
// unboost: " [POKEMON] forgot how to boost [STAT]!",
},
Expand Down

0 comments on commit 1b54a1c

Please sign in to comment.