pbTrainerBattle itself has 7 arguments: The sixth one sets whether the player can continue after losing the battle. If TRUE, the player's party is fully healed upon losing the battle. You should also modify the Conditional Branch to include the "Set handling when conditions do not apply" option (i.e. an "else" part of that Branch), and insert something in there that says the player has lost the battle (you must also set a Self Switch to ON here, like if the battle was won, to prevent the trainer instantly re-challenging the player)