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

Banning Pokemon

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