Much improved AI algorithm.

The algorithm now has two modes of operation: wander and hostile. I made
the decision to use these two modes instead of my original idea of three
(wander, ally, and hostile) because I realized that the factions would
provide enough information for an NPC to decide whether it was friendly or
not.

Accordingly, NPCs will not attack once set to "wander" mode. If left alone
while in hostile mode, they will revert back to wandering mode. While in
hostile mode, they will move frequently and shoot towards the nearest
enemy.