• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - 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.

[Scripting Question] Ability scripting

benicioneto

Google Destruct
  • 4
    Posts
    12
    Years
    • Seen Jul 12, 2022
    Hi, I'm trying to give some pokemons two or more abilities with these code, but it keep getting error.

    def hasWorkingAbility(ability,ignorefainted=false)
    return false if self.isFainted? if !ignorefainted
    return false if @effects[PBEffects::GastroAcid]
    return true if isConst?(@ability,PBAbilities,ability)
    return true if ability==SANDSTREAM && isConst?(self.species,PBSpecies,:TYRANITAR)
    end
     
    Back
    Top