Improve and enhance enemy behavior on maps

Issue #22 new
Tyler Olsen
created an issue

Currently there are only two ways to define enemy behavior or movement on a map. The first is to do custom scripting, just like other map sprites. The second is to tie an enemy to a map zone and allow it to "roam" in it, where it will move around continuously and if the player sprite comes within a certain range, the enemy will chase after them.

The first part of this task should be to make the roaming behavior a little more natural. Queue up different actions for the enemy in this state so it will do something like: move for 3 seconds, stop for 2 seconds, move for 1 second, stop for 3 seconds, etc. The direction of the sprite should change throughout the move/stop as well (including changing direction in the middle of movement).

The second part should be defining more types of behaviors for enemy sprites. For example, a "patrol" behavior where an enemy follows a predefined movement pattern and only deviates from it if it spots the player. Or a "guard" behavior where the enemy tries to prevent the player from going through a passage, taking a treasure, etc. There may be other types of common behaviors we want here as well.