~ubuntu-branches/ubuntu/vivid/inform/vivid

« back to all changes in this revision

Viewing changes to inform-6.31.1/include/newbiegrammar.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Christoph Nordholz
  • Date: 2008-05-26 22:09:44 UTC
  • mfrom: (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080526220944-ba7phz0d1k4vo7wx
Tags: 6.31.1+dfsg-1
* Remove a considerable number of files from the package
  due to unacceptable licensing terms.
* Repair library symlinks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!---------------------------------------------------------------------------
 
2
!       NewbieGrammar.h, by Emily Short (emshort@mindspring.com) 
 
3
!
 
4
!       Being grammar statements and a couple of verbs to accomodate and 
 
5
!       respond to nonstandard kinds of input.  It interprets who and what
 
6
!       questions, as well as correcting some standard errors and redirecting
 
7
!       other questions to Help.
 
8
!
 
9
!       The current contents of this file are dictated by people's r*if posts about
 
10
!       their frustrations with early attempts to play IF, and on the messages
 
11
!       log on phpZork, which reveals what an assortment of random players
 
12
!       have been known to attempt.
 
13
!
 
14
!       Note that the general trend of these grammar lines are to catch things that
 
15
!       are not what one might consider "legitimate" IF commands, or could not
 
16
!       be translated easily into another IF action.  There is a separate library,
 
17
!       called ExpertGrammar, that provides some extra verb synonyms and equivalencies
 
18
!       -- many of which were also suggested by analysis of newbie commands.
 
19
!       The two libraries are separated because it is possible that one will want
 
20
!       the ExpertGrammar without all the extra encumbrances of this library file.
 
21
!
 
22
!       Version 0.6 -- still imperfect.  If you have suggestions about
 
23
!               more things the library should handle, please contact me to 
 
24
!               suggest them.
 
25
!
 
26
!       Thanks to Roger Firth for his corrections.
 
27
!
 
28
!       5/21/03
 
29
!
 
30
!
 
31
!
 
32
!       RIGHTS:
 
33
!       
 
34
!       This library file may be treated as public domain.  It may be
 
35
!       included with or without credit to the original author.  It may be
 
36
!       modified at the user's discretion.  It may be freely redistributed.  
 
37
!
 
38
!       CONTENTS:
 
39
!
 
40
!               Parsing for the following forms:
 
41
!
 
42
!               PLEASE... <anything> calls TooPolite, which tells the player such
 
43
!                       forms are not necessary
 
44
!
 
45
!               I AM, YOU ARE, HE/SHE/IT IS... calls NewbieGrammar, which reminds
 
46
!                       the player to use imperative verbs.
 
47
!
 
48
!               WHO AM I? calls MustXMe, which teaches the syntax for EXAMINE ME,
 
49
!                       then executes that command.
 
50
!
 
51
!               WHO ARE YOU? calls ParserHelp, which explains the parser a bit.
 
52
!
 
53
!               WHERE AM I? calls MustLook, which teaches LOOK, then executes that
 
54
!                       command.
 
55
!
 
56
!               WHERE DO I FIND MORE GAMES LIKE THIS (and a wide range of variants)
 
57
!                       calls ArchiveIntro, which explains about the IF archive.
 
58
!
 
59
!               WHERE CAN I GO NOW? (and variants) calls Exits, which is defined
 
60
!                       in this file just to tell the player to look around.  If you 
 
61
!                       would like to improve the functionality, you might want to look
 
62
!                       at one of the libraries that handles an EXITS command.
 
63
!
 
64
!               WHAT DO I DO NEXT? (and a wide range of variants) calls
 
65
!                       Help.
 
66
!               
 
67
!               WALK TO (and variants) calls LocalGo, which tells you
 
68
!                       that movement within a room is unnecessary.
 
69
!
 
70
!               GO BACK (and variants) calls NoReturn, which tells you
 
71
!                       to be specific about which direction you want to return.
 
72
!
 
73
!               CHECK FOR, LOOK FOR (and variants) calls SpecificSearch, which
 
74
!                       tells you to be specific about how to search for something
 
75
!
 
76
!               Moreover, there is a catch-all, omnipresent item, which
 
77
!               goes everywhere the player goes and reacts to
 
78
!               
 
79
!               -- attempts to use body parts to do things.  This is to counteract 
 
80
!                       newbie commands such as
 
81
!                       OPEN DOOR WITH FOOT, INFLATE RAFT WITH MOUTH, etc.
 
82
!               -- vague instructions, such as KILL SOMEONE or TAKE SOMETHING
 
83
!               -- vague locations such as HERE or ANYWHERE
 
84
!
 
85
!       POSSIBLE DIRECTIONS:
 
86
!
 
87
!       A couple of things one might also do if one really wanted to take this
 
88
!       further: 
 
89
!
 
90
!       --      Use the UnknownVerb entrypoint to try to catch cases where the player is
 
91
!               using a known noun to begin a sentence.  Call NewbieGrammar in this case.
 
92
!
 
93
!       --      Use ChooseObjects to make the allbodyparts item dispreferred in any
 
94
!               disambiguation
 
95
!
 
96
!       --      Use BeforeParsing to look for certain standard adverbs, or else modify
 
97
!               the "I only understood you as far as..." library message to remind the 
 
98
!               player that adverbs are not allowed.  Many of the defective commands
 
99
!               found in a study of newbie command structure included things such as
 
100
 
101
!               >SWIM ANYWAY
 
102
!               >JUMP ACROSS
 
103
!               >HELP PLEASE
 
104
!
 
105
!       -- Implement a fully functioning "GO BACK" verb that would return the 
 
106
!               player to his previous location.  A. O. Muniz has already released
 
107
!               a library to do this with Platypus; with the standard Inform library
 
108
!               it is a bit more challenging, but not impossible.
 
109
!
 
110
!
 
111
!       INSTALLATION: 
 
112
!
 
113
!       Include "NewbieGrammar" after Grammar in your gamefile. 
 
114
!
 
115
!       Note that if you are actually using who, what, or where verbs in your
 
116
!       gave for legitimate purposes, you will need to change the grammar
 
117
!       lines accordingly.
 
118
!
 
119
!       Set a ChooseObjects to make sure that allbodyparts doesn't show up 
 
120
!       on commands like GET ALL.
 
121
!
 
122
!       It is also suggested that you Replace HelpSub before including this 
 
123
!       file.  What is here is pretty minimal.  If you wish to avoid compiling
 
124
!       the grammar lines for 'help' (perhaps because you plan to use something
 
125
!       else), define the constant NO_HELP_GRAMMAR before including this file.
 
126
!
 
127
!--------------------------------------------------------------------------- 
 
128
 
 
129
Object allbodyparts,
 
130
        with
 
131
        short_name [;
 
132
                print "that";
 
133
                rtrue;
 
134
        ],
 
135
        number 0,
 
136
        source 0, 
 
137
        parse_name 
 
138
        [ i j w;
 
139
                for (::)
 
140
                {       
 
141
                        j = 0; w = NextWord();
 
142
                        if ((self.number == 0 or 1) && 
 
143
                                ((w == 'my' or 'head' or 'hands' or 'hand' or 'ear' or 'ears') ||
 
144
                                 (w == 'fist' or 'fists' or 'finger' or 'fingers' or 'thumb' or 'thumbs') ||
 
145
                                 (w == 'arm' or 'arms' or 'leg' or 'legs' or 'foot' or 'feet') ||
 
146
                                 (w == 'eye' or 'eyes' or 'face' or 'nose' or 'mouth' or 'teeth') ||
 
147
                                 (w == 'tooth' or 'tongue' or 'lips' or 'lip')))
 
148
                        {       self.number = 1; j = 1;
 
149
                        } 
 
150
                        if ((self.number == 0 or 2) && 
 
151
                                (w == 'someone' or 'something' or 'anyone' or 'anything')) 
 
152
                        {       self.number = 2; j = 1;
 
153
                        }   
 
154
                        if ((self.number == 0 or 3) && 
 
155
                                (w == 'here' or 'everywhere')) 
 
156
                        {       self.number = 3; j = 1;
 
157
                        }    
 
158
                        if (j~=0)  i++; else return i;
 
159
                }
 
160
        ], 
 
161
        found_in [;
 
162
                rtrue;
 
163
        ],
 
164
        react_before [;
 
165
                if ((noun && noun == self) || (second && second == self))
 
166
                {       
 
167
                        self.message(self.number);
 
168
                        self.number = 0;
 
169
                        rtrue;
 
170
                }
 
171
                rfalse;
 
172
        ],
 
173
        message [ x;
 
174
                switch(x)
 
175
                {
 
176
                1:  "Generally speaking, there is no need to refer to your body
 
177
                        parts individually in interactive fiction.  WEAR SHOES ON FEET
 
178
                        will not necessarily be implemented, for instance; WEAR SHOES
 
179
                        is enough.  And unless you get some hint to the contrary,
 
180
                        you probably cannot OPEN DOOR WITH FOOT or 
 
181
                        PUT THE SAPPHIRE RING IN MY MOUTH.";
 
182
                2:  "The game will not arbitrarily guess what you want.  Be specific --
 
183
                        use a noun for an object you can see around you.";
 
184
                3: switch(action)
 
185
                        {
 
186
                                ##Look, ##Search: <<look>>;
 
187
                                default: "You don't really need to refer to places in the game
 
188
                                        this way.";
 
189
                        }
 
190
                }
 
191
        ],
 
192
        has proper scenery;
 
193
        
 
194
[ IsAmAre;
 
195
        if (NextWord()=='is' or 'am' or 'are' or 'was' or 'were') 
 
196
                return GPR_PREPOSITION;
 
197
        return GPR_FAIL;
 
198
]; 
 
199
[ DoCan;
 
200
        if (NextWord()=='do' or 'does' or 'would' or 'will' or 'shall' or
 
201
                         'can' or 'could' or 'should' or 'may' or 'must') 
 
202
                return GPR_PREPOSITION;
 
203
        return GPR_FAIL;
 
204
]; 
 
205
 
 
206
[ Anybody;
 
207
        if (NextWord()=='I//' or 'me' or 'he' or 'she' or 'it' or
 
208
                'we' or 'you' or 'they' or 'person' or 'one' or
 
209
                'someone' or 'somebody' or 'anyone' or 'anybody')
 
210
                return GPR_PREPOSITION;
 
211
        return GPR_FAIL;
 
212
];
 
213
 
 
214
[ More;
 
215
        if (NextWord()=='more' or 'other' or 'another' or 'others')
 
216
                return GPR_PREPOSITION;
 
217
        return GPR_FAIL;
 
218
];
 
219
 
 
220
[ SomeDirection w flag num;
 
221
        for(::)
 
222
        {
 
223
                w = NextWord();
 
224
                if (w==0) 
 
225
                {       
 
226
                        if (flag)
 
227
                        {       return GPR_PREPOSITION;
 
228
                        }
 
229
                        return GPR_FAIL;
 
230
                }
 
231
                if (w == 'left' or 'right' or 'straight' or 'ahead' or 'back'
 
232
                        or 'backwards' or 'forward' or 'backward' or 'forwards' or 'on' 
 
233
                        or 'onward' or 'onwards' or 'around') 
 
234
                {       flag = 1; num++;
 
235
                } 
 
236
        }
 
237
];                      
 
238
 
 
239
[ InternalNouns w flag num;
 
240
        for(::)
 
241
        {
 
242
                w = NextWord();
 
243
                if (w==0) 
 
244
                {       
 
245
                        if (flag)
 
246
                        {       return GPR_PREPOSITION;
 
247
                        }
 
248
                        return GPR_FAIL;
 
249
                }
 
250
                if (w == 'song' or 'music' or 'songs') 
 
251
                {       flag = 1; num++;
 
252
                }
 
253
                if (w == 'thought' or 'idea' or 'concept') 
 
254
                {       flag = 1; num++;
 
255
                }
 
256
                if (w == 'the' or 'a' or 'some' or 'any')
 
257
                {       flag = 0; num++;
 
258
                } 
 
259
        }
 
260
];                      
 
261
 
 
262
[ ThePoint w flag num;
 
263
        for(::)
 
264
        {
 
265
                w = NextWord();
 
266
                if (w==0) 
 
267
                {       
 
268
                        if (flag)
 
269
                        {       return GPR_PREPOSITION;
 
270
                        }
 
271
                        return GPR_FAIL;
 
272
                }
 
273
                if (w == 'point' or 'point?' or 'idea' or 'idea?' or 'goal' 
 
274
                        or 'goal?' or 'purpose' or 'purpose?') 
 
275
                {       flag = 1; num++;
 
276
                }
 
277
                else
 
278
                {       if (w == 'the' or 'a')
 
279
                        {       flag = 0; num++;
 
280
                        }
 
281
                        else 
 
282
                        {       if (flag)
 
283
                                {       return GPR_PREPOSITION;
 
284
                                }
 
285
                                return GPR_FAIL;
 
286
                        }
 
287
                } 
 
288
        }
 
289
];      
 
290
[ IsThisGame w flag num;
 
291
        for(::)
 
292
        {
 
293
                w = NextWord();
 
294
                if (w==0) 
 
295
                {       
 
296
                        if (flag)
 
297
                        {       return GPR_PREPOSITION;
 
298
                        }
 
299
                        return GPR_FAIL;
 
300
                }
 
301
                if (w == 'this' or 'these' or 'this?' or 'these?') 
 
302
                {       flag = 1; num++;
 
303
                }
 
304
                if (w == 'kind' or 'kinds' or 'of' or 'sort' or 'sorts' or 'like'
 
305
                        or 'such' or 'a' or 'as' or 'all' or 'is' or 'are')
 
306
                {       flag = 0; num++;
 
307
                }
 
308
                if (w == 'game' or 'games' or 'story' or 'stories'
 
309
                        or 'game?' or 'games?' or 'story?' or 'stories?' or
 
310
                        'interactive' or 'fiction' or 'text' or 'adventure'
 
311
                        or 'adventures' or 'fiction?' or 'adventures?')
 
312
                {       flag = 1; num++;
 
313
                }
 
314
        }
 
315
];              
 
316
 
 
317
[ ThisGame w flag num;
 
318
        for(::)
 
319
        {
 
320
                w = NextWord();
 
321
                if (w==0) 
 
322
                {       
 
323
                        if (flag)
 
324
                        {       return GPR_PREPOSITION;
 
325
                        }
 
326
                        return GPR_FAIL;
 
327
                }
 
328
                if (w == 'this' or 'these' or 'this?' or 'these?') 
 
329
                {       flag = 1; num++;
 
330
                }
 
331
                if (w == 'kind' or 'kinds' or 'of' or 'sort' or 'sorts' or 'like'
 
332
                        or 'such' or 'a' or 'as' or 'all')
 
333
                {       flag = 0; num++;
 
334
                }
 
335
                if (w == 'game' or 'games' or 'story' or 'stories'
 
336
                        or 'game?' or 'games?' or 'story?' or 'stories?' or
 
337
                        'interactive' or 'fiction' or 'text' or 'adventure'
 
338
                        or 'adventures' or 'fiction?' or 'adventures?')
 
339
                {       flag = 1; num++;
 
340
                }
 
341
        }
 
342
];                              
 
343
[ GetFind;
 
344
        if (NextWord()=='get' or 'find' or 'acquire') 
 
345
                return GPR_PREPOSITION;
 
346
        return GPR_FAIL;
 
347
];
 
348
[ HelpName;
 
349
        if (NextWord()=='help' or 'assistance' or 'instructions'
 
350
                or 'help?' or 'assistance?' or 'instructions?') 
 
351
                return GPR_PREPOSITION;
 
352
        return GPR_FAIL;
 
353
];
 
354
[ Meant; 
 
355
        if (NextWord()=='supposed' or 'meant' or 'intended') 
 
356
                return GPR_PREPOSITION;
 
357
        return GPR_FAIL;
 
358
];
 
359
[ NextThing;
 
360
        if (NextWord()=='now' or 'now?' or 'next' or 'next?'
 
361
                or 'here' or 'here?') 
 
362
                return GPR_PREPOSITION;
 
363
        return GPR_FAIL;
 
364
];
 
365
[ PlayUse;
 
366
        if (NextWord()=='play' or 'play?' or 'use' or 'use?' or 'operate' or 'operate?'
 
367
                or 'type' or 'type?' or 'do' or 'do?' or 'understand' or 'understand?'
 
368
                or 'learn' or 'learn?' or 'work' or 'work?') 
 
369
                return GPR_PREPOSITION;
 
370
        return GPR_FAIL;
 
371
];
 
372
 
 
373
Verb meta 'hello' 'hi' 'howdy' 'greetings'
 
374
                                *                                                                -> HelloThere;
 
375
 
 
376
Verb meta 'you' 'he' 'she' 'it' 'they' 'we' 'its' 'theyre' 'were' 
 
377
        'youre' 'hes' 'shes'
 
378
                                * topic                                                  -> NewbieGrammar; 
 
379
                                
 
380
Verb meta 'who' 'wh' 'whos' 
 
381
                                * IsAmAre 'I'/'I?' -> MustXMe
 
382
                                * IsAmAre 'you'/'you?' -> ParserHelp
 
383
                                * IsAmAre noun                  -> Examine;
 
384
Verb meta 'where'  
 
385
                                * IsAmAre 'I'/'I?'/'this'/'here'/'this?'/'here?' ->MustLook
 
386
                                * IsAmAre noun  -> RightHere
 
387
                                * IsAmAre ThePoint ThisGame                                     -> BoredHelp
 
388
                                * IsAmAre topic -> SpecificSearch
 
389
                                * DoCan Anybody 'go'/'go?'              -> Exits
 
390
                                * DoCan Anybody 'go' NextThing  -> Exits
 
391
                                * DoCan Anybody GetFind ThisGame ->
 
392
                                        ArchiveIntro
 
393
                                * DoCan Anybody GetFind More ThisGame ->
 
394
                                        ArchiveIntro
 
395
                                * DoCan Anybody 'look' 'for' ThisGame ->
 
396
                                        ArchiveIntro
 
397
                                * DoCan Anybody 'look' 'for' More ThisGame ->
 
398
                                        ArchiveIntro
 
399
                                * DoCan Anybody GetFind HelpName -> OutsideHelp
 
400
                                * DoCan Anybody GetFind HelpName 'with'/'for'/'on' ThisGame -> OutsideHelp ;
 
401
Verb meta 'wheres'  
 
402
                                * 'here'                        -> MustLook
 
403
                                * IsAmAre ThePoint ThisGame                                     -> Help;
 
404
Verb meta 'what' 
 
405
                                * NextThing                                             -> Help 
 
406
                                * IsAmAre 'I'/'I?'                                                      -> MustXMe
 
407
                                * IsAmAre 'you'/'you?'                                                  -> ParserHelp
 
408
                                * IsAmAre 'here'/'here?'                                        -> MustLook
 
409
                                * IsAmAre 'this'/'this?'                                        -> Help
 
410
                                * IsAmAre Anybody Meant 'to' PlayUse -> Help
 
411
                                * IsAmAre Anybody Meant 'to' PlayUse 
 
412
                                        NextThing -> Help
 
413
                                * IsAmAre Anybody Meant 'to' PlayUse
 
414
                                        'in'/'on'/'for'/'with' ThisGame                 -> Help
 
415
                                * IsAmAre noun                                                          -> Examine
 
416
                                * IsAmAre ThePoint                                                              -> BoredHelp
 
417
                                * IsAmAre ThePoint ThisGame                                     -> BoredHelp
 
418
                                * IsAmAre ThisGame 'about'/'about?'/'for?'/'for'                -> BoredHelp
 
419
                                * IsAmAre ThisGame 'about'/'about?'/'for?'/'for'                -> BoredHelp
 
420
                                * IsAmAre 'I' topic                                             -> Help
 
421
                                * IsThisGame                                    -> IntroHelp
 
422
                                * DoCan Anybody PlayUse -> VerbHelp
 
423
                                * DoCan Anybody PlayUse NextThing       -> VerbHelp
 
424
                                * DoCan Anybody PlayUse
 
425
                                        'in'/'on'/'for'/'with' ThisGame                 -> VerbHelp
 
426
                                * IsAmAre ThisGame                                                      -> IntroHelp;
 
427
Verb meta 'whats'
 
428
                                * 'here'                        -> MustLook
 
429
                                * noun                          -> Examine
 
430
                                * ThePoint ThisGame                                     -> BoredHelp;
 
431
Verb meta 'how'
 
432
                                * DoCan Anybody PlayUse -> Help
 
433
                                * IsAmAre Anybody Meant 'to' PlayUse -> Help
 
434
                                * IsAmAre Anybody Meant 'to' PlayUse ThisGame -> Help
 
435
                                * DoCan Anybody PlayUse ThisGame -> Help
 
436
                                * DoCan Anybody GetFind ThisGame -> ArchiveIntro
 
437
                                * DoCan Anybody GetFind More ThisGame -> ArchiveIntro
 
438
                                * DoCan Anybody GetFind HelpName -> OutsideHelp
 
439
                                * DoCan Anybody GetFind HelpName 'with'/'for'/'on' ThisGame -> OutsideHelp
 
440
                                * DoCan ThisGame 'work'/'work?' -> OutsideHelp;
 
441
                                
 
442
#ifndef NO_HELP_GRAMMAR;   !!! added
 
443
Verb 'help'             *       -> Help
 
444
                                * topic -> Help;
 
445
#endif;   !!! added
 
446
 
 
447
Verb 'please' 'kindly'  * topic -> TooPolite;
 
448
 
 
449
 
 
450
Extend only 'i//' 
 
451
                * topic                                                  -> NewbieGrammar;
 
452
Extend  'walk'          * SomeDirection                         -> NoReturn
 
453
                                        * 'back' noun=ADirection         -> Go
 
454
                                        * 'around'/'about'/'away'
 
455
                                                                                        -> VagueGo
 
456
                                        * 'on'/'over'/'across' noun             -> Enter
 
457
                                        * 'to'/'towards'/'around'/'past'/'under' noun
 
458
                                                                                                                -> LocalGo 
 
459
                                        * 'over'/'up'/'down' 'to'/'towards' noun
 
460
                                                                                                                -> LocalGo;
 
461
Extend 'turn'           * SomeDirection                          -> NoReturn;
 
462
Extend  'climb'         * SomeDirection                                  -> NoReturn
 
463
                                        * 'back' noun=ADirection         -> Go;
 
464
Verb    'keep'          * 'going'/'walking'/'heading'/'running'
 
465
                                                                         noun=ADirection -> NoReturn
 
466
                                        * 'going'/'walking'/'heading'/'running'
 
467
                                                                         noun=ADirection -> MustGo;
 
468
Verb    'continue'      *  noun=ADirection -> MustGo
 
469
                                        * 'going'/'walking'/'heading'/'running' 
 
470
                                                                        noun=ADirection -> MustGo;
 
471
Verb    'return' 'back' *                                                        -> NoReturn
 
472
                                        * 'to' topic                             -> NoReturn;
 
473
                                        
 
474
Extend  'check'         * 'for' noun                             -> Examine
 
475
                                        * 'for' topic                            -> SpecificSearch;
 
476
Extend  'look'          * 'for' noun                             -> Examine
 
477
                                        * 'for' topic                            -> SpecificSearch;
 
478
Extend  'search'        * 'for' noun                             -> RightHere
 
479
                                        * 'for' topic                            -> SpecificSearch;
 
480
Verb    'find'          * noun                                           -> RightHere
 
481
                                        * topic                                          -> SpecificSearch;
 
482
Extend  'wear'          * noun 'on' noun                         -> Wear;
 
483
Extend  'sing'          * InternalNouns                          -> InternalAccusative;
 
484
Extend  'think'         * InternalNouns                          -> InternalAccusative;
 
485
 
 
486
[ TooPoliteSub;
 
487
        "The parser does not understand polite formulations such as 
 
488
        PLEASE LOOK AROUND NOW or KINDLY OPEN THE BOX.  Start your commands
 
489
        with an imperative verb and they will work better.";
 
490
];
 
491
 
 
492
[ InternalAccusativeSub;
 
493
        "In constructions like SING A SONG, the ~A SONG~ part is what is known
 
494
        as an internal accusative -- a direct object that is not actually necessary.
 
495
        In short: SING will do just as well.  The game has difficulty with
 
496
        parsing abstracts like ~a song~.";
 
497
];
 
498
 
 
499
[ MustGoSub;
 
500
        print "[Generally, it is necessary to phrase commands like this as a simple
 
501
                direction: GO NORTH, NORTH, etc., rather than KEEP GOING NORTH, HEAD BACK NORTH,
 
502
                etc.]^^";
 
503
        <<Go noun>>;
 
504
];
 
505
 
 
506
[ RightHereSub;
 
507
        print "", (The) noun, " is ";
 
508
        if (IndirectlyContains(player, noun)) "already in your possession!";
 
509
        "in plain sight!";
 
510
];
 
511
 
 
512
[ SpecificSearchSub;
 
513
        "If you want to look for something, try LOOK (to see
 
514
        the room as a whole); LOOK IN containers; LOOK UNDER large items;
 
515
        and SEARCH such items as piles and heaps.^^If you still can't
 
516
        find whatever it is, you're probably out of luck...";
 
517
];
 
518
 
 
519
[ NoReturnSub;
 
520
        "The game does not keep track of your path through the rooms, nor 
 
521
        your orientation within them.  Instead, you should rely on absolute
 
522
        compass directions.  If you
 
523
        wish to visit a new location or return to a previous one, you will have to
 
524
        type the directions to take you there -- NORTH, UP, etc.";
 
525
];
 
526
 
 
527
[ ParserHelpSub;
 
528
        "The voice with which you are communicating is the narrator of the
 
529
        game.^^[If you are having trouble with the game, try HELP.]";
 
530
];
 
531
[ NewbieGrammarSub;
 
532
        "If the game is not understanding you, try issuing your commands in the imperative:
 
533
        e.g., >THROW THE KNIFE, but not >I WOULD REALLY LIKE TO THROW THE KNIFE.  Chatty sentences
 
534
        such as >YOU ARE A VERY STUPID GAME will only prove themselves true.^^If you really
 
535
        feel that the game is looking for a word that is not a verb (as the solution
 
536
        to a riddle, eg.) try some variations, such as SAY FLOOBLE.";
 
537
];
 
538
[ MustLookSub;
 
539
        print "[You can do this in the future by typing LOOK, which is quicker and 
 
540
                more standard.]^";
 
541
        <<Look>>;
 
542
];
 
543
[ MustXMeSub;
 
544
        print "[You're the main character of the game.  Of course, the game author may
 
545
                have given you a description.  You can see this description in the future 
 
546
                by typing EXAMINE ME, which is quicker and more standard.]^^";
 
547
        <<Examine player>>;
 
548
];
 
549
 
 
550
Verb 'intro' * -> TotalIntro;
 
551
[ TotalIntroSub;
 
552
#ifdef BasicBrief;
 
553
        BasicBrief(); new_line;
 
554
#endif;
 
555
#ifdef StartingInstructions;
 
556
        StartingInstructions(); rtrue;
 
557
#endif;
 
558
        "This is a work of interactive fiction.  You should explore and try to do things.";
 
559
];
 
560
[ BoredHelpSub;
 
561
#ifdef StartingInstructions;
 
562
        StartingInstructions(); rtrue;
 
563
#ifnot;
 
564
        <<Help>>;
 
565
#endif;
 
566
];
 
567
 
 
568
[ OutsideHelpSub;
 
569
#ifdef OnlineHelp;
 
570
        OnlineHelp(); rtrue;
 
571
#ifnot;
 
572
        <<Help>>;
 
573
#endif;
 
574
];
 
575
 
 
576
Verb 'verbs' *  -> VerbHelp;
 
577
[ VerbHelpSub;
 
578
#ifdef StandardVerbs;
 
579
        StandardVerbs(); rtrue;
 
580
#ifnot;
 
581
        <<Help>>;
 
582
#endif;
 
583
];
 
584
 
 
585
Verb 'hint' 'hints' *   -> HintHelp;
 
586
[ HintHelpSub;
 
587
#ifdef StuckInstructions;
 
588
        StuckInstructions(); rtrue;
 
589
#ifnot;
 
590
        <<Help>>;
 
591
#endif;
 
592
];
 
593
 
 
594
[ ArchiveIntroSub;
 
595
#ifdef MoreGames;
 
596
        MoreGames(); rtrue;
 
597
#ifndef MoreGames;
 
598
        "You can find more games like this at the Interactive Fiction archive,
 
599
        http://www.ifarchive.org, and a guide to the archive at
 
600
        http://www.wurb.com/if/.";
 
601
#endif;
 
602
];
 
603
 
 
604
[ HelloThereSub;
 
605
        "Hi!^^If you are new to Interactive Fiction, you may want to type HELP.";
 
606
];
 
607
 
 
608
[ ExitsSub;
 
609
        "If you LOOK, you may notice some compass directions you can use to 
 
610
        move to new rooms.";
 
611
];
 
612
 
 
613
[ LocalGoSub;
 
614
        if (noun has door) <<enter noun>>;
 
615
        "There's no need to walk towards items that are already
 
616
        in your vicinity.";
 
617
]; 
 
618
 
 
619
Verb 'demo' * -> Demo;
 
620
[ DemoSub;
 
621
#ifdef CheeseSample;
 
622
        CheeseSample();
 
623
#ifnot;
 
624
        "No demo is available.";
 
625
#endif;
 
626
];
 
627
 
 
628
[ HelpSub;
 
629
        "If you would like a list of verbs you could try, type VERBS.^^If the problem is more
 
630
        that you don't know how to get going with the game, type INTRO.^^If you'd like a sample
 
631
        of a game being played, type DEMO.^^Finally, if you know what you want to achieve
 
632
        but can't figure out how to achieve it, type HINT.
 
633
        ^^If you are having further difficulty with IF, try looking at some of the online help sites
 
634
        such as http://www.brasslantern.org.";
 
635
];
 
636
 
 
637
[ IntroHelpSub;
 
638
#ifdef BasicBrief;
 
639
        BasicBrief(); rtrue;
 
640
#ifnot;
 
641
        "This is a work of interactive fiction, in which you play the role of the 
 
642
        main character.  You interact by typing text at the prompt.";
 
643
#endif;
 
644
];