Add support for predicate/function style checks in quest code.

Working nicely in Shattered City so far, which is very satisfying!