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

[Scripting Question] Complicated Ablitlies

GajeelRedfox99

Pokémon Fantasy Developer
24
Posts
8
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:
    824
    Posts
    8
    Years
  • 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.
     

    GajeelRedfox99

    Pokémon Fantasy Developer
    24
    Posts
    8
    Years
  • 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