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/
15 Global lantern_fuel_left = 20;
16 Global body_temperature = 20;
17 Global cabin_has_electricity = 1;
18 Global forest_location = 1;
19 Global snowmobile_location = 0;
20 Constant MAX_SCORE = 7;
21 Constant DEATH_MENTION_UNDO;
22 Constant Story "Snowed In";
24 "^A work of interactive fiction.
25 ^If you get stuck try typing HELP.
26 ^Ongoing development: https://jxself.org/git/?p=snowed-in.git
27 ^Send bugs and feedback by email to j@@64jxself.org.
28 ^IFID DE9FA2E5-4EC7-4166-9218-E56EFA1DF40F
29 ^Copyright (C) 2021, 2022 Jason Self <j@@64jxself.org>
30 ^You can change and share this game under the terms of the GNU
31 Affero General Public License as published by the Free Software
32 Foundation (FSF), either version 3 of the License, or (at your
33 option) any later version published by the FSF. See the GNU Affero
34 General Public License for more details.^^You should have received
35 a copy of this game's source code along with a copy of the GNU
36 Affero General Public License so that you can know your rights.
37 If not, contact the place you got it from.^^";
43 Object mainroom "Main Room"
45 "This room is a total wreck - it looks like a major fight
46 happened in here. There's a ripped up sofa and a broken
47 old coffee table in the middle of the room. A flat-screen
48 TV is mounted against the wall, with the screen dangling
49 out. This cabin has three other rooms. There's an office
50 area to the east, and a bedroom to the north. A
51 kitchenette can be found to the west. There's a doorway
52 in the south wall leading outside.",
59 Object frontdoor "front door" mainroom
60 with name 'door' 'front',
62 "The wooden door is made of thick oak wood with the shape
63 of a bear claw engraved in it.",
65 if (location == mainroom)
66 print "door to the outside";
68 print "door to the cabin";
71 found_in mainroom southofcabin,
73 if (location == mainroom)
79 if (location == mainroom)
84 has scenery door openable;
86 Object bearclaw "bear claw" mainroom
87 with name 'bear' 'claw',
89 "It's in the shape of a thin, sharp claw with three jagged
90 points at the top of it.",
93 Object sofa "sofa" mainroom
94 with name 'sofa' 'couch',
96 "The sofa is in poor shape. The upholstery is ripped and
97 there are several holes in it.",
99 Take, Pull, Push, PushDir, Turn:
100 print_ret (The) self, " is too heavy for that.";
102 has scenery supporter enterable;
104 Object coffeetable "coffee table" mainroom
105 with name 'coffee' 'table',
107 "The old coffee table looks as if it's had quite a bit of
108 use. There are burn marks covering it and the paint is
109 worn off in most places.",
111 Take, Pull, Push, PushDir, Turn:
112 print_ret (The) self, " is too heavy for that.";
114 has scenery supporter enterable;
116 Object lantern "copper lantern" coffeetable
117 with name 'lantern' 'copper' 'lamp',
119 "This is an exceptionally beautiful lantern, made of
120 fired copper, and polished until it shines. About eleven
121 inches high, with a base of about 5 inches or so in
122 diameter and a large, brass-closed hook at the top. A
123 rainbow of unique colors run through the copper. The
124 glass in the lamp has a fresnel type of design, which is
125 used to distribute light widely.",
128 if (lantern has on) {
129 lantern_fuel_left = 0;
134 "Suddenly, the lantern's flame begins to flicker
135 violently within its glass prison and then
136 extinguishes itself.";
141 if (lantern_fuel_left > 0) {
143 StartTimer(lantern, lantern_fuel_left);
147 "You snap the switch a few times, but nothing
156 lantern_fuel_left = lantern.time_left;
157 if (lantern has on && lantern_fuel_left <= 5)
158 print_ret "The lantern's fuel runs low.";
162 Object television "flat-screen TV" mainroom
163 with name 'TV' 'television' 'flat' 'screen' 'flat-screen',
165 "The flat-screen TV looks fairly modern but it's been
166 broken in a fight and the screen is dangling out.",
168 Take, Pull, Push, PushDir, Turn:
169 print_ret (The) self, " is firmly mounted to the wall.";
171 if (television hasnt visited) {
174 "Despite the significant damage, the television
175 comes to life in one last valiant attempt to be
176 useful. Your favorite news program is on: U.S.
177 News And Grue Report. The news anchor is giving a
178 warning of grue sightings in the area of the
179 forest before the television finally dies.^";
180 give television visited;
184 "The flat-screen TV is broken and can't be
189 has scenery switchable;
191 Object lightsocket "light socket" mainroom
192 with name 'socket' 'lightsocket',
194 Take, Pull, Push, PushDir, Turn:
196 "You don't have the tools to remove a light
199 if (noun ~= lightbulb) {
203 " into the light socket? Maybe you should come
204 with a warning label because you contain more than
205 a trace amount of nut.";
207 if (noun == lightbulb && lightbulb has on) {
210 give kitchenette light;
212 give eastofcabin light;
213 give southofcabin light;
216 has scenery container transparent open;
218 Object lightbulb "light bulb" lightsocket
219 with name 'light' 'bulb' 'lightbulb',
222 if (lightbulb in lightsocket) {
223 if (cabin_has_electricity == 1) {
226 give kitchenette light;
228 give eastofcabin light;
229 give southofcabin light;
233 "You flip the switch a few times, but nothing
239 "Turn on a lightbulb when it's not in the
240 socket? What a strange idea.";
244 Take, Pull, Push, PushDir, Turn, SwitchOff:
246 give mainroom ~light;
248 give kitchenette ~light;
250 give eastofcabin ~light;
251 give southofcabin ~light;
255 Object office "Office"
257 "There seems to have been quite a fight in here. The room
258 is a wreck. Holes are in the walls and the window is
259 broken, letting in the cold air from outside. Chunks of
260 drywall and insulation cover the floor. The desk has a
261 bullet hole through the middle.",
265 if (snowshoes has worn)
267 "You can't fit through the window while
268 wearing the snow shoes.";
270 if (eastofcabin hasnt visited) {
279 Object desk "solid oak desk" office
280 with name 'solid' 'oak' 'desk',
282 "The desk is old and made of solid oak. The right side of
283 it has been smashed and all of the drawers have been
284 removed. A bullet hole goes straight through the middle of
287 Take, Pull, Push, PushDir, Turn:
288 print_ret (The) self, " is too heavy for that.";
290 has scenery supporter enterable;
292 Object businesscard "business card" desk
293 with name 'business' 'card',
295 "The business card is white and has blacked edges. It
296 bears the name ~Lasting Solutions~, a local data recovery
297 company, in bold letters on the top. The company's
298 website URL is printed in blue at the bottom.";
300 Object salesreceipt "sales receipt" desk
301 with name 'sales' 'receipt',
303 "The sales receipt is for $200, dated three years ago.
304 It's printed on old tractor feed printer paper and bears
305 the name ~Lasting Solutions~, a local data recovery
306 company. A handwritten note is scrawled on the bottom:
307 ~Start working on these hard drives soon.~";
309 Object computer "computer" desk
310 with name 'computer' 'PC',
312 "It's a heavy older model that appears to have been
313 seriously damaged in a fight. It's clearly on its last
314 legs but is perhaps still useful.",
316 Take, Pull, Push, PushDir, Turn:
317 print_ret (The) self, " is too heavy for that.";
319 if (computer hasnt visited) {
322 "The computer makes some concerning noises while
323 lights on the front also illuminate. The last
324 file is quickly displayed. ~If anyone else reads
325 this, you're in serious danger. I've been fighting
326 a ferocious grue for the last three days. I'm
327 almost out of supplies and can't last much
328 longer. I'm going to take the last of the supplies
329 and escape through the office window in a
330 last-ditch effort to get away and get back into
331 town. I hope I can make it.~ The computer then
332 makes a sickly sound and finally dies as some
333 smoke comes out of it.^";
334 give computer visited;
338 "The display briefly flickers but nothing
345 Object drywall "drywall" office
346 with name 'drywall' 'dry' 'wall',
348 Take, Pull, Push, PushDir, Turn:
349 print_ret "Taking that would achieve little.";
353 Object insulation "insulation" office
354 with name 'insulation',
356 Take, Pull, Push, PushDir, Turn:
357 print_ret "Taking that would achieve little.";
361 Object bullethole "bullet hole" desk
362 with name 'bullet' 'hole' 'holes',
364 "Looks to have come from something that's capable of
365 doing a lot of damage.",
366 found_in desk bedroom,
369 Object window "window" office
370 with name 'window' 'windows',
372 "The window faces the east side of the cabin. It's broken,
373 letting in the cold air from outside.",
375 if (location == office)
378 print "window into the cabin";
381 found_in office eastofcabin,
383 if (location == office)
389 if (location == office)
396 print_ret "The window faces the east side of the cabin.";
399 "The window's broken so it's not clear how
402 has scenery door openable open;
404 Object kitchenette "Kitchenette"
406 "The kitchenette is empty. A sink, you think, though it's
407 hard to tell what's a pipe and what's a faucet. A
408 refrigerator, standing open and empty. The door has been
409 ripped off. There's no indication as to where it
410 went. There's no food anywhere in here.",
414 Object refrigerator "refrigerator" kitchenette
415 with name 'fridge' 'refrigerator',
417 "An old rusty refrigerator, standing open and empty. The
418 door has been ripped off. There's no indication as to
421 Take, Pull, Push, PushDir, Turn:
422 print_ret (The) self, " is too heavy for that.";
424 print_ret (The) self, " door is missing.";
426 has scenery enterable container openable open;
428 Object sink "sink" kitchenette
429 with name 'sink' 'pipe' 'faucet',
431 "A sink, you think, though it's hard to tell what's a
432 pipe and what's a faucet.",
436 "Pipes from in the walls make a groaning sound,
437 almost like pain and despair. No water comes out.";
439 has scenery container switchable;
441 Object bedroom "Bedroom"
443 "This bedroom is small and cramped, and looks like a
444 major fight happened as the exterior wall has bullet
445 holes. The bed is lying on the floor, torn to shreds. It
446 has no sheets, just a bare mattress.",
450 Object bed "bed" bedroom
451 with name 'bed' 'mattress',
452 with description "The mattress is bare and empty.",
454 Take, Pull, Push, PushDir, Turn:
455 print_ret (The) self, " is too heavy for that.";
457 has scenery supporter;
459 Object suitcase "suitcase" bedroom
460 with name 'suitcase' 'case',
462 "The suitcase is made of a light metallic material that
463 you can't quite make out. The color of it is somewhere
464 between silver and grey.",
465 has container open openable;
467 Object snowsuit "snowsuit" suitcase
468 with name 'snowsuit' 'snow' 'suit',
470 "The snowsuit is blue, decorated with white and purple
471 designs. On the chest are the letters ~CE~ in purple.",
474 if (snowsuit hasnt visited) {
476 give snowsuit visited;
479 if (snowshoes in player && snowshoes has worn) {
480 print_ret "The snowsuit can't fit over the snowshoes.";
483 if (snowshoes in player && snowshoes has worn) {
484 print_ret "The snowsuit can't be taken off over the snowshoes.";
488 if (location ~= mainroom && location ~= office && location ~=
489 kitchenette && location ~= bedroom && location ~= thedark &&
490 snowsuit hasnt worn) {
491 body_temperature = --body_temperature;
493 if (location == mainroom || location == office || location ==
494 kitchenette || location == bedroom || snowsuit has worn && body_temperature
496 body_temperature = ++body_temperature;
498 if (body_temperature == 0) {
501 if (body_temperature <= 5)
503 "You're shivering uncontrollably, and it's hard
504 to move. You feel very exhausted and drowsy. It's
505 all you can do to keep from falling over.";
506 if (body_temperature > 5 && location ~= mainroom && location
507 ~= office && location ~= kitchenette && location ~= bedroom
508 && location ~= thedark && snowsuit hasnt worn) {
509 switch (body_temperature) {
511 "The feeling of cold overwhelms you. Surely the cold will get to
512 you before anything else does. Right?";
514 "You can feel yourself getting colder and colder.";
516 "You can see your own breath freezing in the air, forming little
519 "You shiver in the cold.";
521 "You continue to shiver in the cold.";
523 "Your hands grow numb from the cold.";
525 "You continue shivering in order to keep warm.";
527 "Your shivering grows worse as your body becomes colder by the
530 "Your teeth begin to chatter as you desperately try to warm
533 "Your shivering intensifies as your body begins to freeze over
536 "Your fingers become stiff and you feel sharp pains all over your
539 "The cold has gotten to a point where it is too much for you. You
540 begin to shiver uncontrollably.";
542 "Your eyesight begins to fade and you can't even feel yourself
545 "You can feel your body shutting down from the cold as you slowly
546 begin to lose consciousness.";
552 Object snowshoes "snowshoes" bedroom
553 with name 'snowshoe' 'snowshoes' 'snow' 'boot' 'boots' 'shoe' 'shoes'
556 "They're light blue in color and have a thick, hard
557 rubber bottom that's attached to a metal frame that keeps
558 you from sinking into the snow. They look to be warm and
562 print_ret (The) self,
563 " fit perfectly and go up to your
567 if (location ~= mainroom && location ~= office && location ~=
568 kitchenette && location ~= bedroom && location ~= thedark &&
569 location ~= eastofcabin && snowshoes hasnt worn) {
573 has pluralname clothing;
575 Object southofcabin "South Of Cabin"
578 "The wind is howling, and there's snow flying
579 everywhere. The snow buildup seems to get higher to
581 if (snowsuit hasnt worn)
583 "It's really cold and you're not dressed for
585 if (frontdoor has open) {
586 check_for_cabin_lighting();
588 if (snowshoes has worn && lantern in player && eastofcabin hasnt
589 visited && lantern_fuel_left > 0) {
600 Object truckspot "Forest"
602 "The blizzard is still going on. You don't think it's
603 letting up any time soon. There is a blue and white
604 pickup truck here. It looks like it got stuck in the snow
605 and is slowly being covered by it. The windows are iced
606 up and you can't see inside.",
609 forest_location = forest_location++;
613 Object truck "blue and white pickup truck" truckspot
614 with name 'pickup' 'truck' 'door' 'doors',
616 "The blue and white pickup truck looks old and battered.
617 The paint has chipped and faded. The windows are iced up
618 and you can't see inside.",
620 Take, Pull, Push, PushDir, Turn:
621 print_ret (The) self, " is too heavy for that.";
624 "The windows are iced up and you can't see
627 print_ret (The) self, " is frozen shut.";
629 has scenery supporter enterable openable;
631 Object backpacklocation "Forest"
633 "You keep walking and walking. The snowfall is still as
634 heavy as ever. As you continue trudging through the snow,
635 you wonder if you're actually moving in the right
636 direction. You can't see anything through the blizzard.
637 You wonder if you might be going in circles and end up
638 wandering around forever, never finding your way out of
639 this white void. You're unsure of which way to go. The
640 snowfall is so thick that you can barely see your hand if
641 you hold it right in front of your face. You have no idea
642 how far you've come or in what direction.",
645 forest_location = forest_location++;
649 Object backpack "backpack" backpacklocation
650 with name 'backpack' 'back' 'pack' 'blood',
652 "The backpack is of medium size, black, with three white
653 stripes running vertically on the back. The middle stripe
654 is broken up by a red line running down the center of it
655 toward the bottom of the backpack. On the side are the
656 letters ~CE~ in purple. The backpack is covered in blood,
657 as if the owner met with an untimely demise.",
660 if (backpack hasnt visited) {
662 give backpack visited;
665 has clothing container openable;
667 Object flashlight "flashlight" backpack
668 with name 'flashlight' 'flash' 'light' 'torch',
670 "It looks like a cheap red plastic model, about eight
674 if (flashlight hasnt visited) {
676 give flashlight visited;
678 give flashlight light;
684 [ print_forest_description;
685 if (location ~= thedark) {
686 switch (forest_location) {
689 "You push on despite the bitter cold and the heavy
690 snowfall as you come to a fork. There are two ways to
691 go here, one involves a hill to the south. The
692 other way is continuing through the woods to the
696 "The wind is bitterly cold. You plow through the
697 snowfall, which is still as heavy as ever. You can
698 barely see where you are going, making it hard to
699 tell which direction is which. Out of the corner of
700 your eye, you spot a tall, shadowy figure lingering
701 at the edge of your vision. When you turn to look at
702 it directly, however, it disappears. You continue
703 walking. The wind is howling louder than ever. The
704 endless snowfall makes it difficult to see where
705 you're going. You can't tell where the white sky and
706 white ground begin and end.";
711 "You trudge through the snow. The wind is really
712 strong and howling like a banshee. You hear a horrible
713 howl in the distance or is it the wind? Looking
714 around you see nothing in this barren landscape but
715 snow. You're not sure what to make of it, but you
716 don't want to stick around to find out. The whole
717 world is white. You can barely see five feet ahead of
718 you. You hope you're going the right way. This place
719 is so desolate and barren.";
722 "You think you might can see a large figure stepping
723 out of the trees and moving in the distance but the
724 wind is blowing hard and whipping up massive amounts
725 of snow, making it hard to tell for sure. Your breath
726 billows out in huge clouds. If it keeps blowing like
727 this, you're not sure if you'll ever be able to get
728 back. Snow whirls through the air as a gust of wind
729 picks up speed. The howling gets louder and more
730 intense. There's no left, right, backward or forward.
731 There's nothing but endless, unchanging whiteness.";
733 PlayerTo(backpacklocation);
736 "It feels like you're lost in a maze of snow without
737 a map. You keep trudging through the heavy snowfall,
738 not knowing if you're even going in any particular
739 direction anymore. The wind is really picking up now
740 and the snowfall is getting heavier. You have to keep
741 going. You can't let the snowstorm get the best of
742 you. You can't give up. You must find a way out of
743 this frozen wasteland. The snowstorm has made it
744 impossible to see anything more than a few feet in
748 "The wind is now a shrieking banshee, freezing and
749 relentless, as it throws the snow into your face,
750 blinding you. It's hard to walk against the brutal
751 winds. You can't see anything, but you must keep
752 going. There is no choice. You continue your way
753 through the snowy white void, what with the snow
754 piling up around you. The wind screams in your ears
755 and you can't see anything. Can't go back. Can't go
756 forward. You can't even see where you are. You hope
757 that, as long as you keep moving, you'll eventually
758 find a way out of this frozen wasteland.";
761 "The blizzard rages, but you continue to press on.
762 There's nothing here but you, the snowfall, and the
763 fierce wind howling through this frozen landscape.
764 This isn't just a place of cold and ice - it's
765 other-worldly. You trudge on and try to keep your
766 spirits up and not let the snowstorm get to you. Every
767 step is an effort. You wish you had the powers of a
768 superhero right now. You can barely see where you are
769 going. The wind knocks you down on your hands and
770 knees. You get back up, but you're slipping and
771 sliding all over the place.";
774 "You wander around in the impenetrable white void.
775 The wind is howling louder than ever. You try to
776 persevere. You don't know if you're going in circles
777 or what, but you start to feel that this frozen,
778 lifeless landscape is sucking away your very life
779 force. You can't see your hand in front of your face.
780 You can barely keep moving. Every step you take is
781 hard-fought. You just want this awful nightmare to
782 end. You begin to feel sleepy but you're in danger
783 here. You have to keep moving. Sleep is not an option
784 when you're in a place like this.";
787 "You try to remember the survival tips you've read
788 on the internet, but frankly, you don't remember most
789 of them right now. As you walk you try to keep your
790 mind occupied with anything other than the storm.
791 Nothing makes any sense and you feel like you're
792 starting to go in circles. The wind starts starts to
793 pick up as it begins howling louder than ever. You're
794 determined to live but the blizzard doesn't seem to
795 care whether you live or die. It just keeps howling
796 and shrieking. It's not getting any easier to move in
800 "You keep walking. The snow is drifting and piling
801 up around you, making movement almost impossible. You
802 look around the barren landscape, but there's nothing
803 nearby except snow. It's almost as if you're lost in
804 a white, endless void. You start to get disoriented.
805 You don't even know if you're walking in a circle or
806 not. The situation is looking very grim. Your life
807 feels as if it is slowly ebbing away in the
808 relentless grip of the snowstorm. It feels like
809 you've been wandering for hours, but that's probably
810 just your perception of time slipping away.";
813 "You can barely see anything, and you stumble
814 forward. You could be wandering aimlessly in any
815 direction right now and you wouldn't know the
816 difference. It's as if you're in a sea of white.
817 You're not sure that you're going in the right
818 direction but you can't stop now. There has to be
819 something here besides endless snow. You know that
820 staying here is a death sentence. You have to escape.
821 You're cold, tired, miserable, and desperate to get
822 out of this mess. You have no idea where you are. You
823 keep wandering through endless whiteness. You won't
828 "You see something in the distance but can't make it
829 out. You walk toward it to find out that it's the
830 hotel. You collapse in the lobby as the hotel staff
836 Object forest "Forest"
838 print_forest_description();
842 if (location == thedark) {
845 if (noun == d_obj || noun == u_obj) {
846 print_ret "You can't go that way.";
848 forest_location = forest_location++;
850 cant_go print_forest_description;
853 if (television has visited || computer has visited) {
855 "The grue is waiting behind a snowbank in
856 the distance, away from the light. ";
859 "From somewhere off in the dark distance, far away from the
860 light, a rock is hurled in your direction. It hits the
861 lantern, breaking it, and putting it out of commission. ";
864 lantern_fuel_left = 0;
869 [ check_for_cabin_lighting;
870 if (lightbulb has on) {
872 "The light from inside the cabin only penetrates a few
873 feet from the building. ";
876 if (lantern in player && lantern has on) {
878 "The lantern provides the only source of
881 if (location has light)
883 "The snow stings your face and you can barely see three feet in
885 if (snowshoes in player && snowshoes has worn) {
887 "The snowshoes are doing their job by making sure
888 you don't sink into the snow. ";
892 Object eastofcabin "East Of Cabin"
894 print "It's dark outside. ";
895 check_for_cabin_lighting();
896 if (cabin_has_electricity == 1 && lantern in player && lantern_fuel_left
905 "The snow buildup is is too great to continue in that
912 "You're on the roof of the cabin, although it's hard
913 to tell where the snow buildup ends and the roof
914 begins. You can make out the trees around the cabin,
915 but you can't see very far out into the snowfield
917 if (roof hasnt visited)
919 " You hear a snowmobile approaching in the
920 distance. Is it your salvation? The snowmobile
921 quickly zooms by in front of the cabin and
922 disappears into the forest.";
923 StartDaemon(snowmobile);
924 if (roof has visited)
926 " There seems to be no movement, no sound, no
931 cant_go "Walking off the edge of a roof seems unwise.";
933 Object northofcabin "North Of Cabin"
935 "You're on the north side of the cabin. The wind is
936 howling and the snow is coming down; falling too fast to
937 see well. The snow buildup here is so great that it's
938 almost level with the cabin's roof, which is to the
943 cant_go "It's too steep to go in that direction safely.",
947 if (roof hasnt visited) {
954 Object westofcabin "West Of Cabin"
956 "The snow is falling so fast that you can barely see
957 anything. You can't even be sure you're going in the right
958 direction. The snow buildup gets taller to the north.",
962 "The snow buildup is is too great to continue in that
967 thedark.description =
968 "It is pitch black. You are likely to be eaten
971 "You're trapped in a snowstorm while visiting the forest
972 during your vacation to a small rural town. This is the worst
973 snowstorm in more than 40 years. If only you had listened to
974 the news. Well, it's too late for that. The snow has been
975 falling for the past seven hours and shows no signs of
976 stopping any time soon. You need to get back to your hotel in
977 the town. You finally manage to find an old cabin in the
978 woods and get inside but have no idea where you are. You're
979 not dressed for this weather, and it's getting dark outside.^";
980 StartDaemon(lantern);
981 StartDaemon(snowshoes);
982 StartDaemon(snowsuit);
988 print "You sink into the deep snow and are unable to move.";
991 "Finally, you succumb to the cold. Your mind goes blank as
992 you slip away into the endless darkness and the deep sleep
996 ! Don't have 'take all' take the lightbulb in the mainroom of the
999 [ ChooseObjects obj code;
1001 if (obj has scenery)
1005 if (obj == lightbulb)
1010 if (location == thedark && real_location == mainroom) {
1011 PlaceInScope(lightsocket);
1012 PlaceInScope(lightbulb);
1017 Object snowmobile "snowmobile" thedark
1018 with name 'snowmobile',
1020 snowmobile_location = random(13);
1021 if (location == forest && forest_location == snowmobile_location)
1025 "A snowmobile approaches. The person says they
1026 saw your light and came to rescue you.";
1032 Object grue "grue" thedark
1034 name 'grue' 'monster',
1035 grue_active_around_cabin,
1036 grue_active_in_the_dark,
1038 if (location == thedark) {
1039 switch (++(self.grue_active_in_the_dark)) {
1041 "^You hear horrible gurgling sounds in the dark.";
1043 "^You hear the clink of razor-sharp claws nearby.";
1046 "^Your last memory is of the slavering fangs of the
1047 horrible Grue as it claims you for a meal.";
1050 if (location == mainroom || location == office || location ==
1051 kitchenette || location == bedroom) {
1052 switch (++(self.grue_active_around_cabin)) {
1054 "^You hear the wind howling outside, if it is the wind.";
1056 "^You hear horrible gurgling sounds outside.";
1058 "^The noise outside gets louder.";
1060 "^You hear the sound of shuffling feet outside.";
1062 "^You hear something sniffing around the cabin.";
1064 "^You hear a deep guttural sound from outside that sends a chill down your spine.";
1066 "^You hear something scratching on the cabin walls from outside.";
1068 "^You hear something howl outside. It's a chilling, mournful wail that sends a chill down your spine.";
1070 "^A thunderous CRACK can be heard coming from outside.";
1072 "^There's a sudden crashing sound as something is thrown against the cabin walls.";
1074 "^Something begins to beat against the walls of the cabin, as if trying to to break in. It makes a loud, thunderous noise.";
1076 "^The wind is howling and the walls are being beaten so hard it feels like the cabin is shaking.";
1078 "^Suddenly, there's ominous silence from outside the cabin.";
1081 if (location == mainroom || location == office || location ==
1082 kitchenette || location == bedroom && self.grue_active_around_cabin
1084 print "^The lights flicker and suddenly go out.^";
1085 cabin_has_electricity = 0;
1087 give mainroom ~light;
1089 give kitchenette ~light;
1090 give bedroom ~light;
1091 give eastofcabin ~light;
1092 give southofcabin ~light;
1100 "Oh, no! You have walked into the slavering fangs of a lurking
1105 print ", earning you the rank of ";
1126 "^If you need help try some of the commands from:
1127 ^https://pr-if.org/doc/play-if-card/^";
1131 print "Nothing obvious happens.^";
1161 * 'through' / 'out' / 'via' noun -> Go;
1164 * 'through' / 'out' / 'via' noun -> Go;
1167 * 'through' / 'out' / 'via' noun -> Go;
1170 * 'through' / 'out' / 'via' noun -> Go;
1173 * 'through' / 'out' / 'via' noun -> Go;