retooling hackthena
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sat, 28 Jan 2017 20:36:53 +0000 (14:36 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sat, 28 Jan 2017 20:36:53 +0000 (14:36 -0600)
worlds/bricabrac.scm

index e690e59a71b62200fa1acea9150a1a435b5b9f77..548db77b0540cf9f1866dda90bbbf6ee840a076e 100644 (file)
@@ -19,7 +19,6 @@
 ;;; Hotel Bricabrac
 
 (use-modules (mudsync)
-             (mudsync parser)
              (8sync actors)
              (8sync agenda)
              (oop goops)
@@ -374,6 +373,31 @@ this general shape in the 1990s."
 ;;; Grand hallway
 ;;; -------------
 
+(define-actor <hackthena> (<gameobj>)
+  ((cmd-take-from hackthena-cmd-take-from)))
+
+(define* (hackthena-cmd-take-from gameobj message
+                                  #:key direct-obj indir-obj preposition
+                                  (player (message-from message)))
+  (define keyboard-goes-by
+    (mbody-val (<-wait (dyn-ref gameobj 'grand-hallway:keyboard) 'goes-by)))
+  (define disc-platter-goes-by
+    (mbody-val (<-wait (dyn-ref gameobj 'grand-hallway:disc-platter) 'goes-by)))
+
+  (cond ((member direct-obj keyboard-goes-by)
+         (<- player 'tell
+             #:text `("Are you kidding?  Do you know how hard it is to find "
+                      "a Knight Keyboard?  There's no way she's going "
+                      "to give that up.")))
+        ((member direct-obj disc-platter-goes-by)
+         'TODO)
+        (else
+         (<- player 'tell
+             #:text
+             `("Hackthena doesn't appear to be holding " ,direct-obj
+               ".")))))
+
+
 (define grand-hallway
   (lol
    ('grand-hallway
@@ -398,7 +422,7 @@ room\", while a door to the west is labeled \"playroom\"."))
             #:name "east"
             #:to 'smoking-parlor)))
    ('grand-hallway:hackthena-statue
-    <gameobj> 'grand-hallway
+    <hackthena> 'grand-hallway
     #:name "a statue"
     #:desc '((p "The base of the statue says \"Hackthena, guardian of the hacker
 spirit\".  You've heard of Hackthena... not a goddess, but spiritual protector of
@@ -409,8 +433,23 @@ head, wears a pair of horn-rimmed glasses, and appears posed as if for battle.
 But instead of a weapon, she seems to hold some sort of keyboard.  And her
 shield... well it's round like a shield, but something seems off about it.
 You'd better take a closer look to be sure."))
-    #:goes-by '("hackthena statue" "hackthena" "statue"))
-   ))
+    #:goes-by '("hackthena statue" "hackthena" "statue" "statue of hackthena"))
+   ('grand-hallway:keyboard
+    <gameobj> 'grand-hallway
+    #:name "a Knight Keyboard"
+    #:desc "Whoa, this isn't just any old keyboard, this is a Knight Keyboard!
+Any space cadet can see that with that kind of layout a hack-and-slayer could
+thrash out some serious key-chords like there's no tomorrow.  You guess
+Hackthena must be an emacs user."
+    #:invisible? #t
+    #:goes-by '("knight keyboard" "keyboard"))
+   ('grand-hallway:disc-platter
+    <gameobj> 'grand-hallway
+    #:name "a hard disc platter"
+    #:desc "This isn't a shield after all, it seems to be a hard disc
+platter!  It looks kind of loose..."
+    #:invisible? #t
+    #:goes-by '("hard disc platter" "disc platter" "disc" "shield" "platter"))))
 
 \f
 ;;; Playroom
@@ -448,7 +487,7 @@ if this room is intended for children or child-like adults."
                `((p "A brightly painted wooden chest.  The word \"TOYS\" is "
                     "engraved on it.")
                  (p "Inside you see:"
-                    ,(if (eq? (pk 'contents contents) '())
+                    ,(if (eq? contents '())
                          " nothing!  It's empty!"
                          `(ul ,(map (lambda (occupant)
                                       `(li ,(mbody-val