put _DEBUG back in Makefile.am, more AI fixes

actually consider distance from action target to aggrotarget, at least a little
bit, duh