Fixed incorrect variable use for Jaboca/Rowap Berries' effects

This commit is contained in:
Maruno17
2023-01-18 19:11:14 +00:00
parent 632b0f8b4b
commit 3d9c3e2c00
2 changed files with 6 additions and 15 deletions

View File

@@ -1318,13 +1318,13 @@ Battle::ItemEffects::OnBeingHit.add(:JABOCABERRY,
next if !user.takesIndirectDamage?
amt = user.totalhp / 8
ripening = false
if battler.hasActiveAbility?(:RIPEN)
battle.pbShowAbilitySplash(battler)
if target.hasActiveAbility?(:RIPEN)
battle.pbShowAbilitySplash(target)
amt *= 2
ripening = true
end
battle.pbCommonAnimation("EatBerry", target)
battle.pbHideAbilitySplash(battler) if ripening
battle.pbHideAbilitySplash(target) if ripening
battle.scene.pbDamageAnimation(user)
user.pbReduceHP(amt, false)
battle.pbDisplay(_INTL("{1} consumed its {2} and hurt {3}!", target.pbThis,
@@ -1388,13 +1388,13 @@ Battle::ItemEffects::OnBeingHit.add(:ROWAPBERRY,
next if !user.takesIndirectDamage?
amt = user.totalhp / 8
ripening = false
if battler.hasActiveAbility?(:RIPEN)
battle.pbShowAbilitySplash(battler)
if target.hasActiveAbility?(:RIPEN)
battle.pbShowAbilitySplash(target)
amt *= 2
ripening = true
end
battle.pbCommonAnimation("EatBerry", target)
battle.pbHideAbilitySplash(battler) if ripening
battle.pbHideAbilitySplash(target) if ripening
battle.scene.pbDamageAnimation(user)
user.pbReduceHP(amt, false)
battle.pbDisplay(_INTL("{1} consumed its {2} and hurt {3}!", target.pbThis,