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

Can a Pokemon have two Abilitys at the same time?

1
Posts
5
Years
    • Seen Jan 26, 2021
    Hello everyone!
    I have a question, because I don't find anything about it in the internet.
    Can a Pokemon have two abilities at the same time? Is there a script or something?
    Thank you very much!
    (I'm sorry for my bad English I'm from Germany)
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    I don't know if every single time the code wants to find out if a Pok?mon has an ability it calls hasWorkingAbility, but it looks like that happens a lot, so if you added a second ability to your Pok?mon you could probably change hasWorkingAbility to check if either ability is the one you're looking for.

    And then you'd probably only have to track down anywhere the ability is directly looked at, e.g. in the party status screens etc.
     

    Ego13

    hollow_ego
    311
    Posts
    6
    Years
  • Hey,

    I know this is a quite old post but I just saw it and wanted to share some info.

    It actually is possible to have multiple abilities. In
    PokeBattle_Pokemon
    you add a line like this
    Code:
    attr_accessor(:ability2) # Forces the second ability

    right underneath
    Code:
    attr_accessor(:abilityflag) # Forces the first/second/hidden (0/1/2) ability

    Then all you need to do is modify the following function to check for both abilities
    Code:
    # Returns the ID of this Pok?mon's ability.
      def ability
        abil=abilityIndex
        abils=getAbilityList
        ret1=0; ret2=0
        for i in 0...abils.length
          next if !abils[i][0] || abils[i][0]<=0
          return abils[i][0] if abils[i][1]==abil
          ret1=abils[i][0] if abils[i][1]==0
          ret2=abils[i][0] if abils[i][1]==1
        end
        abil=(@personalID&1) if abil>=2
        return ret2 if abil==1 && ret2>0
        return ret1
      end

    you probably need to change this function as well
    Code:
    # Returns the index of this Pok?mon's ability.
      def abilityIndex
        abil=@abilityflag!=nil ? @abilityflag : (@personalID&1)
        return abil
      end

    You could have abilityindex take arguments to check which ability it should return and then use both in ability method.
    Either way you still need to find a way to assign the second ability. How you do that really depends on how this mechanic should work
     
    Back
    Top