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.";
300 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. The bed is lying on the floor, torn to shreds. It
477 has no sheets, just a bare mattress. The main room is to
482 Object bed "bed" bedroom
483 with name 'bed' 'mattress',
484 with description "The mattress is bare and empty.",
486 Take, Pull, Push, PushDir, Turn:
487 print_ret (The) self, " is too heavy for that.";
489 has scenery supporter;
491 Object suitcase "suitcase" bedroom
492 with name 'suitcase' 'case',
494 "The suitcase is made of a light metallic material that
495 you can't quite make out. The color of it is somewhere
496 between silver and grey.",
497 has container open openable;
499 Object snowsuit "snowsuit" suitcase
500 with name 'snowsuit' 'snow' 'suit',
502 "The snowsuit is blue, decorated with white and purple
503 designs. On the chest are the letters ~CE~ in purple.",
506 if (snowsuit hasnt visited) {
508 give snowsuit visited;
511 if (snowshoes in player && snowshoes has worn) {
513 "The snowsuit can't fit over the
517 if (snowshoes in player && snowshoes has worn) {
519 "The snowsuit can't be taken off over the
524 if (location ~= mainroom && location ~= office && location ~=
525 kitchenette && location ~= bedroom && location ~= thedark &&
526 snowsuit hasnt worn) {
527 body_temperature = --body_temperature;
529 if (location == mainroom || location == office || location ==
530 kitchenette || location == bedroom || snowsuit has worn && body_temperature
532 body_temperature = ++body_temperature;
534 if (body_temperature == 0) {
537 if (body_temperature <= 5)
539 "You're shivering uncontrollably, and it's hard
540 to move. You feel very exhausted and drowsy. It's
541 all you can do to keep from falling over.";
542 if (body_temperature > 5 && location ~= mainroom && location
543 ~= office && location ~= kitchenette && location ~= bedroom
544 && location ~= thedark && snowsuit hasnt worn) {
545 switch (body_temperature) {
547 "The feeling of cold overwhelms you. Surely the
548 cold will get to you before anything else does.
551 "You can feel yourself getting colder and
554 "You can see your own breath freezing in the air,
555 forming little clouds.";
557 "You shiver in the cold.";
559 "You continue to shiver in the cold.";
561 "Your hands grow numb from the cold.";
563 "You continue shivering in order to keep warm.";
565 "Your shivering grows worse as your body becomes
566 colder by the minute.";
568 "Your teeth begin to chatter as you desperately
569 try to warm yourself up.";
571 "Your shivering intensifies as your body begins
572 to freeze over from the cold.";
574 "Your fingers become stiff and you feel sharp
575 pains all over your body.";
577 "The cold has gotten to a point where it is too
578 much for you. You begin to shiver
581 "Your eyesight begins to fade and you can't even
582 feel yourself shivering anymore.";
584 "You can feel your body shutting down from the
585 cold as you slowly begin to lose consciousness.";
591 Object snowshoes "snowshoes" bedroom
592 with name 'snowshoe' 'snowshoes' 'snow' 'boot' 'boots' 'shoe' 'shoes'
595 "They're light blue in color and have a thick, hard
596 rubber bottom that's attached to a metal frame that keeps
597 you from sinking into the snow. They look to be warm and
601 print_ret (The) self,
602 " fit perfectly and go up to your
606 if (location ~= mainroom && location ~= office && location ~=
607 kitchenette && location ~= bedroom && location ~= thedark &&
608 location ~= eastofcabin && snowshoes hasnt worn) {
612 has pluralname clothing;
614 Object southofcabin "South Of Cabin"
617 "The wind is howling, and there's snow flying
618 everywhere. The snow buildup seems to get higher to
620 if (snowsuit hasnt worn)
622 "It's really cold and you're not dressed for
624 if (frontdoor has open) {
625 check_for_cabin_lighting();
627 if (snowshoes has worn && lantern in player && eastofcabin hasnt
628 visited && lantern_fuel_left > 0) {
639 Object truckspot "Forest"
641 "The blizzard is still going on. You don't think it's
642 letting up any time soon. There is a blue and white
643 pickup truck here. It looks like it got stuck in the snow
644 and is slowly being covered by it. The windows are iced
645 up and you can't see inside.",
648 forest_location = forest_location++;
652 Object truck "blue and white pickup truck" truckspot
653 with name 'pickup' 'truck' 'door' 'doors',
655 "The blue and white pickup truck looks old and battered.
656 The paint has chipped and faded. The windows are iced up
657 and you can't see inside.",
659 Take, Pull, Push, PushDir, Turn:
660 print_ret (The) self, " is too heavy for that.";
663 "The windows are iced up and you can't see
666 print_ret (The) self, " is frozen shut.";
668 has scenery supporter enterable openable;
670 Object backpacklocation "Forest"
672 "You keep walking and walking. The snowfall is still as
673 heavy as ever. As you continue trudging through the snow,
674 you wonder if you're actually moving in the right
675 direction. You can't see anything through the blizzard.
676 You wonder if you might be going in circles and end up
677 wandering around forever, never finding your way out of
678 this white void. You're unsure of which way to go. The
679 snowfall is so thick that you can barely see your hand if
680 you hold it right in front of your face. You have no idea
681 how far you've come or in what direction.",
684 forest_location = forest_location++;
688 Object backpack "backpack" backpacklocation
689 with name 'backpack' 'back' 'pack' 'blood',
691 "The backpack is of medium size, black, with three white
692 stripes running vertically on the back. The middle stripe
693 is broken up by a red line running down the center of it
694 toward the bottom of the backpack. On the side are the
695 letters ~CE~ in purple. The backpack is covered in blood,
696 as if the owner met with an untimely demise.",
699 if (backpack hasnt visited) {
701 give backpack visited;
704 has clothing container openable;
706 Object flashlight "flashlight" backpack
707 with name 'flashlight' 'flash' 'light' 'torch',
709 "It looks like a cheap red plastic model, about eight
713 if (flashlight hasnt visited) {
715 give flashlight visited;
717 give flashlight light;
723 [ print_forest_description;
724 if (location ~= thedark) {
725 switch (forest_location) {
728 "You push on despite the bitter cold and the heavy
729 snowfall as you come to a fork. There are two ways to
730 go here, one involves a hill to the south. The
731 other way is continuing through the woods to the
735 "The wind is bitterly cold. You plow through the
736 snowfall, which is still as heavy as ever. You can
737 barely see where you are going, making it hard to
738 tell which direction is which. Out of the corner of
739 your eye, you spot a tall, shadowy figure lingering
740 at the edge of your vision. When you turn to look at
741 it directly, however, it disappears. You continue
742 walking. The wind is howling louder than ever. The
743 endless snowfall makes it difficult to see where
744 you're going. You can't tell where the white sky and
745 white ground begin and end.";
750 "You trudge through the snow. The wind is really
751 strong and howling like a banshee. You hear a
752 horrible howl in the distance or is it the wind?
753 Looking around you see nothing in this barren
754 landscape but snow. You're not sure what to make of
755 it, but you don't want to stick around to find out.
756 The whole world is white. You can barely see five
757 feet ahead of you. You hope you're going the right
758 way. This place is so desolate and barren.";
761 "You think you might can see a large figure stepping
762 out of the trees and moving in the distance but the
763 wind is blowing hard and whipping up massive amounts
764 of snow, making it hard to tell for sure. Your breath
765 billows out in huge clouds. If it keeps blowing like
766 this, you're not sure if you'll ever be able to get
767 back. Snow whirls through the air as a gust of wind
768 picks up speed. The howling gets louder and more
769 intense. There's no left, right, backward or forward.
770 There's nothing but endless, unchanging whiteness.";
772 PlayerTo(backpacklocation);
775 "It feels like you're lost in a maze of snow without
776 a map. You keep trudging through the heavy snowfall,
777 not knowing if you're even going in any particular
778 direction anymore. The wind is really picking up now
779 and the snowfall is getting heavier. You have to keep
780 going. You can't let the snowstorm get the best of
781 you. You can't give up. You must find a way out of
782 this frozen wasteland. The snowstorm has made it
783 impossible to see anything more than a few feet in
787 "The wind is now a shrieking banshee, freezing and
788 relentless, as it throws the snow into your face,
789 blinding you. It's hard to walk against the brutal
790 winds. You can't see anything, but you must keep
791 going. There is no choice. You continue your way
792 through the snowy white void, what with the snow
793 piling up around you. The wind screams in your ears
794 and you can't see anything. Can't go back. Can't go
795 forward. You can't even see where you are. You hope
796 that, as long as you keep moving, you'll eventually
797 find a way out of this frozen wasteland.";
800 "The blizzard rages, but you continue to press on.
801 There's nothing here but you, the snowfall, and the
802 fierce wind howling through this frozen landscape.
803 This isn't just a place of cold and ice - it's
804 other-worldly. You trudge on and try to keep your
805 spirits up and not let the snowstorm get to you.
806 Every step is an effort. You wish you had the powers
807 of a superhero right now. You can barely see where
808 you are going. The wind knocks you down on your hands
809 and knees. You get back up, but you're slipping and
810 sliding all over the place.";
813 "You wander around in the impenetrable white void.
814 The wind is howling louder than ever. You try to
815 persevere. You don't know if you're going in circles
816 or what, but you start to feel that this frozen,
817 lifeless landscape is sucking away your very life
818 force. You can't see your hand in front of your face.
819 You can barely keep moving. Every step you take is
820 hard-fought. You just want this awful nightmare to
821 end. You begin to feel sleepy but you're in danger
822 here. You have to keep moving. Sleep is not an option
823 when you're in a place like this.";
826 "You try to remember the survival tips you've read
827 on the internet, but frankly, you don't remember most
828 of them right now. As you walk you try to keep your
829 mind occupied with anything other than the storm.
830 Nothing makes any sense and you feel like you're
831 starting to go in circles. The wind starts starts to
832 pick up as it begins howling louder than ever. You're
833 determined to live but the blizzard doesn't seem to
834 care whether you live or die. It just keeps howling
835 and shrieking. It's not getting any easier to move in
839 "You keep walking. The snow is drifting and piling
840 up around you, making movement almost impossible. You
841 look around the barren landscape, but there's nothing
842 nearby except snow. It's almost as if you're lost in
843 a white, endless void. You start to get disoriented.
844 You don't even know if you're walking in a circle or
845 not. The situation is looking very grim. Your life
846 feels as if it is slowly ebbing away in the
847 relentless grip of the snowstorm. It feels like
848 you've been wandering for hours, but that's probably
849 just your perception of time slipping away.";
852 "You can barely see anything, and you stumble
853 forward. You could be wandering aimlessly in any
854 direction right now and you wouldn't know the
855 difference. It's as if you're in a sea of white.
856 You're not sure that you're going in the right
857 direction but you can't stop now. There has to be
858 something here besides endless snow. You know that
859 staying here is a death sentence. You have to escape.
860 You're cold, tired, miserable, and desperate to get
861 out of this mess. You have no idea where you are. You
862 keep wandering through endless whiteness. You won't
866 "You're so cold that you begin to hallucinate, first
867 seeing the words ~Ventilation Control Room~ and then
868 yourself at a console. The hallucination quickly
873 "You see something in the distance but can't make it
874 out. You walk toward it to find out that it's the
875 hotel. You collapse in the lobby as the hotel staff
881 Object forest "Forest"
883 print_forest_description();
887 if (location == thedark) {
890 if (noun == d_obj || noun == u_obj) {
891 print_ret "You can't go that way.";
893 forest_location = forest_location++;
895 cant_go print_forest_description;
898 if (television has visited || computer has visited) {
900 "The grue is waiting behind a snowbank in
901 the distance, away from the light. ";
904 "From somewhere off in the dark distance, far away from the
905 light, a rock is hurled in your direction. It hits the
906 lantern, breaking it, and putting it out of commission. ";
909 lantern_fuel_left = 0;
914 [ check_for_cabin_lighting;
915 if (lightbulb has on) {
917 "The light from inside the cabin only penetrates a few
918 feet from the building. ";
921 if (lantern in player && lantern has on) {
923 "The lantern provides the only source of
926 if (location has light)
928 "The snow stings your face and you can barely see three
929 feet in front of you. ";
930 if (snowshoes in player && snowshoes has worn) {
932 "The snowshoes are doing their job by making sure
933 you don't sink into the snow. ";
937 Object eastofcabin "East Of Cabin"
939 print "It's dark outside. ";
940 check_for_cabin_lighting();
941 if (cabin_has_electricity == 1 && lantern in player && lantern_fuel_left
950 "The snow buildup is is too great to continue in that
957 "You're on the roof of the cabin, although it's hard
958 to tell where the snow buildup ends and the roof
959 begins. You can make out the trees around the cabin,
960 but you can't see very far out into the snowfield
962 if (roof hasnt visited)
964 " You hear a snowmobile approaching in the
965 distance. Is it your salvation? The snowmobile
966 quickly zooms by in front of the cabin and
967 disappears into the forest.";
968 StartDaemon(snowmobile);
969 if (roof has visited)
971 " There seems to be no movement, no sound, no
976 cant_go "Walking off the edge of a roof seems unwise.";
978 Object northofcabin "North Of Cabin"
981 "You're on the north side of the cabin. The wind is
982 howling and the snow is coming down; falling too fast
984 if (northofcabin hasnt visited)
986 " That might be a tree in the distance or a
987 shadowy figure - It's hard to tell in this
990 " The snow buildup here is so great that it's
991 almost level with the cabin's roof, which is to the
997 cant_go "It's too steep to go in that direction safely.",
1000 if (noun == s_obj) {
1001 if (roof hasnt visited) {
1007 Object westofcabin "West Of Cabin"
1010 "The snow is falling so fast that you can barely see
1011 anything. You can't even be sure you're going in the
1013 if (westofcabin hasnt visited)
1015 " Then you hear a shuffling noise in the snow.
1016 There was something there and now it's gone. Or
1017 was it always there and you just never saw it?";
1018 print_ret " The snow buildup gets taller to the north.";
1023 "The snow buildup is is too great to continue in that
1027 Location = mainroom;
1028 thedark.description =
1029 "It is pitch black. You are likely to be eaten
1032 "You're trapped in a snowstorm while visiting the forest
1033 during your vacation to a small rural town. This is the worst
1034 snowstorm in more than 40 years. If only you had listened to
1035 the news. Well, it's too late for that. The snow has been
1036 falling for the past seven hours and shows no signs of
1037 stopping any time soon. You need to get back to your hotel in
1038 the town. You finally manage to find an old cabin in the
1039 woods and get inside but have no idea where you are. You're
1040 not dressed for this weather, and it's getting dark
1042 StartDaemon(lantern);
1043 StartDaemon(snowshoes);
1044 StartDaemon(snowsuit);
1050 print "You sink into the deep snow and are unable to move.";
1053 "Finally, you succumb to the cold. Your mind goes blank as
1054 you slip away into the endless darkness and the deep sleep
1058 ! Don't have 'take all' take the lightbulb in the mainroom of the
1061 [ ChooseObjects obj code;
1063 if (obj has scenery)
1067 if (obj == lightbulb)
1072 if (location == thedark && real_location == mainroom) {
1073 PlaceInScope(lightsocket);
1074 PlaceInScope(lightbulb);
1079 Object snowmobile "snowmobile" thedark
1080 with name 'snowmobile',
1082 snowmobile_location = random(14);
1083 if (location == forest && forest_location == snowmobile_location)
1087 "A snowmobile approaches. The person says they
1088 saw your light and came to rescue you.";
1094 Object grue "grue" thedark
1096 name 'grue' 'monster',
1097 grue_active_around_cabin,
1098 grue_active_in_the_dark,
1100 if (location == thedark) {
1101 switch (++(self.grue_active_in_the_dark)) {
1103 "^You hear horrible gurgling sounds in the
1106 "^You hear the clink of razor-sharp claws
1110 "^Your last memory is of the slavering fangs of
1111 the horrible Grue as it claims you for a meal.";
1114 if (location == mainroom || location == office || location ==
1115 kitchenette || location == bedroom) {
1116 switch (++(self.grue_active_around_cabin)) {
1118 "^You hear the wind howling outside, if it is the
1121 "^You hear horrible gurgling sounds outside.";
1123 "^The noise outside gets louder.";
1125 "^You hear the sound of shuffling feet outside.";
1127 "^You hear something sniffing around the cabin.";
1129 "^You hear a deep guttural sound from outside
1130 that sends a chill down your spine.";
1132 "^You hear something scratching on the cabin
1133 walls from outside.";
1135 "^You hear something howl outside. It's a
1136 chilling, mournful wail that sends a chill down
1139 "^A thunderous CRACK can be heard coming from
1142 "^There's a sudden crashing sound as something is
1143 thrown against the cabin walls.";
1145 "^Something begins to beat against the walls of
1146 the cabin, as if trying to to break in. It makes a
1147 loud, thunderous noise.";
1149 "^The wind is howling and the walls are being
1150 beaten so hard it feels like the cabin is
1153 "^Suddenly, there's ominous silence from outside
1157 if (location == mainroom || location == office || location ==
1158 kitchenette || location == bedroom && self.grue_active_around_cabin
1160 print "^The lights flicker and suddenly go out.^";
1161 cabin_has_electricity = 0;
1163 give mainroom ~light;
1165 give kitchenette ~light;
1166 give bedroom ~light;
1167 give eastofcabin ~light;
1168 give southofcabin ~light;
1176 "Oh, no! You have walked into the slavering fangs of a lurking
1181 print ", earning you the rank of ";
1202 "^If you need help try some of the commands from:
1203 ^https://pr-if.org/doc/play-if-card/^";
1207 print "Nothing obvious happens.^";
1217 print_ret "Doing that would achieve little.";
1244 * 'up' / 'open' noun -> Tear;
1250 * 'up' / 'open' noun -> Tear;
1253 * 'through' / 'out' / 'via' noun -> Enter;
1256 * 'through' / 'out' / 'via' noun -> Enter;
1259 * 'through' / 'out' / 'via' noun -> Enter;
1262 * 'through' / 'out' / 'via' noun -> Climb;
1265 * 'through' / 'out' / 'via' noun -> Enter;