mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Bug fixes: interacting with a follower in the same tile as the player; underline/strikethrough line mispositionings and added shadows to those lines; Toxic/Flame Orb replacing existing status problems; grown berry plants looking like sprouts; pbShowCommandsWithHelp not deactivating message windows it creates
This commit is contained in:
@@ -24,7 +24,7 @@ class Battle::Battler
|
||||
|
||||
def pbCanInflictStatus?(newStatus, user, showMessages, move = nil, ignoreStatus = false)
|
||||
return false if fainted?
|
||||
selfInflicted = (user && user.index == @index)
|
||||
self_inflicted = (user && user.index == @index) # Rest and Flame Orb/Toxic Orb only
|
||||
# Already have that status problem
|
||||
if self.status == newStatus && !ignoreStatus
|
||||
if showMessages
|
||||
@@ -41,13 +41,13 @@ class Battle::Battler
|
||||
return false
|
||||
end
|
||||
# Trying to replace a status problem with another one
|
||||
if self.status != :NONE && !ignoreStatus && !selfInflicted
|
||||
if self.status != :NONE && !ignoreStatus && !(self_inflicted && move) # Rest can replace a status problem
|
||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...", pbThis(true))) if showMessages
|
||||
return false
|
||||
end
|
||||
# Trying to inflict a status problem on a Pokémon behind a substitute
|
||||
if @effects[PBEffects::Substitute] > 0 && !(move && move.ignoresSubstitute?(user)) &&
|
||||
!selfInflicted
|
||||
!self_inflicted
|
||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...", pbThis(true))) if showMessages
|
||||
return false
|
||||
end
|
||||
@@ -105,7 +105,7 @@ class Battle::Battler
|
||||
immAlly = nil
|
||||
if Battle::AbilityEffects.triggerStatusImmunityNonIgnorable(self.ability, self, newStatus)
|
||||
immuneByAbility = true
|
||||
elsif selfInflicted || !@battle.moldBreaker
|
||||
elsif self_inflicted || !@battle.moldBreaker
|
||||
if abilityActive? && Battle::AbilityEffects.triggerStatusImmunity(self.ability, self, newStatus)
|
||||
immuneByAbility = true
|
||||
else
|
||||
@@ -163,7 +163,7 @@ class Battle::Battler
|
||||
return false
|
||||
end
|
||||
# Safeguard immunity
|
||||
if pbOwnSide.effects[PBEffects::Safeguard] > 0 && !selfInflicted && move &&
|
||||
if pbOwnSide.effects[PBEffects::Safeguard] > 0 && !self_inflicted && move &&
|
||||
!(user && user.hasActiveAbility?(:INFILTRATOR))
|
||||
@battle.pbDisplay(_INTL("{1}'s team is protected by Safeguard!", pbThis)) if showMessages
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user