Update to serial 220530
[snowed-in.git] / src / snowed-in.inf
index 4174df5a32577acbd7d453c5f4f747bdb3ee42f7..6c262e23711d6a95b40e8aac984d5425e306ea51 100644 (file)
@@ -16,6 +16,7 @@ Global lantern_fuel_left = 20;
 Global body_temperature = 20;
 Global cabin_has_electricity = 1;
 Global forest_location = 1;
+Global snowmobile_location = 0;
 Constant NO_SCORE;
 Constant DEATH_MENTION_UNDO;
 Constant Story "Snowed In";
@@ -37,7 +38,7 @@ Constant Headline
 Include "parser";
 Include "verblib";
 Release 1;
-Serial "220214";
+Serial "220530";
 
 Object  mainroom "Main Room"
   with  description 
@@ -202,7 +203,7 @@ Object  lightsocket "light socket" mainroom
                     with a warning label because you contain more than 
                     a trace amount of nut.";
             }
-            if (noun == lightbulb && light has on) {
+            if (noun == lightbulb && lightbulb has on) {
                 give mainroom light;
                 give office light;
                 give kitchenette light;
@@ -253,7 +254,7 @@ Object  lightbulb "light bulb" lightsocket
 Object  office "Office"
   with  description 
             "There seems to have been quite a fight in here. The room 
-            is a wreck. Holes are in the walls and the windows are 
+            is a wreck. Holes are in the walls and the window is 
             broken, letting in the cold air from outside. Chunks of 
             drywall and insulation cover the floor. The desk has a 
             bullet hole through the middle.",
@@ -564,22 +565,18 @@ Object  southofcabin "South Of Cabin"
   with  description [;
             print 
                 "The wind is howling, and there's snow flying 
-                everywhere. ";
+                everywhere. The snow buildup seems to get higher to 
+                the west. ";
             if (snowsuit hasnt worn)
                 print 
                     "It's really cold and you're not dressed for 
                     this weather. ";
-            ! if (frontdoor has open) {
-            check_for_cabin_lighting();
-            ! }
-            if (cabin_has_electricity == 1) {
-                if (television has visited || computer has visited) {
-                    print "The grue set a trap for you to come outside. ";
-                }
-                print 
-                    "Your last memory is of a large log attached to ropes on 
-                    neighboring trees as it collides with your face.";
-                deadflag = 1;
+            if (frontdoor has open) {
+                check_for_cabin_lighting();
+            }
+            if (snowshoes has worn && lantern in player && eastofcabin hasnt
+            visited && lantern_fuel_left > 0) {
+                throw_rock();
             }
             print "^";
         ],
@@ -592,7 +589,7 @@ Object  southofcabin "South Of Cabin"
 Object  truckspot "Forest"
   with  description 
             "The blizzard is still going on. You don't think it's 
-            letting up anytime soon. There is a blue and white 
+            letting up any time soon. There is a blue and white 
             pickup truck here. It looks like it got stuck in the snow 
             and is slowly being covered by it. The windows are iced 
             up and you can't see inside.",
@@ -639,7 +636,7 @@ Object  backpacklocation "Forest"
         ];
 
 Object  backpack "backpack" backpacklocation
-  with  name 'back' 'pack' 'blood',
+  with  name 'backpack' 'back' 'pack' 'blood',
   with  description 
             "The backpack is of medium size, black, with three white 
             stripes running vertically on the back. The middle stripe 
@@ -650,7 +647,7 @@ Object  backpack "backpack" backpacklocation
   has   clothing container openable;
 
 Object  flashlight "flashlight" backpack
-  with  name 'flash' 'light' 'torch',
+  with  name 'flashlight' 'flash' 'light' 'torch',
         description 
             "It looks like a cheap red plastic model, about eight 
             inches long.",
@@ -669,7 +666,7 @@ Object  flashlight "flashlight" backpack
             print_ret 
                 "You push on despite the bitter cold and the heavy 
                 snowfall as you come to a fork. There are two ways to 
-                go here, one is going up a hill to the south. The 
+                go here, one involves a hill to the south. The 
                 other way is continuing through the woods to the 
                 north.";
           2:
@@ -700,17 +697,16 @@ Object  flashlight "flashlight" backpack
                 is so desolate and barren.";
           5:
             print_ret 
-                "You trudge through the snow. The wind is really 
-                strong and howling like a banshee. You hear a horrible 
-                howl in the distance or is it the wind? Looking 
-                around you see nothing in this barren landscape but 
-                snow. You're not sure what to make of it, but you 
-                don't want to stick around to find out. The whole 
-                world is white. You can barely see five feet ahead of 
-                you. You hope you're going the right way. This place 
-                is so desolate and barren. There's no left, right, 
-                backward or forward. There's nothing but endless, 
-                unchanging whiteness.";
+                "You think you might can see a large figure stepping 
+                out of the trees and moving in the distance but the 
+                wind is blowing hard and whipping up massive amounts 
+                of snow, making it hard to tell for sure. Your breath 
+                billows out in huge clouds. If it keeps blowing like 
+                this, you're not sure if you'll ever be able to get 
+                back. Snow whirls through the air as a gust of wind 
+                picks up speed. The howling gets louder and more 
+                intense. There's no left, right, backward or forward. 
+                There's nothing but endless, unchanging whiteness.";
           6:
             PlayerTo(backpacklocation);
           7:
@@ -831,6 +827,22 @@ Object  forest "Forest"
         ],
         cant_go print_forest_description;
 
+[ throw_rock;
+    if (television has visited || computer has visited) {
+        print 
+            "The grue is waiting behind a snowbank in
+            the distance, away from the light. ";
+    }
+    print 
+        "From somewhere off in the dark distance, far away from the 
+        light, a rock is hurled in your direction. It hits the 
+        lantern, breaking it, and putting it out of commission. ";
+    give lantern ~on;
+    give lantern ~light;
+    lantern_fuel_left = 0;
+    StopDaemon(lantern);
+];
+
 [ check_for_cabin_lighting;
     if (lightbulb has on) {
         print 
@@ -850,10 +862,7 @@ Object  forest "Forest"
     if (snowshoes in player && snowshoes has worn) {
         print 
             "The snowshoes are doing their job by making sure 
-            you don't sink into the snow.";
-    }
-    if (location == eastofcabin) {
-        print "^";
+            you don't sink into the snow. ";
     }
 ];
 
@@ -861,18 +870,65 @@ Object  eastofcabin "East Of Cabin"
   with  description [;
             print "It's dark outside. ";
             check_for_cabin_lighting();
+            if (cabin_has_electricity == 1 && lantern in player && lantern_fuel_left
+            > 0) {
+                throw_rock();
+            }
+            print "^";
         ],
         w_to window,
         s_to southofcabin,
+        cant_go 
+            "The snow buildup is is too great to continue in that 
+            direction.",
   has   light;
 
+Object  roof "Roof"
+  with  description [;
+            print 
+                "You're on the roof of the cabin, although it's hard 
+                to tell where the snow buildup ends and the roof 
+                begins. You can make out the trees around the cabin, 
+                but you can't see very far out into the snowfield 
+                beyond them.";
+            if (roof hasnt visited)
+                print 
+                    " You hear a snowmobile approaching in the 
+                    distance. Is it your salvation? The snowmobile 
+                    quickly zooms by in front of the cabin and 
+                    disappears into the forest.";
+            StartDaemon(snowmobile);
+            if (roof has visited)
+                print 
+                    " There seems to be no movement, no sound, no 
+                    sign of anything.";
+            new_line;
+        ],
+        n_to northofcabin,
+        cant_go "Walking off the edge of a roof seems unwise.";
+
+Object  northofcabin "North Of Cabin"
+  with  description 
+            "You're on the north side of the cabin. The wind is 
+            howling and the snow is coming down; falling too fast to 
+            see well. The snow buildup here is so great that it's 
+            almost level with the cabin's roof, which is to the 
+            south.",
+        n_to westofcabin,
+        s_to roof,
+        w_to westofcabin,
+        cant_go "It's too steep to go in that direction safely.";
+
 Object  westofcabin "West Of Cabin"
   with  description 
             "The snow is falling so fast that you can barely see 
             anything. You can't even be sure you're going in the right 
-            direction.",
+            direction. The snow buildup gets taller to the north.",
         s_to southofcabin,
-  has   light;
+        n_to northofcabin,
+        cant_go 
+            "The snow buildup is is too great to continue in that 
+            direction.";
 
 [ Initialise;
     Location = mainroom;
@@ -885,10 +941,10 @@ Object  westofcabin "West Of Cabin"
         snowstorm in more than 40 years. If only you had listened to 
         the news. Well, it's too late for that. The snow has been 
         falling for the past seven hours and shows no signs of 
-        stopping anytime soon. You need to get back to your hotel in 
+        stopping any time soon. You need to get back to your hotel in 
         the town. You finally manage to find an old cabin in the 
         woods and get inside but have no idea where you are. You're 
-        not dressed for this weather.^";
+        not dressed for this weather, and it's getting dark outside.^";
     StartDaemon(lantern);
     StartDaemon(snowshoes);
     StartDaemon(snowsuit);
@@ -926,6 +982,22 @@ Object  westofcabin "West Of Cabin"
     return false;
 ];
 
+Object  snowmobile "snowmobile" thedark
+  with  name 'snowmobile',
+        daemon [;
+            snowmobile_location = random(13);
+            if (location == forest && forest_location == snowmobile_location)
+            {
+                deadflag = 2;
+                print_ret 
+                    "You hear a snowmobile approaching in the 
+                    distance. The person says they saw your light and 
+                    came to rescue you.";
+            }
+            return true;
+        ],
+  has   scenery;
+
 Object  grue "grue" thedark
   with  article "the",
         name 'grue' 'monster',