• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Infinite Use of Vitamins

HeyHeyHenry

HeyHeyHenryΔ
  • 11
    Posts
    5
    Years
    I want to know if it's possible to allow the player to use how much vitamins they want to, I mean, you have a limit to use Carbos, Calcium...
    But there is a way to remove this limit and allow the player to increase their pokémon status as much they want?
     
    I removed the 100 EVs limit recently in my game. You need to search for this line
    Code:
    def pbRaiseEffortValues
    then change every 100 to either 252 or 255 as you wish like this:
    Code:
    def pbRaiseEffortValues(pokemon,ev,evgain=10,evlimit=true)
      return 0 if evlimit && pokemon.ev[ev]>=252
      totalev=0
      for i in 0...6
        totalev+=pokemon.ev[i]
      end
      if totalev+evgain>PokeBattle_Pokemon::EVLIMIT
        evgain=PokeBattle_Pokemon::EVLIMIT-totalev
      end
      if pokemon.ev[ev]+evgain>PokeBattle_Pokemon::EVSTATLIMIT
        evgain=PokeBattle_Pokemon::EVSTATLIMIT-pokemon.ev[ev]
      end
      if evlimit && pokemon.ev[ev]+evgain>252
        evgain=252-pokemon.ev[ev]
      end
      if evgain>0
        pokemon.ev[ev]+=evgain
        pokemon.calcStats
      end
      return evgain
    end
    That's all I did if I remember correctly.
     
    Back
    Top