Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[bin/crypt] descriptions at start and when entering rooms

Also fill in all the room descriptions from last year.
  • Loading branch information...
commit 1c7f6e2f38bba5261ecba4d3e6f9be50b1106088 1 parent 8896863
Carl Mäsak authored July 06, 2012
13  bin/crypt
@@ -429,8 +429,12 @@ multi MAIN() {
429 429
         up down in out
430 430
     >;
431 431
 
432  
-    say "Clearing";
433  
-    say "";
  432
+    given 'clearing' {
  433
+        say .ucfirst;
  434
+        say "";
  435
+        say %descriptions{$_};
  436
+        say "";
  437
+    }
434 438
 
435 439
     loop {
436 440
         my $command = prompt('> ');
@@ -465,7 +469,10 @@ multi MAIN() {
465 469
                 }
466 470
                 my @events = $game."$verb"(|@args);
467 471
                 for @events {
468  
-                    when Adventure::PlayerWalked { say ucfirst .to }
  472
+                    when Adventure::PlayerWalked { say ucfirst .to; say "" }
  473
+                    when Adventure::PlayerLooked {
  474
+                        say %descriptions{.description_of};
  475
+                    }
469 476
                 }
470 477
                 CATCH {
471 478
                     when X::Adventure { say .message, '.' }
24  game-data/descriptions
... ...
@@ -1,3 +1,27 @@
1 1
 == clearing
2 2
 The forest road stops here, and the gaps between the trees widen into a
3 3
 patch of un-forest. The sky above is clear apart from a few harmless clouds.
  4
+
  5
+== hill
  6
+A flat, broad hill interrupts the dense-ish forest here. Only grass and
  7
+small bushes grow on the hill.
  8
+
  9
+== chamber
  10
+This is a cramped space just inside the hidden opening in the hill. The
  11
+sun gets in enough to illuminate the place. There are some scribblings on
  12
+the wall.
  13
+
  14
+== hall
  15
+It's hard to believe that this kind of room can fit under a hill. It's tall,
  16
+long, and quite spacious. Hieroglyphs adorn all four of the walls. The
  17
+floor slants a bit.
  18
+
  19
+== cave
  20
+This is a perfectly cylindrical chamber. An oversized fire-pit takes up most
  21
+of the floor space in the middle of the room. Ancient runes run along the
  22
+circumference of the wall. It's hot and stuffy.
  23
+
  24
+== crypt
  25
+The air is stale and smells a bit metallic. Three impenetrable sarcophagi
  26
+sit next to each other on the floor. On the walls are numerous finely
  27
+inscribed ideograms.

0 notes on commit 1c7f6e2

Please sign in to comment.
Something went wrong with that request. Please try again.