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 flashlight_battery_power_left = 50;
22 Global body_temperature = 20;
23 Global cabin_has_electricity = 1;
24 Global forest_location = 1;
25 Global snowmobile_location = 0;
26 Constant MAX_SCORE = 7;
27 Constant DEATH_MENTION_UNDO;
28 Constant Story "Snowed In";
30 "^A work of interactive fiction.
31 ^If you get stuck try typing HELP.
32 ^Ongoing development: https://jxself.org/git/?p=snowed-in.git
33 ^Send bugs and feedback by email to j@@64jxself.org.
34 ^IFID DE9FA2E5-4EC7-4166-9218-E56EFA1DF40F
35 ^Copyright (C) 2021, 2022 Jason Self <j@@64jxself.org>
36 ^You can change and share this game under the terms of the GNU
37 Affero General Public License as published by the Free Software
38 Foundation (FSF), either version 3 of the License, or (at your
39 option) any later version published by the FSF. See the GNU Affero
40 General Public License for more details.^^You should have received
41 a copy of this game's source code along with a copy of the GNU
42 Affero General Public License so that you can know your rights.
43 If not, contact the place you got it from.^^";
49 Include "src/hotel.inf";
51 Object mainroom "Main Room"
53 "This room is a total wreck - it looks like a major fight
54 happened in here. There's a ripped up sofa and a broken
55 old coffee table in the middle of the room. A flat-screen
56 TV is mounted against the wall, with the screen dangling
57 out. This cabin has three other rooms. There's an office
58 area to the east, and a bedroom to the north. A
59 kitchenette can be found to the west. There's a doorway
60 in the south wall leading outside.",
63 "The weight of the snow against the door is such that it
69 Object frontdoor "front door" mainroom
70 with name 'door' 'front',
72 "The wooden door is made of thick oak wood with the shape
73 of a bear claw engraved in it.",
75 if (location == mainroom)
76 print "door to the outside";
78 print "door to the cabin";
81 found_in mainroom southofcabin,
83 if (location == mainroom)
89 if (location == mainroom)
97 "The weight of the snow against the door is such that
100 has scenery door openable;
102 Object bearclaw "bear claw" mainroom
103 with name 'bear' 'claw',
105 "It's in the shape of a thin, sharp claw with three jagged
106 points at the top of it.",
109 Object sofa "sofa" mainroom
110 with name 'sofa' 'couch',
112 "The sofa is in poor shape. The upholstery is ripped and
113 there are several holes in it.",
116 if (action_to_be == ##Eat)
120 Take, Pull, Push, PushDir, Turn:
121 print_ret (The) self, " is too heavy for that.";
126 has scenery supporter enterable;
128 Object coffeetable "coffee table" mainroom
129 with name 'coffee' 'table',
131 "The old coffee table looks as if it's had quite a bit of
132 use. There are burn marks covering it and the paint is
133 worn off in most places.",
136 if (action_to_be == ##Eat)
140 Take, Pull, Push, PushDir, Turn:
141 print_ret (The) self, " is too heavy for that.";
143 has scenery supporter enterable;
145 Object lantern "copper lantern" coffeetable
146 with name 'lantern' 'copper' 'lamp',
148 "This is an exceptionally beautiful lantern, made of
149 fired copper, and polished until it shines. About eleven
150 inches high, with a base of about 5 inches or so in
151 diameter and a large, brass-closed hook at the top. A
152 rainbow of unique colors run through the copper. The
153 glass in the lamp has a fresnel type of design, which is
154 used to distribute light widely.",
157 if (lantern has on) {
158 lantern_fuel_left = 0;
163 "Suddenly, the lantern's flame begins to flicker
164 violently within its glass prison and then
165 extinguishes itself.";
170 if (lantern_fuel_left > 0) {
172 StartTimer(lantern, lantern_fuel_left);
176 "You snap the switch a few times, but nothing
185 lantern_fuel_left = lantern.time_left;
186 if (lantern has on && lantern_fuel_left <= 5)
187 print_ret "The lantern's fuel runs low.";
191 Object television "flat-screen TV" mainroom
192 with name 'TV' 'television' 'flat' 'screen' 'flat-screen',
194 "The flat-screen TV looks fairly modern but it's been
195 broken in a fight and the screen is dangling out.",
197 Take, Pull, Push, PushDir, Turn, Remove:
199 "The damaged electronics throw some sparks,
200 and you get a mild shock. Perhaps it's best left
203 if (television hasnt visited) {
206 "Despite the significant damage, the television
207 comes to life in one last valiant attempt to be
208 useful. Your favorite news program is on: U.S.
209 News And Grue Report. The news anchor is giving a
210 warning of grue sightings in the area of the
211 forest before the television finally dies.^";
212 give television visited;
216 "The flat-screen TV is broken and can't be
221 has scenery switchable;
223 Object lightsocket "light socket" mainroom
224 with name 'socket' 'lightsocket',
226 Take, Pull, Push, PushDir, Turn:
228 "You don't have the tools to remove a light
231 if (noun ~= lightbulb) {
235 " into the light socket? Maybe you should come
236 with a warning label because you contain more than
237 a trace amount of nut.";
239 if (noun == lightbulb && lightbulb has on) {
242 give kitchenette light;
244 give eastofcabin light;
245 give southofcabin light;
248 has scenery container transparent open;
250 Object lightbulb "light bulb" lightsocket
251 with name 'light' 'bulb' 'lightbulb',
254 if (lightbulb in lightsocket) {
255 if (cabin_has_electricity == 1) {
258 give kitchenette light;
260 give eastofcabin light;
261 give southofcabin light;
265 "You flip the switch a few times, but nothing
271 "Turn on a lightbulb when it's not in the
272 socket? What a strange idea.";
276 Take, Pull, Push, PushDir, Turn, SwitchOff:
278 give mainroom ~light;
280 give kitchenette ~light;
282 give eastofcabin ~light;
283 give southofcabin ~light;
287 Object office "Office"
289 "There seems to have been quite a fight in here. The room
290 is a wreck. Holes are in the walls and the window is
291 broken, letting in the cold air from outside. Chunks of
292 drywall and insulation cover the floor. The desk has a
293 bullet hole through the middle. The main room is to the
298 if (snowshoes has worn)
300 "You can't fit through the window while
301 wearing the snow shoes.";
302 if (eastofcabin hasnt visited) {
312 Object desk "solid oak desk" office
313 with name 'solid' 'oak' 'desk',
315 "The desk is old and made of solid oak. The right side of
316 it has been smashed and all of the drawers have been
317 removed. A bullet hole goes straight through the middle of
320 Take, Pull, Push, PushDir, Turn:
321 print_ret (The) self, " is too heavy for that.";
323 has scenery supporter enterable;
325 Object businesscard "business card" desk
326 with name 'business' 'card',
328 "The business card is white and has blacked edges. It
329 bears the name ~Lasting Solutions~, a local data recovery
330 company, in bold letters on the top. The company's
331 website URL is printed in blue at the bottom.";
333 Object salesreceipt "sales receipt" desk
334 with name 'sales' 'receipt',
336 "The sales receipt is for $200, dated three years ago.
337 It's printed on old tractor feed printer paper and bears
338 the name ~Lasting Solutions~, a local data recovery
339 company. A handwritten note is scrawled on the bottom:
340 ~Start working on these hard drives soon.~";
342 Object computer "computer" desk
343 with name 'computer' 'PC',
345 "It's a heavy older model that appears to have been
346 seriously damaged in a fight. It's clearly on its last
347 legs but is perhaps still useful.",
349 Take, Pull, Push, PushDir, Turn:
350 print_ret (The) self, " is too heavy for that.";
352 if (computer hasnt visited) {
355 "The computer makes some concerning noises while
356 lights on the front also illuminate. The last
357 file is quickly displayed. ~If anyone else reads
358 this, you're in serious danger. I've been fighting
359 a ferocious grue for the last three days. I'm
360 almost out of supplies and can't last much
361 longer. I'm going to take the last of the supplies
362 and escape through the office window in a
363 last-ditch effort to get away and get back into
364 town. I hope I can make it.~ The computer then
365 makes a sickly sound and finally dies as some
366 smoke comes out of it.^";
367 give computer visited;
371 "The display briefly flickers but nothing
378 Object drywall "drywall" office
379 with name 'drywall' 'dry' 'wall',
381 Take, Pull, Push, PushDir, Turn:
382 print_ret "Taking that would achieve little.";
386 Object insulation "insulation" office
387 with name 'insulation',
389 Take, Pull, Push, PushDir, Turn:
390 print_ret "Taking that would achieve little.";
394 Object bullethole "bullet hole" desk
395 with name 'bullet' 'hole' 'holes',
397 "Looks to have come from something that's capable of
398 doing a lot of damage.",
399 found_in desk bedroom,
402 Object window "window" office
403 with name 'window' 'windows',
405 "The window faces the east side of the cabin. It's broken,
406 letting in the cold air from outside.",
408 if (location == office)
411 print "window into the cabin";
414 found_in office eastofcabin,
416 if (location == office)
422 if (location == office)
429 print_ret "The window faces the east side of the cabin.";
432 "The window's broken so it's not clear how
435 has scenery door openable open;
437 Object kitchenette "Kitchenette"
439 "The kitchenette is empty. A sink, you think, though it's
440 hard to tell what's a pipe and what's a faucet. A
441 refrigerator, standing open and empty. The door has been
442 ripped off. There's no indication as to where it
443 went. There's no food anywhere in here. The main room is
448 Object refrigerator "refrigerator" kitchenette
449 with name 'fridge' 'refrigerator',
451 "An old rusty refrigerator, standing open and empty. The
452 door has been ripped off. There's no indication as to
455 Take, Pull, Push, PushDir, Turn:
456 print_ret (The) self, " is too heavy for that.";
458 print_ret (The) self, " door is missing.";
460 has scenery enterable container openable open;
462 Object sink "sink" kitchenette
463 with name 'sink' 'pipe' 'faucet',
465 "A sink, you think, though it's hard to tell what's a
466 pipe and what's a faucet.",
470 "Pipes from in the walls make a groaning sound,
471 almost like pain and despair. No water comes out.";
473 has scenery container switchable;
475 Object bedroom "Bedroom"
477 "This bedroom is small and cramped, and looks like a
478 major fight happened as the exterior wall has bullet
479 holes. There's a bare mattress, torn to shreds. The main
480 room is to the south.",
484 Object bed "bed" bedroom
485 with name 'bed' 'mattress',
486 with description "The mattress is bare and empty.",
488 Take, Pull, Push, PushDir, Turn:
489 print_ret (The) self, " is too heavy for that.";
491 has scenery supporter;
493 Object suitcase "suitcase" bedroom
494 with name 'suitcase' 'case',
496 "The suitcase is made of a light metallic material that
497 you can't quite make out. The color of it is somewhere
498 between silver and grey.",
499 has container open openable;
501 Object snowsuit "snowsuit" suitcase
502 with name 'snowsuit' 'snow' 'suit',
504 "The snowsuit is blue, decorated with white and purple
505 designs. On the chest are the letters ~CE~ in purple.",
508 if (snowsuit hasnt visited) {
510 give snowsuit visited;
513 if (snowshoes in player && snowshoes has worn) {
515 "The snowsuit can't fit over the
519 if (snowshoes in player && snowshoes has worn) {
521 "The snowsuit can't be taken off over the
526 if (location == northofcabin || location == southofcabin ||
527 location == westofcabin || location == truckspot || location
528 == backpacklocation || location == forest && snowsuit hasnt
530 body_temperature = --body_temperature;
532 if (location == mainroom || location == office || location ==
533 kitchenette || location == bedroom || snowsuit has worn && body_temperature
535 body_temperature = ++body_temperature;
537 if (body_temperature == 0) {
540 if (body_temperature <= 5)
542 "You're shivering uncontrollably, and it's hard
543 to move. You feel very exhausted and drowsy. It's
544 all you can do to keep from falling over.";
545 if (body_temperature > 5 && location ~= mainroom && location
546 ~= office && location ~= kitchenette && location ~= bedroom
547 && location ~= thedark && snowsuit hasnt worn) {
548 switch (body_temperature) {
550 "The feeling of cold overwhelms you. Surely the
551 cold will get to you before anything else does.
554 "You can feel yourself getting colder and
557 "You can see your own breath freezing in the air,
558 forming little clouds.";
560 "You shiver in the cold.";
562 "You continue to shiver in the cold.";
564 "Your hands grow numb from the cold.";
566 "You continue shivering in order to keep warm.";
568 "Your shivering grows worse as your body becomes
569 colder by the minute.";
571 "Your teeth begin to chatter as you desperately
572 try to warm yourself up.";
574 "Your shivering intensifies as your body begins
575 to freeze over from the cold.";
577 "Your fingers become stiff and you feel sharp
578 pains all over your body.";
580 "The cold has gotten to a point where it is too
581 much for you. You begin to shiver
584 "Your eyesight begins to fade and you can't even
585 feel yourself shivering anymore.";
587 "You can feel your body shutting down from the
588 cold as you slowly begin to lose consciousness.";
594 Object snowshoes "snowshoes" bedroom
595 with name 'snowshoe' 'snowshoes' 'snow' 'boot' 'boots' 'shoe' 'shoes'
598 "They're light blue in color and have a thick, hard
599 rubber bottom that's attached to a metal frame that keeps
600 you from sinking into the snow. They look to be warm and
604 print_ret (The) self,
605 " fit perfectly and go up to your
609 if (location == northofcabin || location == southofcabin ||
610 location == westofcabin || location == truckspot || location
611 == backpacklocation || location == forest && snowshoes hasnt
616 has pluralname clothing;
618 Object southofcabin "South Of Cabin"
621 "The wind is howling, and there's snow flying
622 everywhere. The snow buildup seems to get higher to
624 if (snowsuit hasnt worn)
626 "It's really cold and you're not dressed for
628 if (frontdoor has open) {
629 check_for_cabin_lighting();
631 if (snowshoes has worn && lantern in player && eastofcabin hasnt
632 visited && lantern_fuel_left > 0) {
643 Object truckspot "Forest"
645 "The blizzard is still going on. You don't think it's
646 letting up any time soon. There is a blue and white
647 pickup truck here. It looks like it got stuck in the snow
648 and is slowly being covered by it. The windows are iced
649 up and you can't see inside.",
652 forest_location = forest_location++;
656 Object truck "blue and white pickup truck" truckspot
657 with name 'pickup' 'truck' 'door' 'doors',
659 "The blue and white pickup truck looks old and battered.
660 The paint has chipped and faded. The windows are iced up
661 and you can't see inside.",
663 Take, Pull, Push, PushDir, Turn:
664 print_ret (The) self, " is too heavy for that.";
667 "The windows are iced up and you can't see
670 print_ret (The) self, " is frozen shut.";
672 has scenery supporter enterable openable;
674 Object backpacklocation "Forest"
676 "You keep walking and walking. The snowfall is still as
677 heavy as ever. As you continue trudging through the snow,
678 you wonder if you're actually moving in the right
679 direction. You can't see anything through the blizzard.
680 You wonder if you might be going in circles and end up
681 wandering around forever, never finding your way out of
682 this white void. You're unsure of which way to go. The
683 snowfall is so thick that you can barely see your hand if
684 you hold it right in front of your face. You have no idea
685 how far you've come or in what direction.",
688 forest_location = forest_location++;
692 Object backpack "backpack" backpacklocation
693 with name 'backpack' 'back' 'pack' 'blood',
695 "The backpack is of medium size, black, with three white
696 stripes running vertically on the back. The middle stripe
697 is broken up by a red line running down the center of it
698 toward the bottom of the backpack. On the side are the
699 letters ~CE~ in purple. The backpack is covered in blood,
700 as if the owner met with an untimely demise.",
703 if (backpack hasnt visited) {
705 give backpack visited;
708 has clothing container openable;
710 Object flashlight "flashlight" backpack
711 with name 'flashlight' 'flash' 'light' 'torch',
713 "It looks like a cheap red plastic model, about eight
717 if (flashlight hasnt visited) {
719 give flashlight visited;
721 give flashlight light;
723 give flashlight ~light;
727 [ print_forest_description;
728 if (location ~= thedark) {
729 switch (forest_location) {
732 "You push on despite the bitter cold and the heavy
733 snowfall as you come to a fork. There are two ways to
734 go here, one involves a hill to the south. The
735 other way is continuing through the woods to the
739 "The wind is bitterly cold. You plow through the
740 snowfall, which is still as heavy as ever. You can
741 barely see where you are going, making it hard to
742 tell which direction is which. Out of the corner of
743 your eye, you spot a tall, shadowy figure lingering
744 at the edge of your vision. When you turn to look at
745 it directly, however, it disappears. You continue
746 walking. The wind is howling louder than ever. The
747 endless snowfall makes it difficult to see where
748 you're going. You can't tell where the white sky and
749 white ground begin and end.";
754 "You trudge through the snow. The wind is really
755 strong and howling like a banshee. You hear a
756 horrible howl in the distance or is it the wind?
757 Looking around you see nothing in this barren
758 landscape but snow. You're not sure what to make of
759 it, but you don't want to stick around to find out.
760 The whole world is white. You can barely see five
761 feet ahead of you. You hope you're going the right
762 way. This place is so desolate and barren.";
765 "You think you might can see a large figure stepping
766 out of the trees and moving in the distance but the
767 wind is blowing hard and whipping up massive amounts
768 of snow, making it hard to tell for sure. Your breath
769 billows out in huge clouds. If it keeps blowing like
770 this, you're not sure if you'll ever be able to get
771 back. Snow whirls through the air as a gust of wind
772 picks up speed. The howling gets louder and more
773 intense. There's no left, right, backward or forward.
774 There's nothing but endless, unchanging whiteness.";
776 PlayerTo(backpacklocation);
779 "It feels like you're lost in a maze of snow without
780 a map. You keep trudging through the heavy snowfall,
781 not knowing if you're even going in any particular
782 direction anymore. The wind is really picking up now
783 and the snowfall is getting heavier. You have to keep
784 going. You can't let the snowstorm get the best of
785 you. You can't give up. You must find a way out of
786 this frozen wasteland. The snowstorm has made it
787 impossible to see anything more than a few feet in
791 "The wind is now a shrieking banshee, freezing and
792 relentless, as it throws the snow into your face,
793 blinding you. It's hard to walk against the brutal
794 winds. You can't see anything, but you must keep
795 going. There is no choice. You continue your way
796 through the snowy white void, what with the snow
797 piling up around you. The wind screams in your ears
798 and you can't see anything. Can't go back. Can't go
799 forward. You can't even see where you are. You hope
800 that, as long as you keep moving, you'll eventually
801 find a way out of this frozen wasteland.";
804 "The blizzard rages, but you continue to press on.
805 There's nothing here but you, the snowfall, and the
806 fierce wind howling through this frozen landscape.
807 This isn't just a place of cold and ice - it's
808 other-worldly. You trudge on and try to keep your
809 spirits up and not let the snowstorm get to you.
810 Every step is an effort. You wish you had the powers
811 of a superhero right now. You can barely see where
812 you are going. The wind knocks you down on your hands
813 and knees. You get back up, but you're slipping and
814 sliding all over the place.";
817 "You wander around in the impenetrable white void.
818 The wind is howling louder than ever. You try to
819 persevere. You don't know if you're going in circles
820 or what, but you start to feel that this frozen,
821 lifeless landscape is sucking away your very life
822 force. You can't see your hand in front of your face.
823 You can barely keep moving. Every step you take is
824 hard-fought. You just want this awful nightmare to
825 end. You begin to feel sleepy but you're in danger
826 here. You have to keep moving. Sleep is not an option
827 when you're in a place like this.";
830 "You try to remember the survival tips you've read
831 on the internet, but frankly, you don't remember most
832 of them right now. As you walk you try to keep your
833 mind occupied with anything other than the storm.
834 Nothing makes any sense and you feel like you're
835 starting to go in circles. The wind starts starts to
836 pick up as it begins howling louder than ever. You're
837 determined to live but the blizzard doesn't seem to
838 care whether you live or die. It just keeps howling
839 and shrieking. It's not getting any easier to move in
843 "You keep walking. The snow is drifting and piling
844 up around you, making movement almost impossible. You
845 look around the barren landscape, but there's nothing
846 nearby except snow. It's almost as if you're lost in
847 a white, endless void. You start to get disoriented.
848 You don't even know if you're walking in a circle or
849 not. The situation is looking very grim. Your life
850 feels as if it is slowly ebbing away in the
851 relentless grip of the snowstorm. It feels like
852 you've been wandering for hours, but that's probably
853 just your perception of time slipping away.";
856 "You can barely see anything, and you stumble
857 forward. You could be wandering aimlessly in any
858 direction right now and you wouldn't know the
859 difference. It's as if you're in a sea of white.
860 You're not sure that you're going in the right
861 direction but you can't stop now. There has to be
862 something here besides endless snow. You know that
863 staying here is a death sentence. You have to escape.
864 You're cold, tired, miserable, and desperate to get
865 out of this mess. You have no idea where you are. You
866 keep wandering through endless whiteness. You won't
870 "You're so cold that you begin to hallucinate, first
871 seeing the words ~Ventilation Control Room~ and then
872 yourself at a console. The hallucination quickly
876 "You see something in the distance but can't make it
877 out. You walk toward it to find out that it's the
878 hotel. You collapse in the lobby as the hotel staff
885 Object forest "Forest"
887 print_forest_description();
891 if (location == thedark) {
894 if (noun == d_obj || noun == u_obj) {
895 print_ret "You can't go that way.";
897 forest_location = forest_location++;
899 cant_go print_forest_description;
902 if (television has visited || computer has visited) {
904 "The grue is waiting behind a snowbank in
905 the distance, away from the light. ";
908 "From somewhere off in the dark distance, far away from the
909 light, a rock is hurled in your direction. It hits the
910 lantern, breaking it, and putting it out of commission. ";
913 lantern_fuel_left = 0;
918 [ check_for_cabin_lighting;
919 if (lightbulb has on) {
921 "The light from inside the cabin only penetrates a few
922 feet from the building. ";
925 if (lantern in player && lantern has on) {
927 "The lantern provides the only source of
930 if (location has light)
932 "The snow stings your face and you can barely see three
933 feet in front of you. ";
934 if (snowshoes in player && snowshoes has worn) {
936 "The snowshoes are doing their job by making sure
937 you don't sink into the snow. ";
941 Object eastofcabin "East Of Cabin"
943 print "It's dark outside. ";
944 check_for_cabin_lighting();
945 if (cabin_has_electricity == 1 && lantern in player && lantern_fuel_left
954 "The snow buildup is is too great to continue in that
961 "You're on the roof of the cabin, although it's hard
962 to tell where the snow buildup ends and the roof
963 begins. You can make out the trees around the cabin,
964 but you can't see very far out into the snowfield
966 if (roof hasnt visited)
968 " You hear a snowmobile approaching in the
969 distance. Is it your salvation? The snowmobile
970 quickly zooms by in front of the cabin and
971 disappears into the forest.";
972 StartDaemon(snowmobile);
973 if (roof has visited)
975 " There seems to be no movement, no sound, no
980 cant_go "Walking off the edge of a roof seems unwise.";
982 Object northofcabin "North Of Cabin"
985 "You're on the north side of the cabin. The wind is
986 howling and the snow is coming down; falling too fast
988 if (northofcabin hasnt visited)
990 " That might be a tree in the distance or a
991 shadowy figure - It's hard to tell in this
994 " The snow buildup here is so great that it's
995 almost level with the cabin's roof, which is to the
1001 cant_go "It's too steep to go in that direction safely.",
1004 if (noun == s_obj) {
1005 if (roof hasnt visited) {
1011 Object westofcabin "West Of Cabin"
1014 "The snow is falling so fast that you can barely see
1015 anything. You can't even be sure you're going in the
1017 if (westofcabin hasnt visited)
1019 " Then you hear a shuffling noise in the snow.
1020 There was something there and now it's gone. Or
1021 was it always there and you just never saw it?";
1022 print_ret " The snow buildup gets taller to the north.";
1027 "The snow buildup is is too great to continue in that
1031 Location = mainroom;
1032 thedark.description =
1033 "It is pitch black. You are likely to be eaten
1036 "You're trapped in a snowstorm while visiting the forest
1037 during your vacation to a small rural town. This is the worst
1038 snowstorm in more than 40 years. If only you had listened to
1039 the news. Well, it's too late for that. The snow has been
1040 falling for the past seven hours and shows no signs of
1041 stopping any time soon. You need to get back to your hotel in
1042 the town. You finally manage to find an old cabin in the
1043 woods and get inside but have no idea where you are. You're
1044 not dressed for this weather, and it's getting dark
1046 StartDaemon(lantern);
1047 StartDaemon(snowshoes);
1048 StartDaemon(snowsuit);
1054 print "You sink into the deep snow and are unable to move.";
1057 "Finally, you succumb to the cold. Your mind goes blank as
1058 you slip away into the endless darkness and the deep sleep
1062 ! Don't have 'take all' take the lightbulb in the mainroom of the
1065 [ ChooseObjects obj code;
1067 if (obj has scenery)
1071 if (obj == lightbulb)
1076 if (location == thedark && real_location == mainroom) {
1077 PlaceInScope(lightsocket);
1078 PlaceInScope(lightbulb);
1083 Object cabin "cabin" mainroom
1085 found_in mainroom bedroom office kitchenette southofcabin eastofcabin
1086 northofcabin westofcabin,
1090 "You'll have to say which compass direction to go
1095 Object snowmobile "snowmobile" thedark
1096 with name 'snowmobile',
1098 snowmobile_location = random(14);
1099 if (location == forest && forest_location == snowmobile_location)
1102 "A snowmobile approaches. The person says they
1103 saw your light and came to rescue you.^";
1110 Object grue "grue" thedark
1112 name 'grue' 'monster',
1113 grue_active_around_cabin,
1114 grue_active_in_the_dark,
1116 if (location == thedark) {
1117 switch (++(self.grue_active_in_the_dark)) {
1119 "^You hear horrible gurgling sounds in the
1122 "^You hear the clink of razor-sharp claws
1126 "^Your last memory is of the slavering fangs of
1127 the horrible Grue as it claims you for a meal.";
1130 if (location == mainroom || location == office || location ==
1131 kitchenette || location == bedroom) {
1132 switch (++(self.grue_active_around_cabin)) {
1134 "^You hear the wind howling outside, if it is the
1137 "^You hear horrible gurgling sounds outside.";
1139 "^The noise outside gets louder.";
1141 "^You hear the sound of shuffling feet outside.";
1143 "^You hear something sniffing around the cabin.";
1145 "^You hear a deep guttural sound from outside
1146 that sends a chill down your spine.";
1148 "^You hear something scratching on the cabin
1149 walls from outside.";
1151 "^You hear something howl outside. It's a
1152 chilling, mournful wail that sends a chill down
1155 "^A thunderous CRACK can be heard coming from
1158 "^There's a sudden crashing sound as something is
1159 thrown against the cabin walls.";
1161 "^Something begins to beat against the walls of
1162 the cabin, as if trying to to break in. It makes a
1163 loud, thunderous noise.";
1165 "^The wind is howling and the walls are being
1166 beaten so hard it feels like the cabin is
1169 "^Suddenly, there's ominous silence from outside
1173 if (location == mainroom || location == office || location ==
1174 kitchenette || location == bedroom && self.grue_active_around_cabin
1176 print "^The lights flicker and suddenly go out.^";
1177 cabin_has_electricity = 0;
1179 give mainroom ~light;
1181 give kitchenette ~light;
1182 give bedroom ~light;
1183 give eastofcabin ~light;
1184 give southofcabin ~light;
1192 "Oh, no! You have walked into the slavering fangs of a lurking
1197 print ", earning you the rank of ";
1218 "^If you need help try some of the commands from:
1219 ^https://pr-if.org/doc/play-if-card/^";
1223 print "Nothing obvious happens.^";
1233 print_ret "Doing that would achieve little.";
1260 * 'up' / 'open' noun -> Tear;
1266 * 'up' / 'open' noun -> Tear;
1269 * 'through' / 'out' / 'via' noun -> Enter;
1272 * 'through' / 'out' / 'via' noun -> Enter;
1275 * 'through' / 'out' / 'via' noun -> Enter;
1278 * 'through' / 'out' / 'via' noun -> Climb;
1281 * 'through' / 'out' / 'via' noun -> Enter;
1284 * 'out' / 'outside' -> VagueGo;
1287 * 'out' / 'outside' / 'outside' 'of' noun -> VagueGo;
1290 * 'in' / 'into' / 'inside' -> VagueGo;
1293 * 'in' / 'into' / 'inside' / 'inside' 'of' noun -> VagueGo;
1298 Extend 'leave' first