From 0dc666331fb99fa9349d6d47c7de6a60357e7da4 Mon Sep 17 00:00:00 2001 From: David O'Toole Date: Thu, 17 Dec 2009 07:48:14 -0500 Subject: [PATCH] teleporting lich --- forest/enemy.lisp | 17 +++++++++++------ forest/forest.org | 1 - forest/forest.org_archive | 17 +++++++++++++++++ forest/sparkles-1.png | Bin 0 -> 200 bytes forest/sparkles-2.png | Bin 0 -> 208 bytes forest/startup.lisp | 2 +- 6 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 forest/sparkles-1.png create mode 100644 forest/sparkles-2.png 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 0000000000000000000000000000000000000000..ac78662804a24be241ec01ad743decfdfa416fd2 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^M2* zG#MC-ZJyi$if|TqL>4nJa0`PlBg3pY5H=O_M1F{+}2h~(T}eKg(OQ{BTAg} zb8}PkN*J7rQWHy3QxwWGOEMJPJ$(bh8~Mb6ij+NF978NlCnrd-I4nJa0`PlBg3pY5H=O_M1F{JPe8x4_|Hr3Q3l@MwB?` z=jNv7l`uFLr6!i7rYMwWmSiZnd-?{1H}Z)C6={3AIEGl9PEL@Bd2s&!f05ZA=Rdqu vKg(*8l~};x)y}*DkJ4wkzZUT63}I*3c|ctAOv*wXpf(0iS3j3^P6