Defeat Condition and waiting now works

Next I want to rewrite how the menu system works and change function
outputs and inputs to be uniform