Weapon systems

Added State Machine and sparse battle functionality.