mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixed evolution-related code causing errors in Battle Frontier battles
This commit is contained in:
@@ -86,7 +86,9 @@ class Battle::Battler
|
|||||||
# Do other things
|
# Do other things
|
||||||
@battle.pbClearChoice(@index) # Reset choice
|
@battle.pbClearChoice(@index) # Reset choice
|
||||||
pbOwnSide.effects[PBEffects::LastRoundFainted] = @battle.turnCount
|
pbOwnSide.effects[PBEffects::LastRoundFainted] = @battle.turnCount
|
||||||
$game_temp.party_direct_damage_taken[@pokemonIndex] = 0 if pbOwnedByPlayer?
|
if $game_temp.party_direct_damage_taken && pbOwnedByPlayer?
|
||||||
|
$game_temp.party_direct_damage_taken[@pokemonIndex] = 0
|
||||||
|
end
|
||||||
# Check other battlers' abilities that trigger upon a battler fainting
|
# Check other battlers' abilities that trigger upon a battler fainting
|
||||||
pbAbilitiesOnFainting
|
pbAbilitiesOnFainting
|
||||||
# Check for end of primordial weather
|
# Check for end of primordial weather
|
||||||
|
|||||||
@@ -288,7 +288,9 @@ class Battle::Move
|
|||||||
@battle.pbDisplay(_INTL("The substitute took damage for {1}!",target.pbThis(true)))
|
@battle.pbDisplay(_INTL("The substitute took damage for {1}!",target.pbThis(true)))
|
||||||
end
|
end
|
||||||
if target.damageState.critical
|
if target.damageState.critical
|
||||||
$game_temp.party_critical_hits_dealt[user.pokemonIndex] += 1 if user.pbOwnedByPlayer?
|
if $game_temp.party_critical_hits_dealt && user.pbOwnedByPlayer?
|
||||||
|
$game_temp.party_critical_hits_dealt[user.pokemonIndex] += 1
|
||||||
|
end
|
||||||
if target.damageState.affection_critical
|
if target.damageState.affection_critical
|
||||||
if numTargets > 1
|
if numTargets > 1
|
||||||
@battle.pbDisplay(_INTL("{1} landed a critical hit on {2}, wishing to be praised!",
|
@battle.pbDisplay(_INTL("{1} landed a critical hit on {2}, wishing to be praised!",
|
||||||
@@ -382,6 +384,8 @@ class Battle::Move
|
|||||||
target.lastHPLostFromFoe = damage # For Metal Burst
|
target.lastHPLostFromFoe = damage # For Metal Burst
|
||||||
target.lastFoeAttacker.push(user.index) # For Metal Burst
|
target.lastFoeAttacker.push(user.index) # For Metal Burst
|
||||||
end
|
end
|
||||||
$game_temp.party_direct_damage_taken[target.pokemonIndex] += damage if target.pbOwnedByPlayer?
|
if $game_temp.party_direct_damage_taken && target.pbOwnedByPlayer?
|
||||||
|
$game_temp.party_direct_damage_taken[target.pokemonIndex] += damage
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -591,6 +591,7 @@ Events.onEndBattle += proc { |_sender,e|
|
|||||||
(decision!=2 && decision!=5) # not a loss or a draw
|
(decision!=2 && decision!=5) # not a loss or a draw
|
||||||
$game_temp.party_levels_before_battle = nil
|
$game_temp.party_levels_before_battle = nil
|
||||||
$game_temp.party_critical_hits_dealt = nil
|
$game_temp.party_critical_hits_dealt = nil
|
||||||
|
$game_temp.party_direct_damage_taken = nil
|
||||||
# Check for blacking out or gaining Pickup/Huney Gather items
|
# Check for blacking out or gaining Pickup/Huney Gather items
|
||||||
case decision
|
case decision
|
||||||
when 1, 4 # Win, capture
|
when 1, 4 # Win, capture
|
||||||
|
|||||||
Reference in New Issue
Block a user