anchor.diff:    (when (and (parent bullet) (typep (event-hit event) 'thopter))
       (detach (parent bullet) bullet)))
   
  +(defun nearest-object (component type)
  +  (with-slots (offset parent) component
  +    (iter (for x in-vector (children parent))
  +          (when (typep x type)
  +            (finding x minimizing (dist offset (offset x)))))))
  +
   (defmethod update ((enemy enemy) event)
  -  (with-slots (parent (xy offset) (v veloc) accel) enemy
  +  (with-slots (parent (xy offset) (v veloc) (s size) accel health) enemy
       (labels
           ((circular (r)
              (+ ;; circular motion
  
positive.code:             (* (- (proj v r)) 0.1d0)
              ;; correction for tangential veloc
              (* (unit (norm v r)) (- 2 (abs (norm v r))) 0.1d0)))
           (away (xy2 v2)
             (/ (rot v2 (* pi 0.25d0 (signum (cross v2 (- xy xy2))))) 30d0))
           (toward (xy2 v2)
             (unit (- xy2 xy))))
        (let ((nearest (iter (for x in-vector (children parent))
                             (when (or (typep x 'bullet) (typep x 'thopter))
                               (finding x minimizing (dist xy (offset x))))))
              (r (- xy (/ (size (game-root *game*)) 2))))
          (setf accel
                (if nearest
                    (with-slots ((xy2 offset) (v2 veloc)) nearest
                      (cond ((and (typep nearest 'bullet) (< (dist xy xy2) 120))
                             (away xy2 v2))
                            ((and (typep nearest 'thopter) (< (dist xy xy2) 180))
                             (toward xy2 v2))
                            (t (circular r))))
                    (circular r)))))))
  
  (defmethod alarm ((enemy enemy) event)
    (with-slots (parent offset size veloc timer) enemy
  
negative.code:                          'thopter :host :server :parent root
                           :offset (complex (* (x size) 1/4) (* (y size) 3/4))
                           :image (make-instance 'anim :name :thopter)
                           :health 4 :firepower 1))
                (thopter2 (make-instance
                           'thopter :host :client :parent root
                           :offset (complex (* (x size) 3/4) (* (y size) 3/4))
                           :image (make-instance 'anim :name :thopter)
                           :health 4 :firepower 1)))
            (subscribe (game-keys game) thopter1)
            (subscribe (game-keys game) thopter2))))
      (spawn-wave (+ 2 (level (game-wave game))))))
  