mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Fixed not getting berry's effect at full HP or under Heal Block when using Bug Bite/Pluck
This commit is contained in:
@@ -8,7 +8,7 @@ class PokeBattle_Battler
|
||||
amt = 1 if amt<1 && !fainted?
|
||||
oldHP = @hp
|
||||
self.hp -= amt
|
||||
PBDebug.log("[HP change] #{pbThis} lost #{amt} HP (#{oldHP}=>#{@hp})")
|
||||
PBDebug.log("[HP change] #{pbThis} lost #{amt} HP (#{oldHP}=>#{@hp})") if amt>0
|
||||
raise _INTL("HP less than 0") if @hp<0
|
||||
raise _INTL("HP greater than total HP") if @hp>@totalhp
|
||||
@battle.scene.pbHPChanged(self,oldHP,anim) if anyAnim && amt>0
|
||||
@@ -22,7 +22,7 @@ class PokeBattle_Battler
|
||||
amt = 1 if amt<1 && @hp<@totalhp
|
||||
oldHP = @hp
|
||||
self.hp += amt
|
||||
PBDebug.log("[HP change] #{pbThis} gained #{amt} HP (#{oldHP}=>#{@hp})")
|
||||
PBDebug.log("[HP change] #{pbThis} gained #{amt} HP (#{oldHP}=>#{@hp})") if amt>0
|
||||
raise _INTL("HP less than 0") if @hp<0
|
||||
raise _INTL("HP greater than total HP") if @hp>@totalhp
|
||||
@battle.scene.pbHPChanged(self,oldHP,anim) if anyAnim && amt>0
|
||||
|
||||
@@ -245,10 +245,9 @@ class PokeBattle_Battler
|
||||
end
|
||||
end
|
||||
|
||||
# forcedItem is an item ID for Pluck/Fling, and 0 otherwise. fling is for
|
||||
# Fling only.
|
||||
# forcedItem is an item ID for Bug Bite/Pluck/Fling, and 0 otherwise.
|
||||
# fling is for Fling only.
|
||||
def pbItemHPHealCheck(forcedItem=0,fling=false)
|
||||
return if !canHeal?
|
||||
return if forcedItem==0 && !itemActive?
|
||||
thisItem = (forcedItem>0) ? forcedItem : @item
|
||||
if BattleHandlers.triggerHPHealItem(thisItem,self,@battle,(forcedItem!=0))
|
||||
|
||||
Reference in New Issue
Block a user