• 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.

Setting a 1 v 1 Pokemon Battle.

Marohak

Asker of Dumb Questions
25
Posts
10
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
     
    453
    Posts
    10
    Years
    • Seen Apr 17, 2024
    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!
     
    28
    Posts
    15
    Years
  • 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.
     
    453
    Posts
    10
    Years
    • Seen Apr 17, 2024
    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