• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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 ball and dexball

  • 52
    Posts
    5
    Years
    • Seen Mar 15, 2022
    so i wanted to add 2 new pokeballs in my game but not sure how i would script the pokeballs correctly or even if i can

    1.dexball(multiple types)
    i want this pokeball to catch pokemon better if it is in the corresponding region that the pokemon is in
    ex:a galar weezing,zorua,ect would be caught better in a galardexball than a normal or a kantodex ball

    2.infinite ball
    i have an idea on how to do it but just checking
    have it like a timer ball and on the last turn that it has like timerball having 10 it would be a instacatch
     
    For the Dexball, I only have half a solution for you. pbAllRegionalSpecies(region) returns an array of all pokemon ids in the passed region. 0 is the first one, 1, second, yada-yada. This only works for species though, forms would have to be hard coded exceptions.
    pbAllRegionalSpecies(0).include?(getID(PBSpecies,:BULBASAUR)) returns true because Bulbasaur is a Kanto mon.
    pbAllRegionalSpecies(0).include?(battler.species) is the ball code, for region 0, but once again, forms need hard coded exceptions.

    Infinite ball, that's an isUnconditional like the Master ball, but no next true here. We want
    Code:
    BallHandlers::IsUnconditional.add(:INFINITEBALL,proc{|ball,battle,battler|
       multiplier=[1+(0.3*battle.turncount),4].min
       next multiplier>=10
    })
    assuming of course, I've understood it properly, you want it to be a instacatch if the multiplier for the timer ball is a 10x? regardless, IsUnconditional is what you want.
     
    Last edited:
    Back
    Top