Fixed Focus Band only triggering at full HP, made more text translatable

This commit is contained in:
Maruno17
2024-09-30 21:44:36 +01:00
parent b80de83b0d
commit fc538a09f7
3 changed files with 17 additions and 20 deletions

View File

@@ -571,7 +571,6 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
end
end
# TODO: Why is this called 4 times per loop in pbMessageDisplay?
def update
super
@pausesprite.update if @pausesprite&.visible

View File

@@ -785,17 +785,17 @@ class Battle
when :HarshSun
if !pbCheckGlobalAbility(:DESOLATELAND)
@field.weather = :None
pbDisplay("The harsh sunlight faded!")
pbDisplay(_INTL("The harsh sunlight faded!"))
end
when :HeavyRain
if !pbCheckGlobalAbility(:PRIMORDIALSEA)
@field.weather = :None
pbDisplay("The heavy rain has lifted!")
pbDisplay(_INTL("The heavy rain has lifted!"))
end
when :StrongWinds
if !pbCheckGlobalAbility(:DELTASTREAM)
@field.weather = :None
pbDisplay("The mysterious air current has dissipated!")
pbDisplay(_INTL("The mysterious air current has dissipated!"))
end
end
if @field.weather != oldWeather

View File

@@ -209,8 +209,7 @@ class Battle::Move
elsif target.effects[PBEffects::Endure]
target.damageState.endured = true
damage -= 1
elsif damage == target.totalhp
if target.hasActiveAbility?(:STURDY) && !target.beingMoldBroken?
elsif target.hasActiveAbility?(:STURDY) && !target.beingMoldBroken? && target.hp == target.totalhp
target.damageState.sturdy = true
damage -= 1
elsif target.hasActiveItem?(:FOCUSSASH) && target.hp == target.totalhp
@@ -228,7 +227,6 @@ class Battle::Move
end
end
end
end
damage = 0 if damage < 0
target.damageState.hpLost = damage
target.damageState.totalHPLost += damage