Kaynağa Gözat

WIP, just commiting to switch pcs

esko997 1 yıl önce
ebeveyn
işleme
fc6803e4d2
2 değiştirilmiş dosya ile 22 ekleme ve 11 silme
  1. 18 9
      combat.lisp
  2. 4 2
      structs.lisp

+ 18 - 9
combat.lisp

@@ -52,16 +52,25 @@ Actions:
 			    (top-level-game-menu))))
 		    (enemy-turn sector)))))))))
 
-(defun enemy-turn (sector)
-  "Perform AI actions based on AI-type associated with enemy ship"
-  (case (ai-type (first (enemy-ships sector)))
-    (aggressive (progn
-		  ;; This AI will just stupidly attack until it's out of ammo
-		  ;; If it runs out of ammo, it will try and flee
+;; IN PROGRESS
+;; (defun enemy-turn (sector)
+;;   "Perform AI actions based on AI-type associated with enemy ship"
+;;   (flet ((enemy-attack (player-ship-obj enemy-obj)
+;; 	   ;; For now, just use the first weapon
+;; 	   (let ((weapon-obj ((first (weapons enemy-obj))))
+;; 		 (ammo
+	     
+	   
+;;   (case (ai-type (first (enemy-ships sector)))
+;;     (aggressive (progn
+;; 		  ;; This AI will just stupidly attack until it's out of ammo
+;; 		  ;; If it runs out of ammo, it will try and flee
 		  
-		  ))
-    (fearful ())
-    (unpredicatable ())))
+;; 		  ))
+;;     (fearful () ;; This AI will basically just try to escape, unless it fails
+;;                 ;; twice in a row, in which it will try to attack
+;;      )
+;;     (unpredicatable ())))
 		
 
 ;; Select weapon

+ 4 - 2
structs.lisp

@@ -51,10 +51,12 @@
     :initform 1000)
    (crew
     :initarg :crew
-    :accessor crew)
+    :accessor crew
+    :initform NIL)
    (inventory
     :initarg :inventory
-    :accessor inventory)))
+    :accessor inventory
+    :initform (make-instance 'player-inventory))))
 
 (defclass ai-ship (ship)
   ((name