• 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!
  • Akari, Selene, Mint, Solana - 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] Complicated Ablitlies

GajeelRedfox99

Pokémon Fantasy Developer
  • 24
    Posts
    9
    Years
    Sup?
    I have planned a couple of abilities for my game. Some are similar enough to other abilities for me to try myself, but I have one ability planned that I need some help with.
    When the pokémon enters the battlefield, all other pokémon on the field end up in the whirlpool effect. It might be a bit broken, but maybe it is supposed to slightly BREAK the game, if you catch my drift. The pokémon will be basically impossible to get unless you try enough. Another pokémon will get the same ability, but with fire spin, if that helps hint you at the Pokémon getting it.
    The ability names are BREAKWHIRL, PBS name, or actual name BREAK Whirlpool, and BREAKFLAME, PBS name, or actual name BREAK Fire Vortex
    Thanks, and have a good day ~ Gajeel

    Edit: New question Below VVVV
    P.S May have future questions regarding other weird abilities.
     
    Last edited:
    In Essentials v16, the code for Intimidate is found on line 1056 of PokeBattle_Battler. Above that, add this:

    Code:
          # BREAK abilities
          if self.hasWorkingAbility(:BREAKWHIRL) && onactive
            PBDebug.log("[#{pbThis}: has BREAK Whirl!]")
           # @battle.pbDisplayEffect(self)
            for i in 0...4
              if pbIsOpposing?(i) && [email protected][i].isFainted?
                if @battle.battlers[i].effects[PBEffects::MultiTurn]==0
                  @battle.battlers[i].effects[PBEffects::MultiTurn]=4+rand(2)
                  @battle.battlers[i].effects[PBEffects::MultiTurn]=5 if self.hasWorkingItem(:GRIPCLAW)
                  @battle.battlers[i].effects[PBEffects::MultiTurnAttack]=getConst(PBMoves,:WHIRLPOOL)
                  @battle.battlers[i].effects[PBEffects::MultiTurnUser]=self.index
                  @battle.pbDisplay(_INTL("{1} was trapped in the vortex!",@battle.battlers[i].pbThis))
                end
              end
            end
          end
          if self.hasWorkingAbility(:BREAKFLAME) && onactive
            PBDebug.log("[#{pbThis}: has BREAK Flame!]")
           # @battle.pbDisplayEffect(self)
            for i in 0...4
              if pbIsOpposing?(i) && [email protected][i].isFainted?
                if @battle.battlers[i].effects[PBEffects::MultiTurn]==0
                  @battle.battlers[i].effects[PBEffects::MultiTurn]=4+rand(2)
                  @battle.battlers[i].effects[PBEffects::MultiTurn]=5 if self.hasWorkingItem(:GRIPCLAW)
                  @battle.battlers[i].effects[PBEffects::MultiTurnAttack]=getConst(PBMoves,:FIRESPIN)
                  @battle.battlers[i].effects[PBEffects::MultiTurnUser]=self.index
                  @battle.pbDisplay(_INTL("{1} was trapped in the vortex!",@battle.battlers[i].pbThis))
                end
              end
            end
          end

    Essentially, as soon as they switch in, they use a non-damaging version of Fire Spin and Whirlpool. this should - I repeat, should, this code is untested - work the way you described.
     
    In Essentials v16, the code for Intimidate is found on line 1056 of PokeBattle_Battler. Above that, add this:

    Code:
          # BREAK abilities
          if self.hasWorkingAbility(:BREAKWHIRL) && onactive
            PBDebug.log("[#{pbThis}: has BREAK Whirl!]")
           # @battle.pbDisplayEffect(self)
            for i in 0...4
              if pbIsOpposing?(i) && [email protected][i].isFainted?
                if @battle.battlers[i].effects[PBEffects::MultiTurn]==0
                  @battle.battlers[i].effects[PBEffects::MultiTurn]=4+rand(2)
                  @battle.battlers[i].effects[PBEffects::MultiTurn]=5 if self.hasWorkingItem(:GRIPCLAW)
                  @battle.battlers[i].effects[PBEffects::MultiTurnAttack]=getConst(PBMoves,:WHIRLPOOL)
                  @battle.battlers[i].effects[PBEffects::MultiTurnUser]=self.index
                  @battle.pbDisplay(_INTL("{1} was trapped in the vortex!",@battle.battlers[i].pbThis))
                end
              end
            end
          end
          if self.hasWorkingAbility(:BREAKFLAME) && onactive
            PBDebug.log("[#{pbThis}: has BREAK Flame!]")
           # @battle.pbDisplayEffect(self)
            for i in 0...4
              if pbIsOpposing?(i) && [email protected][i].isFainted?
                if @battle.battlers[i].effects[PBEffects::MultiTurn]==0
                  @battle.battlers[i].effects[PBEffects::MultiTurn]=4+rand(2)
                  @battle.battlers[i].effects[PBEffects::MultiTurn]=5 if self.hasWorkingItem(:GRIPCLAW)
                  @battle.battlers[i].effects[PBEffects::MultiTurnAttack]=getConst(PBMoves,:FIRESPIN)
                  @battle.battlers[i].effects[PBEffects::MultiTurnUser]=self.index
                  @battle.pbDisplay(_INTL("{1} was trapped in the vortex!",@battle.battlers[i].pbThis))
                end
              end
            end
          end

    Essentially, as soon as they switch in, they use a non-damaging version of Fire Spin and Whirlpool. this should - I repeat, should, this code is untested - work the way you described.
    Yes it did work! Thanks so much!
     
    Back
    Top