9010e8ade5776878f75a86e735b3ad2dde50c04e
[homeland.git] / src / objects / livingroom.inf
1 ! Copyright (C) 2019 Jason Self <j@jxself.org>
2 !
3 ! This file is free software: you may copy, redistribute gand/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.
7 !
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.
12 !
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
16 Object  livingroom "Livingroom"
17   with  description 
18             "You are in a modestly furnished livingroom. Pictures 
19             hang from the walls. You can hear the sound of vehicles 
20             driving by outside. The kitchen is to the west. The front 
21             door is to the east. Your bedroom is to the south.",
22         before [;
23           Listen:
24             print "You can hear the sound of vehicles driving by outside.^";
25             return true;
26         ],
27         n_to 
28             "Since when did you get the ability to walk through 
29             walls? The kitchen is to the west. The front door is to 
30             the east. Your bedroom is to the south.",
31         s_to bedroom,
32         w_to kitchen,
33         e_to frontdoor,
34   has   light;
35
36 Object  picture "pictures" livingroom
37   with  description 
38             "The pictures in the room consist of a landscape painting 
39             showing a strangely geometric mountain, another of a 
40             still life painting of a table laid out with a feast and 
41             the third is a portrait of an unknown man. He has a full 
42             beard, is wearing a black robe and no shoes. On his head 
43             is a large 1970s-era hard disk platter.",
44         name 'picture' 'photo' 'photos' 'frame' 'frames' 'pictures' 
45         'image' 'images',
46         Before [;
47           Take:
48             print_ret 
49                 "They look so nice, perhaps it's better to leave them 
50                 where they are.";
51         ],
52   has   scenery pluralname;
53
54 Object  man "man" livingroom
55   with  description "It's a painting of Richard Stallman dressed as 
56                     St IGNUcius.",
57         name 'man' 'disk' 'hard' 'platter' 'robe' 'rms' 'Richard' 'Stallman'
58         'robe' 'black' 'image' 'images',
59         Before [;
60           Take:
61             print_ret 
62                 "The painting looks so nice, perhaps it's better to 
63                 leave it where it is.";
64         ],
65   has   scenery;
66
67 Object  television "television" livingroom
68   with  name 'television' 'tv',
69         description 
70             "It's big, gray, and one of those old-fashioned CRT 
71             models. It looks very heavy.",
72         watch_count 0,
73         before [;
74           Listen, Examine:
75             if (television has on) {
76                 self.watch_count = self.watch_count + 1;
77                 switch (self.watch_count) {
78                   1:
79                     print 
80                         "It's big, gray, and one of those 
81                         old-fashioned CRT models. It looks very 
82                         heavy.^The TV is currently switched on. Your 
83                         favorite news program is on: U.S. News And 
84                         Grue Report.^The news anchor is saying ~In 
85                         other news, authorities continue to 
86                         investigate the missing persons case.~^";
87                     score = score + 1;
88                     return true;
89                   2:
90                     print 
91                         "The news anchor continues by saying ~We're 
92                         told the that number of missing people is now 
93                         up to as many as 5.~^";
94                     score = score + 1;
95                     return true;
96                   3:
97                     print 
98                         "The news anchor concludes their coverage by 
99                         saying ~We'll have more as the story continues 
100                         to develop.~^";
101                     score = score + 1;
102                     return true;
103                   default:
104                     print 
105                         "It's big, gray, and one of those 
106                         old-fashioned CRT models. It looks very 
107                         heavy.^The TV is currently switched on. Your 
108                         favorite news program is on: U.S. News And 
109                         Grue Report.^";
110                     return true;
111                 }
112             }
113             ;
114           Take, Pull, Push, PushDir:
115             print_ret (The) self, " is too heavy for that.";
116         ],
117         after [;
118           SwitchOn:
119             print 
120                 "The television comes to life. Your favorite news 
121                 program is on: U.S. News And Grue Report.^";
122             if (television hasnt visited) {
123                 score = score + 1;
124                 give television visited;
125             }
126             return true;
127         ],
128   has   static switchable;
129
130 Object  couch "couch" livingroom
131   with  name 'couch' 'sofa',
132         description 
133             "It looks like a throwback from the 1970s but has held up 
134             very well.",
135         before [;
136           Take, Pull, Push, PushDir:
137             print_ret (The) self, " is too heavy for that.";
138         ],
139         after [;
140           Enter:
141             print 
142                  "The couch makes a nauseating, high-pitched groan as 
143                  your weight is added.^";
144             return true;
145           Exit, GetOff:
146             print "The couch makes a muted snort as your weight is removed.^";
147             return true;
148         ],
149   has   static supporter enterable;
150
151 Object  frontdoor "front door" livingroom
152   with  name 'door' 'front',
153         description 
154             "Cinnamon brown in color it appears to be a very solid 
155             and hefty door.",
156         short_name [;
157             if (location == livingroom)
158                 print "door to the outside";
159             else
160                 print "door to your house";
161             return true;
162         ],
163         found_in livingroom sidewalk,
164         door_dir [;
165             if (location == sidewalk)
166                 return w_to;
167             else
168                 return e_to;
169         ],
170         door_to [;
171             if (location == sidewalk)
172                 return livingroom;
173             else
174                 return sidewalk;
175         ],
176   has   scenery door openable;