REPLACE_EVALUATE defines more variables.

Also expand the documentation.
Fix variable-evaluation errors in ADD_ITEM_EFFECT