Fixed some bad uses of @battle

This commit is contained in:
Maruno17
2021-12-29 11:43:24 +00:00
parent 01ce5d347c
commit 63b157d7ec
3 changed files with 3 additions and 4 deletions

View File

@@ -754,7 +754,7 @@ class Battle
def pbStartWeatherAbility(new_weather, battler, ignore_primal = false)
return if !ignore_primal && [:HarshSun, :HeavyRain, :StrongWinds].include?(@field.weather)
return if @field.weather == new_weather
battle.pbShowAbilitySplash(battler)
pbShowAbilitySplash(battler)
if !Scene::USE_ABILITY_SPLASH
pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName))
end

View File

@@ -323,7 +323,7 @@ class Battle::Battler
user.lastMoveFailed = true
if ![:Rain, :HeavyRain].include?(user.effectiveWeather) && user.takesIndirectDamage?
user.pbTakeEffectDamage((user.totalhp / 4.0).round, false) { |hp_lost|
battle.pbDisplay(_INTL("{1} is hurt by its {2}!", battler.pbThis, battler.itemName))
@battle.pbDisplay(_INTL("{1} is hurt by its {2}!", battler.pbThis, battler.itemName))
}
@battle.pbGainExp # In case user is KO'd by this
end

View File

@@ -1476,8 +1476,7 @@ Battle::ItemEffects::OnBeingHitPositiveBerry.add(:ENIGMABERRY,
if forced
battle.pbDisplay(_INTL("{1}'s HP was restored.", battler.pbThis))
else
battle.pbDisplay(_INTL("{1} restored its health using its {2}!", battler.pbThis,
itemName))
battle.pbDisplay(_INTL("{1} restored its health using its {2}!", battler.pbThis, itemName))
end
next true
}