mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 22:36:03 +00:00
Resolved many Rubocop warnings
This commit is contained in:
@@ -61,7 +61,7 @@ class PokeBattle_Move
|
||||
#=============================================================================
|
||||
# About the move
|
||||
#=============================================================================
|
||||
def pbTarget(user); return @target; end
|
||||
def pbTarget(_user); return @target; end
|
||||
|
||||
def totalpp
|
||||
return @totalpp if @totalpp && @totalpp>0 # Usually undefined
|
||||
@@ -127,8 +127,8 @@ class PokeBattle_Move
|
||||
def danceMove?; return @flags[/o/]; end
|
||||
|
||||
# Causes perfect accuracy (param=1) and double damage (param=2).
|
||||
def tramplesMinimize?(param=1); return false; end
|
||||
def nonLethal?(user,target); return false; end # For False Swipe
|
||||
def tramplesMinimize?(_param=1); return false; end
|
||||
def nonLethal?(_user,_target); return false; end # For False Swipe
|
||||
|
||||
def ignoresSubstitute?(user) # user is the Pokémon using this move
|
||||
if NEWEST_BATTLE_MECHANICS
|
||||
|
||||
@@ -30,8 +30,8 @@ class PokeBattle_Move
|
||||
# attack in the same turn.
|
||||
# user.effects[PBEffects::TwoTurnAttack] is set to the move's ID during the
|
||||
# charging turn, and is 0 during the attack turn.
|
||||
def pbIsChargingTurn?(user); return false; end
|
||||
def pbDamagingMove?; return damagingMove?; end
|
||||
def pbIsChargingTurn?(user); return false; end
|
||||
def pbDamagingMove?; return damagingMove?; end
|
||||
|
||||
def pbContactMove?(user)
|
||||
return false if user.hasActiveAbility?(:LONGREACH)
|
||||
@@ -92,7 +92,7 @@ class PokeBattle_Move
|
||||
# Move failure checks
|
||||
#=============================================================================
|
||||
# Check whether the move fails completely due to move-specific requirements.
|
||||
def pbMoveFailed?(user,targets); return false; end
|
||||
def pbMoveFailed?(user,targets); return false; end
|
||||
# Checks whether the move will be ineffective against the target.
|
||||
def pbFailsAgainstTarget?(user,target); return false; end
|
||||
|
||||
|
||||
@@ -543,8 +543,7 @@ class PokeBattle_Move_097 < PokeBattle_Move
|
||||
def pbBaseDamage(baseDmg,user,target)
|
||||
dmgs = [200,80,60,50,40]
|
||||
ppLeft = [@pp,dmgs.length-1].min # PP is reduced before the move is used
|
||||
baseDmg = dmgs[ppLeft]
|
||||
return baseDmg
|
||||
return dmgs[ppLeft]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -897,7 +896,7 @@ class PokeBattle_Move_0A4 < PokeBattle_Move
|
||||
PBEnvironment::Forest, PBEnvironment::ForestGrass
|
||||
@secretPower = 2 # (Same as Grassy Terrain)
|
||||
when PBEnvironment::MovingWater, PBEnvironment::StillWater,
|
||||
PBEnvironment::Puddle, PBEnvironment::Underwater
|
||||
PBEnvironment::Underwater
|
||||
@secretPower = 5 # Water Pulse, lower Attack by 1
|
||||
when PBEnvironment::Puddle
|
||||
@secretPower = 6 # Mud Shot, lower Speed by 1
|
||||
@@ -1052,7 +1051,7 @@ class PokeBattle_Move_0A9 < PokeBattle_Move
|
||||
end
|
||||
|
||||
def pbGetDefenseStats(user,target)
|
||||
ret1, ret2 = super
|
||||
ret1, _ret2 = super
|
||||
return ret1, 6 # Def/SpDef stat stage
|
||||
end
|
||||
end
|
||||
@@ -1321,7 +1320,6 @@ class PokeBattle_Move_0B3 < PokeBattle_Move
|
||||
# turn into, but what self-respecting game wouldn't at least have Tri
|
||||
# Attack in it?
|
||||
@npMove = getID(PBMoves,:TRIATTACK)
|
||||
m = nil
|
||||
case @battle.field.terrain
|
||||
when PBBattleTerrains::Electric
|
||||
@npMove = getConst(PBMoves,:THUNDERBOLT) || @npMove
|
||||
@@ -2409,7 +2407,7 @@ class PokeBattle_Move_0D3 < PokeBattle_Move
|
||||
def pbBaseDamage(baseDmg,user,target)
|
||||
shift = (4-user.effects[PBEffects::Rollout]) # 0-4, where 0 is most powerful
|
||||
shift += 1 if user.effects[PBEffects::DefenseCurl]
|
||||
baseDmg = baseDmg<<shift
|
||||
baseDmg = baseDmg << shift
|
||||
return baseDmg
|
||||
end
|
||||
|
||||
@@ -3013,7 +3011,7 @@ class PokeBattle_Move_0EB < PokeBattle_Move
|
||||
end
|
||||
if @battle.trainerBattle?
|
||||
canSwitch = false
|
||||
@battle.eachInTeamFromBattlerIndex(target.index) do |pkmn,i|
|
||||
@battle.eachInTeamFromBattlerIndex(target.index) do |_pkmn,i|
|
||||
next if !@battle.pbCanSwitchLax?(target.index,i)
|
||||
canSwitch = true
|
||||
break
|
||||
@@ -3555,7 +3553,7 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
|
||||
end
|
||||
return if pbIsMegaStone?(user.item)
|
||||
flingableItem = false
|
||||
@flingPowers.each do |power,items|
|
||||
@flingPowers.each do |_power,items|
|
||||
items.each do |i|
|
||||
next if !isConst?(user.item,PBItems,i)
|
||||
flingableItem = true
|
||||
|
||||
@@ -1029,7 +1029,7 @@ class PokeBattle_Move_133 < PokeBattle_Move
|
||||
|
||||
def pbMoveFailed?(user,targets)
|
||||
hasAlly = false
|
||||
user.eachAlly do |b|
|
||||
user.eachAlly do |_b|
|
||||
hasAlly = true
|
||||
break
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user