I blatantly misplayed with both Tyranitar and Tyranitar (I guess you could blame my mind on being on something else), when I should have played conservatively with them. They were my main chances of winning the battle, so once they were low on health, I saw no reason to continue the battle.