mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
More tweaks from the Rubocop overlord
This commit is contained in:
@@ -450,14 +450,12 @@ def pbMoveTutorChoose(move, movelist = nil, bymachine = false, oneusemachine = f
|
||||
pbMessage(_INTL("{1} can't learn {2}.", pokemon.name, movename)) { screen.pbUpdate }
|
||||
elsif !pokemon.compatible_with_move?(move)
|
||||
pbMessage(_INTL("{1} can't learn {2}.", pokemon.name, movename)) { screen.pbUpdate }
|
||||
else
|
||||
if pbLearnMove(pokemon, move, false, bymachine) { screen.pbUpdate }
|
||||
$stats.moves_taught_by_item += 1 if bymachine
|
||||
$stats.moves_taught_by_tutor += 1 if !bymachine
|
||||
pokemon.add_first_move(move) if oneusemachine
|
||||
ret = true
|
||||
break
|
||||
end
|
||||
elsif pbLearnMove(pokemon, move, false, bymachine) { screen.pbUpdate }
|
||||
$stats.moves_taught_by_item += 1 if bymachine
|
||||
$stats.moves_taught_by_tutor += 1 if !bymachine
|
||||
pokemon.add_first_move(move) if oneusemachine
|
||||
ret = true
|
||||
break
|
||||
end
|
||||
end
|
||||
screen.pbEndScene
|
||||
@@ -470,7 +468,7 @@ def pbConvertItemToItem(variable, array)
|
||||
pbSet(variable, nil)
|
||||
for i in 0...(array.length / 2)
|
||||
next if item != array[2 * i]
|
||||
pbSet(variable, array[2 * i + 1])
|
||||
pbSet(variable, array[(2 * i) + 1])
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -480,7 +478,7 @@ def pbConvertItemToPokemon(variable, array)
|
||||
pbSet(variable, nil)
|
||||
for i in 0...(array.length / 2)
|
||||
next if item != array[2 * i]
|
||||
pbSet(variable, GameData::Species.get(array[2 * i + 1]).id)
|
||||
pbSet(variable, GameData::Species.get(array[(2 * i) + 1]).id)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
@@ -207,7 +207,7 @@ def pbSize(pkmn)
|
||||
spiv = pkmn.iv[:SPEED] & 15
|
||||
m = pkmn.personalID & 0xFF
|
||||
n = (pkmn.personalID >> 8) & 0xFF
|
||||
s = (((ativ ^ dfiv) * hpiv) ^ m) * 256 + (((saiv ^ sdiv) * spiv) ^ n)
|
||||
s = ((((ativ ^ dfiv) * hpiv) ^ m) * 256) + (((saiv ^ sdiv) * spiv) ^ n)
|
||||
xyz = []
|
||||
if s < 10 then xyz = [ 290, 1, 0]
|
||||
elsif s < 110 then xyz = [ 300, 1, 10]
|
||||
@@ -225,7 +225,7 @@ def pbSize(pkmn)
|
||||
elsif s < 65410 then xyz = [1500, 2, 65210]
|
||||
else xyz = [1700, 1, 65510]
|
||||
end
|
||||
return (((s - xyz[2]) / xyz[1] + xyz[0]).floor * baseheight / 10).floor
|
||||
return ((((s - xyz[2]) / xyz[1]) + xyz[0]).floor * baseheight / 10).floor
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user