mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Fixed Xerneas/Zacian/Zamazenta not being their alternate form throughout battle
This commit is contained in:
@@ -258,6 +258,8 @@ class Battle
|
||||
logMsg += "#{@opponent.length} trainer(s))" if trainerBattle?
|
||||
PBDebug.log(logMsg)
|
||||
pbEnsureParticipants
|
||||
pbParty(0).each { |pkmn| @peer.pbOnStartingBattle(self, pkmn, wildBattle?) if pkmn }
|
||||
pbParty(1).each { |pkmn| @peer.pbOnStartingBattle(self, pkmn, wildBattle?) if pkmn }
|
||||
begin
|
||||
pbStartBattleCore
|
||||
rescue BattleAbortedException
|
||||
|
||||
@@ -36,6 +36,12 @@ class Battle::Peer
|
||||
return (box < 0) ? "" : $PokemonStorage[box].name
|
||||
end
|
||||
|
||||
def pbOnStartingBattle(battle, pkmn, wild = false)
|
||||
f = MultipleForms.call("getFormOnStartingBattle", pkmn, wild)
|
||||
pkmn.form = f if f
|
||||
MultipleForms.call("changePokemonOnStartingBattle", pkmn, battle)
|
||||
end
|
||||
|
||||
def pbOnEnteringBattle(battle, battler, pkmn, wild = false)
|
||||
f = MultipleForms.call("getFormOnEnteringBattle", pkmn, wild)
|
||||
pkmn.form = f if f
|
||||
|
||||
Reference in New Issue
Block a user