• 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!
  • Scottie, Todd, Serena, Kris - 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.

Setting a 1 v 1 Pokemon Battle.

Marohak

Asker of Dumb Questions
  • 25
    Posts
    11
    Years
    I'm at a point in my Hak where the player has a Mew and has to battle the game's Villain, who has Mewtwo.

    Now, the player obviously will have 5 other Pokemon.

    I want to remove the other 5 Pokemon and have The player only be able to use Mew vs Mewtwo.

    Is there a script, or perhaps a way I can work around to get that to happen?

    Please and Thank you
     
    Trainer's pokemon party is stored in $Trainer.party as an array of pokemon.
    Before starting the battle with Mewtwo, you could save the current party in a temporary
    global variable. Something like,

    $temp_trainer_party = $Trainer.party

    After that, you should select Mew from the party and make the party contain only Mew.

    $Trainer.party = $Trainer.party.select { |poke| poke.species == PBSpecies::MEW }

    After the battle is over, you can now restore your original party
    $Trainer.party = $temp_trainer_party

    This is off the top of my head, and I can't check its correctness
    at the moment, so if it's incorrect, please do correct it.

    Hope this helps!
     
    Hello, I have nearly the same question.
    I want to let the player choose 1 Pokémon for a 1 vs 1 Battle. But the choosen Pokémon must be a Water Type .... how can I do this?
    Thanks for Help.
     
    Hello, I have nearly the same question.
    I want to let the player choose 1 Pokémon for a 1 vs 1 Battle. But the choosen Pokémon must be a Water Type .... how can I do this?
    Thanks for Help.

    For general pokemon selection purposes, try to find FL's Pokemon Selection script. Although I have it,
    I've changed it a bit, so it's better that you find the original, or, here, I've made an event for you that
    asks you to choose a water pokemon and initiates a wild battle with a pidgey. You can of course,
    insert a trainer battle instead, if you like.

    Spoiler:


    For easier pasting, here are the code parts.

    Code:
    pbChoosePokemon(1,2, proc {|poke|
      !poke.egg? &&
      !(poke.isShadow? rescue false) &&
      poke.hasType?(:WATER)
    })
    
    $temp_party = $Trainer.party
    index = pbGet(1)
    $Trainer.party = [$Trainer.party[index]]
    pbWildBattle("PIDGEY", 4)
    $Trainer.party = $temp_party
     
    Back
    Top