mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Minor bugfiixes (#140)
* Fixed moves bounced back by Magic Coat/Bounced moves affecting Pokemon they normally shouldn't * Fixed townmap compiler not saving any map names (doesn't make a difference; added for completionism) * Update a few ruby utilities * Fixed small typo bug in map renderer disposal
This commit is contained in:
@@ -471,9 +471,20 @@ class Battle::Battler
|
||||
@battle.pbHideAbilitySplash(b) if b.damageState.magicBounce
|
||||
newChoice = choice.clone
|
||||
newChoice[3] = user.index
|
||||
newTargets = pbFindTargets(newChoice, move, b)
|
||||
newTargets = pbFindTargets(newChoice ,move, b)
|
||||
newTargets = pbChangeTargets(move, b, newTargets)
|
||||
success = pbProcessMoveHit(move, b, newTargets, 0, false)
|
||||
success = false
|
||||
if !move.pbMoveFailed?(b, newTargets)
|
||||
newTargets.each_with_index do |newTarget, idx|
|
||||
if pbSuccessCheckAgainstTarget(move, b, newTarget, newTargets)
|
||||
success = true
|
||||
next
|
||||
end
|
||||
newTargets[idx] = nil
|
||||
end
|
||||
newTargets.compact!
|
||||
end
|
||||
pbProcessMoveHit(move, b, newTargets, 0, false) if success
|
||||
b.lastMoveFailed = true if !success
|
||||
targets.each { |otherB| otherB.pbFaint if otherB && otherB.fainted? }
|
||||
user.pbFaint if user.fainted?
|
||||
@@ -486,7 +497,10 @@ class Battle::Battler
|
||||
@battle.pbShowAbilitySplash(mc) if magicBouncer >= 0
|
||||
@battle.pbDisplay(_INTL("{1} bounced the {2} back!", mc.pbThis, move.name))
|
||||
@battle.pbHideAbilitySplash(mc) if magicBouncer >= 0
|
||||
success = pbProcessMoveHit(move, mc, [], 0, false)
|
||||
success = false
|
||||
if !move.pbMoveFailed?(mc, [])
|
||||
success = pbProcessMoveHit(move, mc, [], 0, false)
|
||||
end
|
||||
mc.lastMoveFailed = true if !success
|
||||
targets.each { |b| b.pbFaint if b && b.fainted? }
|
||||
user.pbFaint if user.fainted?
|
||||
|
||||
Reference in New Issue
Block a user