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

Banning Pokemon

SuperJanBro

Renegade
  • 63
    Posts
    10
    Years
    Okay, so with me implementing shadow Pokemon- I've noticed that it makes gym battles laughably easy. I was wondering if there's a way to ban Pokemon from gyms? I know it's possible to ban them from places like the battle tower, but is there a way I can use a script to disallow the use of shadow Pokemon in gyms?

    Like for example if you go up to the gym leader, and you have a shadow Pokemon, a different text box will open up, and say "Hey, you can't use those type of Pokémon!"

    Any help will be nice! Thanks! (And sorry if this is confusing.)

    ~SuperJanBro

    EDIT:
    Actually, nevermind! While looking through essentials and the name rater, I learned that I can use the script !if.shadow. Thanks again, though!
    EDIT:
    ...Actually it seems I spoke too soon. The script works, but only if the specified slot has the shadow pokemon. Does anyone know how to make it so all shadow pokemon are also excluded?
     
    Last edited:

    Dban1

    To Be The Best ROM Hacker
  • 27
    Posts
    12
    Years
    I'm not too sure, but I think adding [0] , [1] , [2] .. and so on determines the position in your party. So if you wanted to check all 6 slots, you could add all 6 lines of !if.shadow with the [0] stuff behind.


    Though, regrettably I'm not sure where exactly to place the [0]s
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Code:
    hasShadow=false
    for i in $Trainer.party
      hasShadow=true if i.isShadow?
    end
    $game_switches[51]=hasShadow
    Use that piece of script in the event, and then check whether Game Switch 51 is true (they have a Shadow Pokémon, don't battle) or false (no Shadow Pokémon, battle).

    Change the switch number to something else if necessary.
     

    SuperJanBro

    Renegade
  • 63
    Posts
    10
    Years
    Code:
    hasShadow=false
    for i in $Trainer.party
      hasShadow=true if i.isShadow?
    end
    $game_switches[51]=hasShadow
    Use that piece of script in the event, and then check whether Game Switch 51 is true (they have a Shadow Pokémon, don't battle) or false (no Shadow Pokémon, battle).

    Change the switch number to something else if necessary.


    Works like a charm! Thank you so much!
     
    Back
    Top