diff --git a/forest/enemy.lisp b/forest/enemy.lisp index 15e1503..114b333 100644 --- a/forest/enemy.lisp +++ b/forest/enemy.lisp @@ -226,7 +226,10 @@ (column [player-column *world*])) (let ((coords (block searching - (dolist (dir '(:north :south :east :west)) + (dolist (dir (car (one-of '((:north :south :east :west) + (:west :north :east :south) + (:east :north :south :west) + (:soutn :west :north :east))))) (multiple-value-bind (r c) (step-in-direction row column dir) (unless (and [obstacle-at-p *world* r c] (< [distance-to-player self] 8)) @@ -238,7 +241,6 @@ [drop-cell *world* self r c] (dotimes (i 10) [drop self (clone =sparkles=)])))))) - (define-method attack lich (target) [damage [get-player *world*] 10] @@ -249,7 +251,7 @@ (define-method run lich () [expend-action-points self 6] (when (and (null ) - (< [distance-to-player self] 15)) + (< [distance-to-player self] 16)) (setf t) [say self "A scream of undead power chills you to the bone!"] [play-sample self "lichscream"]) @@ -264,9 +266,12 @@ (percent-of-time 10 [teleport self]) (progn (setf (random-direction)) [>>move self direction]))) - (progn (when (< 7 (random 10)) - (setf (random-direction))) - [>>move self direction])))))) + (progn + [move self direction] + (when (and + (< [distance-to-player self] 12)) + (percent-of-time 12 [teleport self])))))))) + (define-method die lich () [say self "The lich dies!"] diff --git a/forest/forest.org b/forest/forest.org index 68653dd..c056123 100644 --- a/forest/forest.org +++ b/forest/forest.org @@ -16,7 +16,6 @@ ** TODO [#B] more story stuff ** TODO [#B] oil flask bomb ** TODO [#B] rose found in the forest -** TODO [#B] teleporting lich next to player! ** TODO [#B] wolves are annoying ** TODO [#C] Command-Q should quit on mac ? ** TODO [#C] add emote code to XE2 and cells diff --git a/forest/forest.org_archive b/forest/forest.org_archive index 973806e..63b9a94 100644 --- a/forest/forest.org_archive +++ b/forest/forest.org_archive @@ -53,6 +53,23 @@ CLOSED: [2009-12-17 Thu 02:24] :ARCHIVE_CATEGORY: forest :ARCHIVE_TODO: TODO :END: +* DONE [#B] teleporting lich next to player! +CLOSED: [2009-12-17 Thu 07:27] +:PROPERTIES: +:ARCHIVE_TIME: 2009-12-17 Thu 07:27 +:ARCHIVE_FILE: ~/xe2/forest/forest.org +:ARCHIVE_CATEGORY: forest +:ARCHIVE_TODO: DONE +:END: +* DONE [#A] forest exits should be able to be in any column +:PROPERTIES: +:ARCHIVE_TIME: 2009-12-17 Thu 07:27 +:ARCHIVE_FILE: ~/xe2/forest/forest.org +:ARCHIVE_CATEGORY: forest +:ARCHIVE_TODO: TODO +:END: + + diff --git a/forest/sparkles-1.png b/forest/sparkles-1.png new file mode 100644 index 0000000..ac78662 Binary files /dev/null and b/forest/sparkles-1.png differ diff --git a/forest/sparkles-2.png b/forest/sparkles-2.png new file mode 100644 index 0000000..f86cbe5 Binary files /dev/null and b/forest/sparkles-2.png differ diff --git a/forest/startup.lisp b/forest/startup.lisp index f421a3f..62a1db9 100644 --- a/forest/startup.lisp +++ b/forest/startup.lisp @@ -320,7 +320,7 @@ (defparameter *room-window-width* 800) (defparameter *room-window-height* 600) -(defparameter *start-level* 3) +(defparameter *start-level* 1) (defun init-forest () (xe2:message "Initializing Forest...")