Quite simple, really. Press attack when it's your turn until you win.
Based on RPGs in general (but especially Undertale), and D&D.