Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Find this section in Item_Utilities:
- def pbRaiseHappinessAndLowerEV(pkmn,scene,stat,messages)
- h = pkmn.happiness<255
- e = pkmn.ev[stat]>0
- if !h && !e
- scene.pbDisplay(_INTL("It won't have any effect."))
- return false
- end
- if h
- pkmn.changeHappiness("evberry")
- end
- if e
- pkmn.ev[stat] -= 10
- pkmn.ev[stat] = 0 if pkmn.ev[stat]<0
- pkmn.calc_stats
- end
- scene.pbRefresh
- scene.pbDisplay(messages[2-(h ? 0 : 2)-(e ? 0 : 1)])
- return true
- end
- #Right underneath pkmn.calc_stats, add this line:
- pkmn.hp += 1 if pkmn.hp == 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement