More Rubocop

This commit is contained in:
Maruno17
2021-12-27 00:26:45 +00:00
parent 4a6324389b
commit aa643a6049
51 changed files with 346 additions and 323 deletions

View File

@@ -60,10 +60,13 @@ class Battle
end
sideCounts.each_with_index do |_count, i|
if !requireds[i] || requireds[i] == 0
raise _INTL("Player-side trainer {1} has no battler position for their Pokémon to go (trying {2}v{3} battle)",
i + 1, @sideSizes[0], @sideSizes[1]) if side == 0
raise _INTL("Opposing trainer {1} has no battler position for their Pokémon to go (trying {2}v{3} battle)",
i + 1, @sideSizes[0], @sideSizes[1]) if side == 1
if side == 0
raise _INTL("Player-side trainer {1} has no battler position for their Pokémon to go (trying {2}v{3} battle)",
i + 1, @sideSizes[0], @sideSizes[1])
elsif side == 1
raise _INTL("Opposing trainer {1} has no battler position for their Pokémon to go (trying {2}v{3} battle)",
i + 1, @sideSizes[0], @sideSizes[1])
end
end
next if requireds[i] <= sideCounts[i] # Trainer has enough Pokémon to fill their positions
if requireds[i] == 1

View File

@@ -9,8 +9,10 @@ class Battle
end
# Embargo
if battler && battler.effects[PBEffects::Embargo] > 0
scene.pbDisplay(_INTL("Embargo's effect prevents the item's use on {1}!",
battler.pbThis(true))) if showMessages
if showMessages
scene.pbDisplay(_INTL("Embargo's effect prevents the item's use on {1}!",
battler.pbThis(true)))
end
return false
end
return true