mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Code tidying with Rubocop
This commit is contained in:
@@ -635,7 +635,7 @@ Battle::AI::Handlers::MoveEffectAgainstTargetScore.add("RaiseTargetAttack2Confus
|
||||
score = ai.get_score_for_target_stat_raise(score, target, [:ATTACK, 2], false)
|
||||
# Score for confusing the target
|
||||
next Battle::AI::Handlers.apply_move_effect_against_target_score(
|
||||
"ConfuseTarget", score, move, user, target, ai, battle)
|
||||
"ConfuseTarget", score, move, user, target, ai, battle)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -657,7 +657,7 @@ Battle::AI::Handlers::MoveEffectAgainstTargetScore.add("RaiseTargetSpAtk1Confuse
|
||||
score = ai.get_score_for_target_stat_raise(score, target, [:SPECIAL_ATTACK, 1], false)
|
||||
# Score for confusing the target
|
||||
next Battle::AI::Handlers.apply_move_effect_against_target_score(
|
||||
"ConfuseTarget", score, move, user, target, ai, battle)
|
||||
"ConfuseTarget", score, move, user, target, ai, battle)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -463,7 +463,7 @@ Battle::AI::Handlers::MoveEffectScore.add("EnsureNextCriticalHit",
|
||||
next Battle::AI::MOVE_USELESS_SCORE
|
||||
end
|
||||
# Prefer if user knows a damaging move which won't definitely critical hit
|
||||
if user.check_for_move { |m| m.damagingMove? && m.function_code != "AlwaysCriticalHit"}
|
||||
if user.check_for_move { |m| m.damagingMove? && m.function_code != "AlwaysCriticalHit" }
|
||||
score += 15
|
||||
end
|
||||
next score
|
||||
@@ -860,7 +860,7 @@ Battle::AI::Handlers::MoveEffectScore.add("ProtectUserFromDamagingMovesKingsShie
|
||||
# Prefer if the foe's Attack can be lowered by this move
|
||||
if b.battler.affectedByContactEffect? && b.check_for_move { |m| m.contactMove? }
|
||||
drop_score = ai.get_score_for_target_stat_drop(
|
||||
0, b, [:ATTACK, (Settings::MECHANICS_GENERATION >= 8) ? 1 : 2], false)
|
||||
0, b, [:ATTACK, (Settings::MECHANICS_GENERATION >= 8) ? 1 : 2], false)
|
||||
score += drop_score / 2 # Halved because we don't know what move b will use
|
||||
end
|
||||
# Prefer if the foe is in the middle of using a two turn attack
|
||||
|
||||
@@ -387,7 +387,7 @@ Battle::AI::Handlers::MoveFailureAgainstTargetCheck.add("StartDamageTargetEachTu
|
||||
Battle::AI::Handlers::MoveEffectAgainstTargetScore.add("StartDamageTargetEachTurnIfTargetAsleep",
|
||||
proc { |score, move, user, target, ai, battle|
|
||||
next Battle::AI::MOVE_USELESS_SCORE if target.statusCount <= 1
|
||||
next score + 8 * target.statusCount
|
||||
next score + (8 * target.statusCount)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -835,7 +835,7 @@ Battle::AI::Handlers::MoveEffectAgainstTargetScore.add("DisableTargetHealingMove
|
||||
)
|
||||
|
||||
#===============================================================================
|
||||
#.
|
||||
#
|
||||
#===============================================================================
|
||||
Battle::AI::Handlers::MoveEffectAgainstTargetScore.add("DisableTargetSoundMoves",
|
||||
proc { |score, move, user, target, ai, battle|
|
||||
|
||||
Reference in New Issue
Block a user