mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Resolved many Rubocop warnings
This commit is contained in:
@@ -18,16 +18,16 @@ class BattleIntroAnimation < PokeBattle_Animation
|
||||
makeSlideSprite("base_0",1,appearTime,PictureOrigin::Bottom)
|
||||
makeSlideSprite("base_1",-1,appearTime,PictureOrigin::Center)
|
||||
# Player sprite, partner trainer sprite
|
||||
@battle.player.each_with_index do |p,i|
|
||||
@battle.player.each_with_index do |_p,i|
|
||||
makeSlideSprite("player_#{i+1}",1,appearTime,PictureOrigin::Bottom)
|
||||
end
|
||||
# Opposing trainer sprite(s) or wild Pokémon sprite(s)
|
||||
if @battle.trainerBattle?
|
||||
@battle.opponent.each_with_index do |p,i|
|
||||
@battle.opponent.each_with_index do |_p,i|
|
||||
makeSlideSprite("trainer_#{i+1}",-1,appearTime,PictureOrigin::Bottom)
|
||||
end
|
||||
else # Wild battle
|
||||
@battle.pbParty(1).each_with_index do |pkmn,i|
|
||||
@battle.pbParty(1).each_with_index do |_pkmn,i|
|
||||
idxBattler = 2*i+1
|
||||
makeSlideSprite("pokemon_#{idxBattler}",-1,appearTime,PictureOrigin::Bottom)
|
||||
end
|
||||
@@ -574,9 +574,7 @@ class BattlerRecallAnimation < PokeBattle_Animation
|
||||
# Calculate the color to turn the battler sprite
|
||||
col = getBattlerColorFromBallType(ballType)
|
||||
col.alpha = 0
|
||||
# Calculate start and end coordinates for battler sprite movement
|
||||
battlerStartX = batSprite.x
|
||||
battlerStartY = batSprite.y
|
||||
# Calculate end coordinates for battler sprite movement
|
||||
ballPos = PokeBattle_SceneConstants.pbBattlerPosition(@idxBattler,batSprite.sideSize)
|
||||
battlerEndX = ballPos[0]
|
||||
battlerEndY = ballPos[1]
|
||||
@@ -867,8 +865,6 @@ class PokeballThrowDeflectAnimation < PokeBattle_Animation
|
||||
# Set up Poké Ball sprite
|
||||
ball = addBallSprite(ballStartX,ballStartY,@ballType)
|
||||
ball.setZ(0,90)
|
||||
# Set up battler sprite
|
||||
battler = addSprite(batSprite,PictureOrigin::Bottom)
|
||||
# Poké Ball arc animation
|
||||
ball.setSE(0,"Battle throw")
|
||||
createBallTrajectory(ball,0,16,
|
||||
|
||||
@@ -293,7 +293,7 @@ class PokeBattle_Scene
|
||||
def pbBeginEndOfRoundPhase
|
||||
end
|
||||
|
||||
def pbEndBattle(result)
|
||||
def pbEndBattle(_result)
|
||||
@abortable = false
|
||||
pbShowWindow(BLANK)
|
||||
# Fade out all sprites
|
||||
|
||||
@@ -144,9 +144,8 @@ class PokeBattle_Scene
|
||||
# Fade out and hide all sprites
|
||||
visibleSprites = pbFadeOutAndHide(@sprites)
|
||||
# Get player's party
|
||||
party = @battle.pbParty(idxBattler)
|
||||
partyPos = @battle.pbPartyOrder(idxBattler)
|
||||
partyStart, partyEnd = @battle.pbTeamIndexRangeFromBattlerIndex(idxBattler)
|
||||
partyStart, _partyEnd = @battle.pbTeamIndexRangeFromBattlerIndex(idxBattler)
|
||||
modParty = @battle.pbPlayerDisplayParty(idxBattler)
|
||||
# Start party screen
|
||||
scene = PokemonParty_Scene.new
|
||||
@@ -190,7 +189,7 @@ class PokeBattle_Scene
|
||||
#=============================================================================
|
||||
# Opens the Bag screen and chooses an item to use
|
||||
#=============================================================================
|
||||
def pbItemMenu(idxBattler,firstAction)
|
||||
def pbItemMenu(idxBattler,_firstAction)
|
||||
# Fade out and hide all sprites
|
||||
visibleSprites = pbFadeOutAndHide(@sprites)
|
||||
# Set Bag starting positions
|
||||
@@ -250,7 +249,7 @@ class PokeBattle_Scene
|
||||
# Get player's party
|
||||
party = @battle.pbParty(idxBattler)
|
||||
partyPos = @battle.pbPartyOrder(idxBattler)
|
||||
partyStart, partyEnd = @battle.pbTeamIndexRangeFromBattlerIndex(idxBattler)
|
||||
partyStart, _partyEnd = @battle.pbTeamIndexRangeFromBattlerIndex(idxBattler)
|
||||
modParty = @battle.pbPlayerDisplayParty(idxBattler)
|
||||
# Start party screen
|
||||
pkmnScene = PokemonParty_Scene.new
|
||||
|
||||
@@ -272,7 +272,7 @@ class PokeBattle_Scene
|
||||
#=============================================================================
|
||||
# Shows stats windows upon a Pokémon levelling up
|
||||
#=============================================================================
|
||||
def pbLevelUp(pkmn,battler,oldTotalHP,oldAttack,oldDefense,oldSpAtk,oldSpDef,oldSpeed)
|
||||
def pbLevelUp(pkmn,_battler,oldTotalHP,oldAttack,oldDefense,oldSpAtk,oldSpDef,oldSpeed)
|
||||
pbTopRightWindow(
|
||||
_INTL("Max. HP<r>+{1}\r\nAttack<r>+{2}\r\nDefense<r>+{3}\r\nSp. Atk<r>+{4}\r\nSp. Def<r>+{5}\r\nSpeed<r>+{6}",
|
||||
pkmn.totalhp-oldTotalHP,pkmn.attack-oldAttack,pkmn.defense-oldDefense,
|
||||
@@ -482,7 +482,7 @@ class PokeBattle_Scene
|
||||
end
|
||||
|
||||
# Plays a common animation.
|
||||
def pbCommonAnimation(animName,user=nil,target=nil,hitNum=0)
|
||||
def pbCommonAnimation(animName,user=nil,target=nil)
|
||||
return if !animName || animName==""
|
||||
target = target[0] if target && target.is_a?(Array)
|
||||
animations = pbLoadBattleAnimations
|
||||
|
||||
Reference in New Issue
Block a user