The round ends when all the top cards are gone and when there are no new cards in the deck. It's a bit of a puzzle to play it in such a way that you still have time to heal after an attack, for example by keeping a treasure card at the top and deal with the enemy first, then heal and collect your treasure card last... if possible.