diff --git a/forest/README b/forest/README index 2990311..66417aa 100644 --- a/forest/README +++ b/forest/README @@ -72,6 +72,11 @@ eventually die. All progress is lost when a character dies, and a new game is generated for the next play. Press ESCAPE to restart after dying. +You have a long distance to travel, and a limited amount of food and +ammunition. Don't fight everything you see if you need to conserve +arrows. Use your map (by default, inventory slot 1) to orient yourself +toward the path to the Monastery. + Your measure of health is the red HIT POINTS bar at the top of the screen; when this reaches zero, you die. Use healing herbs, scattered around the forest and scavenged from victims of the undead, to restore diff --git a/forest/chimes-2.wav b/forest/chimes-2.wav new file mode 100644 index 0000000..c47861b Binary files /dev/null and b/forest/chimes-2.wav differ diff --git a/forest/chimes-3.wav b/forest/chimes-3.wav new file mode 100644 index 0000000..967bfa7 Binary files /dev/null and b/forest/chimes-3.wav differ diff --git a/forest/enemy.lisp b/forest/enemy.lisp index f52fb98..15e1503 100644 --- a/forest/enemy.lisp +++ b/forest/enemy.lisp @@ -179,6 +179,19 @@ (weight :initform 3000) (equip-for :initform '(:left-hand :right-hand))) +(defcell sparkles + (tile :initform "sparkles-1") + (categories :initform '(:actor)) + (clock :initform 8)) + +(define-method run sparkles () + (decf ) + (if (plusp ) + (progn [move self (random-direction)] + (setf (car (one-of '("sparkles-1" "sparkles-2")))) + [play-sample self (car (one-of '("chimes-2" "chimes-3")))]) + [die self])) + (define-prototype lich (:parent xe2:=cell=) (name :initform "Lich") (strength :initform (make-stat :base 29 :min 0 :max 40)) @@ -206,6 +219,27 @@ (let ((blade (clone =lichblade=))) [equip self [add-item self blade]])) +(define-method teleport lich () + (dotimes (i 10) + [drop self (clone =sparkles=)]) + (let ((row [player-row *world*]) + (column [player-column *world*])) + (let ((coords + (block searching + (dolist (dir '(:north :south :east :west)) + (multiple-value-bind (r c) (step-in-direction row column dir) + (unless (and [obstacle-at-p *world* r c] + (< [distance-to-player self] 8)) + [say self "The lich teleports right in front of you!"] + (return-from searching (list r c)))))))) + (when coords + (destructuring-bind (r c) coords + [delete-from-world self] + [drop-cell *world* self r c] + (dotimes (i 10) + [drop self (clone =sparkles=)])))))) + + (define-method attack lich (target) [damage [get-player *world*] 10] [expend-action-points self 40] @@ -227,7 +261,7 @@ (if [obstacle-in-direction-p world row column direction] (let ((target [target-in-direction-p world row column direction])) (if (and target (not [in-category target :enemy])) - [>>attack self direction] + (percent-of-time 10 [teleport self]) (progn (setf (random-direction)) [>>move self direction]))) (progn (when (< 7 (random 10)) diff --git a/forest/forest.lisp b/forest/forest.lisp index b5dc753..35c7e74 100644 --- a/forest/forest.lisp +++ b/forest/forest.lisp @@ -96,7 +96,7 @@ (defcell tree (tile :initform (car (one-of '("tree-2" "tree-2" "tree-2" "tree-3")))) (description :initform "These trees are still green. Perhaps the land is coming back?") - (categories :initform '(:obstacle :opaque :nosnow :exclusive))) + (categories :initform '(:obstacle :opaque :nosnow :exclusive :target))) ;;; The snow diff --git a/forest/forest.org b/forest/forest.org index eed09f2..68653dd 100644 --- a/forest/forest.org +++ b/forest/forest.org @@ -1,29 +1,32 @@ -** TODO [#A] don't spawn player on tree +** TODO THE BLACK TABLETS INSCRIBED WITH PROPHECY ** TODO [#A] FIX numlock being on breaks shift keybinding -** TODO [#A] treasure on enemies (gold) -** TODO [#C] joypad support -** TODO [#A] sheet music in-game +** TODO [#A] don't spawn player on tree ** TODO [#A] fix bubbles to stay onscreen, Lothaine etc ** TODO [#A] forest exits should be able to be in any column ** TODO [#A] lich incantation distance attackk? ** TODO [#A] move lich a little more quickly? +** TODO [#A] sheet music in-game +** TODO [#A] treasure on enemies (gold) ** TODO [#A] you hear rushing water to the east, fix not being able to find exits. ** TODO [#B] alpha transparency ** TODO [#B] don't have enemies attack when you dead -** TODO [#C] add emote code to XE2 and cells ** TODO [#B] find in-game notes with same color scheme text as scroll ** TODO [#B] ghouls that pop out of the ground ** TODO [#B] magic missile (sparkly trails.) ** 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 +** TODO [#C] cremating the mountain body ** TODO [#C] enemies search for dark spots ** TODO [#C] fix 100% cpu usage ** TODO [#C] fix in-game map scrolling off bottom of viewport ** TODO [#C] fix scrolling ** TODO [#C] indicate edge of map with chevrons. piece together maps. +** TODO [#C] joypad support ** TODO [#C] longer level approach to monastery, talk to a few npcs, follow a road and cross fences ** TODO [#C] magic barrier shield (flickering sprites) ** TODO [#C] overworld map? (FUTURE) diff --git a/forest/forest.pak b/forest/forest.pak index 0356acb..cd27299 100644 --- a/forest/forest.pak +++ b/forest/forest.pak @@ -34,6 +34,12 @@ (:name "tree-4" :type :image :file "tree-4.png") (:name "tree-5" :type :image :file "tree-5.png") + (:name "rose" :type :image :file "rose.png") + (:name "mountain-body" :type :image :file "mountain-body.png") + + (:name "sparkles-1" :type :image :file "sparkles-1.png") + (:name "sparkles-2" :type :image :file "sparkles-2.png") + (:name "snow-1" :type :image :file "snow-1.png") (:name "snow-2" :type :image :file "snow-2.png") (:name "snow-3" :type :image :file "snow-3.png") @@ -56,6 +62,8 @@ (:name "chimes" :type :sample :file "chimes.wav" :properties (:volume 20)) (:name "path" :type :sample :file "path.wav" :properties (:volume 20)) (:name "flutism" :type :sample :file "flutism.wav" :properties (:volume 13)) + (:name "chimes-2" :type :sample :file "chimes-2.wav" :properties (:volume 13)) + (:name "chimes-3" :type :sample :file "chimes-3.wav" :properties (:volume 13)) (:name "bark" :type :sample :file "bark.wav" :properties (:volume 30)) (:name "yelp" :type :sample :file "yelp.wav" :properties (:volume 30)) diff --git a/forest/monastery.lisp b/forest/monastery.lisp index 8a62f4d..0237edb 100644 --- a/forest/monastery.lisp +++ b/forest/monastery.lisp @@ -90,22 +90,27 @@ (defcell hill-1 (description :initform "This gentle slope heads down toward the Monastery.") + (name :initform "Hillside") (tile :initform "hill-1")) (defcell hill-2 (description :initform "This gentle slope heads down toward the Monastery.") + (name :initform "Hillside") (tile :initform "hill-2")) (defcell hill-3 (description :initform "This gentle slope heads down toward the Monastery.") + (name :initform "Hillside") (tile :initform "hill-3")) (defcell flowers-1 - (description :initform "Gorgeous wildflowers.") + (description :initform "Gorgeous wildflowers like you never saw in Nothbess town.") + (name :initform "Wildflowers") (tile :initform "flowers-1")) (define-prototype flowers-2 (:parent =flowers-1=) - (description :initform "Wildflowers of every description.") + (description :initform "Wildflowers of every description. This land is precious.") + (name :initform "Wildflowers") (tile :initform "flowers-2") (categories :initform '(:actor))) diff --git a/forest/mountain-body.png b/forest/mountain-body.png new file mode 100644 index 0000000..2e6ff9b Binary files /dev/null and b/forest/mountain-body.png differ diff --git a/forest/mountain.lisp b/forest/mountain.lisp index fda2de2..fbe7028 100644 --- a/forest/mountain.lisp +++ b/forest/mountain.lisp @@ -5,6 +5,29 @@ (description :initform "The walls of the passageway are slick with ice.") (categories :initform '(:obstacle :opaque))) +(defcell rose + (tile :initform "rose") + (description :initform +"This rose appears fresh despite the cold. +Perhaps it was laid beside the body?") + (categories :initform '(:story :item))) + +(define-method step rose (stepper) + (when [is-player stepper] + (if [take stepper :direction :here :category :item] + (progn [say self "You take the rose."] + [play-sample self "chimes"]) + [say self "Your satchel is full."]))) + +(defcell mountain-body + (tile :initform "mountain-body") + (name :initform "Frozen body") + (description :initform +"This is the dead body of a Sanctuary Order monk. +We'll have to send out a party later to recover the body and +prepare it for cremation.")) + + ;;; Mountain passage world (defparameter *passage-width* 49) @@ -24,7 +47,8 @@ (define-method drop-mountains passage () (let* ((offset 10) - (right (- 17 ))) + (right (- 17 )) + (rose-row (+ 30 (random 20)))) (dotimes (i ) (setf offset (min right (max 0 (incf offset (if (= 0 (random 2)) 1 -1))))) @@ -32,10 +56,14 @@ (prog1 nil [drop-cell *world* (clone =mountain=) r c]))) (trace-row #'drop-mountain i 0 (+ offset (random 4))) + (when (= i rose-row) + (let ((rose-col (+ offset 10 (random 5)))) + [drop-cell self (clone =mountain-body=) i rose-col] + [drop-cell self (clone =rose=) i (+ 1 rose-col)])) (percent-of-time 10 [drop-cell self (clone =wolf=) i (+ offset (random 4))]) (trace-row #'drop-mountain i (+ offset (random 4) 20) ))) ;; drop monastery gateway - (let ((column (+ 1 offset (random 10))) + (let ((column (+ 12 offset (random 10))) (row (- 2))) [replace-cells-at self row column (clone =monastery-gateway=)]))) diff --git a/forest/path-old1.wav b/forest/path-old1.wav new file mode 100644 index 0000000..c8052ba Binary files /dev/null and b/forest/path-old1.wav differ diff --git a/forest/rose.png b/forest/rose.png new file mode 100644 index 0000000..9782207 Binary files /dev/null and b/forest/rose.png differ diff --git a/forest/startup.lisp b/forest/startup.lisp index 62a1db9..f421a3f 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* 1) +(defparameter *start-level* 3) (defun init-forest () (xe2:message "Initializing Forest...")