mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Fixed some bad uses of @battle
This commit is contained in:
@@ -754,7 +754,7 @@ class Battle
|
|||||||
def pbStartWeatherAbility(new_weather, battler, ignore_primal = false)
|
def pbStartWeatherAbility(new_weather, battler, ignore_primal = false)
|
||||||
return if !ignore_primal && [:HarshSun, :HeavyRain, :StrongWinds].include?(@field.weather)
|
return if !ignore_primal && [:HarshSun, :HeavyRain, :StrongWinds].include?(@field.weather)
|
||||||
return if @field.weather == new_weather
|
return if @field.weather == new_weather
|
||||||
battle.pbShowAbilitySplash(battler)
|
pbShowAbilitySplash(battler)
|
||||||
if !Scene::USE_ABILITY_SPLASH
|
if !Scene::USE_ABILITY_SPLASH
|
||||||
pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName))
|
pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ class Battle::Battler
|
|||||||
user.lastMoveFailed = true
|
user.lastMoveFailed = true
|
||||||
if ![:Rain, :HeavyRain].include?(user.effectiveWeather) && user.takesIndirectDamage?
|
if ![:Rain, :HeavyRain].include?(user.effectiveWeather) && user.takesIndirectDamage?
|
||||||
user.pbTakeEffectDamage((user.totalhp / 4.0).round, false) { |hp_lost|
|
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
|
@battle.pbGainExp # In case user is KO'd by this
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1476,8 +1476,7 @@ Battle::ItemEffects::OnBeingHitPositiveBerry.add(:ENIGMABERRY,
|
|||||||
if forced
|
if forced
|
||||||
battle.pbDisplay(_INTL("{1}'s HP was restored.", battler.pbThis))
|
battle.pbDisplay(_INTL("{1}'s HP was restored.", battler.pbThis))
|
||||||
else
|
else
|
||||||
battle.pbDisplay(_INTL("{1} restored its health using its {2}!", battler.pbThis,
|
battle.pbDisplay(_INTL("{1} restored its health using its {2}!", battler.pbThis, itemName))
|
||||||
itemName))
|
|
||||||
end
|
end
|
||||||
next true
|
next true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user