Implemented autosaving.
Also rewrote the game loop and fixed some bugs.
commit f1c01b051400574f7b6b7bff4692ade9eb897ad8
2 parents 36a4562 + d6d5930
@Daniel Vedder Daniel Vedder authored on 20 Oct 2017
Showing 13 changed files
View
28
ATL/Pooh/pooh-extensions.lisp
 
(let ((honey-found NIL))
(defun climb-rock (player &optional arg)
"Climb the rock at the rapids"
(if (> 25 (random 100))
(if (> 33 (random 100))
(progn (format t "~&You slip!")
(read-line)
(sleep 3)
(goto player "Stream"))
(progn (format t "~&You clamber up on the rock.")
(unless honey-found
(unless honey-found ;;FIXME fails when a saved game is loaded again
(format t "~&You find a pot of honey!")
(set-object-attribute (get-game-object 'place (player-place player))
'item "Hunny")
(setf honey-found T))))))
 
(defun stream-current (player &optional arg)
"The stream sweeps the player on into the Floody place."
(when (> 75 (random 100))
(describe-place "Stream")
(format t "~&~%You struggle to get back to the banks.") (sleep 5)
(format t "~&You fight against the rushing water, but it's stronger than you.") (sleep 2)
(format t "~&The stream pulls you along.") (sleep 3)
(format t "~&It finally deposits you in a floody place.") (sleep 2)
(goto player "Floody place") (clear-screen)))
 
(defun play (player &optional arg)
"Let the player play a game"
(let ((place (player-place player)))
(40 (format t "~&You build four towers, one at each corner."))
(60 (format t "~&You pile up sand for a big strong keep in the center."))
(80 (format t "~&You decorate the castle, adding pretty little details."))
(100 (format t "~&You stand back and admire your handiwork. What a fine castle!")
(set-object-attribute (get-game-object 'place "Sandy pit") 'item "Sandcastle")))
(unless (= sandcastle 100) (incf sandcastle 20))))
(set-object-attribute (get-game-object 'place "Sandy pit") 'item "Sandcastle"))
(110 (format t "~&You've already built a sandcastle here! And a fine one it is too...")))
(unless (= sandcastle 110) (incf sandcastle 20))))
 
(let ((score 0))
(defun poohsticks (player)
"Play Poohsticks"
"Wear the mystical golden ring..."
(if (member 'ring (extract-elements arg))
(progn
(format t "~&You slip the golden ring on your finger.") (sleep 1)
(format t "~&You feel something ought to happen.~&Nothing does."))
(format t "~&You feel something ought to happen.") (sleep 2)
(format t "~&Nothing does."))
(format t "~&What do you want to wear?")))
 
(defun ring-of-destiny (player)
"When the ring is picked up"
 
(defun annoying-ring (player)
"The ring cannot be dropped!"
(format t "~&You feel a stab of pain in your heart as you watch the ring drop.")
(sleep 1)
(format t "~&On second thoughts, you pick it up again.~%~%")
(sleep 1)
(take player "Golden ring"))
 
 
;; When somebody plays on my server (Helios), he can leave me a message...
View
4
ATL/Pooh/pooh.atl
constitution 4
define-player "Christopher Robin"
description "Christopher Robin is my game dev character."
place "Piglet's porch" ;Development
;place "Christopher Robin's house"
place "Rapids" ;Development
View
ATL/Pooh/woods.atl
View
doc/COMMANDS
View
doc/PLAYING
View
doc/TODO
View
doc/bugreport.txt
View
lisp/atlantis.lisp
View
lisp/player.lisp
View
lisp/ui.lisp
View
lisp/util.lisp
View
lisp/world.lisp
View
saves/pooh1.world 100644 → 0