• 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!
  • Cyndy, May, Hero (Conquest), or Wes - 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.

Ability move modifier

  • 752
    Posts
    14
    Years
    • UK
    • Seen Dec 29, 2024
    Hi

    I'm trying to program an ability that affects just a single move ( battle bond), the ability is working but it affecting all moves currently. Does anyone know what the code to check for a specific move is?

    So far i have
    Code:
        if attacker.hasWorkingAbility(:BATTLEBOND)
          damagemult=(damagemult*1.3).round
        end
     
    Last edited:
    Hi

    I'm trying to program an ability that affects just a single move ( battle bond), the ability is working but it affecting all moves currently. Does anyone know what the code to check for a specific move is?

    So far i have
    Code:
        if attacker.hasWorkingAbility(:BATTLEBOND)
          damagemult=(damagemult*1.3).round
        end

    What method is this in? It's important that we know, because we need to know what variables are in scope of this piece of code. If there's something called move or moveid nearby, you can use that with isConst?:

    Code:
    if attacker.hasWorkingAbility(:BATTLEBOND) && isConst?(move.id,PBMoves,:TACKLE)
    Code:
    if attacker.hasWorkingAbility(:BATTLEBOND) && isConst?(moveid,PBMoves,:TACKLE)

    If not, please let me know what method you added this to and I'll have a look for you ;)
     
    Ah, @id should work, then.

    That would be something like this:
    Code:
    if attacker.hasWorkingAbility(:BATTLEBOND) && isConst?(@id,PBMoves,:TACKLE)
     
    Last edited:
    Back
    Top