• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - 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.

Making a Pokémon only capturable in a certain ball

  • 29
    Posts
    10
    Years
    • Seen Aug 16, 2016
    hello guys, i hope if the solution to this is already posted somewhere you don't get annoyed and could tell me where, as i couldn't find it. anyway, here's my problem:

    how can i make an event encounter pokemon (e.g. mewtwo) catchable by only 1 special kind of ball? but i don't want to simply put the rareness to 0 and use a masterball, i want the special ball to have a normal catch rate to make the battle difficult.

    i tried adding an EncounterModifiers switch, which will

    a) allow me to use only this kind of pokeballs, like in bug catching contest or safari zone
    or
    b) make the pokemon dodge all other pokeballs (like ghosts or like when you throw a ball at a foreign trainers non-shadow-pokemon in battle)

    but all i get is syntax errors.

    if someone with better scripting skills could help me, that'd be great

    thanks a lot
     
    Last edited:
    i realized it's not exactly what i want. it's not really about the certain species (as there will be no other wild mewtwos in my game on which this special ball would work), but rather the situation of fighting against a pokemon belonging to another trainer (but fighting autonomously in an event encounter instead of a trainer battle), which could only be captured by sth like a snag ball (no shadow pokemon)

    could an encounter modifier like:

    if $game_switches[XX]
    catchRate*=0 if (!isConst?(:SNAGBALL,proc{|ball,catchRate,battle,battler|))
    end
    }

    make all other balls fail except the special ball?
     
    ok, i know now, that it has to be more like this:

    if $game_switches[XX]
    catchRate*=0 if !isConst?(
    [PokeCommunity.com] Making a Pokémon only capturable in a certain ball
    NAGBALL,proc{|ball,catchRate,battle,battler|)
    end
    }

    but i still couldn't figure out, where to put this line. i think there must be a line beforehand, defining the following one. but i have no idea if it must be put in the ballhandlers section or above main, or into encountermodifiers...
    if anyone does, please let me know
     
    At PokeBattle_Battle, change the second code:

    Code:
    "shakes=4" 
      else

    to

    Code:
    "shakes=4" 
      elsif !($game_switches[XX] && isConst?(ball,PBItems,:SNAGBALL)) # Insert the item internal name instead of SNAGBALL.

    or, if you configured snag balls right:

    Code:
    "shakes=4" 
      elsif !($game_switches[XX] && pbIsSnagBall?(ball))

    Untested.
     
    thanks for your help!

    EDIT:
    Found a way. For anyone who likes to see how it works:

    a=battler.totalhp
    b=battler.hp
    rareness=BallHandlers.modifyCatchRate(ball,rareness,self,battler)
    x=(((a*3-b*2)*rareness)/(a*3)).floor
    if battler.status==PBStatuses::SLEEP || battler.status==PBStatuses::FROZEN
    x*=2
    elsif battler.status!=0
    x=(x*3/2).floor
    elsif $game_switches[98] && isConst?(ball,PBItems,:STEALBALL)
    x*=4
    elsif $game_switches[98] && !isConst?(ball,PBItems,:STEALBALL)
    x=0
    end
    shakes=0
    if x>255 || BallHandlers.isUnconditional?(ball,self,battler)
    shakes=4

    it goes in pokebattle battle, as fl said. change the x*=4 if you want the only working ball to be more or less effective
     
    Last edited:
    Back
    Top