mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 06:04:59 +00:00
Refactoring of code relating to switching, effect damage and effects that trigger after a move is used
This commit is contained in:
@@ -157,14 +157,7 @@ class PokeBattle_Move_DamageTargetAlly < PokeBattle_Move
|
||||
@battle.battlers[b[0]].pbThis(true)))
|
||||
end
|
||||
end
|
||||
switchedAlly = []
|
||||
hitAlly.each do |b|
|
||||
@battle.battlers[b[0]].pbItemHPHealCheck
|
||||
if @battle.battlers[b[0]].pbAbilitiesOnDamageTaken(b[1])
|
||||
switchedAlly.push(@battle.battlers[b[0]])
|
||||
end
|
||||
end
|
||||
switchedAlly.each { |b| b.pbEffectsOnSwitchIn(true) }
|
||||
hitAlly.each { |b| @battle.battlers[b[0]].pbItemHPHealCheck }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -602,7 +595,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_DoublePowerIfTargetLostHPThisTurn < PokeBattle_Move
|
||||
def pbBaseDamage(baseDmg,user,target)
|
||||
baseDmg *= 2 if target.tookDamage
|
||||
baseDmg *= 2 if target.tookDamageThisRound
|
||||
return baseDmg
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user