• 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] Berries that reduce Physical / Special Damage

  • 71
    Posts
    4
    Years
    Hi,

    I'm trying to make a couple of scripts for two new type of berries. One reduces incoming physical damage, while the other reduces special damage.

    Code:
    def pbMoveWeakeningBerryF(move,mults)
        return if !move.physicalMove?
      mults[:final_damage_multiplier] /= 2
        @damageState.berryWeakened = true
        ripening = false
        if hasActiveAbility?(:RIPEN)
          @battle.pbShowAbilitySplash(self)
          mults[:final_damage_multiplier] /= 2
          ripening = true
        end
        @battle.pbCommonAnimation("EatBerry", self)
        @battle.pbHideAbilitySplash(self) if ripening
      end
      
      def pbMoveWeakeningBerryS(move,mults)
        return if !move.specialMove?
        mults[:final_damage_multiplier] /= 2
        @damageState.berryWeakened = true
        ripening = false
        if hasActiveAbility?(:RIPEN)
          @battle.pbShowAbilitySplash(self)
          mults[:final_damage_multiplier] /= 2
          ripening = true
        end
        @battle.pbCommonAnimation("EatBerry", self)
        @battle.pbHideAbilitySplash(self) if ripening
      end

    But it doesn't seem to work:/ what should I start looking to fix?
     
  • 71
    Posts
    4
    Years
    The methods are placed just below the code for the TypeWeakeningBerries (Occa Berry, Shuca berry etc) they all get called from the same method.

    I just changed a couple of lines and yet it doesn't work at all:/
     
    Back
    Top