/[the-feebs-war]/system.lisp
ViewVC logotype

Diff of /system.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 14 by gmilare, Sat Feb 16 19:59:50 2008 UTC revision 17 by gmilare, Sat Mar 15 18:56:01 2008 UTC
# Line 133  in the maze, except for fireballs, which Line 133  in the maze, except for fireballs, which
133    
134    (:method ((fireball fireball) x-pos y-pos)    (:method ((fireball fireball) x-pos y-pos)
135      (push fireball *fireballs-flying*)      (push fireball *fireballs-flying*)
136      (setf (object-x-position object) x-pos      (setf (object-x-position fireball) x-pos
137            (object-y-position object) y-pos))) ; don't place it yet, only after first move            (object-y-position fireball) y-pos))) ; don't place it yet, only after first move
138    
139  ;;; Reincarnating  ;;; Reincarnating
140    
# Line 147  in the maze, except for fireballs, which Line 147  in the maze, except for fireballs, which
147  (defgeneric destroy-object (object cause)  (defgeneric destroy-object (object cause)
148    (:documentation "Called when CAUSE destroys OBJECT.    (:documentation "Called when CAUSE destroys OBJECT.
149  CAUSE could be :starve or a fireball (for feebs)  CAUSE could be :starve or a fireball (for feebs)
150  or :dissipate (for fireballs)."  or :dissipate (for fireballs).")
151    (:method (object cause)    (:method (object cause)
152      (delete-object object (object-x-position object)      (delete-object object (object-x-position object)
153                     (object-y-position object)))                     (object-y-position object)))
# Line 191  or :dissipate (for fireballs)." Line 191  or :dissipate (for fireballs)."
191  returned from MAKE-MOVE-CHOICE for the same object.")  returned from MAKE-MOVE-CHOICE for the same object.")
192    
193    (:method (object move)    (:method (object move)
194      nil)      (warn "Unknown move ~a for object ~a." move object))
195    
196    (:method (object (move (eql :turn-right)))    (:method (object (move (eql :turn-right)))
197      (setf (object-direction object)      (setf (object-direction object)
# Line 209  returned from MAKE-MOVE-CHOICE for the s Line 209  returned from MAKE-MOVE-CHOICE for the s
209      (multiple-value-bind (stuff new-x new-y)      (multiple-value-bind (stuff new-x new-y)
210          (get-forward-pos object)          (get-forward-pos object)
211        (unless (wallp stuff)        (unless (wallp stuff)
212          (change-object-pos object new-x new-y))))          (change-object-pos object new-x new-y)
213            t)))
214    
215    (:method ((fireball fireball) (move (eql :dissipate)))    (:method ((fireball fireball) (move (eql :dissipate)))
216      (destroy-object fireball :dissipate))      (destroy-object fireball :dissipate))

Legend:
Removed from v.14  
changed lines
  Added in v.17

  ViewVC Help
Powered by ViewVC 1.1.5