Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "colorchange": {
- desc: "This Pokemon's secondary type changes according to it's most powerful attack.",
- shortDesc: "This Pokemon's secondary type changes according to it's most powerful attack.",
- onStart: function (pokemon) {
- var secelt = [0, 0];
- for (var i in pokemon.moves) {
- var bp = this.getMove(pokemon.moves[i]).basePower;
- if (bp > secelt[0]) secelt = [bp, i];
- }
- var type = this.getMove(pokemon.moves[secelt[1]]).type;
- var pTypes = pokemon.types;
- if (pTypes[0] !== type && (!pTypes[1] || pTypes[1] !== type)) {
- pTypes[1] = type;
- this.add('-start', pokemon, 'typechange', pTypes.join('/'));
- pokemon.typesData = [
- {type: pTypes[0], suppressed: false, isAdded: false},
- {type: pTypes[1], suppressed: false, isAdded: false}
- ];
- }
- },
- id: "colorchange",
- name: "Color Change",
- rating: 4,
- num: 16
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement