The script $Trainer.party.delete_at(index), where "index" is the spot in the player's party, will let you delete even the player's last able pok?mon.
You could set up the script as:
Code:
for i in 0...$Trainer.party.length
$Trainer.party.delete_at(i)
That should do it.