-(defvar *player-health* nil)
-(defvar *player-agility* nil)
-(defvar *player-strength* nil)
-
-(defvar *monsters* nil)
-(defvar *monster-builders* nil)
-(defvar *monster-num* 12)
+(defvar orc-battle-player-health nil)
+(defvar orc-battle-player-agility nil)
+(defvar orc-battle-player-strength nil)
+
+(defvar orc-battle-monsters nil)
+(defvar orc-battle-monster-builders nil)
+(defvar orc-battle-monster-num 12)
 
 (defun orc-battle ()
   (interactive)

    (map 'list
         (lambda(m)
           (or (monster-dead m) (monster-attack m)))
         *monsters*)
    (game-loop)))

(defun init-player ()
  (setf *player-health* 30)
  (setf *player-agility* 30)
  (setf *player-strength* 30))

(defun player-dead ()
  (<= *player-health* 0))

(defun show-player ()
  (newline)
  (insert "You are a valiant knight with a health of ")
  (insert *player-health*)
  (insert ", an agility of ")
  (insert *player-agility*)
  (insert ", and a strength of ")
  (insert *player-strength*))

(defun player-attack ()
  (newline)
  (insert "Attack style: [s]tab [d]ouble swing [r]oundhouse:")
  (case (read)
    (s (monster-hit (pick-monster)
                    (+ 2 (randval (ash *player-strength* -1)))))
    (d (let ((x (randval (truncate (/ *player-strength* 6)))))
         (insert "Your double swing has a strength of ")
         (insert x)
         (newline)
         (monster-hit (pick-monster) x)
         (unless (monsters-dead)
           (monster-hit (pick-monster) x))))
    (otherwise (dotimes (x (1+ (randval (truncate (/ *player-strength* 3)))))
                 (unless (monsters-dead)
                   (monster-hit (random-monster) 1))))))

(defun random-monster ()
  (let ((m (aref *monsters* (random (length *monsters*)))))
    (if (monster-dead m)
        (random-monster)
        m)))

       (insert "An orc swings his club at you and knocks off ")
       (insert x)
       (insert " of your health points. ")
       (decf orc-battle-player-health x)))

(defclass hydra (monster) ())
(push 'make-hydra orc-battle-monster-builders)

(defmethod monster-show ((m hydra))
  (insert "A malicious hydra with ")
