Update to serial number 200614
[homeland.git] / src / homeland.inf
1 !% $OMIT_UNUSED_ROUTINES=1
2 ! Copyright (C) 2019, 2020 Jason Self <j@jxself.org>
3 !
4 ! This file is free software: you may copy, redistribute and/or
5 ! modify it under the terms of the GNU Affero General Public License
6 ! as published by the Free Software Foundation, either version 3 of
7 ! the License, or (at your option) any later version.
8 !
9 ! This file is distributed in the hope that it will be useful, but
10 ! WITHOUT ANY WARRANTY; without even the implied warranty of
11 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ! Affero General Public License for more details.
13 !
14 ! You should have received a copy of the GNU Affero General Public
15 ! License along with this file. If not, see https://gnu.org/licenses/
16 Global guardscalled = 0;
17 Constant DEATH_MENTION_UNDO;
18 Constant MAX_SCORE = 7;
19 Constant Story "Homeland";
20 Constant Headline 
21     "^A work of interactive fiction.
22     ^If you get stuck try typing HELP.
23     ^Ongoing development: https://jxself.org/git/?p=homeland.git
24     ^Send bugs and feedback by email to j@@64jxself.org.
25     ^IFID AC0898CB-0668-4853-9EB9-757958D4AF56
26     ^Copyright (C) 2019, 2020 Jason Self
27     ^You can change and share this game under the terms of the GNU 
28     Affero General Public License as published by the Free Software 
29     Foundation (FSF), either version 3 of the License, or (at your 
30     option) any later version published by the FSF. See the GNU Affero 
31     General Public License for more details.^^You should have received 
32     a copy of this game's source code along with a copy of the GNU 
33     Affero General Public License so that you can know your rights. 
34     If not, contact the place you got it from.^^";
35 Include "parser";
36 Include "verblib";
37 Release 0;
38 Serial "200614";
39 Include "src/objects/intro/kitchen.inf";
40 Include "src/objects/intro/livingroom.inf";
41 Include "src/objects/intro/bedroom.inf";
42 Include "src/objects/intro/grandlivingroom.inf";
43 Include "src/objects/intro/sidewalk.inf";
44 Include "src/objects/intro/frontporch.inf";
45 Include "src/objects/intro/neighborlivingroom.inf";
46 Include "src/objects/intro/backyard.inf";
47 Include "src/objects/intro/neighborkitchen.inf";
48
49 Include "src/objects/overworld/campsite.inf";
50 Include "src/objects/overworld/westofcampsite.inf";
51 Include "src/objects/overworld/shed.inf";
52 Include "src/objects/overworld/house.inf";
53 Include "src/objects/overworld/g58.inf";
54 Include "src/objects/overworld/g59.inf";
55 Include "src/objects/overworld/g60.inf";
56 Include "src/objects/overworld/g77.inf";
57 Include "src/objects/overworld/g79.inf";
58 Include "src/objects/overworld/h70.inf";
59 Include "src/objects/overworld/h78.inf";
60 Include "src/objects/overworld/h80.inf";
61
62 Include "src/objects/globals.inf";
63
64 [ DeathMessage;
65     if (deadflag == 3)
66         print "To Be Continued";
67 ];
68
69 [ PrintRank;
70     print ", earning you the rank of ";
71     if (score == 0)
72         "Novice.";
73     if (score == 1)
74         "Trained.";
75     if (score == 2)
76         "Skilled.";
77     if (score == 3)
78         "Talented.";
79     if (score == 4)
80         "Capable.";
81     if (score == 5)
82         "Adept.";
83     if (score == 6)
84         "Proficient.";
85     if (score >= 7)
86         print "Versed.";
87 ];
88
89 [ Initialise;
90     Location = kitchen;
91     print "^It happened again.^^";
92     print 
93         "While reading the morning newspaper, there was another small 
94         explosion from your neighbor's home. This time you were able 
95         to see the series of three bright blue sparks that your 
96         friends were talking about from your kitchen window through 
97         the curtains covering their living room window.^^";
98     print 
99         "You crane your neck out the window to look, but all is 
100         quiet. ~What's going on over there?~ you wonder.^^";
101     StartDaemon(machine);
102 ];
103
104 [ URL;
105     print 
106         "^If you need help try some of the commands from: 
107         ^http://pr-if.org/doc/play-if-card/^";
108 ];
109
110 [ XyzzySub;
111     print "Nothing obvious happens.^";
112     return true;
113 ];
114
115 [ HelpSub;
116     if (location == kitchen && window hasnt open) {
117         print 
118             "It might be nice to open that window and get some
119             fresh air.^";
120     }
121     if (location == kitchen && window has open) {
122         print 
123             "That window seems almost large enough to climb 
124             through.^";
125     }
126     if (location == livingroom || location == bedroom || location == 
127     sidewalk || location == frontporch && window hasnt open) {
128         print 
129             "Maybe you should go back to the kitchen and try the 
130             HELP command again.^";
131     }
132     if (location == livingroom || location == bedroom || location == 
133     sidewalk || location == frontporch && window has open) {
134         print 
135             "That window in your kitchen seems just large enough to 
136             climb through...^";
137     }
138     if (location == backyard || location == bedroom || location == frontporch || location == grandlivingroom || location == kitchen || location == livingroom || location == neighborkitchen || location == neighborlivingroom || location == sidewalk && television hasnt on && television.watch_count < 3) {
139         print "I wonder what's on TV?^";
140     }
141     if (location == backyard || location == bedroom || location == frontporch || location == grandlivingroom || location == kitchen || location == livingroom || location == neighborkitchen || location == neighborlivingroom || location == sidewalk && television has on && television.watch_count < 3) {
142         print 
143             "The TV show U.S. News And Grue Report is usually very 
144             informative.^";
145     }
146     if (location == backyard || location == bedroom || location == frontporch || location == grandlivingroom || location == kitchen || location == livingroom || location == neighborkitchen || location == neighborlivingroom || location == sidewalk && TestScope(poker)) {
147         print 
148             "The poker looks like it could make an effective 
149             weapon.^";
150     }
151     URL();
152     return true;
153 ];
154
155 Include "grammar";
156
157 Verb 'About'
158     * -> Version;
159
160 Verb 'Info'
161     * -> Version;
162
163 Verb 'Help'
164     * -> Help;
165
166 Verb 'Clue'
167     * -> Help;
168
169 Verb 'xyzzy'
170     * -> Xyzzy;
171
172 Verb 'lick' = 'eat';
173
174 Verb 'snort' = 'smell';
175
176 Verb 'jam' = 'put';
177
178 Verb 'jab' = 'put';
179
180 Verb 'stick' = 'put';
181
182 Verb 'thrust' = 'put';
183
184 Verb 'crawl'
185     * 'through' / 'out' / 'via' noun -> Go;
186
187 Verb 'escape'
188     * 'through' / 'out' / 'via' noun -> Go;
189
190 Extend 'jump'
191     * 'through' / 'out' / 'via' noun -> Go;
192
193 Extend 'climb'
194     * 'through' / 'out' / 'via' noun -> Go;
195
196 Extend 'go'
197     * 'through' / 'out' / 'via' noun -> Go;
198
199 Extend 'attack'
200     * noun 'with' noun -> Attack;