Encounter System

Added an encounter system. Seems to work well.