Skip to content

Instantly share code, notes, and snippets.

@Xyphis12
Last active August 29, 2015 13:56
Show Gist options
  • Save Xyphis12/8813930 to your computer and use it in GitHub Desktop.
Save Xyphis12/8813930 to your computer and use it in GitHub Desktop.
adding opertunist
"opportunist": {
desc: "When the user uses a consumable, it regenerates once",
id: "opportunist",
name: "Opportunist",
onResidualOrder: 26, // Don't know what this is for
onResidualSubOrder: 1, // This either
onResidual: function(pokemon) {
if (!pokemon.item) {
// If the pokemon does not have an Item (e.g. it got consumed) Will probably have to figure somethign out for if the pokemon didn't have an iten to start
pokemon.setItem(pokemon.lastItem);
this.add('-item', pokemon, pokemon.getItem(), '[from] ability: Opportunist'); // Same code from the ability harvest
}
},
rating: 2,
num: 139 // IDK if just using a random number would work here
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment