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

Custom Ability LeechSeed

  • 5
    Posts
    8
    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 something like Garden Seeder.

    Thanks :)
     
    Last edited:
  • 71
    Posts
    6
    Years
    • Seen May 24, 2024
    Code:
    BattleHandlers::AbilityOnSwitchIn.add(:GARDENSEEDER,
      proc { |ability,battler,battle|
        battle.pbShowAbilitySplash(battler)
        battle.eachOtherSideBattler(battler.index) do |b|
          next if b.effects[PBEffects::LeechSeed]>=0
          next if b.pbHasType?(:GRASS)
          b.effects[PBEffects::LeechSeed] = battler.index
          battle.pbDisplay(_INTL("{1} was seeded!",b.pbThis))
        end
        battle.pbHideAbilitySplash(battler)
      }
    )

    i didn't test but it would be something like that
    honestly im fairly sure it'll have exploits, like u'll probably need to add more exceptions, i don't know if for example one of the terrains or magic guard, etc should protect the pokemon from being seeded
     
    Back
    Top