if !@opponent
if @party2.length==1
if @doublebattle
raise _INTL("Only two wild Pokémon are allowed in double battles")
end
wildpoke=@party2[0]
@battlers[1].pbInitialize(wildpoke,0,false)
@peer.pbOnEnteringBattle(self,wildpoke)
pbSetSeen(wildpoke)
@scene.pbStartBattle(self)
if $game_switches[#]
pbDisplayPaused(_INTL("Totem (1) appeared! Some of it's stats were boosted!"))
else
pbDisplayPaused(_INTL("Wild {1} appeared!",wildpoke.name))
end
elsif @party2.length==2
if !@doublebattle
raise _INTL("Only one wild Pokémon is allowed in single battles")
end
@battlers[1].pbInitialize(@party2[0],0,false)
@battlers[3].pbInitialize(@party2[1],1,false)
@peer.pbOnEnteringBattle(self,@party2[0])
@peer.pbOnEnteringBattle(self,@party2[1])
pbSetSeen(@party2[0])
pbSetSeen(@party2[1])
@scene.pbStartBattle(self)
pbDisplayPaused(_INTL("Wild {1} and\r\n{2} appeared!",
@party2[0].name,@party2[1].name))
else
raise _INTL("Only one or two wild Pokémon are allowed")
end