mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Applied most Rubocop-suggested layout fixes
This commit is contained in:
@@ -3,6 +3,7 @@ class BugContestState
|
||||
attr_accessor :decision
|
||||
attr_accessor :lastPokemon
|
||||
attr_reader :timer
|
||||
|
||||
ContestantNames = [
|
||||
_INTL("Bug Catcher Ed"),
|
||||
_INTL("Bug Catcher Benny"),
|
||||
|
||||
@@ -81,7 +81,7 @@ def pbGetLegalMoves2(species, maxlevel)
|
||||
# If we have two status moves that have the same function code, delete the
|
||||
# one with lower accuracy (Supersonic vs. Confuse Ray, etc.)
|
||||
elsif md.function_code == move2[1].function_code && md.base_damage == 0 &&
|
||||
move2[1].base_damage == 0 && md.accuracy > move2[1].accuracy
|
||||
move2[1].base_damage == 0 && md.accuracy > move2[1].accuracy
|
||||
deleteAll.call(moves, move2[0])
|
||||
# Delete poison-causing moves if we have a move that causes toxic
|
||||
elsif md.function_code == "BadPoisonTarget" && move2[1].function_code == "PoisonTarget"
|
||||
@@ -91,10 +91,10 @@ def pbGetLegalMoves2(species, maxlevel)
|
||||
# does more damage than the other move OR does the same damage but is more
|
||||
# accurate, delete the other move (Surf, Flamethrower, Thunderbolt, etc.)
|
||||
elsif md.function_code == move2[1].function_code && md.base_damage != 0 &&
|
||||
md.type == move2[1].type &&
|
||||
(md.total_pp == 15 || md.total_pp == 10 || md.total_pp == move2[1].total_pp) &&
|
||||
(md.base_damage > move2[1].base_damage ||
|
||||
(md.base_damage == move2[1].base_damage && md.accuracy > move2[1].accuracy))
|
||||
md.type == move2[1].type &&
|
||||
(md.total_pp == 15 || md.total_pp == 10 || md.total_pp == move2[1].total_pp) &&
|
||||
(md.base_damage > move2[1].base_damage ||
|
||||
(md.base_damage == move2[1].base_damage && md.accuracy > move2[1].accuracy))
|
||||
deleteAll.call(moves, move2[0])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -36,7 +36,7 @@ def pbTrainerInfo(pokemonlist, trfile, rules)
|
||||
randomName = getRandomNameEx(gender, nil, 0, 12)
|
||||
# Add the trainer to bttrainers
|
||||
tr = [trainerid, randomName, _INTL("Here I come!"), _INTL("Yes, I won!"),
|
||||
_INTL("Man, I lost!"), []]
|
||||
_INTL("Man, I lost!"), []]
|
||||
bttrainers.push(tr)
|
||||
end
|
||||
# Sort all the randomly chosen trainers by their base money (smallest first)
|
||||
@@ -160,7 +160,7 @@ def pbTrainerInfo(pokemonlist, trfile, rules)
|
||||
# until a valid team can be formed from what's in numbers
|
||||
if numbers.length < Settings::MAX_PARTY_SIZE || !rules.ruleset.hasValidTeam?(numbersPokemon)
|
||||
while numbers.length < pokemonlist.length &&
|
||||
(numbers.length < Settings::MAX_PARTY_SIZE || !rules.ruleset.hasValidTeam?(numbersPokemon))
|
||||
(numbers.length < Settings::MAX_PARTY_SIZE || !rules.ruleset.hasValidTeam?(numbersPokemon))
|
||||
index = rand(pokemonlist.length)
|
||||
if !numbers.include?(index)
|
||||
numbers.push(index)
|
||||
@@ -202,7 +202,7 @@ def pbTrainerInfo(pokemonlist, trfile, rules)
|
||||
yield(nil) if block_given?
|
||||
if trIndex < 0
|
||||
info = [newbttrainers, pbpokemonlist, [trfile],
|
||||
trfile + "tr.txt", trfile + "pm.txt", !hasDefault]
|
||||
trfile + "tr.txt", trfile + "pm.txt", !hasDefault]
|
||||
trlists.push(info)
|
||||
end
|
||||
yield(nil) if block_given?
|
||||
|
||||
@@ -134,6 +134,7 @@ end
|
||||
#===============================================================================
|
||||
class PlayerRatingElo
|
||||
attr_reader :rating
|
||||
|
||||
K_VALUE = 16
|
||||
|
||||
def initialize
|
||||
|
||||
Reference in New Issue
Block a user