Last active
August 29, 2015 13:56
-
-
Save Xyphis12/8813930 to your computer and use it in GitHub Desktop.
adding opertunist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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