Advertisement
TechSkylander1518

Prevent Pomeg Exploit v19

Nov 3rd, 2021
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.57 KB | None | 0 0
  1. #Find this section in Item_Utilities:
  2.  
  3. def pbRaiseHappinessAndLowerEV(pkmn,scene,stat,messages)
  4.   h = pkmn.happiness<255
  5.   e = pkmn.ev[stat]>0
  6.   if !h && !e
  7.     scene.pbDisplay(_INTL("It won't have any effect."))
  8.     return false
  9.   end
  10.   if h
  11.     pkmn.changeHappiness("evberry")
  12.   end
  13.   if e
  14.     pkmn.ev[stat] -= 10
  15.     pkmn.ev[stat] = 0 if pkmn.ev[stat]<0
  16.     pkmn.calc_stats
  17.   end
  18.   scene.pbRefresh
  19.   scene.pbDisplay(messages[2-(h ? 0 : 2)-(e ? 0 : 1)])
  20.   return true
  21. end
  22.  
  23. #Right underneath pkmn.calc_stats, add this line:
  24.     pkmn.hp += 1 if pkmn.hp == 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement