• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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] Custom Ability LeechSeed

  • 5
    Posts
    9
    Years
    • Seen Dec 14, 2021
    Hey!!

    Im a total coding n00b! Could you please help me with creating a custom ability that when a pokemon enters the field he immidiatly leech seeds the opposing pokemon? The ability woud be called Gardner

    Cheers!
     
    This one is easy. Paste this in the new script you made for the previous ability:

    Code:
    BattleHandlers::AbilityOnSwitchIn.add(:GARDENER,
      proc { |ability,battler,battle|
        show_splash = true
        battler.eachOpposing { |b|
          next if b.effects[PBEffects::LeechSeed]>=0
          if show_splash
            # Show the splash only won't. 
            battle.pbShowAbilitySplash(battler)
            show_splash = false
          end 
          b.effects[PBEffects::LeechSeed] = battler.index
          battle.pbDisplay(_INTL("{1} was seeded!",b.pbThis))
        }
        battle.pbHideAbilitySplash(battler) if !show_splash
      }
    )

    Do you plan to make a topic for every new thing you wanna code?
    I suggest you start learning some Ruby or recruit someone to make that code for you. I'm not going to write your game.
     
    Back
    Top