Merge branch 'master' into dev

This commit is contained in:
Maruno17
2021-01-10 19:11:26 +00:00
7 changed files with 60 additions and 44 deletions

View File

@@ -124,8 +124,13 @@ class PokeBattle_Battler
#=============================================================================
# Held item consuming/removing
#=============================================================================
def pbCanConsumeBerry?(_item, check_gluttony = true)
def canConsumeBerry?
return false if @battle.pbCheckOpposingAbility(:UNNERVE, @index)
return true
end
def canConsumePinchBerry?(_item, check_gluttony = true)
return false if !canConsumeBerry?
return true if @hp <= @totalhp / 4
return true if @hp <= @totalhp / 2 && (!check_gluttony || hasActiveAbility?(:GLUTTONY))
return false