|
@@ -599,18 +599,21 @@
|
599
|
599
|
'enemy-map-value (game-map-terrain map)))
|
600
|
600
|
|
601
|
601
|
(defun write-status-to-terminal (player prev-key map)
|
602
|
|
- (declare (ignore prev-key))
|
603
|
602
|
(multiple-value-bind (width height) (get-window-size)
|
604
|
603
|
(declare (ignore width))
|
605
|
604
|
(multiple-value-bind (x y) (calc-coord (get-location player) map)
|
606
|
|
- (terminal-color (color-from-name "white"))
|
607
|
|
- (terminal-print 0 (1- height) (format nil "Health: ~d Mana: ~d Location: (~d, ~d)"
|
608
|
|
- (slot-value player 'health)
|
609
|
|
- (slot-value player 'mana)
|
610
|
|
- x y)))))
|
611
|
|
-
|
612
|
|
-(defun ally-p (mobile)
|
613
|
|
- (typep mobile 'minion))
|
|
605
|
+ (let ((attack-string (cond
|
|
606
|
+ ((= prev-key bearlibterminal-ffi:+tk-r+) "Choose ranged attack direction or press enter.")
|
|
607
|
+ ((= prev-key bearlibterminal-ffi:+tk-m+) "Choose melee attack direction or press enter.")
|
|
608
|
+ (:otherwise ""))))
|
|
609
|
+ (terminal-color (color-from-name "white"))
|
|
610
|
+ (terminal-print 0 (1- height) (format nil "Health: ~d Mana: ~d Location: (~d, ~d) ~A"
|
|
611
|
+ (slot-value player 'health)
|
|
612
|
+ (slot-value player 'mana)
|
|
613
|
+ x y attack-string)))))
|
|
614
|
+
|
|
615
|
+ (defun ally-p (mobile)
|
|
616
|
+ (typep mobile 'minion)))
|
614
|
617
|
|
615
|
618
|
(defun bash (basher bashee)
|
616
|
619
|
(decf (slot-value bashee 'health) (slot-value basher 'melee-attack-damage)))
|