Lots of rubocop

This commit is contained in:
Maruno17
2023-01-28 15:21:12 +00:00
parent 2d056052ce
commit 13aab8d911
159 changed files with 1679 additions and 1931 deletions

View File

@@ -104,11 +104,11 @@ class Battle::Move
def pbFailsAgainstTarget?(user, target, show_message); return false; end
def pbMoveFailedLastInRound?(user, showMessage = true)
unmoved = @battle.allBattlers.any? { |b|
unmoved = @battle.allBattlers.any? do |b|
next b.index != user.index &&
[:UseMove, :Shift].include?(@battle.choices[b.index][0]) &&
!b.movedThisRound?
}
end
if !unmoved
@battle.pbDisplay(_INTL("But it failed!")) if showMessage
return true

View File

@@ -226,16 +226,12 @@ class Battle::Move
def pbModifyDamage(damageMult, user, target); return damageMult; end
def pbGetAttackStats(user, target)
if specialMove?
return user.spatk, user.stages[:SPECIAL_ATTACK] + 6
end
return user.spatk, user.stages[:SPECIAL_ATTACK] + 6 if specialMove?
return user.attack, user.stages[:ATTACK] + 6
end
def pbGetDefenseStats(user, target)
if specialMove?
return target.spdef, target.stages[:SPECIAL_DEFENSE] + 6
end
return target.spdef, target.stages[:SPECIAL_DEFENSE] + 6 if specialMove?
return target.defense, target.stages[:DEFENSE] + 6
end
@@ -396,9 +392,7 @@ class Battle::Move
end
end
# Multi-targeting attacks
if numTargets > 1
multipliers[:final_damage_multiplier] *= 0.75
end
multipliers[:final_damage_multiplier] *= 0.75 if numTargets > 1
# Weather
case user.effectiveWeather
when :Sun, :HarshSun

View File

@@ -356,8 +356,7 @@ class Battle::Move::TwoTurnMove < Battle::Move
@battle.pbDisplay(_INTL("{1} began charging up!", user.pbThis))
end
def pbAttackingTurnMessage(user, targets)
end
def pbAttackingTurnMessage(user, targets); end
def pbEffectAgainstTarget(user, target)
if @damagingTurn
@@ -372,8 +371,7 @@ class Battle::Move::TwoTurnMove < Battle::Move
# the latter just records the target is being Sky Dropped
end
def pbAttackingTurnEffect(user, target)
end
def pbAttackingTurnEffect(user, target); end
def pbShowAnimation(id, user, targets, hitNum = 0, showAnimation = true)
hitNum = 1 if @chargingTurn && !@damagingTurn # Charging anim

View File

@@ -100,9 +100,7 @@ class Battle::Move::OHKO < Battle::Move::FixedDamageMove
def pbHitEffectivenessMessages(user, target, numTargets = 1)
super
if target.fainted?
@battle.pbDisplay(_INTL("It's a one-hit KO!"))
end
@battle.pbDisplay(_INTL("It's a one-hit KO!")) if target.fainted?
end
end
@@ -1211,9 +1209,7 @@ end
#===============================================================================
class Battle::Move::UseTargetAttackInsteadOfUserAttack < Battle::Move
def pbGetAttackStats(user, target)
if specialMove?
return target.spatk, target.stages[:SPECIAL_ATTACK] + 6
end
return target.spatk, target.stages[:SPECIAL_ATTACK] + 6 if specialMove?
return target.attack, target.stages[:ATTACK] + 6
end
end