• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Buffing Hail?

  • 58
    Posts
    9
    Years
    • Seen Oct 6, 2019
    I am interested in balancing Hail and making it basically the same as Sandstorm. Along with its existing effects, I would like to add:

    + 50% Defense buff to Ice types during Hail
    + Sand Rush & Sand Force-esque abilities

    I would appreciate if someone could walk me through the process. I am completely new to coding, so go easy on me.

    (I have the most recent version of Essentials with all the moves, Pokemon, mechanics, etc from Gen 6.)

    Thanks.
     
    1.) 50% [Physical] Defense buff to Ice types in Hail

    a.) in PokeBattle_Move, find the following code around line 938:
    Code:
        if @battle.pbWeather==PBWeather::SANDSTORM &&
           opponent.pbHasType?(:ROCK) && applysandstorm
          defense=(defense*1.5).round
        end

    b.) Add this directly below it:
    Code:
        if @battle.pbWeather==PBWeather::HAIL &&
           opponent.pbHasType?(:ICE) && !applysandstorm
          defense=(defense*1.5).round
        end


    2.) Snow Rush

    a.) Find this code in PokeBattle_Battler (with an R), around line 654:
    Code:
        when PBWeather::SANDSTORM
          speedmult=speedmult*2 if self.hasWorkingAbility(:SANDRUSH)

    b.) Add this directly below it (Before that "end") :
    Code:
        when PBWeather::HAIL
          speedmult=speedmult*2 if self.hasWorkingAbility(:SNOWRUSH)


    3.) Snow Force

    a.) In PokeBattle_Move, around line 625, find this...
    Code:
        if attacker.hasWorkingAbility(:SANDFORCE) &&
           @battle.pbWeather==PBWeather::SANDSTORM &&
           (isConst?(type,PBTypes,:ROCK) ||
           isConst?(type,PBTypes,:GROUND) ||
           isConst?(type,PBTypes,:STEEL))
          damagemult=(damagemult*1.3).round
        end

    b.) ...and paste this directly below it:
    Code:
        if attacker.hasWorkingAbility(:SNOWFORCE) &&
           @battle.pbWeather==PBWeather::HAIL &&
           (isConst?(type,PBTypes,:ICE) ||
           isConst?(type,PBTypes,:WATER) ||
           isConst?(type,PBTypes,:STEEL))
          damagemult=(damagemult*1.3).round
        end

    c.) In PokeBattle_AI, around line 2964, find this...:
    Code:
        if skill>=PBTrainerAI.mediumSkill
          if attacker.hasWorkingAbility(:SANDFORCE) &&
             pbWeather==PBWeather::SANDSTORM &&
             (isConst?(type,PBTypes,:ROCK) ||
             isConst?(type,PBTypes,:GROUND) ||
             isConst?(type,PBTypes,:STEEL))
            basedamage=(basedamage*1.3).round
          end
        end

    d.) ...and add this beneath it:
    Code:
        if skill>=PBTrainerAI.mediumSkill
          if attacker.hasWorkingAbility(:SNOWFORCE) &&
             pbWeather==PBWeather::HAIL &&
             (isConst?(type,PBTypes,:ICE) ||
             isConst?(type,PBTypes,:WATER) ||
             isConst?(type,PBTypes,:STEEL))
            basedamage=(basedamage*1.3).round
          end
        end


    4.) Snow Rush and Snow Force being immune to hail damage even if not Ice type (for use when Traced)

    a.) In PokeBattle_Battle (without an R), find this around line 3068:
    Code:
                if !i.pbHasType?(:ICE) &&
                   !i.hasWorkingAbility(:ICEBODY) &&
                   !i.hasWorkingAbility(:SNOWCLOAK) &&
                   !i.hasWorkingAbility(:MAGICGUARD) &&
                   !i.hasWorkingAbility(:OVERCOAT) &&

    b.) Add this directly below it:
    Code:
                   !i.hasWorkingAbility(:SNOWRUSH) &&
                   !i.hasWorkingAbility(:SNOWFORCE) &&
     
    I plugged in your codes, and all the alterations seem to be working. I still have to do a bit more testing and calculation, but everything appears to be doing what I wanted.

    Thank ya kindly, sir. :-)

    One thing I noticed and am curious about: why is that the code for the Sandstorm buff lists Defense as receiving the increase, rather than Sp. Def?

    if @battle.pbWeather==PBWeather::SANDSTORM && opponent.pbHasType?(:ROCK) && applysandstorm defense=(defense*1.5).round end



    I don't understand why Sp. Def isn't listed, unless there is some funny code language going on (which I would be ignorant to).
     
    The word "defense" there actually refers to either the physical or Special defense stat, depending on the move. If you look slightly earlier, you'll see this:

    Code:
        defense=opponent.defense
        defstage=opponent.stages[PBStats::DEFENSE]+6
        applysandstorm=false
        if type>=0 && pbIsSpecial?(type)
          defense=opponent.spdef
          defstage=opponent.stages[PBStats::SPDEF]+6
          applysandstorm=true
        end
     
    Back
    Top