mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Fixed party order not being altered at the start of battle if there are unable Pokémon before the one(s) sent in initially
This commit is contained in:
@@ -143,6 +143,8 @@ class Battle
|
||||
# For each trainer in turn, find the needed number of Pokémon for them to
|
||||
# send out, and initialize them
|
||||
battlerNumber = 0
|
||||
partyOrder = pbPartyOrder(side)
|
||||
starts = pbPartyStarts(side)
|
||||
trainer.each_with_index do |_t, idxTrainer|
|
||||
ret[side][idxTrainer] = []
|
||||
eachInTeam(side, idxTrainer) do |pkmn, idxPkmn|
|
||||
@@ -150,6 +152,10 @@ class Battle
|
||||
idxBattler = (2 * battlerNumber) + side
|
||||
pbCreateBattler(idxBattler, pkmn, idxPkmn)
|
||||
ret[side][idxTrainer].push(idxBattler)
|
||||
if idxPkmn != starts[idxTrainer] + battlerNumber
|
||||
idxOther = starts[idxTrainer] + battlerNumber
|
||||
partyOrder[idxPkmn], partyOrder[idxOther] = partyOrder[idxOther], partyOrder[idxPkmn]
|
||||
end
|
||||
battlerNumber += 1
|
||||
break if ret[side][idxTrainer].length >= requireds[idxTrainer]
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ class Battle
|
||||
return false
|
||||
end
|
||||
# Embargo
|
||||
if battler&.effects[PBEffects::Embargo] > 0
|
||||
if battler && battler.effects[PBEffects::Embargo] > 0
|
||||
if showMessages
|
||||
scene.pbDisplay(_INTL("Embargo's effect prevents the item's use on {1}!",
|
||||
battler.pbThis(true)))
|
||||
|
||||
Reference in New Issue
Block a user