Scoring doesn't need global variables
[the-server-room.git] / the-server-room.inf
index c3a429b0ac0631627da8b0a3b87acdec263526ab..2af50d38fd1ac0480759f44ea4f06ec9cbb18975 100644 (file)
 Constant Story "The Server Room";
 Constant Headline "^An Interactive Fiction by Daniel Bartholomew.^";
 Release 1;
-Serial "190826";
+Serial "190908";
 Constant MAX_SCORE = 6;
 Include "parser";
 Include "verblib";
-Global openedbackpack = 1;
-Global openedtray = 1;
-Global takencd = 1;
 Global beeping = 1;
 !=========================================================================
 ! The Game Objects
 
 Object  break_room "Break Room"
   with  description
-            "Your standard break room. A fridge, and a long counter
-            take up one wall. East is the outside world and west is
-            the hallway to the server room.",
+            "This break room is a calm, quiet and peaceful for people
+            to unwind and eat. Well kept and organized, the area is
+            clean and inviting. A large television is mounted to one
+            of the walls, next to a refrigerator. Even though no
+            one's around the smell of a pleasant coffee blend still
+            hangs in the air. A cool-looking counter and white couch
+            take up another wall. The remaining walls have posters of
+            various sports teams of the previous four years. East is
+            the outside world and west is the hallway to the server
+            room.",
         w_to hallway,
         e_to
             "You take one look outside and think better of it. The
@@ -62,22 +66,32 @@ Object  break_room "Break Room"
   has   light;
 
 Object  fridge "refrigerator" break_room
-  with  description "Your standard refrigerator.",
+  with  description
+            "This refrigerator makes a statement with a sleek, modern
+            and minimal stainless steel design. Featuring large doors
+            it seems quite an impressive refrigerator that can hold a
+            lot.",
         name 'fridge' 'refrigerator',
   has   container openable scenery;
 
 Object  counter "long counter" break_room
   with  description
-            "A long counter. You can't quite determine the color,
-            it's somewhere between green and brown. On the counter is
-            a microwave.",
+            "It's a beautiful, stylish, and high-quality solid wood
+            counter that runs the length of the wall. You can't quite
+            determine the color of the sleek countertop, it's
+            somewhere between green and brown. The design on the
+            countertop consists of geometric patterns. It seems a
+            sturdy, durable, and solid counter.",
         name 'counter',
   has   static supporter scenery;
 
 Object  microwave "microwave" counter
-  with  description "Your standard microwave.",
+  with  description
+            "A combination of silver and black, this microwave looks
+            like a real workhorse. It's compact, quiet, and works
+            great.",
         name 'microwave' 'micro',
-  has   container openable scenery;
+  has   container openable;
 
 Object  table "table" break_room
   with  description "It's a table. Were you expecting something else?",
@@ -90,14 +104,19 @@ Object  table "table" break_room
   has   supporter;
 
 Object  backpack "backpack" table
-  with  description "Your backpack.",
+  with  description
+            "This backpack looks like a modern art piece that was
+            made using brown and light blue-green watercolors. A black
+            line was traced around to make the stitching lines.
+            Well-worn and quite suitable for travel, it looks like it
+            could carry a lot of belongings.",
         name 'pack' 'back' 'bag' 'backpack',
         article "your",
         before [;
           Open:
-            if (openedbackpack == 1) {
+            if (backpack hasnt visited) {
                 score = score + 2;
-                openedbackpack = 2;
+                give backpack visited;
             }
         ],
   has   clothing container openable;
@@ -110,10 +129,9 @@ Object  disc "Trisquel CD" backpack
         name 'disk' 'disc' 'Trisquel' 'cd',
         after [;
           Take:
-            if (takencd == 1) {
+            if (disc hasnt visited) {
                 score = score + 2;
-                takencd = 2;
-                print_ret "You pick up the Trisquel CD.^";
+                give disc visited;
             }
         ],
   has   ;
@@ -121,23 +139,29 @@ Object  disc "Trisquel CD" backpack
 Object  hallway "Hallway"
   with  description
             "Bereft of features, adornment or even adequate lighting,
-             this hallway is as plain as they come. Doors lead east
-             back to the break room, north to the server room, or
-             west to the restrooms.",
+            this hallway is as plain as they come. Doors lead east
+            back to the break room, north to the server room, or
+            west to the restrooms.",
         e_to break_room,
-        n_to server_room,
-        w_to
-            "When nature calls, you'll know about it, but right now,
-            it isn't calling.",
-        before [;
-          Go:
-            if (noun == n_obj) {
-                StartDaemon(server_room);
-                print
-                    "^^You use your key card to open the server room
-                    door and step into your world.^";
-            }
-        ],
+        n_to
+            "You use your key card to open the server room door but
+            instead of a beep of approval and an unlocked door you
+            get a buzz of denial and the door remains locked. Plus:
+            Through the window in the door you can see someone moving
+            around inside but there shouldn't be anyone else here
+            today.",
+        w_to restroom,
+  has   light;
+
+Object  restroom "Restroom"
+  with  description
+            "This average-sized, square restroom has a sink set into a
+            resin counter. The floor is tiled, the ceiling has
+            removable tiles, and the walls are painted with a
+            wallpapered dado. Light is provided by ceiling lights. The
+            room is done in colors that remind you of the sky and
+            overall looks very eclectic.",
+        e_to hallway,
   has   light;
 
 Object  server_room "Server Room"
@@ -149,9 +173,7 @@ Object  server_room "Server Room"
             up rack 7. The little indicator light is blinking red, and
             it is beeping.",
         s_to hallway,
-        daemon [;
-            if (location ~= server_room)
-                return;
+        each_turn [;
             beeping = random(7);
             switch (beeping) {
               1:
@@ -191,9 +213,9 @@ Object  tray "tray" server_room
             if (noun ~= disc)
                 print_ret (The) noun, " is too big to fit.";
           Open:
-            if (openedtray == 1) {
+            if (tray hasnt visited) {
                 score = score + 2;
-                openedtray = 2;
+                give tray visited;
             }
         ],
         after [;