Advertisement
Guest User

janky dynamax code

a guest
Nov 14th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. volatileStatus: 'dynamax',
  2. effect: {
  3. duration: 3,
  4. onFlinch: false,
  5. onStart(target) {
  6. this.add('-start', target, 'move: Dynamax');
  7. let newHP = Math.floor((Math.floor(2 * target.template.baseStats['hp'] + target.set.ivs['hp'] + Math.floor(target.set.evs['hp'] / 4) + 100) * target.level / 100 + 10) * 1.5);
  8. target.hp = Math.floor(target.hp * 1.5);
  9. target.maxhp = newHP;
  10. this.add('-heal', target, target.getHealth, '[silent]');
  11. },
  12.  
  13. onModifyPriority(priority, pokemon, target, move) {
  14. if (move) {
  15. if (move.category === 'Status') return 4;
  16. else return 0;
  17. }
  18. },
  19.  
  20. onUpdate(pokemon) {
  21. if (this.effectData.source && !this.effectData.source.isActive && pokemon.volatiles['dynamax']) {
  22. this.debug('Removing Dynamax volatile on ' + pokemon);
  23. pokemon.removeVolatile('dynamax');
  24. }
  25. },
  26.  
  27. onEnd(pokemon) {
  28. this.add('-end', pokemon, 'Dynamax');
  29. let newHP = Math.floor(Math.floor(2 * pokemon.template.baseStats['hp'] + pokemon.set.ivs['hp'] + Math.floor(pokemon.set.evs['hp'] / 4) + 100) * pokemon.level / 100 + 10);
  30. pokemon.hp = Math.ceil(pokemon.hp / 1.5);
  31. pokemon.maxhp = newHP;
  32. this.add('-heal', pokemon, pokemon.getHealth, '[silent]');
  33. },
  34. },
  35. secondary: null,
  36. target: "normal",
  37. type: "Normal",
  38. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement