def pbAddPokemonKickParty(pokemon,level=nil,seeform=true)
return if !pokemon || !$Trainer
if $Trainer.party.length>=6
pbDisplayPaused(_INTL("Your party is full, and something's preventing {1} from going to the PC.",pokemon.name))
pbDisplayPaused(_INTL("Choose a party member to send back."))
loop do
[email protected](1,3)
if $game_variables[1]>=0
commands=[]
cmdShift=-1
cmdSummary=-1
pkmnindex=$game_variables[1]
commands[cmdShift=commands.length]=_INTL("Send to PC")
commands[cmdSummary=commands.length]=_INTL("Summary")
commands[commands.length]=_INTL("Cancel")
command=pbShowCommands(_INTL("Do what with {1}?",$Trainer.party[pkmnindex].name),commands,false)
if cmdShift>=0 && command==cmdShift
$PokemonStorage.pbStoreCaught($Trainer.party[pkmnindex])
pbRemovePokemonAt(pkmnindex)
pbAddPokemon(pokemon,level,seeform)
return
elsif cmdSummary>=0 && command==cmdSummary
scene.pbSummary(activecmd)
end
end
end
else
pbAddPokemon(pokemon,level,seeform)
end
end