mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Many more Rubocop-inspired code improvements
This commit is contained in:
@@ -22,10 +22,3 @@ class PhoneDatabase
|
||||
@trainers = []
|
||||
end
|
||||
end
|
||||
|
||||
module PhoneMsgType
|
||||
Generic = 0
|
||||
Greeting = 1
|
||||
Body = 2
|
||||
BattleRequest = 3
|
||||
end
|
||||
|
||||
@@ -570,9 +570,10 @@ module GameData
|
||||
when "09D" then new_code = "StartWeakenElectricMoves"
|
||||
when "09E" then new_code = "StartWeakenFireMoves"
|
||||
when "09F"
|
||||
if data[:id] == :MULTIATTACK
|
||||
case data[:id]
|
||||
when :MULTIATTACK
|
||||
new_code = "TypeDependsOnUserMemory"
|
||||
elsif data[:id] == :TECHNOBLAST
|
||||
when :TECHNOBLAST
|
||||
new_code = "TypeDependsOnUserDrive"
|
||||
else
|
||||
new_code = "TypeDependsOnUserPlate"
|
||||
|
||||
@@ -16,7 +16,7 @@ module GameData
|
||||
for i in 0...2**factors.length
|
||||
# Set try_ parameters for this combination
|
||||
factors.each_with_index do |factor, index|
|
||||
value = ((i / (2**index)) % 2 == 0) ? factor[1] : factor[2]
|
||||
value = ((i / (2**index)).even?) ? factor[1] : factor[2]
|
||||
case factor[0]
|
||||
when 0 then try_species = value
|
||||
when 1 then try_form = value
|
||||
|
||||
Reference in New Issue
Block a user