Code tidying with Rubocop

This commit is contained in:
Maruno17
2023-07-18 22:42:10 +01:00
parent 6053363715
commit a5734eaf46
68 changed files with 276 additions and 232 deletions

View File

@@ -145,7 +145,8 @@ class Battle::Move
def nonLethal?(_user, _target); return false; end # For False Swipe
def preventsBattlerConsumingHealingBerry?(battler, targets); return false; end # For Bug Bite/Pluck
def ignoresSubstitute?(user) # user is the Pokémon using this move
# user is the Pokémon using this move.
def ignoresSubstitute?(user)
if Settings::MECHANICS_GENERATION >= 6
return true if soundMove?
return true if user&.hasActiveAbility?(:INFILTRATOR)

View File

@@ -318,7 +318,8 @@ class Battle::Move::TwoTurnMove < Battle::Move
return !@damagingTurn # Deliberately not "return @chargingTurn"
end
def pbDamagingMove? # Stops damage being dealt in the first (charging) turn
# Stops damage being dealt in the first (charging) turn.
def pbDamagingMove?
return false if !@damagingTurn
return super
end

View File

@@ -604,7 +604,8 @@ end
class Battle::Move::AttackTwoTurnsLater < Battle::Move
def targetsPosition?; return true; end
def pbDamagingMove? # Stops damage being dealt in the setting-up turn
# Stops damage being dealt in the setting-up turn.
def pbDamagingMove?
return false if !@battle.futureSight
return super
end

View File

@@ -606,7 +606,8 @@ class Battle::Move::MultiTurnAttackBideThenReturnDoubleDamage < Battle::Move::Fi
end
end
def pbDamagingMove? # Stops damage being dealt in the charging turns
# Stops damage being dealt in the charging turns.
def pbDamagingMove?
return false if !@damagingTurn
return super
end