mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-13 07:54:59 +00:00
More aligning of code
This commit is contained in:
@@ -62,7 +62,7 @@ class Battle::Battler
|
||||
when :Electric
|
||||
if newStatus == :SLEEP
|
||||
@battle.pbDisplay(_INTL("{1} surrounds itself with electrified terrain!",
|
||||
pbThis(true))) if showMessages
|
||||
pbThis(true))) if showMessages
|
||||
return false
|
||||
end
|
||||
when :Misty
|
||||
@@ -133,19 +133,19 @@ class Battle::Battler
|
||||
case newStatus
|
||||
when :SLEEP
|
||||
msg = _INTL("{1} stays awake because of {2}'s {3}!",
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
when :POISON
|
||||
msg = _INTL("{1} cannot be poisoned because of {2}'s {3}!",
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
when :BURN
|
||||
msg = _INTL("{1} cannot be burned because of {2}'s {3}!",
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
when :PARALYSIS
|
||||
msg = _INTL("{1} cannot be paralyzed because of {2}'s {3}!",
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
when :FROZEN
|
||||
msg = _INTL("{1} cannot be frozen solid because of {2}'s {3}!",
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
pbThis, immAlly.pbThis(true), immAlly.abilityName)
|
||||
end
|
||||
else
|
||||
case newStatus
|
||||
|
||||
@@ -15,7 +15,7 @@ class Battle::Battler
|
||||
# Check the stat stage
|
||||
if statStageAtMax?(stat)
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} won't go any higher!",
|
||||
pbThis, GameData::Stat.get(stat).name)) if showFailMsg
|
||||
pbThis, GameData::Stat.get(stat).name)) if showFailMsg
|
||||
return false
|
||||
end
|
||||
return true
|
||||
@@ -142,22 +142,25 @@ class Battle::Battler
|
||||
end
|
||||
if abilityActive?
|
||||
return false if !@battle.moldBreaker && Battle::AbilityEffects.triggerStatLossImmunity(
|
||||
self.ability, self, stat, @battle, showFailMsg)
|
||||
self.ability, self, stat, @battle, showFailMsg
|
||||
)
|
||||
return false if Battle::AbilityEffects.triggerStatLossImmunityNonIgnorable(
|
||||
self.ability, self, stat, @battle, showFailMsg)
|
||||
self.ability, self, stat, @battle, showFailMsg
|
||||
)
|
||||
end
|
||||
if !@battle.moldBreaker
|
||||
allAllies.each do |b|
|
||||
next if !b.abilityActive?
|
||||
return false if Battle::AbilityEffects.triggerStatLossImmunityFromAlly(
|
||||
b.ability, b, self, stat, @battle, showFailMsg)
|
||||
b.ability, b, self, stat, @battle, showFailMsg
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
# Check the stat stage
|
||||
if statStageAtMin?(stat)
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} won't go any lower!",
|
||||
pbThis, GameData::Stat.get(stat).name)) if showFailMsg
|
||||
pbThis, GameData::Stat.get(stat).name)) if showFailMsg
|
||||
return false
|
||||
end
|
||||
return true
|
||||
@@ -298,7 +301,7 @@ class Battle::Battler
|
||||
@battle.pbDisplay(_INTL("{1} is protected by its substitute!", pbThis))
|
||||
else
|
||||
@battle.pbDisplay(_INTL("{1}'s substitute protected it from {2}'s {3}!",
|
||||
pbThis, user.pbThis(true), user.abilityName))
|
||||
pbThis, user.pbThis(true), user.abilityName))
|
||||
end
|
||||
return false
|
||||
end
|
||||
@@ -308,7 +311,7 @@ class Battle::Battler
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!", pbThis, GameData::Stat.get(:ATTACK).name))
|
||||
else
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!", pbThis, abilityName,
|
||||
GameData::Stat.get(:ATTACK).name))
|
||||
GameData::Stat.get(:ATTACK).name))
|
||||
end
|
||||
@battle.pbHideAbilitySplash(self)
|
||||
return false
|
||||
@@ -322,14 +325,14 @@ class Battle::Battler
|
||||
if !hasActiveAbility?(:CONTRARY)
|
||||
if pbOwnSide.effects[PBEffects::Mist] > 0
|
||||
@battle.pbDisplay(_INTL("{1} is protected from {2}'s {3} by Mist!",
|
||||
pbThis, user.pbThis(true), user.abilityName))
|
||||
pbThis, user.pbThis(true), user.abilityName))
|
||||
return false
|
||||
end
|
||||
if abilityActive?
|
||||
if Battle::AbilityEffects.triggerStatLossImmunity(self.ability, self, :ATTACK, @battle, false) ||
|
||||
Battle::AbilityEffects.triggerStatLossImmunityNonIgnorable(self.ability, self, :ATTACK, @battle, false)
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} prevented {3}'s {4} from working!",
|
||||
pbThis, abilityName, user.pbThis(true), user.abilityName))
|
||||
pbThis, abilityName, user.pbThis(true), user.abilityName))
|
||||
return false
|
||||
end
|
||||
end
|
||||
@@ -337,7 +340,7 @@ class Battle::Battler
|
||||
next if !b.abilityActive?
|
||||
if Battle::AbilityEffects.triggerStatLossImmunityFromAlly(b.ability, b, self, :ATTACK, @battle, false)
|
||||
@battle.pbDisplay(_INTL("{1} is protected from {2}'s {3} by {4}'s {5}!",
|
||||
pbThis, user.pbThis(true), user.abilityName, b.pbThis(true), b.abilityName))
|
||||
pbThis, user.pbThis(true), user.abilityName, b.pbThis(true), b.abilityName))
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -124,7 +124,7 @@ class Battle::Battler
|
||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...", pbThis(true)))
|
||||
else
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
||||
pbThis, abilityName, move.name))
|
||||
pbThis, abilityName, move.name))
|
||||
end
|
||||
end
|
||||
@battle.pbHideAbilitySplash(self)
|
||||
@@ -154,7 +154,7 @@ class Battle::Battler
|
||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...", pbThis(true)))
|
||||
else
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
|
||||
pbThis, abilityName, move.name))
|
||||
pbThis, abilityName, move.name))
|
||||
end
|
||||
end
|
||||
@battle.pbHideAbilitySplash(self)
|
||||
@@ -249,10 +249,10 @@ class Battle::Battler
|
||||
@battle.pbShowAbilitySplash(b)
|
||||
if Battle::Scene::USE_ABILITY_SPLASH
|
||||
@battle.pbDisplay(_INTL("{1} shared its {2} with {3}!",
|
||||
b.pbThis, b.itemName, pbThis(true)))
|
||||
b.pbThis, b.itemName, pbThis(true)))
|
||||
else
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} let it share its {3} with {4}!",
|
||||
b.pbThis, b.abilityName, b.itemName, pbThis(true)))
|
||||
b.pbThis, b.abilityName, b.itemName, pbThis(true)))
|
||||
end
|
||||
self.item = b.item
|
||||
b.item = nil
|
||||
|
||||
@@ -557,7 +557,7 @@ class Battle::Battler
|
||||
@battle.pbHideAbilitySplash(nextUser)
|
||||
if !Battle::Scene::USE_ABILITY_SPLASH
|
||||
@battle.pbDisplay(_INTL("{1} kept the dance going with {2}!",
|
||||
nextUser.pbThis, nextUser.abilityName))
|
||||
nextUser.pbThis, nextUser.abilityName))
|
||||
end
|
||||
nextUser.effects[PBEffects::Dancer] = true
|
||||
if nextUser.pbCanChooseMove?(move, false)
|
||||
@@ -641,7 +641,7 @@ class Battle::Battler
|
||||
# actual removal of the item happens in def pbEffectsAfterMove.
|
||||
@battle.pbCommonAnimation("UseItem", user)
|
||||
@battle.pbDisplay(_INTL("The {1} strengthened {2}'s power!",
|
||||
GameData::Item.get(user.effects[PBEffects::GemConsumed]).name, move.name))
|
||||
GameData::Item.get(user.effects[PBEffects::GemConsumed]).name, move.name))
|
||||
end
|
||||
# Messages about missed target(s) (relevant for multi-target moves only)
|
||||
if !move.pbRepeatHit?
|
||||
|
||||
@@ -87,8 +87,7 @@ class Battle::Battler
|
||||
# executing them)
|
||||
if hasActiveItem?(:ASSAULTVEST) && move.statusMove? && move.id != :MEFIRST && commandPhase
|
||||
if showMessages
|
||||
msg = _INTL("The effects of the {1} prevent status moves from being used!",
|
||||
itemName)
|
||||
msg = _INTL("The effects of the {1} prevent status moves from being used!", itemName)
|
||||
(commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg)
|
||||
end
|
||||
return false
|
||||
@@ -277,7 +276,7 @@ class Battle::Battler
|
||||
if @effects[PBEffects::Attract] >= 0
|
||||
@battle.pbCommonAnimation("Attract", self)
|
||||
@battle.pbDisplay(_INTL("{1} is in love with {2}!", pbThis,
|
||||
@battle.battlers[@effects[PBEffects::Attract]].pbThis(true)))
|
||||
@battle.battlers[@effects[PBEffects::Attract]].pbThis(true)))
|
||||
if @battle.pbRandom(100) < 50
|
||||
@battle.pbDisplay(_INTL("{1} is immobilized by love!", pbThis))
|
||||
@lastMoveFailed = true
|
||||
|
||||
@@ -71,7 +71,7 @@ class Battle::Battler
|
||||
if target.effects[PBEffects::Grudge] && target.fainted?
|
||||
move.pp = 0
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} lost all of its PP due to the grudge!",
|
||||
user.pbThis, move.name))
|
||||
user.pbThis, move.name))
|
||||
end
|
||||
# Destiny Bond (recording that it should apply)
|
||||
if target.effects[PBEffects::DestinyBond] && target.fainted?
|
||||
|
||||
Reference in New Issue
Block a user