mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
More tweaks from the Rubocop overlord
This commit is contained in:
@@ -89,8 +89,8 @@ class PokemonEggHatch_Scene
|
||||
@pokemon.species_data.apply_metrics_to_sprite(@sprites["pokemon"], 1)
|
||||
@sprites["hatch"].visible = false
|
||||
for i in 1..fadeTime
|
||||
@sprites["pokemon"].tone = Tone.new(255 - i * toneDiff, 255 - i * toneDiff, 255 - i * toneDiff)
|
||||
@sprites["overlay"].opacity = 255 - i * toneDiff
|
||||
@sprites["pokemon"].tone = Tone.new(255 - (i * toneDiff), 255 - (i * toneDiff), 255 - (i * toneDiff))
|
||||
@sprites["overlay"].opacity = 255 - (i * toneDiff)
|
||||
updateScene
|
||||
end
|
||||
@sprites["pokemon"].tone = Tone.new(0, 0, 0)
|
||||
|
||||
@@ -34,13 +34,13 @@ class SpriteMetafile
|
||||
def initialize(viewport = nil)
|
||||
@metafile = []
|
||||
@values = [
|
||||
viewport,
|
||||
Tone.new(0, 0, 0, 0), Rect.new(0, 0, 0, 0),
|
||||
true,
|
||||
0, 0, 0, 0, 0, 100, 100,
|
||||
0, false, 0, 255, 0,
|
||||
Color.new(0, 0, 0, 0), Color.new(0, 0, 0, 0),
|
||||
0
|
||||
viewport,
|
||||
Tone.new(0, 0, 0, 0), Rect.new(0, 0, 0, 0),
|
||||
true,
|
||||
0, 0, 0, 0, 0, 100, 100,
|
||||
0, false, 0, 255, 0,
|
||||
Color.new(0, 0, 0, 0), Color.new(0, 0, 0, 0),
|
||||
0
|
||||
]
|
||||
end
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ class PokemonTrade_Scene
|
||||
pictureBall.moveXY(delay, 6, Graphics.width / 2, -32)
|
||||
# Play animation
|
||||
pbRunPictures(
|
||||
[picturePoke, pictureBall],
|
||||
[@sprites["rsprite1"], spriteBall]
|
||||
[picturePoke, pictureBall],
|
||||
[@sprites["rsprite1"], spriteBall]
|
||||
)
|
||||
spriteBall.dispose
|
||||
end
|
||||
@@ -124,12 +124,12 @@ class PokemonTrade_Scene
|
||||
d = [1, 2, 4, 8][i] # Fraction of the starting height each bounce rises to
|
||||
delay -= t if i == 0
|
||||
if i > 0
|
||||
pictureBall.setZoomXY(delay, 100 + 5 * (5 - i), 100 - 5 * (5 - i)) # Squish
|
||||
pictureBall.setZoomXY(delay, 100 + (5 * (5 - i)), 100 - (5 * (5 - i))) # Squish
|
||||
pictureBall.moveZoom(delay, 2, 100) # Unsquish
|
||||
pictureBall.moveXY(delay, t, Graphics.width / 2, y - 100 / d)
|
||||
pictureBall.moveXY(delay, t, Graphics.width / 2, y - (100 / d))
|
||||
end
|
||||
pictureBall.moveXY(delay + t, t, Graphics.width / 2, y)
|
||||
pictureBall.setSE(delay + 2 * t, "Battle ball drop")
|
||||
pictureBall.setSE(delay + (2 * t), "Battle ball drop")
|
||||
delay = pictureBall.totalDuration
|
||||
end
|
||||
picturePoke.setXY(delay, Graphics.width / 2, y)
|
||||
@@ -150,8 +150,8 @@ class PokemonTrade_Scene
|
||||
picturePoke.setSE(delay, cry) if cry
|
||||
# Play animation
|
||||
pbRunPictures(
|
||||
[picturePoke, pictureBall],
|
||||
[@sprites["rsprite2"], spriteBall]
|
||||
[picturePoke, pictureBall],
|
||||
[@sprites["rsprite2"], spriteBall]
|
||||
)
|
||||
spriteBall.dispose
|
||||
end
|
||||
|
||||
@@ -139,10 +139,10 @@ class HallOfFame_Scene
|
||||
def xpointformula(battlernumber)
|
||||
ret = 0
|
||||
if !SINGLEROW
|
||||
ret = 32 + 160 * xpositionformula(battlernumber)
|
||||
ret = 32 + (160 * xpositionformula(battlernumber))
|
||||
else
|
||||
ret = (60 * (battlernumber / 2) + 48) * (xpositionformula(battlernumber) - 1)
|
||||
ret += Graphics.width / 2 - 56
|
||||
ret = ((60 * (battlernumber / 2)) + 48) * (xpositionformula(battlernumber) - 1)
|
||||
ret += (Graphics.width / 2) - 56
|
||||
end
|
||||
return ret
|
||||
end
|
||||
@@ -150,9 +150,9 @@ class HallOfFame_Scene
|
||||
def ypointformula(battlernumber)
|
||||
ret = 0
|
||||
if !SINGLEROW
|
||||
ret = 32 + 128 * ypositionformula(battlernumber) / 2
|
||||
ret = 32 + (128 * ypositionformula(battlernumber) / 2)
|
||||
else
|
||||
ret = 96 - 8 * (battlernumber / 2)
|
||||
ret = 96 - (8 * (battlernumber / 2))
|
||||
end
|
||||
return ret
|
||||
end
|
||||
@@ -311,16 +311,16 @@ class HallOfFame_Scene
|
||||
dexnumber = _ISPRINTF("No. {1:03d}", number)
|
||||
end
|
||||
textPositions = [
|
||||
[dexnumber, 32, Graphics.height - 86, 0, BASECOLOR, SHADOWCOLOR],
|
||||
[pokename, Graphics.width - 192, Graphics.height - 86, 2, BASECOLOR, SHADOWCOLOR],
|
||||
[_INTL("Lv. {1}", pokemon.egg? ? "?" : pokemon.level),
|
||||
64, Graphics.height - 54, 0, BASECOLOR, SHADOWCOLOR],
|
||||
[_INTL("IDNo.{1}", pokemon.egg? ? "?????" : idno),
|
||||
Graphics.width - 192, Graphics.height - 54, 2, BASECOLOR, SHADOWCOLOR]
|
||||
[dexnumber, 32, Graphics.height - 86, 0, BASECOLOR, SHADOWCOLOR],
|
||||
[pokename, Graphics.width - 192, Graphics.height - 86, 2, BASECOLOR, SHADOWCOLOR],
|
||||
[_INTL("Lv. {1}", pokemon.egg? ? "?" : pokemon.level),
|
||||
64, Graphics.height - 54, 0, BASECOLOR, SHADOWCOLOR],
|
||||
[_INTL("IDNo.{1}", pokemon.egg? ? "?????" : idno),
|
||||
Graphics.width - 192, Graphics.height - 54, 2, BASECOLOR, SHADOWCOLOR]
|
||||
]
|
||||
if (hallNumber > -1)
|
||||
textPositions.push([_INTL("Hall of Fame No."), Graphics.width / 2 - 104, -6, 0, BASECOLOR, SHADOWCOLOR])
|
||||
textPositions.push([hallNumber.to_s, Graphics.width / 2 + 104, -6, 1, BASECOLOR, SHADOWCOLOR])
|
||||
textPositions.push([_INTL("Hall of Fame No."), (Graphics.width / 2) - 104, -6, 0, BASECOLOR, SHADOWCOLOR])
|
||||
textPositions.push([hallNumber.to_s, (Graphics.width / 2) + 104, -6, 1, BASECOLOR, SHADOWCOLOR])
|
||||
end
|
||||
pbDrawTextPositions(overlay, textPositions)
|
||||
end
|
||||
|
||||
@@ -118,14 +118,14 @@ _END_
|
||||
pcred = PluginManager.credits(plugin)
|
||||
plugin_credits << "\"#{plugin}\" v.#{PluginManager.version(plugin)} by:\n"
|
||||
if pcred.size >= 5
|
||||
plugin_credits << pcred[0] + "\n"
|
||||
plugin_credits << (pcred[0] + "\n")
|
||||
i = 1
|
||||
until i >= pcred.size
|
||||
plugin_credits << pcred[i] + "<s>" + (pcred[i + 1] || "") + "\n"
|
||||
plugin_credits << (pcred[i] + "<s>" + (pcred[i + 1] || "") + "\n")
|
||||
i += 2
|
||||
end
|
||||
else
|
||||
pcred.each { |name| plugin_credits << name + "\n" }
|
||||
pcred.each { |name| plugin_credits << (name + "\n") }
|
||||
end
|
||||
plugin_credits << "\n"
|
||||
end
|
||||
@@ -148,7 +148,7 @@ _END_
|
||||
credit_bitmap = Bitmap.new(Graphics.width, @bitmap_height + 16)
|
||||
pbSetSystemFont(credit_bitmap)
|
||||
for j in 0...lines_per_bitmap
|
||||
line = credit_lines[i * lines_per_bitmap + j]
|
||||
line = credit_lines[(i * lines_per_bitmap) + j]
|
||||
next if !line
|
||||
line = line.split("<s>")
|
||||
xpos = 0
|
||||
@@ -156,29 +156,29 @@ _END_
|
||||
linewidth = Graphics.width
|
||||
for k in 0...line.length
|
||||
if line.length > 1
|
||||
xpos = (k == 0) ? 0 : 20 + Graphics.width / 2
|
||||
xpos = (k == 0) ? 0 : 20 + (Graphics.width / 2)
|
||||
align = (k == 0) ? 2 : 0 # Right align : left align
|
||||
linewidth = Graphics.width / 2 - 20
|
||||
linewidth = (Graphics.width / 2) - 20
|
||||
end
|
||||
credit_bitmap.font.color = TEXT_SHADOW_COLOR
|
||||
credit_bitmap.draw_text(xpos, j * 32 + 12, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 12, linewidth, 32, line[k], align)
|
||||
credit_bitmap.font.color = TEXT_OUTLINE_COLOR
|
||||
credit_bitmap.draw_text(xpos + 2, j * 32 + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, j * 32 + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, j * 32 + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, j * 32 + 4, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, j * 32 + 4, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, j * 32 + 6, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, j * 32 + 6, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, j * 32 + 6, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, (j * 32) + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, (j * 32) + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, (j * 32) + 4, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, (j * 32) + 4, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, (j * 32) + 6, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 6, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, (j * 32) + 6, linewidth, 32, line[k], align)
|
||||
credit_bitmap.font.color = TEXT_BASE_COLOR
|
||||
credit_bitmap.draw_text(xpos, j * 32 + 4, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 4, linewidth, 32, line[k], align)
|
||||
end
|
||||
end
|
||||
credit_sprite = Sprite.new(text_viewport)
|
||||
credit_sprite.bitmap = credit_bitmap
|
||||
credit_sprite.z = 9998
|
||||
credit_sprite.oy = @realOY - @bitmap_height * i
|
||||
credit_sprite.oy = @realOY - (@bitmap_height * i)
|
||||
@credit_sprites[i] = credit_sprite
|
||||
end
|
||||
#-------------------------------
|
||||
@@ -245,6 +245,6 @@ _END_
|
||||
return if cancel?
|
||||
return if last?
|
||||
@realOY += SCROLL_SPEED * delta
|
||||
@credit_sprites.each_with_index { |s, i| s.oy = @realOY - @bitmap_height * i }
|
||||
@credit_sprites.each_with_index { |s, i| s.oy = @realOY - (@bitmap_height * i) }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user