dtalley11

Changes not working for persistent with Gravity

Apr 12th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Vryheid joined.
  2. Valence Electron joined.
  3. Format:
  4. CAP
  5. Sleep Clause Mod: Limit one foe put to sleep
  6. Species Clause: Limit one of each Pokemon
  7. OHKO Clause: OHKO moves are banned
  8. Moody Clause: Moody is banned
  9. Evasion Moves Clause: Evasion moves are banned
  10. Endless Battle Clause: Forcing endless battles is banned.
  11. HP Percentage Mod: HP is reported as percentages
  12. Vryheid's team:
  13. Cyclohm / Scizor / Tomohawk / Cresselia / Chansey / Mollux
  14. Valence Electron's team:
  15. Fidgit
  16. Battle between Vryheid and Valence Electron started!
  17. Go! Chansey!
  18. Valence Electron sent out Fidgit!
  19. Turn 1
  20. Chansey used Protect!
  21. Chansey protected itself!
  22. The opposing Fidgit used Gravity!
  23. Error parsing: -sideend|move: Gravity
  24. TypeError: Object #<Object> has no method 'removeSideCondition'
  25.     at Battle.runMinor (http://play.pokemonshowdown.com/js/battle.js?2874287d:4375:10)
  26. Turn 2
  27. dtalley11 joined.
  28. Welcome to battle-cap-13!
  29. dtalley11: well now
  30. dtalley11: that's a prudy looking error
  31. Vryheid: can you screenshot what gravity looks like
  32. Vryheid: on your end I mean
  33. Vryheid: or at least copy and paste the text in a pastebin or something
  34. Vryheid: latter is prob easier
  35.  
  36.  
  37.  
  38.  
  39.  
  40. ---------------------------------
  41. changes
  42.  
  43.  
  44. pseudoWeather: 'gravity', --> sideCondition: 'gravity',
  45. this.add('-fieldstart', 'move: Gravity'); --> this.add('-sideend', 'move: Gravity');
  46. this.add('-fieldend', 'move: Gravity'); --> this.add('-sideend', 'move: Gravity');
  47. target: "all", --> target: "allySide",
  48.  
  49.  
  50. New code:
  51.     "gravity": {
  52.         num: 356,
  53.         accuracy: true,
  54.         basePower: 0,
  55.         category: "Status",
  56.         desc: "For 5 turns, the evasion of all active Pokemon is 0.6x. At the time of use, Bounce, Fly, Magnet Rise, Sky Drop, and Telekinesis end immediately for all active Pokemon. During the effect, Bounce, Fly, High Jump Kick, Jump Kick, Magnet Rise, Sky Drop, Splash, and Telekinesis are prevented from being used by all active Pokemon. Ground-type attacks, Spikes, Toxic Spikes, and the Ability Arena Trap can affect Flying-types or Pokemon with the Ability Levitate. Fails if this move is already in effect.",
  57.         shortDesc: "For 5 turns, negates all Ground immunities.",
  58.         id: "gravity",
  59.         isViable: true,
  60.         name: "Gravity",
  61.         pp: 5,
  62.         priority: 0,
  63.         sideCondition: 'gravity',
  64.         effect: {
  65.             duration: 5,
  66.             durationCallback: function(target, source, effect) {
  67.                 if (source && source.ability === 'persistent') {
  68.                     return 7;
  69.                 }
  70.                 return 5;
  71.             },
  72.             onStart: function() {
  73.                 this.add('-sideend', 'move: Gravity');
  74.             },
  75.             onAccuracy: function(accuracy) {
  76.                 if (typeof accuracy !== 'number') return;
  77.                 return accuracy * 5/3;
  78.             },
  79.             onModifyPokemonPriority: 100,
  80.             onModifyPokemon: function(pokemon) {
  81.                 pokemon.negateImmunity['Ground'] = true;
  82.                 var disabledMoves = {bounce:1, fly:1, highjumpkick:1, jumpkick:1, magnetrise:1, skydrop:1, splash:1, telekinesis:1};
  83.                 for (var m in disabledMoves) {
  84.                     pokemon.disabledMoves[m] = true;
  85.                 }
  86.                 var applies = false;
  87.                 if (pokemon.removeVolatile('bounce') || pokemon.removeVolatile('fly') || pokemon.removeVolatile('skydrop')) {
  88.                     applies = true;
  89.                     this.cancelMove(pokemon);
  90.                 }
  91.                 if (pokemon.volatiles['magnetrise']) {
  92.                     applies = true;
  93.                     delete pokemon.volatiles['magnetrise'];
  94.                 }
  95.                 if (pokemon.volatiles['telekinesis']) {
  96.                     applies = true;
  97.                     delete pokemon.volatiles['telekinesis'];
  98.                 }
  99.                 if (applies) this.add('-activate', pokemon, 'Gravity');
  100.             },
  101.             onBeforeMove: function(pokemon, target, move) {
  102.                 var disabledMoves = {bounce:1, fly:1, highjumpkick:1, jumpkick:1, magnetrise:1, skydrop:1, splash:1, telekinesis:1};
  103.                 if (disabledMoves[move.id]) {
  104.                     this.add('cant', pokemon, 'move: Gravity', move);
  105.                     return false;
  106.                 }
  107.             },
  108.             onResidualOrder: 22,
  109.             onEnd: function() {
  110.                 this.add('-sideend', 'move: Gravity');
  111.             }
  112.         },
  113.         secondary: false,
  114.         target: "allySide",
  115.         type: "Psychic"
  116.     },
Advertisement
Add Comment
Please, Sign In to add comment