Skip to content

Instantly share code, notes, and snippets.

@Spandamn
Created October 13, 2016 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Spandamn/5e5c47cbdaee376a221b02446ba52173 to your computer and use it in GitHub Desktop.
Save Spandamn/5e5c47cbdaee376a221b02446ba52173 to your computer and use it in GitHub Desktop.
/config/formats.js For Meta Man
{
name: "Meta Man Randbats",
desc: [
"When a Pokemon faints, the opposing Pokemon replaces its current ability with the fainted Pokemon's and gains its last-used move in a new slot (for up to 9 total moves). These changes last the entire match. If a Pokemon faints before using a move during the match, no move is gained by the opponent.",
"&bullet; <a href=\"http://www.smogon.com/forums/threads/meta-man.3565966/\">Meta Man</a>",
],
team: 'random',
ruleset: ['Team Preview', 'Random Battle'],
section: "Randomized Metas",
mod: "metaman",
onFaint: function(pokemon) {
pokemon.side.foe.pokemon[0].ability = pokemon.ability;
this.add("-message", pokemon.side.foe.pokemon[0].name + " received " + pokemon.name + "'s " + this.data.Abilities[pokemon.ability].name + "!");
let lastMove = pokemon.lastM;
let has
if (pokemon.side.foe.pokemon[0].moveset.length <= 9 && lastMove && !pokemon.side.foe.pokemon[0].hasMove(lastMove.id)) {
pokemon.side.foe.pokemon[0].moveset.push(lastMove);
pokemon.side.foe.pokemon[0].baseMoveset.push(lastMove);
this.add("-message", pokemon.side.foe.pokemon[0].name + " received " + pokemon.name + "'s " + pokemon.lastM.move + "!");
}
},
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment