mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
Code tidying with Rubocop
This commit is contained in:
@@ -530,7 +530,7 @@ class Battle
|
||||
return 2 if counts[0] < counts[1] # Loss (foe has more able Pokémon)
|
||||
return 1 if hpTotals[0] > hpTotals[1] # Win (player has more HP in total)
|
||||
return 2 if hpTotals[0] < hpTotals[1] # Loss (foe has more HP in total)
|
||||
return 5 # Draw
|
||||
return 5 # Draw
|
||||
end
|
||||
|
||||
# Unused
|
||||
@@ -549,10 +549,10 @@ class Battle
|
||||
return 2 if counts[0] < counts[1] # Loss (foe has more able Pokémon)
|
||||
return 1 if hpTotals[0] > hpTotals[1] # Win (player has a bigger average HP %)
|
||||
return 2 if hpTotals[0] < hpTotals[1] # Loss (foe has a bigger average HP %)
|
||||
return 5 # Draw
|
||||
return 5 # Draw
|
||||
end
|
||||
|
||||
def pbDecisionOnDraw; return 5; end # Draw
|
||||
def pbDecisionOnDraw; return 5; end # Draw
|
||||
|
||||
def pbJudge
|
||||
fainted1 = pbAllFainted?(0)
|
||||
|
||||
@@ -126,7 +126,7 @@ class Battle
|
||||
if Settings::SCALED_EXP_FORMULA
|
||||
exp /= 5
|
||||
levelAdjust = ((2 * level) + 10.0) / (pkmn.level + level + 10.0)
|
||||
levelAdjust = levelAdjust**5
|
||||
levelAdjust **= 5
|
||||
levelAdjust = Math.sqrt(levelAdjust)
|
||||
exp *= levelAdjust
|
||||
exp = exp.floor
|
||||
|
||||
Reference in New Issue
Block a user