Many more Rubocop-inspired code improvements

This commit is contained in:
Maruno17
2021-12-18 19:06:22 +00:00
parent d17fc40a47
commit 13a238cc6a
107 changed files with 651 additions and 652 deletions

View File

@@ -99,7 +99,7 @@ class PokemonEggHatch_Scene
frames = (GameData::Species.cry_length(@pokemon) * Graphics.frame_rate).ceil
@pokemon.play_cry
updateScene(frames + 4)
pbBGMStop()
pbBGMStop
pbMEPlay("Evolution success")
@pokemon.name = nil
pbMessage(_INTL("\\se[]{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update }
@@ -135,8 +135,8 @@ class PokemonEggHatch_Scene
targets.push(@sprites["pokemon"].x)
targets.each_with_index do |target, i|
loop do
break if i % 2 == 0 && @sprites["pokemon"].x >= target
break if i % 2 == 1 && @sprites["pokemon"].x <= target
break if i.even? && @sprites["pokemon"].x >= target
break if i.odd? && @sprites["pokemon"].x <= target
@sprites["pokemon"].x += speed
@sprites["hatch"].x = @sprites["pokemon"].x
updateScene

View File

@@ -161,7 +161,7 @@ class HallOfFame_Scene
def xpositionformula(battlernumber)
ret = 0
if !SINGLEROW
ret = (battlernumber / 3 % 2 == 0) ? (19 - battlernumber) % 3 : (19 + battlernumber) % 3
ret = (battlernumber / 3).even? ? (19 - battlernumber) % 3 : (19 + battlernumber) % 3
else
ret = battlernumber % 2 * 2
end