Skip to content

Commit

Permalink
Pokebilities: fix special abilities as well as Gastro Acid (#5140)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyuk-bot authored and TheImmortal committed Feb 6, 2019
1 parent 0a864e8 commit 205a753
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ let Formats = [
onBegin: function () {
let allPokemon = this.p1.pokemon.concat(this.p2.pokemon);
for (let pokemon of allPokemon) {
if (pokemon.ability === pokemon.template.abilities['S']) {
if (pokemon.ability === toId(pokemon.template.abilities['S'])) {
continue;
}
// @ts-ignore
Expand Down
16 changes: 16 additions & 0 deletions data/mods/pokebilities/moves.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

/**@type {{[k: string]: ModdedMoveData}} */
exports.BattleMovedex = {
"gastroacid": {
inherit: true,
effect: {
// Ability suppression implemented in Pokemon.ignoringAbility() within sim/pokemon.js
onStart: function (pokemon) {
this.add('-endability', pokemon);
this.singleEvent('End', this.getAbility(pokemon.ability), pokemon.abilityData, pokemon, pokemon, 'gastroacid');
if (pokemon.innates) pokemon.innates.forEach(innate => pokemon.removeVolatile("ability" + innate));
},
},
},
};
4 changes: 2 additions & 2 deletions data/pokedex.js
Original file line number Diff line number Diff line change
Expand Up @@ -11472,7 +11472,7 @@ let BattlePokedex = {
types: ["Dragon", "Ground"],
gender: "N",
baseStats: {hp: 108, atk: 100, def: 121, spa: 81, spd: 95, spe: 95},
abilities: {0: "Aura Break", H: "Power Construct"},
abilities: {0: "Aura Break", S: "Power Construct"},
heightm: 5,
weightkg: 305,
color: "Green",
Expand All @@ -11488,7 +11488,7 @@ let BattlePokedex = {
types: ["Dragon", "Ground"],
gender: "N",
baseStats: {hp: 54, atk: 100, def: 71, spa: 61, spd: 85, spe: 115},
abilities: {0: "Aura Break", H: "Power Construct"},
abilities: {0: "Aura Break", S: "Power Construct"},
heightm: 1.2,
weightkg: 33.5,
color: "Green",
Expand Down

0 comments on commit 205a753

Please sign in to comment.