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

Pokemon Blacklist for E4

Qwertyis666

Dragon Trainer Since 1996
60
Posts
10
Years
  • Hi, the last day I was thinking to add a big rule for the E4 of my game: No Legendary Allowed!
    But the only problem is than I don't know who to make a pokemon blacklist in a event.
    Do I have to make a script and call it when I talk to the entrance NPC or I can make everything without script?

    Thanks in advance and sorry for my bad english.
     
    1,224
    Posts
    10
    Years
  • Code:
    def hasBlackListed?
    blacklist=[getID(PBSpecies,:ARCEUS)]
    ret=false
    for poke in $Trainer.party
    if blacklist.include?(poke.species)
    ret=true
    break
    end
    end
    return ret
    end
     
    119
    Posts
    10
    Years
    • Seen Sep 1, 2023
    The code mej71 posted does exactly what you need, if you want to add a code function. Otherwise it's also possible to do it with pbHasSpecies?(:SPECIESNAME) and conditional branches inside an event.
    I recommend using mej71's function (place it somewhere outside a class or module in the scripts) as that makes events more organized and easier to read (and I suspect it requires less processing power). It's easier to use and gets the job done in a more efficient way.
     

    Qwertyis666

    Dragon Trainer Since 1996
    60
    Posts
    10
    Years
  • Code:
    def hasBlackListed?
    blacklist=[getID(PBSpecies,:ARCEUS)]
    ret=false
    for poke in $Trainer.party
    if blacklist.include?(poke.species)
    ret=true
    break
    end
    end
    return ret
    end

    Thanks you very much mej!

    Badhaas: yeah before posting my question I make a little test with pbHasSpecies? and like you said, it was too hard to read after add a 5th Pokemon! (I can only write one Pokemon at time with pbHasSpecies, right?)

    Thanks again and sorry for my bad english
     
    119
    Posts
    10
    Years
    • Seen Sep 1, 2023
    Yeah, with pbHasSpecies you can only check for one Pokémon at a time. You can do multiple checks of these inside a conditional branch by adding &&. An example would be "pbHasSpecies?(:Gliscor") && pbHasSpecies?(:Golum)". If you combine this with the blacklist function you could you could have different pokemon banned from different events, with the blacklist containing only the common ones. I suggest using only one blacklist within your game to keep things consistent and avoid confusing players.
     
    Back
    Top