1 ! Copyright (C) 2021, 2022 Jason Self <j@jxself.org>
3 ! This file is free software: you may copy, redistribute and/or
4 ! modify it under the terms of the GNU Affero General Public License
5 ! as published by the Free Software Foundation, either version 3 of
6 ! the License, or (at your option) any later version.
8 ! This file is distributed in the hope that it will be useful, but
9 ! WITHOUT ANY WARRANTY; without even the implied warranty of
10 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ! Affero General Public License for more details.
13 ! You should have received a copy of the GNU Affero General Public
14 ! License along with this file. If not, see https://gnu.org/licenses/
16 ! SPDX-License-Identifier: AGPL-3.0-or-later
17 Array UUID_ARRAY string "UUID://DE9FA2E5-4EC7-4166-9218-E56EFA1DF40F//";
20 Global lantern_fuel_left = 20;
21 Global body_temperature = 20;
22 Global cabin_has_electricity = 1;
23 Global forest_location = 1;
24 Global snowmobile_location = 0;
25 Constant MAX_SCORE = 7;
26 Constant DEATH_MENTION_UNDO;
27 Constant Story "Snowed In";
29 "^A work of interactive fiction.
30 ^If you get stuck try typing HELP.
31 ^Ongoing development: https://jxself.org/git/?p=snowed-in.git
32 ^Send bugs and feedback by email to j@@64jxself.org.
33 ^IFID DE9FA2E5-4EC7-4166-9218-E56EFA1DF40F
34 ^Copyright (C) 2021, 2022 Jason Self <j@@64jxself.org>
35 ^You can change and share this game under the terms of the GNU
36 Affero General Public License as published by the Free Software
37 Foundation (FSF), either version 3 of the License, or (at your
38 option) any later version published by the FSF. See the GNU Affero
39 General Public License for more details.^^You should have received
40 a copy of this game's source code along with a copy of the GNU
41 Affero General Public License so that you can know your rights.
42 If not, contact the place you got it from.^^";
48 Object mainroom "Main Room"
50 "This room is a total wreck - it looks like a major fight
51 happened in here. There's a ripped up sofa and a broken
52 old coffee table in the middle of the room. A flat-screen
53 TV is mounted against the wall, with the screen dangling
54 out. This cabin has three other rooms. There's an office
55 area to the east, and a bedroom to the north. A
56 kitchenette can be found to the west. There's a doorway
57 in the south wall leading outside.",
64 Object frontdoor "front door" mainroom
65 with name 'door' 'front',
67 "The wooden door is made of thick oak wood with the shape
68 of a bear claw engraved in it.",
70 if (location == mainroom)
71 print "door to the outside";
73 print "door to the cabin";
76 found_in mainroom southofcabin,
78 if (location == mainroom)
84 if (location == mainroom)
89 has scenery door openable;
91 Object bearclaw "bear claw" mainroom
92 with name 'bear' 'claw',
94 "It's in the shape of a thin, sharp claw with three jagged
95 points at the top of it.",
98 Object sofa "sofa" mainroom
99 with name 'sofa' 'couch',
101 "The sofa is in poor shape. The upholstery is ripped and
102 there are several holes in it.",
104 Take, Pull, Push, PushDir, Turn:
105 print_ret (The) self, " is too heavy for that.";
107 has scenery supporter enterable;
109 Object coffeetable "coffee table" mainroom
110 with name 'coffee' 'table',
112 "The old coffee table looks as if it's had quite a bit of
113 use. There are burn marks covering it and the paint is
114 worn off in most places.",
116 Take, Pull, Push, PushDir, Turn:
117 print_ret (The) self, " is too heavy for that.";
119 has scenery supporter enterable;
121 Object lantern "copper lantern" coffeetable
122 with name 'lantern' 'copper' 'lamp',
124 "This is an exceptionally beautiful lantern, made of
125 fired copper, and polished until it shines. About eleven
126 inches high, with a base of about 5 inches or so in
127 diameter and a large, brass-closed hook at the top. A
128 rainbow of unique colors run through the copper. The
129 glass in the lamp has a fresnel type of design, which is
130 used to distribute light widely.",
133 if (lantern has on) {
134 lantern_fuel_left = 0;
139 "Suddenly, the lantern's flame begins to flicker
140 violently within its glass prison and then
141 extinguishes itself.";
146 if (lantern_fuel_left > 0) {
148 StartTimer(lantern, lantern_fuel_left);
152 "You snap the switch a few times, but nothing
161 lantern_fuel_left = lantern.time_left;
162 if (lantern has on && lantern_fuel_left <= 5)
163 print_ret "The lantern's fuel runs low.";
167 Object television "flat-screen TV" mainroom
168 with name 'TV' 'television' 'flat' 'screen' 'flat-screen',
170 "The flat-screen TV looks fairly modern but it's been
171 broken in a fight and the screen is dangling out.",
173 Take, Pull, Push, PushDir, Turn:
174 print_ret (The) self, " is firmly mounted to the wall.";
176 if (television hasnt visited) {
179 "Despite the significant damage, the television
180 comes to life in one last valiant attempt to be
181 useful. Your favorite news program is on: U.S.
182 News And Grue Report. The news anchor is giving a
183 warning of grue sightings in the area of the
184 forest before the television finally dies.^";
185 give television visited;
189 "The flat-screen TV is broken and can't be
194 has scenery switchable;
196 Object lightsocket "light socket" mainroom
197 with name 'socket' 'lightsocket',
199 Take, Pull, Push, PushDir, Turn:
201 "You don't have the tools to remove a light
204 if (noun ~= lightbulb) {
208 " into the light socket? Maybe you should come
209 with a warning label because you contain more than
210 a trace amount of nut.";
212 if (noun == lightbulb && lightbulb has on) {
215 give kitchenette light;
217 give eastofcabin light;
218 give southofcabin light;
221 has scenery container transparent open;
223 Object lightbulb "light bulb" lightsocket
224 with name 'light' 'bulb' 'lightbulb',
227 if (lightbulb in lightsocket) {
228 if (cabin_has_electricity == 1) {
231 give kitchenette light;
233 give eastofcabin light;
234 give southofcabin light;
238 "You flip the switch a few times, but nothing
244 "Turn on a lightbulb when it's not in the
245 socket? What a strange idea.";
249 Take, Pull, Push, PushDir, Turn, SwitchOff:
251 give mainroom ~light;
253 give kitchenette ~light;
255 give eastofcabin ~light;
256 give southofcabin ~light;
260 Object office "Office"
262 "There seems to have been quite a fight in here. The room
263 is a wreck. Holes are in the walls and the window is
264 broken, letting in the cold air from outside. Chunks of
265 drywall and insulation cover the floor. The desk has a
266 bullet hole through the middle.",
270 if (snowshoes has worn)
272 "You can't fit through the window while
273 wearing the snow shoes.";
275 if (eastofcabin hasnt visited) {
284 Object desk "solid oak desk" office
285 with name 'solid' 'oak' 'desk',
287 "The desk is old and made of solid oak. The right side of
288 it has been smashed and all of the drawers have been
289 removed. A bullet hole goes straight through the middle of
292 Take, Pull, Push, PushDir, Turn:
293 print_ret (The) self, " is too heavy for that.";
295 has scenery supporter enterable;
297 Object businesscard "business card" desk
298 with name 'business' 'card',
300 "The business card is white and has blacked edges. It
301 bears the name ~Lasting Solutions~, a local data recovery
302 company, in bold letters on the top. The company's
303 website URL is printed in blue at the bottom.";
305 Object salesreceipt "sales receipt" desk
306 with name 'sales' 'receipt',
308 "The sales receipt is for $200, dated three years ago.
309 It's printed on old tractor feed printer paper and bears
310 the name ~Lasting Solutions~, a local data recovery
311 company. A handwritten note is scrawled on the bottom:
312 ~Start working on these hard drives soon.~";
314 Object computer "computer" desk
315 with name 'computer' 'PC',
317 "It's a heavy older model that appears to have been
318 seriously damaged in a fight. It's clearly on its last
319 legs but is perhaps still useful.",
321 Take, Pull, Push, PushDir, Turn:
322 print_ret (The) self, " is too heavy for that.";
324 if (computer hasnt visited) {
327 "The computer makes some concerning noises while
328 lights on the front also illuminate. The last
329 file is quickly displayed. ~If anyone else reads
330 this, you're in serious danger. I've been fighting
331 a ferocious grue for the last three days. I'm
332 almost out of supplies and can't last much
333 longer. I'm going to take the last of the supplies
334 and escape through the office window in a
335 last-ditch effort to get away and get back into
336 town. I hope I can make it.~ The computer then
337 makes a sickly sound and finally dies as some
338 smoke comes out of it.^";
339 give computer visited;
343 "The display briefly flickers but nothing
350 Object drywall "drywall" office
351 with name 'drywall' 'dry' 'wall',
353 Take, Pull, Push, PushDir, Turn:
354 print_ret "Taking that would achieve little.";
358 Object insulation "insulation" office
359 with name 'insulation',
361 Take, Pull, Push, PushDir, Turn:
362 print_ret "Taking that would achieve little.";
366 Object bullethole "bullet hole" desk
367 with name 'bullet' 'hole' 'holes',
369 "Looks to have come from something that's capable of
370 doing a lot of damage.",
371 found_in desk bedroom,
374 Object window "window" office
375 with name 'window' 'windows',
377 "The window faces the east side of the cabin. It's broken,
378 letting in the cold air from outside.",
380 if (location == office)
383 print "window into the cabin";
386 found_in office eastofcabin,
388 if (location == office)
394 if (location == office)
401 print_ret "The window faces the east side of the cabin.";
404 "The window's broken so it's not clear how
407 has scenery door openable open;
409 Object kitchenette "Kitchenette"
411 "The kitchenette is empty. A sink, you think, though it's
412 hard to tell what's a pipe and what's a faucet. A
413 refrigerator, standing open and empty. The door has been
414 ripped off. There's no indication as to where it
415 went. There's no food anywhere in here.",
419 Object refrigerator "refrigerator" kitchenette
420 with name 'fridge' 'refrigerator',
422 "An old rusty refrigerator, standing open and empty. The
423 door has been ripped off. There's no indication as to
426 Take, Pull, Push, PushDir, Turn:
427 print_ret (The) self, " is too heavy for that.";
429 print_ret (The) self, " door is missing.";
431 has scenery enterable container openable open;
433 Object sink "sink" kitchenette
434 with name 'sink' 'pipe' 'faucet',
436 "A sink, you think, though it's hard to tell what's a
437 pipe and what's a faucet.",
441 "Pipes from in the walls make a groaning sound,
442 almost like pain and despair. No water comes out.";
444 has scenery container switchable;
446 Object bedroom "Bedroom"
448 "This bedroom is small and cramped, and looks like a
449 major fight happened as the exterior wall has bullet
450 holes. The bed is lying on the floor, torn to shreds. It
451 has no sheets, just a bare mattress.",
455 Object bed "bed" bedroom
456 with name 'bed' 'mattress',
457 with description "The mattress is bare and empty.",
459 Take, Pull, Push, PushDir, Turn:
460 print_ret (The) self, " is too heavy for that.";
462 has scenery supporter;
464 Object suitcase "suitcase" bedroom
465 with name 'suitcase' 'case',
467 "The suitcase is made of a light metallic material that
468 you can't quite make out. The color of it is somewhere
469 between silver and grey.",
470 has container open openable;
472 Object snowsuit "snowsuit" suitcase
473 with name 'snowsuit' 'snow' 'suit',
475 "The snowsuit is blue, decorated with white and purple
476 designs. On the chest are the letters ~CE~ in purple.",
479 if (snowsuit hasnt visited) {
481 give snowsuit visited;
484 if (snowshoes in player && snowshoes has worn) {
486 "The snowsuit can't fit over the
490 if (snowshoes in player && snowshoes has worn) {
492 "The snowsuit can't be taken off over the
497 if (location ~= mainroom && location ~= office && location ~=
498 kitchenette && location ~= bedroom && location ~= thedark &&
499 snowsuit hasnt worn) {
500 body_temperature = --body_temperature;
502 if (location == mainroom || location == office || location ==
503 kitchenette || location == bedroom || snowsuit has worn && body_temperature
505 body_temperature = ++body_temperature;
507 if (body_temperature == 0) {
510 if (body_temperature <= 5)
512 "You're shivering uncontrollably, and it's hard
513 to move. You feel very exhausted and drowsy. It's
514 all you can do to keep from falling over.";
515 if (body_temperature > 5 && location ~= mainroom && location
516 ~= office && location ~= kitchenette && location ~= bedroom
517 && location ~= thedark && snowsuit hasnt worn) {
518 switch (body_temperature) {
520 "The feeling of cold overwhelms you. Surely the
521 cold will get to you before anything else does.
524 "You can feel yourself getting colder and
527 "You can see your own breath freezing in the air,
528 forming little clouds.";
530 "You shiver in the cold.";
532 "You continue to shiver in the cold.";
534 "Your hands grow numb from the cold.";
536 "You continue shivering in order to keep warm.";
538 "Your shivering grows worse as your body becomes
539 colder by the minute.";
541 "Your teeth begin to chatter as you desperately
542 try to warm yourself up.";
544 "Your shivering intensifies as your body begins
545 to freeze over from the cold.";
547 "Your fingers become stiff and you feel sharp
548 pains all over your body.";
550 "The cold has gotten to a point where it is too
551 much for you. You begin to shiver
554 "Your eyesight begins to fade and you can't even
555 feel yourself shivering anymore.";
557 "You can feel your body shutting down from the
558 cold as you slowly begin to lose consciousness.";
564 Object snowshoes "snowshoes" bedroom
565 with name 'snowshoe' 'snowshoes' 'snow' 'boot' 'boots' 'shoe' 'shoes'
568 "They're light blue in color and have a thick, hard
569 rubber bottom that's attached to a metal frame that keeps
570 you from sinking into the snow. They look to be warm and
574 print_ret (The) self,
575 " fit perfectly and go up to your
579 if (location ~= mainroom && location ~= office && location ~=
580 kitchenette && location ~= bedroom && location ~= thedark &&
581 location ~= eastofcabin && snowshoes hasnt worn) {
585 has pluralname clothing;
587 Object southofcabin "South Of Cabin"
590 "The wind is howling, and there's snow flying
591 everywhere. The snow buildup seems to get higher to
593 if (snowsuit hasnt worn)
595 "It's really cold and you're not dressed for
597 if (frontdoor has open) {
598 check_for_cabin_lighting();
600 if (snowshoes has worn && lantern in player && eastofcabin hasnt
601 visited && lantern_fuel_left > 0) {
612 Object truckspot "Forest"
614 "The blizzard is still going on. You don't think it's
615 letting up any time soon. There is a blue and white
616 pickup truck here. It looks like it got stuck in the snow
617 and is slowly being covered by it. The windows are iced
618 up and you can't see inside.",
621 forest_location = forest_location++;
625 Object truck "blue and white pickup truck" truckspot
626 with name 'pickup' 'truck' 'door' 'doors',
628 "The blue and white pickup truck looks old and battered.
629 The paint has chipped and faded. The windows are iced up
630 and you can't see inside.",
632 Take, Pull, Push, PushDir, Turn:
633 print_ret (The) self, " is too heavy for that.";
636 "The windows are iced up and you can't see
639 print_ret (The) self, " is frozen shut.";
641 has scenery supporter enterable openable;
643 Object backpacklocation "Forest"
645 "You keep walking and walking. The snowfall is still as
646 heavy as ever. As you continue trudging through the snow,
647 you wonder if you're actually moving in the right
648 direction. You can't see anything through the blizzard.
649 You wonder if you might be going in circles and end up
650 wandering around forever, never finding your way out of
651 this white void. You're unsure of which way to go. The
652 snowfall is so thick that you can barely see your hand if
653 you hold it right in front of your face. You have no idea
654 how far you've come or in what direction.",
657 forest_location = forest_location++;
661 Object backpack "backpack" backpacklocation
662 with name 'backpack' 'back' 'pack' 'blood',
664 "The backpack is of medium size, black, with three white
665 stripes running vertically on the back. The middle stripe
666 is broken up by a red line running down the center of it
667 toward the bottom of the backpack. On the side are the
668 letters ~CE~ in purple. The backpack is covered in blood,
669 as if the owner met with an untimely demise.",
672 if (backpack hasnt visited) {
674 give backpack visited;
677 has clothing container openable;
679 Object flashlight "flashlight" backpack
680 with name 'flashlight' 'flash' 'light' 'torch',
682 "It looks like a cheap red plastic model, about eight
686 if (flashlight hasnt visited) {
688 give flashlight visited;
690 give flashlight light;
696 [ print_forest_description;
697 if (location ~= thedark) {
698 switch (forest_location) {
701 "You push on despite the bitter cold and the heavy
702 snowfall as you come to a fork. There are two ways to
703 go here, one involves a hill to the south. The
704 other way is continuing through the woods to the
708 "The wind is bitterly cold. You plow through the
709 snowfall, which is still as heavy as ever. You can
710 barely see where you are going, making it hard to
711 tell which direction is which. Out of the corner of
712 your eye, you spot a tall, shadowy figure lingering
713 at the edge of your vision. When you turn to look at
714 it directly, however, it disappears. You continue
715 walking. The wind is howling louder than ever. The
716 endless snowfall makes it difficult to see where
717 you're going. You can't tell where the white sky and
718 white ground begin and end.";
723 "You trudge through the snow. The wind is really
724 strong and howling like a banshee. You hear a
725 horrible howl in the distance or is it the wind?
726 Looking around you see nothing in this barren
727 landscape but snow. You're not sure what to make of
728 it, but you don't want to stick around to find out.
729 The whole world is white. You can barely see five
730 feet ahead of you. You hope you're going the right
731 way. This place is so desolate and barren.";
734 "You think you might can see a large figure stepping
735 out of the trees and moving in the distance but the
736 wind is blowing hard and whipping up massive amounts
737 of snow, making it hard to tell for sure. Your breath
738 billows out in huge clouds. If it keeps blowing like
739 this, you're not sure if you'll ever be able to get
740 back. Snow whirls through the air as a gust of wind
741 picks up speed. The howling gets louder and more
742 intense. There's no left, right, backward or forward.
743 There's nothing but endless, unchanging whiteness.";
745 PlayerTo(backpacklocation);
748 "It feels like you're lost in a maze of snow without
749 a map. You keep trudging through the heavy snowfall,
750 not knowing if you're even going in any particular
751 direction anymore. The wind is really picking up now
752 and the snowfall is getting heavier. You have to keep
753 going. You can't let the snowstorm get the best of
754 you. You can't give up. You must find a way out of
755 this frozen wasteland. The snowstorm has made it
756 impossible to see anything more than a few feet in
760 "The wind is now a shrieking banshee, freezing and
761 relentless, as it throws the snow into your face,
762 blinding you. It's hard to walk against the brutal
763 winds. You can't see anything, but you must keep
764 going. There is no choice. You continue your way
765 through the snowy white void, what with the snow
766 piling up around you. The wind screams in your ears
767 and you can't see anything. Can't go back. Can't go
768 forward. You can't even see where you are. You hope
769 that, as long as you keep moving, you'll eventually
770 find a way out of this frozen wasteland.";
773 "The blizzard rages, but you continue to press on.
774 There's nothing here but you, the snowfall, and the
775 fierce wind howling through this frozen landscape.
776 This isn't just a place of cold and ice - it's
777 other-worldly. You trudge on and try to keep your
778 spirits up and not let the snowstorm get to you.
779 Every step is an effort. You wish you had the powers
780 of a superhero right now. You can barely see where
781 you are going. The wind knocks you down on your hands
782 and knees. You get back up, but you're slipping and
783 sliding all over the place.";
786 "You wander around in the impenetrable white void.
787 The wind is howling louder than ever. You try to
788 persevere. You don't know if you're going in circles
789 or what, but you start to feel that this frozen,
790 lifeless landscape is sucking away your very life
791 force. You can't see your hand in front of your face.
792 You can barely keep moving. Every step you take is
793 hard-fought. You just want this awful nightmare to
794 end. You begin to feel sleepy but you're in danger
795 here. You have to keep moving. Sleep is not an option
796 when you're in a place like this.";
799 "You try to remember the survival tips you've read
800 on the internet, but frankly, you don't remember most
801 of them right now. As you walk you try to keep your
802 mind occupied with anything other than the storm.
803 Nothing makes any sense and you feel like you're
804 starting to go in circles. The wind starts starts to
805 pick up as it begins howling louder than ever. You're
806 determined to live but the blizzard doesn't seem to
807 care whether you live or die. It just keeps howling
808 and shrieking. It's not getting any easier to move in
812 "You keep walking. The snow is drifting and piling
813 up around you, making movement almost impossible. You
814 look around the barren landscape, but there's nothing
815 nearby except snow. It's almost as if you're lost in
816 a white, endless void. You start to get disoriented.
817 You don't even know if you're walking in a circle or
818 not. The situation is looking very grim. Your life
819 feels as if it is slowly ebbing away in the
820 relentless grip of the snowstorm. It feels like
821 you've been wandering for hours, but that's probably
822 just your perception of time slipping away.";
825 "You can barely see anything, and you stumble
826 forward. You could be wandering aimlessly in any
827 direction right now and you wouldn't know the
828 difference. It's as if you're in a sea of white.
829 You're not sure that you're going in the right
830 direction but you can't stop now. There has to be
831 something here besides endless snow. You know that
832 staying here is a death sentence. You have to escape.
833 You're cold, tired, miserable, and desperate to get
834 out of this mess. You have no idea where you are. You
835 keep wandering through endless whiteness. You won't
839 "You're so cold that you begin to hallucinate, first
840 seeing the words ~Ventilation Control Room~ and then
841 yourself at a console. The hallucination quickly
846 "You see something in the distance but can't make it
847 out. You walk toward it to find out that it's the
848 hotel. You collapse in the lobby as the hotel staff
854 Object forest "Forest"
856 print_forest_description();
860 if (location == thedark) {
863 if (noun == d_obj || noun == u_obj) {
864 print_ret "You can't go that way.";
866 forest_location = forest_location++;
868 cant_go print_forest_description;
871 if (television has visited || computer has visited) {
873 "The grue is waiting behind a snowbank in
874 the distance, away from the light. ";
877 "From somewhere off in the dark distance, far away from the
878 light, a rock is hurled in your direction. It hits the
879 lantern, breaking it, and putting it out of commission. ";
882 lantern_fuel_left = 0;
887 [ check_for_cabin_lighting;
888 if (lightbulb has on) {
890 "The light from inside the cabin only penetrates a few
891 feet from the building. ";
894 if (lantern in player && lantern has on) {
896 "The lantern provides the only source of
899 if (location has light)
901 "The snow stings your face and you can barely see three
902 feet in front of you. ";
903 if (snowshoes in player && snowshoes has worn) {
905 "The snowshoes are doing their job by making sure
906 you don't sink into the snow. ";
910 Object eastofcabin "East Of Cabin"
912 print "It's dark outside. ";
913 check_for_cabin_lighting();
914 if (cabin_has_electricity == 1 && lantern in player && lantern_fuel_left
923 "The snow buildup is is too great to continue in that
930 "You're on the roof of the cabin, although it's hard
931 to tell where the snow buildup ends and the roof
932 begins. You can make out the trees around the cabin,
933 but you can't see very far out into the snowfield
935 if (roof hasnt visited)
937 " You hear a snowmobile approaching in the
938 distance. Is it your salvation? The snowmobile
939 quickly zooms by in front of the cabin and
940 disappears into the forest.";
941 StartDaemon(snowmobile);
942 if (roof has visited)
944 " There seems to be no movement, no sound, no
949 cant_go "Walking off the edge of a roof seems unwise.";
951 Object northofcabin "North Of Cabin"
954 "You're on the north side of the cabin. The wind is
955 howling and the snow is coming down; falling too fast
957 if (northofcabin hasnt visited)
959 " That might be a tree in the distance or a
960 shadowy figure - It's hard to tell in this
963 " The snow buildup here is so great that it's
964 almost level with the cabin's roof, which is to the
970 cant_go "It's too steep to go in that direction safely.",
974 if (roof hasnt visited) {
980 Object westofcabin "West Of Cabin"
983 "The snow is falling so fast that you can barely see
984 anything. You can't even be sure you're going in the
986 if (westofcabin hasnt visited)
988 " Then you hear a shuffling noise in the snow.
989 There was something there and now it's gone. Or
990 was it always there and you just never saw it?";
991 print_ret " The snow buildup gets taller to the north.";
996 "The snow buildup is is too great to continue in that
1000 Location = mainroom;
1001 thedark.description =
1002 "It is pitch black. You are likely to be eaten
1005 "You're trapped in a snowstorm while visiting the forest
1006 during your vacation to a small rural town. This is the worst
1007 snowstorm in more than 40 years. If only you had listened to
1008 the news. Well, it's too late for that. The snow has been
1009 falling for the past seven hours and shows no signs of
1010 stopping any time soon. You need to get back to your hotel in
1011 the town. You finally manage to find an old cabin in the
1012 woods and get inside but have no idea where you are. You're
1013 not dressed for this weather, and it's getting dark
1015 StartDaemon(lantern);
1016 StartDaemon(snowshoes);
1017 StartDaemon(snowsuit);
1023 print "You sink into the deep snow and are unable to move.";
1026 "Finally, you succumb to the cold. Your mind goes blank as
1027 you slip away into the endless darkness and the deep sleep
1031 ! Don't have 'take all' take the lightbulb in the mainroom of the
1034 [ ChooseObjects obj code;
1036 if (obj has scenery)
1040 if (obj == lightbulb)
1045 if (location == thedark && real_location == mainroom) {
1046 PlaceInScope(lightsocket);
1047 PlaceInScope(lightbulb);
1052 Object snowmobile "snowmobile" thedark
1053 with name 'snowmobile',
1055 snowmobile_location = random(14);
1056 if (location == forest && forest_location == snowmobile_location)
1060 "A snowmobile approaches. The person says they
1061 saw your light and came to rescue you.";
1067 Object grue "grue" thedark
1069 name 'grue' 'monster',
1070 grue_active_around_cabin,
1071 grue_active_in_the_dark,
1073 if (location == thedark) {
1074 switch (++(self.grue_active_in_the_dark)) {
1076 "^You hear horrible gurgling sounds in the
1079 "^You hear the clink of razor-sharp claws
1083 "^Your last memory is of the slavering fangs of
1084 the horrible Grue as it claims you for a meal.";
1087 if (location == mainroom || location == office || location ==
1088 kitchenette || location == bedroom) {
1089 switch (++(self.grue_active_around_cabin)) {
1091 "^You hear the wind howling outside, if it is the
1094 "^You hear horrible gurgling sounds outside.";
1096 "^The noise outside gets louder.";
1098 "^You hear the sound of shuffling feet outside.";
1100 "^You hear something sniffing around the cabin.";
1102 "^You hear a deep guttural sound from outside
1103 that sends a chill down your spine.";
1105 "^You hear something scratching on the cabin
1106 walls from outside.";
1108 "^You hear something howl outside. It's a
1109 chilling, mournful wail that sends a chill down
1112 "^A thunderous CRACK can be heard coming from
1115 "^There's a sudden crashing sound as something is
1116 thrown against the cabin walls.";
1118 "^Something begins to beat against the walls of
1119 the cabin, as if trying to to break in. It makes a
1120 loud, thunderous noise.";
1122 "^The wind is howling and the walls are being
1123 beaten so hard it feels like the cabin is
1126 "^Suddenly, there's ominous silence from outside
1130 if (location == mainroom || location == office || location ==
1131 kitchenette || location == bedroom && self.grue_active_around_cabin
1133 print "^The lights flicker and suddenly go out.^";
1134 cabin_has_electricity = 0;
1136 give mainroom ~light;
1138 give kitchenette ~light;
1139 give bedroom ~light;
1140 give eastofcabin ~light;
1141 give southofcabin ~light;
1149 "Oh, no! You have walked into the slavering fangs of a lurking
1154 print ", earning you the rank of ";
1175 "^If you need help try some of the commands from:
1176 ^https://pr-if.org/doc/play-if-card/^";
1180 print "Nothing obvious happens.^";
1210 * 'through' / 'out' / 'via' noun -> Go;
1213 * 'through' / 'out' / 'via' noun -> Go;
1216 * 'through' / 'out' / 'via' noun -> Go;
1219 * 'through' / 'out' / 'via' noun -> Go;
1222 * 'through' / 'out' / 'via' noun -> Go;