1e346a4e05e6c5063980f9a073b7fbd196766d22
[homeland.git] / src / homeland.inf
1 !% $OMIT_UNUSED_ROUTINES=1
2 ! Copyright (C) 2019, 2020, 2021, 2022 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, 2021 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 "220206";
39
40 Include "src/intro.inf";
41
42 Include "src/overworld.inf";
43
44 Include "src/globals.inf";
45
46 [ DeathMessage;
47     if (deadflag == 3)
48         print "To Be Continued";
49 ];
50
51 [ PrintRank;
52     print ", earning you the rank of ";
53     if (score == 0)
54         "Novice.";
55     if (score == 1)
56         "Trained.";
57     if (score == 2)
58         "Skilled.";
59     if (score == 3)
60         "Talented.";
61     if (score == 4)
62         "Capable.";
63     if (score == 5)
64         "Adept.";
65     if (score == 6)
66         "Proficient.";
67     if (score >= 7)
68         print "Versed.";
69 ];
70
71 [ Initialise;
72     Location = kitchen;
73     print "^It happened again.^^";
74     print 
75         "While reading the morning newspaper, there was another small 
76         explosion from your neighbor's home. This time you were able 
77         to see the series of three bright blue sparks that your 
78         friends were talking about from your kitchen window through 
79         the curtains covering their living room window.^^";
80     print 
81         "You crane your neck out the window to look, but all is 
82         quiet. ~What's going on over there?~ you wonder.^^";
83     StartDaemon(machine);
84 ];
85
86 [ URL;
87     print 
88         "^If you need help try some of the commands from: 
89         ^http://pr-if.org/doc/play-if-card/^";
90 ];
91
92 [ XyzzySub;
93     print "Nothing obvious happens.^";
94     return true;
95 ];
96
97 [ HelpSub;
98     if (location == kitchen && window hasnt open) {
99         print 
100             "It might be nice to open that window and get some
101             fresh air.^";
102     }
103     if (location == kitchen && window has open) {
104         print 
105             "That window seems almost large enough to climb 
106             through.^";
107     }
108     if (location == livingroom || location == bedroom || location == 
109     sidewalk || location == frontporch && window hasnt open) {
110         print 
111             "Maybe you should go back to the kitchen and try the 
112             HELP command again.^";
113     }
114     if (location == livingroom || location == bedroom || location == 
115     sidewalk || location == frontporch && window has open) {
116         print 
117             "That window in your kitchen seems just large enough to 
118             climb through...^";
119     }
120     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) {
121         print "I wonder what's on TV?^";
122     }
123     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) {
124         print 
125             "The TV show U.S. News And Grue Report is usually very 
126             informative.^";
127     }
128     if (location == backyard || location == bedroom || location == frontporch || location == grandlivingroom || location == kitchen || location == livingroom || location == neighborkitchen || location == neighborlivingroom || location == sidewalk && TestScope(poker)) {
129         print 
130             "The poker looks like it could make an effective 
131             weapon.^";
132     }
133     URL();
134     return true;
135 ];
136
137 Include "grammar";
138
139 Verb 'About'
140     * -> Version;
141
142 Verb 'Info'
143     * -> Version;
144
145 Verb 'Help'
146     * -> Help;
147
148 Verb 'Clue'
149     * -> Help;
150
151 Verb 'Hint'
152     * -> Help;
153
154 Verb 'xyzzy'
155     * -> Xyzzy;
156
157 Verb 'lick' = 'eat';
158
159 Verb 'snort' = 'smell';
160
161 Verb 'jam' = 'put';
162
163 Verb 'jab' = 'put';
164
165 Verb 'stick' = 'put';
166
167 Verb 'thrust' = 'put';
168
169 Verb 'crawl'
170     * 'through' / 'out' / 'via' noun -> Go;
171
172 Verb 'escape'
173     * 'through' / 'out' / 'via' noun -> Go;
174
175 Extend 'jump'
176     * 'through' / 'out' / 'via' noun -> Go;
177
178 Extend 'climb'
179     * 'through' / 'out' / 'via' noun -> Go;
180
181 Extend 'go'
182     * 'through' / 'out' / 'via' noun -> Go;
183
184 Extend 'attack'
185     * noun 'with' noun -> Attack;