Puzzle or Adventure condition monitoring / handling?

Feel free to post an example of your current implementation.