Guest User

Ability Question

a guest
Sep 8th, 2020
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. coldsweat: {
  2. desc: "On switch-in, this Pokémon summons hail. It changes the weather to rain if any opposing Pokémon has an attack that is super effective on this Pokémon or an OHKO move. Counter, Metal Burst, and Mirror Coat count as attacking moves of their respective types, Hidden Power counts as its determined type, and Judgment, Multi-Attack, Natural Gift, Revelation Dance, Techno Blast, and Weather Ball are considered Normal-type moves.",
  3. shortDesc: "On switch-in, this Pokémon summons hail. Summons rain if the foe has a supereffective or OHKO move.",
  4. onStart(source) {
  5. this.field.setWeather('hail');
  6. },
  7. onStart(pokemon) {
  8. for (const target of pokemon.side.foe.active) {
  9. if (!target || target.fainted) continue;
  10. for (const moveSlot of target.moveSlots) {
  11. const move = this.dex.getMove(moveSlot.move);
  12. if (move.category === 'Status') continue;
  13. const moveType = move.id === 'hiddenpower' ? target.hpType : move.type;
  14. if (
  15. this.dex.getImmunity(moveType, pokemon) && this.dex.getEffectiveness(moveType, pokemon) > 0 ||
  16. move.ohko
  17. ) {
  18. this.field.setWeather('raindance');
  19. this.add('-ability', pokemon, 'Cold Sweat');
  20. return;
  21. }
  22. }
  23. }
  24. },
  25. onFoeSwitchIn(target) {
  26. if (!target || target.fainted) continue;
  27. for (const moveSlot of target.moveSlots) {
  28. const move = this.dex.getMove(moveSlot.move);
  29. if (move.category === 'Status') continue;
  30. const moveType = move.id === 'hiddenpower' ? target.hpType : move.type;
  31. if (
  32. this.dex.getImmunity(moveType, pokemon) && this.dex.getEffectiveness(moveType, pokemon) > 0 ||
  33. move.ohko
  34. ) {
  35. this.field.setWeather('raindance');
  36. this.add('-ability', pokemon, 'Cold Sweat');
  37. return;
  38. }
  39. }
  40. },
  41. name: "Cold Sweat",
  42. rating: 4,
  43. num: -1007,
  44. },
Add Comment
Please, Sign In to add comment