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.",
60 "The weight of the snow against the door is such that it
66 Object frontdoor "front door" mainroom
67 with name 'door' 'front',
69 "The wooden door is made of thick oak wood with the shape
70 of a bear claw engraved in it.",
72 if (location == mainroom)
73 print "door to the outside";
75 print "door to the cabin";
78 found_in mainroom southofcabin,
80 if (location == mainroom)
86 if (location == mainroom)
94 "The weight of the snow against the door is such that
97 has scenery door openable;
99 Object bearclaw "bear claw" mainroom
100 with name 'bear' 'claw',
102 "It's in the shape of a thin, sharp claw with three jagged
103 points at the top of it.",
106 Object sofa "sofa" mainroom
107 with name 'sofa' 'couch',
109 "The sofa is in poor shape. The upholstery is ripped and
110 there are several holes in it.",
113 if (action_to_be == ##Eat)
117 Take, Pull, Push, PushDir, Turn:
118 print_ret (The) self, " is too heavy for that.";
123 has scenery supporter enterable;
125 Object coffeetable "coffee table" mainroom
126 with name 'coffee' 'table',
128 "The old coffee table looks as if it's had quite a bit of
129 use. There are burn marks covering it and the paint is
130 worn off in most places.",
133 if (action_to_be == ##Eat)
137 Take, Pull, Push, PushDir, Turn:
138 print_ret (The) self, " is too heavy for that.";
140 has scenery supporter enterable;
142 Object lantern "copper lantern" coffeetable
143 with name 'lantern' 'copper' 'lamp',
145 "This is an exceptionally beautiful lantern, made of
146 fired copper, and polished until it shines. About eleven
147 inches high, with a base of about 5 inches or so in
148 diameter and a large, brass-closed hook at the top. A
149 rainbow of unique colors run through the copper. The
150 glass in the lamp has a fresnel type of design, which is
151 used to distribute light widely.",
154 if (lantern has on) {
155 lantern_fuel_left = 0;
160 "Suddenly, the lantern's flame begins to flicker
161 violently within its glass prison and then
162 extinguishes itself.";
167 if (lantern_fuel_left > 0) {
169 StartTimer(lantern, lantern_fuel_left);
173 "You snap the switch a few times, but nothing
182 lantern_fuel_left = lantern.time_left;
183 if (lantern has on && lantern_fuel_left <= 5)
184 print_ret "The lantern's fuel runs low.";
188 Object television "flat-screen TV" mainroom
189 with name 'TV' 'television' 'flat' 'screen' 'flat-screen',
191 "The flat-screen TV looks fairly modern but it's been
192 broken in a fight and the screen is dangling out.",
194 Take, Pull, Push, PushDir, Turn, Remove:
196 "The damaged electronics throw some sparks,
197 and you get a mild shock. Perhaps it's best left
200 if (television hasnt visited) {
203 "Despite the significant damage, the television
204 comes to life in one last valiant attempt to be
205 useful. Your favorite news program is on: U.S.
206 News And Grue Report. The news anchor is giving a
207 warning of grue sightings in the area of the
208 forest before the television finally dies.^";
209 give television visited;
213 "The flat-screen TV is broken and can't be
218 has scenery switchable;
220 Object lightsocket "light socket" mainroom
221 with name 'socket' 'lightsocket',
223 Take, Pull, Push, PushDir, Turn:
225 "You don't have the tools to remove a light
228 if (noun ~= lightbulb) {
232 " into the light socket? Maybe you should come
233 with a warning label because you contain more than
234 a trace amount of nut.";
236 if (noun == lightbulb && lightbulb has on) {
239 give kitchenette light;
241 give eastofcabin light;
242 give southofcabin light;
245 has scenery container transparent open;
247 Object lightbulb "light bulb" lightsocket
248 with name 'light' 'bulb' 'lightbulb',
251 if (lightbulb in lightsocket) {
252 if (cabin_has_electricity == 1) {
255 give kitchenette light;
257 give eastofcabin light;
258 give southofcabin light;
262 "You flip the switch a few times, but nothing
268 "Turn on a lightbulb when it's not in the
269 socket? What a strange idea.";
273 Take, Pull, Push, PushDir, Turn, SwitchOff:
275 give mainroom ~light;
277 give kitchenette ~light;
279 give eastofcabin ~light;
280 give southofcabin ~light;
284 Object office "Office"
286 "There seems to have been quite a fight in here. The room
287 is a wreck. Holes are in the walls and the window is
288 broken, letting in the cold air from outside. Chunks of
289 drywall and insulation cover the floor. The desk has a
290 bullet hole through the middle. The main room is to the
295 if (snowshoes has worn)
297 "You can't fit through the window while
298 wearing the snow shoes.";
299 if (eastofcabin hasnt visited) {
309 Object desk "solid oak desk" office
310 with name 'solid' 'oak' 'desk',
312 "The desk is old and made of solid oak. The right side of
313 it has been smashed and all of the drawers have been
314 removed. A bullet hole goes straight through the middle of
317 Take, Pull, Push, PushDir, Turn:
318 print_ret (The) self, " is too heavy for that.";
320 has scenery supporter enterable;
322 Object businesscard "business card" desk
323 with name 'business' 'card',
325 "The business card is white and has blacked edges. It
326 bears the name ~Lasting Solutions~, a local data recovery
327 company, in bold letters on the top. The company's
328 website URL is printed in blue at the bottom.";
330 Object salesreceipt "sales receipt" desk
331 with name 'sales' 'receipt',
333 "The sales receipt is for $200, dated three years ago.
334 It's printed on old tractor feed printer paper and bears
335 the name ~Lasting Solutions~, a local data recovery
336 company. A handwritten note is scrawled on the bottom:
337 ~Start working on these hard drives soon.~";
339 Object computer "computer" desk
340 with name 'computer' 'PC',
342 "It's a heavy older model that appears to have been
343 seriously damaged in a fight. It's clearly on its last
344 legs but is perhaps still useful.",
346 Take, Pull, Push, PushDir, Turn:
347 print_ret (The) self, " is too heavy for that.";
349 if (computer hasnt visited) {
352 "The computer makes some concerning noises while
353 lights on the front also illuminate. The last
354 file is quickly displayed. ~If anyone else reads
355 this, you're in serious danger. I've been fighting
356 a ferocious grue for the last three days. I'm
357 almost out of supplies and can't last much
358 longer. I'm going to take the last of the supplies
359 and escape through the office window in a
360 last-ditch effort to get away and get back into
361 town. I hope I can make it.~ The computer then
362 makes a sickly sound and finally dies as some
363 smoke comes out of it.^";
364 give computer visited;
368 "The display briefly flickers but nothing
375 Object drywall "drywall" office
376 with name 'drywall' 'dry' 'wall',
378 Take, Pull, Push, PushDir, Turn:
379 print_ret "Taking that would achieve little.";
383 Object insulation "insulation" office
384 with name 'insulation',
386 Take, Pull, Push, PushDir, Turn:
387 print_ret "Taking that would achieve little.";
391 Object bullethole "bullet hole" desk
392 with name 'bullet' 'hole' 'holes',
394 "Looks to have come from something that's capable of
395 doing a lot of damage.",
396 found_in desk bedroom,
399 Object window "window" office
400 with name 'window' 'windows',
402 "The window faces the east side of the cabin. It's broken,
403 letting in the cold air from outside.",
405 if (location == office)
408 print "window into the cabin";
411 found_in office eastofcabin,
413 if (location == office)
419 if (location == office)
426 print_ret "The window faces the east side of the cabin.";
429 "The window's broken so it's not clear how
432 has scenery door openable open;
434 Object kitchenette "Kitchenette"
436 "The kitchenette is empty. A sink, you think, though it's
437 hard to tell what's a pipe and what's a faucet. A
438 refrigerator, standing open and empty. The door has been
439 ripped off. There's no indication as to where it
440 went. There's no food anywhere in here. The main room is
445 Object refrigerator "refrigerator" kitchenette
446 with name 'fridge' 'refrigerator',
448 "An old rusty refrigerator, standing open and empty. The
449 door has been ripped off. There's no indication as to
452 Take, Pull, Push, PushDir, Turn:
453 print_ret (The) self, " is too heavy for that.";
455 print_ret (The) self, " door is missing.";
457 has scenery enterable container openable open;
459 Object sink "sink" kitchenette
460 with name 'sink' 'pipe' 'faucet',
462 "A sink, you think, though it's hard to tell what's a
463 pipe and what's a faucet.",
467 "Pipes from in the walls make a groaning sound,
468 almost like pain and despair. No water comes out.";
470 has scenery container switchable;
472 Object bedroom "Bedroom"
474 "This bedroom is small and cramped, and looks like a
475 major fight happened as the exterior wall has bullet
476 holes. There's a bare mattress, torn to shreds. The main
477 room is to the south.",
481 Object bed "bed" bedroom
482 with name 'bed' 'mattress',
483 with description "The mattress is bare and empty.",
485 Take, Pull, Push, PushDir, Turn:
486 print_ret (The) self, " is too heavy for that.";
488 has scenery supporter;
490 Object suitcase "suitcase" bedroom
491 with name 'suitcase' 'case',
493 "The suitcase is made of a light metallic material that
494 you can't quite make out. The color of it is somewhere
495 between silver and grey.",
496 has container open openable;
498 Object snowsuit "snowsuit" suitcase
499 with name 'snowsuit' 'snow' 'suit',
501 "The snowsuit is blue, decorated with white and purple
502 designs. On the chest are the letters ~CE~ in purple.",
505 if (snowsuit hasnt visited) {
507 give snowsuit visited;
510 if (snowshoes in player && snowshoes has worn) {
512 "The snowsuit can't fit over the
516 if (snowshoes in player && snowshoes has worn) {
518 "The snowsuit can't be taken off over the
523 if (location ~= mainroom && location ~= office && location ~=
524 kitchenette && location ~= bedroom && location ~= thedark &&
525 snowsuit hasnt worn) {
526 body_temperature = --body_temperature;
528 if (location == mainroom || location == office || location ==
529 kitchenette || location == bedroom || snowsuit has worn && body_temperature
531 body_temperature = ++body_temperature;
533 if (body_temperature == 0) {
536 if (body_temperature <= 5)
538 "You're shivering uncontrollably, and it's hard
539 to move. You feel very exhausted and drowsy. It's
540 all you can do to keep from falling over.";
541 if (body_temperature > 5 && location ~= mainroom && location
542 ~= office && location ~= kitchenette && location ~= bedroom
543 && location ~= thedark && snowsuit hasnt worn) {
544 switch (body_temperature) {
546 "The feeling of cold overwhelms you. Surely the
547 cold will get to you before anything else does.
550 "You can feel yourself getting colder and
553 "You can see your own breath freezing in the air,
554 forming little clouds.";
556 "You shiver in the cold.";
558 "You continue to shiver in the cold.";
560 "Your hands grow numb from the cold.";
562 "You continue shivering in order to keep warm.";
564 "Your shivering grows worse as your body becomes
565 colder by the minute.";
567 "Your teeth begin to chatter as you desperately
568 try to warm yourself up.";
570 "Your shivering intensifies as your body begins
571 to freeze over from the cold.";
573 "Your fingers become stiff and you feel sharp
574 pains all over your body.";
576 "The cold has gotten to a point where it is too
577 much for you. You begin to shiver
580 "Your eyesight begins to fade and you can't even
581 feel yourself shivering anymore.";
583 "You can feel your body shutting down from the
584 cold as you slowly begin to lose consciousness.";
590 Object snowshoes "snowshoes" bedroom
591 with name 'snowshoe' 'snowshoes' 'snow' 'boot' 'boots' 'shoe' 'shoes'
594 "They're light blue in color and have a thick, hard
595 rubber bottom that's attached to a metal frame that keeps
596 you from sinking into the snow. They look to be warm and
600 print_ret (The) self,
601 " fit perfectly and go up to your
605 if (location ~= mainroom && location ~= office && location ~=
606 kitchenette && location ~= bedroom && location ~= thedark &&
607 location ~= eastofcabin && snowshoes hasnt worn) {
611 has pluralname clothing;
613 Object southofcabin "South Of Cabin"
616 "The wind is howling, and there's snow flying
617 everywhere. The snow buildup seems to get higher to
619 if (snowsuit hasnt worn)
621 "It's really cold and you're not dressed for
623 if (frontdoor has open) {
624 check_for_cabin_lighting();
626 if (snowshoes has worn && lantern in player && eastofcabin hasnt
627 visited && lantern_fuel_left > 0) {
638 Object truckspot "Forest"
640 "The blizzard is still going on. You don't think it's
641 letting up any time soon. There is a blue and white
642 pickup truck here. It looks like it got stuck in the snow
643 and is slowly being covered by it. The windows are iced
644 up and you can't see inside.",
647 forest_location = forest_location++;
651 Object truck "blue and white pickup truck" truckspot
652 with name 'pickup' 'truck' 'door' 'doors',
654 "The blue and white pickup truck looks old and battered.
655 The paint has chipped and faded. The windows are iced up
656 and you can't see inside.",
658 Take, Pull, Push, PushDir, Turn:
659 print_ret (The) self, " is too heavy for that.";
662 "The windows are iced up and you can't see
665 print_ret (The) self, " is frozen shut.";
667 has scenery supporter enterable openable;
669 Object backpacklocation "Forest"
671 "You keep walking and walking. The snowfall is still as
672 heavy as ever. As you continue trudging through the snow,
673 you wonder if you're actually moving in the right
674 direction. You can't see anything through the blizzard.
675 You wonder if you might be going in circles and end up
676 wandering around forever, never finding your way out of
677 this white void. You're unsure of which way to go. The
678 snowfall is so thick that you can barely see your hand if
679 you hold it right in front of your face. You have no idea
680 how far you've come or in what direction.",
683 forest_location = forest_location++;
687 Object backpack "backpack" backpacklocation
688 with name 'backpack' 'back' 'pack' 'blood',
690 "The backpack is of medium size, black, with three white
691 stripes running vertically on the back. The middle stripe
692 is broken up by a red line running down the center of it
693 toward the bottom of the backpack. On the side are the
694 letters ~CE~ in purple. The backpack is covered in blood,
695 as if the owner met with an untimely demise.",
698 if (backpack hasnt visited) {
700 give backpack visited;
703 has clothing container openable;
705 Object flashlight "flashlight" backpack
706 with name 'flashlight' 'flash' 'light' 'torch',
708 "It looks like a cheap red plastic model, about eight
712 if (flashlight hasnt visited) {
714 give flashlight visited;
716 give flashlight light;
718 give flashlight ~light;
722 [ print_forest_description;
723 if (location ~= thedark) {
724 switch (forest_location) {
727 "You push on despite the bitter cold and the heavy
728 snowfall as you come to a fork. There are two ways to
729 go here, one involves a hill to the south. The
730 other way is continuing through the woods to the
734 "The wind is bitterly cold. You plow through the
735 snowfall, which is still as heavy as ever. You can
736 barely see where you are going, making it hard to
737 tell which direction is which. Out of the corner of
738 your eye, you spot a tall, shadowy figure lingering
739 at the edge of your vision. When you turn to look at
740 it directly, however, it disappears. You continue
741 walking. The wind is howling louder than ever. The
742 endless snowfall makes it difficult to see where
743 you're going. You can't tell where the white sky and
744 white ground begin and end.";
749 "You trudge through the snow. The wind is really
750 strong and howling like a banshee. You hear a
751 horrible howl in the distance or is it the wind?
752 Looking around you see nothing in this barren
753 landscape but snow. You're not sure what to make of
754 it, but you don't want to stick around to find out.
755 The whole world is white. You can barely see five
756 feet ahead of you. You hope you're going the right
757 way. This place is so desolate and barren.";
760 "You think you might can see a large figure stepping
761 out of the trees and moving in the distance but the
762 wind is blowing hard and whipping up massive amounts
763 of snow, making it hard to tell for sure. Your breath
764 billows out in huge clouds. If it keeps blowing like
765 this, you're not sure if you'll ever be able to get
766 back. Snow whirls through the air as a gust of wind
767 picks up speed. The howling gets louder and more
768 intense. There's no left, right, backward or forward.
769 There's nothing but endless, unchanging whiteness.";
771 PlayerTo(backpacklocation);
774 "It feels like you're lost in a maze of snow without
775 a map. You keep trudging through the heavy snowfall,
776 not knowing if you're even going in any particular
777 direction anymore. The wind is really picking up now
778 and the snowfall is getting heavier. You have to keep
779 going. You can't let the snowstorm get the best of
780 you. You can't give up. You must find a way out of
781 this frozen wasteland. The snowstorm has made it
782 impossible to see anything more than a few feet in
786 "The wind is now a shrieking banshee, freezing and
787 relentless, as it throws the snow into your face,
788 blinding you. It's hard to walk against the brutal
789 winds. You can't see anything, but you must keep
790 going. There is no choice. You continue your way
791 through the snowy white void, what with the snow
792 piling up around you. The wind screams in your ears
793 and you can't see anything. Can't go back. Can't go
794 forward. You can't even see where you are. You hope
795 that, as long as you keep moving, you'll eventually
796 find a way out of this frozen wasteland.";
799 "The blizzard rages, but you continue to press on.
800 There's nothing here but you, the snowfall, and the
801 fierce wind howling through this frozen landscape.
802 This isn't just a place of cold and ice - it's
803 other-worldly. You trudge on and try to keep your
804 spirits up and not let the snowstorm get to you.
805 Every step is an effort. You wish you had the powers
806 of a superhero right now. You can barely see where
807 you are going. The wind knocks you down on your hands
808 and knees. You get back up, but you're slipping and
809 sliding all over the place.";
812 "You wander around in the impenetrable white void.
813 The wind is howling louder than ever. You try to
814 persevere. You don't know if you're going in circles
815 or what, but you start to feel that this frozen,
816 lifeless landscape is sucking away your very life
817 force. You can't see your hand in front of your face.
818 You can barely keep moving. Every step you take is
819 hard-fought. You just want this awful nightmare to
820 end. You begin to feel sleepy but you're in danger
821 here. You have to keep moving. Sleep is not an option
822 when you're in a place like this.";
825 "You try to remember the survival tips you've read
826 on the internet, but frankly, you don't remember most
827 of them right now. As you walk you try to keep your
828 mind occupied with anything other than the storm.
829 Nothing makes any sense and you feel like you're
830 starting to go in circles. The wind starts starts to
831 pick up as it begins howling louder than ever. You're
832 determined to live but the blizzard doesn't seem to
833 care whether you live or die. It just keeps howling
834 and shrieking. It's not getting any easier to move in
838 "You keep walking. The snow is drifting and piling
839 up around you, making movement almost impossible. You
840 look around the barren landscape, but there's nothing
841 nearby except snow. It's almost as if you're lost in
842 a white, endless void. You start to get disoriented.
843 You don't even know if you're walking in a circle or
844 not. The situation is looking very grim. Your life
845 feels as if it is slowly ebbing away in the
846 relentless grip of the snowstorm. It feels like
847 you've been wandering for hours, but that's probably
848 just your perception of time slipping away.";
851 "You can barely see anything, and you stumble
852 forward. You could be wandering aimlessly in any
853 direction right now and you wouldn't know the
854 difference. It's as if you're in a sea of white.
855 You're not sure that you're going in the right
856 direction but you can't stop now. There has to be
857 something here besides endless snow. You know that
858 staying here is a death sentence. You have to escape.
859 You're cold, tired, miserable, and desperate to get
860 out of this mess. You have no idea where you are. You
861 keep wandering through endless whiteness. You won't
865 "You're so cold that you begin to hallucinate, first
866 seeing the words ~Ventilation Control Room~ and then
867 yourself at a console. The hallucination quickly
872 "You see something in the distance but can't make it
873 out. You walk toward it to find out that it's the
874 hotel. You collapse in the lobby as the hotel staff
880 Object forest "Forest"
882 print_forest_description();
886 if (location == thedark) {
889 if (noun == d_obj || noun == u_obj) {
890 print_ret "You can't go that way.";
892 forest_location = forest_location++;
894 cant_go print_forest_description;
897 if (television has visited || computer has visited) {
899 "The grue is waiting behind a snowbank in
900 the distance, away from the light. ";
903 "From somewhere off in the dark distance, far away from the
904 light, a rock is hurled in your direction. It hits the
905 lantern, breaking it, and putting it out of commission. ";
908 lantern_fuel_left = 0;
913 [ check_for_cabin_lighting;
914 if (lightbulb has on) {
916 "The light from inside the cabin only penetrates a few
917 feet from the building. ";
920 if (lantern in player && lantern has on) {
922 "The lantern provides the only source of
925 if (location has light)
927 "The snow stings your face and you can barely see three
928 feet in front of you. ";
929 if (snowshoes in player && snowshoes has worn) {
931 "The snowshoes are doing their job by making sure
932 you don't sink into the snow. ";
936 Object eastofcabin "East Of Cabin"
938 print "It's dark outside. ";
939 check_for_cabin_lighting();
940 if (cabin_has_electricity == 1 && lantern in player && lantern_fuel_left
949 "The snow buildup is is too great to continue in that
956 "You're on the roof of the cabin, although it's hard
957 to tell where the snow buildup ends and the roof
958 begins. You can make out the trees around the cabin,
959 but you can't see very far out into the snowfield
961 if (roof hasnt visited)
963 " You hear a snowmobile approaching in the
964 distance. Is it your salvation? The snowmobile
965 quickly zooms by in front of the cabin and
966 disappears into the forest.";
967 StartDaemon(snowmobile);
968 if (roof has visited)
970 " There seems to be no movement, no sound, no
975 cant_go "Walking off the edge of a roof seems unwise.";
977 Object northofcabin "North Of Cabin"
980 "You're on the north side of the cabin. The wind is
981 howling and the snow is coming down; falling too fast
983 if (northofcabin hasnt visited)
985 " That might be a tree in the distance or a
986 shadowy figure - It's hard to tell in this
989 " The snow buildup here is so great that it's
990 almost level with the cabin's roof, which is to the
996 cant_go "It's too steep to go in that direction safely.",
1000 if (roof hasnt visited) {
1006 Object westofcabin "West Of Cabin"
1009 "The snow is falling so fast that you can barely see
1010 anything. You can't even be sure you're going in the
1012 if (westofcabin hasnt visited)
1014 " Then you hear a shuffling noise in the snow.
1015 There was something there and now it's gone. Or
1016 was it always there and you just never saw it?";
1017 print_ret " The snow buildup gets taller to the north.";
1022 "The snow buildup is is too great to continue in that
1026 Location = mainroom;
1027 thedark.description =
1028 "It is pitch black. You are likely to be eaten
1031 "You're trapped in a snowstorm while visiting the forest
1032 during your vacation to a small rural town. This is the worst
1033 snowstorm in more than 40 years. If only you had listened to
1034 the news. Well, it's too late for that. The snow has been
1035 falling for the past seven hours and shows no signs of
1036 stopping any time soon. You need to get back to your hotel in
1037 the town. You finally manage to find an old cabin in the
1038 woods and get inside but have no idea where you are. You're
1039 not dressed for this weather, and it's getting dark
1041 StartDaemon(lantern);
1042 StartDaemon(snowshoes);
1043 StartDaemon(snowsuit);
1049 print "You sink into the deep snow and are unable to move.";
1052 "Finally, you succumb to the cold. Your mind goes blank as
1053 you slip away into the endless darkness and the deep sleep
1057 ! Don't have 'take all' take the lightbulb in the mainroom of the
1060 [ ChooseObjects obj code;
1062 if (obj has scenery)
1066 if (obj == lightbulb)
1071 if (location == thedark && real_location == mainroom) {
1072 PlaceInScope(lightsocket);
1073 PlaceInScope(lightbulb);
1078 Object cabin "cabin" mainroom
1080 found_in mainroom bedroom office kitchenette southofcabin eastofcabin
1081 northofcabin westofcabin,
1085 "You'll have to say which compass direction to go
1090 Object snowmobile "snowmobile" thedark
1091 with name 'snowmobile',
1093 snowmobile_location = random(14);
1094 if (location == forest && forest_location == snowmobile_location)
1098 "A snowmobile approaches. The person says they
1099 saw your light and came to rescue you.";
1105 Object grue "grue" thedark
1107 name 'grue' 'monster',
1108 grue_active_around_cabin,
1109 grue_active_in_the_dark,
1111 if (location == thedark) {
1112 switch (++(self.grue_active_in_the_dark)) {
1114 "^You hear horrible gurgling sounds in the
1117 "^You hear the clink of razor-sharp claws
1121 "^Your last memory is of the slavering fangs of
1122 the horrible Grue as it claims you for a meal.";
1125 if (location == mainroom || location == office || location ==
1126 kitchenette || location == bedroom) {
1127 switch (++(self.grue_active_around_cabin)) {
1129 "^You hear the wind howling outside, if it is the
1132 "^You hear horrible gurgling sounds outside.";
1134 "^The noise outside gets louder.";
1136 "^You hear the sound of shuffling feet outside.";
1138 "^You hear something sniffing around the cabin.";
1140 "^You hear a deep guttural sound from outside
1141 that sends a chill down your spine.";
1143 "^You hear something scratching on the cabin
1144 walls from outside.";
1146 "^You hear something howl outside. It's a
1147 chilling, mournful wail that sends a chill down
1150 "^A thunderous CRACK can be heard coming from
1153 "^There's a sudden crashing sound as something is
1154 thrown against the cabin walls.";
1156 "^Something begins to beat against the walls of
1157 the cabin, as if trying to to break in. It makes a
1158 loud, thunderous noise.";
1160 "^The wind is howling and the walls are being
1161 beaten so hard it feels like the cabin is
1164 "^Suddenly, there's ominous silence from outside
1168 if (location == mainroom || location == office || location ==
1169 kitchenette || location == bedroom && self.grue_active_around_cabin
1171 print "^The lights flicker and suddenly go out.^";
1172 cabin_has_electricity = 0;
1174 give mainroom ~light;
1176 give kitchenette ~light;
1177 give bedroom ~light;
1178 give eastofcabin ~light;
1179 give southofcabin ~light;
1187 "Oh, no! You have walked into the slavering fangs of a lurking
1192 print ", earning you the rank of ";
1213 "^If you need help try some of the commands from:
1214 ^https://pr-if.org/doc/play-if-card/^";
1218 print "Nothing obvious happens.^";
1228 print_ret "Doing that would achieve little.";
1255 * 'up' / 'open' noun -> Tear;
1261 * 'up' / 'open' noun -> Tear;
1264 * 'through' / 'out' / 'via' noun -> Enter;
1267 * 'through' / 'out' / 'via' noun -> Enter;
1270 * 'through' / 'out' / 'via' noun -> Enter;
1273 * 'through' / 'out' / 'via' noun -> Climb;
1276 * 'through' / 'out' / 'via' noun -> Enter;
1279 * 'out' / 'outside' -> VagueGo;
1282 * 'out' / 'outside' / 'outside' 'of' noun -> VagueGo;
1285 * 'in' / 'into' / 'inside' -> VagueGo;
1288 * 'in' / 'into' / 'inside' / 'inside' 'of' noun -> VagueGo;
1293 Extend 'leave' first