-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmygame_import.i
More file actions
2183 lines (1500 loc) · 58.2 KB
/
Copy pathmygame_import.i
File metadata and controls
2183 lines (1500 loc) · 58.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- mygame_import.i
-- An auxiliary game source file for ALAN Standard Library v2.1.
-- This file is not one of the library files and not necessary for running a game
-- which uses the library.
-- This file lists all attributes of the my_game instance (declared in the
-- library file 'definitions.i') and all verb outcomes (declared in 'verbs.i'),
-- for easy editing and modification.
-- USAGE: if you need to edit/change a great number of pre-declared library
-- messages (verb outcomes, verb check messages, illegal parameter messages
-- etc.) for your game, e.g. when you are writing in another language or if you
-- intend to use an unusual person/tense in your game's narrative, please edit
-- the default messages in this file. Then, import this file into your main
-- source file, together with the five library files. The library files don't
-- need to be edited (except if you wish to reword standard runtime messages
-- found in 'messages.i').
-- NOTE 1: In your main source file, you won't need to declare the my_game
-- instance, since you import that instance to your game in this file.
-- NOTE 2: This file doesn't contain the responses for verb outcomes in
-- 'lib_classes.i' nor some marginal messages for the behaviour of
-- 'indoor and outdoor objects in 'lib_locations.i'.
-- To change verb outcomes for classes predefined in 'lib_classes,i', add the
-- change in this file at the applicable verb in the list of verbs further
-- below, in the following way:
-- In this example, the author has changed the response for the verb
-- 'look_through' for the class WINDOW:
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- VERB look_through
-- DOES ONLY
-- IF THIS ISA WINDOW
-- THEN "You see the garden outside the house."
-- -- the above would be the default outcome for all windows in the game.
-- ELSE "You can't see through" SAY THE bulk. "."
-- -- this is the original default response defined by the library,
-- -- and in the list of verbs further below.
-- END IF.
-- END VERB look_through.
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Above, the author has added an IF clause to cater for both window objects and
-- other objects. The 'lib_classes.i' file won't have to be edited.
-- For example, to change the verb outcome for any verb applying to a class you
-- have created yourself:
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- EVERY cat ISA ACTOR
-- VERB examine
-- DOES ONLY "It's just an ordinary cat"
-- END VERB examine.
-- END EVERY.
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- etc.
-- To add a check of your own to any library verb, just add the check to the
-- verb definition in the list of verbs below, for example:
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- VERB jump
-- CHECK strength OF hero > 5 -- your own check, added in this file
-- ELSE "You feel too weak." -- and not in the library files!
-- DOES "You jump on the spot, to no avail."
-- END VERB jump.
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- =============================================================================
THE my_game ISA DEFINITION_BLOCK
-- attributes for the game banner; edit these to suit your own game:
-- =================================================================
HAS title "My New Game".
HAS subtitle "". -- leaving this empty won't show the subtitle line in your game's banner
HAS author "An ALAN Author". -- put your name/pseudonym here
HAS year 0000. -- change this to the current year
HAS version "1". -- setting this to 0 won't show the version line in your game's banner
-- messages for the hero:
-- ======================
-- The hero is not defined as an instance in the library; the game author
-- has all the freedom to define the hero as (s)he sees fit. However,
-- there are some messages for the hero defined in the library. These can be
-- easily overridden. Two of these messages are right here, the rest are
-- e.g. in verb checks.
HAS hero_worn_header "You are wearing".
HAS hero_worn_else "You are not wearing anything.".
-- These messages are shown when you add "LIST worn." for example to the
-- 'examine' verb.
-- description messages for dark locations:
-- ========================================
HAS dark_loc_desc "It is pitch black. You can't see anything at all.".
HAS light_goes_off "It is now pitch black.".
-- This message is shown when a light goes off and the location becomes dark.
-- response for restricted actions:
-- ================================
HAS restricted_response "You can't do that.".
-- This message is shown whenever the player used a verb that has been
-- disabled by the "CAN NOT [verb]." or verbs_disabled attributes (see the
-- library manual).
HAS restricted_level 0.
-- by default, all verbs work in the normal way
-- all illegal parameter messages, typically found in the ELSE parts of SYNTAX
-- structures and the first two below being by far the most common.
-- ===========================================================================
-- the general message for when a parameter is not suitable with the verb:
--------------------------------------------------------------------------
HAS illegal_parameter_sg "That's not something you can $v.". -- (numerous)
HAS illegal_parameter_pl "Those are not something you can $v.".
-- variations of the above message when a preposition is required after the verb:
---------------------------------------------------------------------------------
HAS illegal_parameter_about_sg "That's not something you can $v about.". -- ask_about, tell_about, think_about
HAS illegal_parameter_about_pl "Those are not something you can $v about.".
HAS illegal_parameter_at "You can't $v anything at $+2.". -- fire_at, throw_at
HAS illegal_parameter_for_sg "That's not something you can $v for.". -- ask_for
HAS illegal_parameter_for_pl "Those are not something you can $v for.".
HAS illegal_parameter2_from_sg "That's not something you can take things from.". -- take_from
HAS illegal_parameter2_from_pl "Those are not something you can take things from.".
HAS illegal_parameter_in_sg "That's not something you can $v in.". -- dive_in, jump_in, lie_in, swim_in
HAS illegal_parameter_in_pl "Those are not something you can $v in.".
HAS illegal_parameter_on_sg "That's not something you can $v on.". -- climb_on, jump_on, knock, lie_on, sit_on,
-- stand_on, switch_on, turn_on
HAS illegal_parameter_on_pl "Those are not something you can $v on.".
HAS illegal_parameter_off_sg "That's not something you can $v off.". -- get_off, switch_off, turn_off
HAS illegal_parameter_off_pl "Those are not something you can $v off.".
HAS illegal_parameter_to_sg "That's not something you can $v to.". -- listen_to, talk_to
HAS illegal_parameter_to_pl "Those are not something you can $v to.".
HAS illegal_parameter2_to_sg "That's not something you can $v things to.". -- give, show, tell, tie_to, throw_to
HAS illegal_parameter2_to_pl "Those are not something you can $v things to.".
HAS illegal_parameter_with_sg "That's not something you can $v with.". -- kill_with, shoot_with, play_with
HAS illegal_parameter_with_pl "Those are not something you can $v with.".
HAS illegal_parameter2_with_sg "That's not something you can $v things with.". -- attack_with, break_with, burn_with, close_with,
-- + cut_with, fill_with, lock_with, open_with, pry_with,
-- + push_with, unlock_with
HAS illegal_parameter2_with_pl "Those are not something you can $v things with.".
-- other illegal parameter messages:
------------------------------------
HAS illegal_parameter_act "That doesn't make sense.". -- empty_in, pour_in, put_in, throw_in
HAS illegal_parameter_consult_sg "That's not something you can find information
about.". -- consult_about
HAS illegal_parameter_consult_pl "Those are not something you can find
information about.".
HAS illegal_parameter_examine_sg "That's not something you can examine.". -- examine
HAS illegal_parameter_examine_pl "Those are not something you can examine.".
HAS illegal_parameter_go "You can't go there.". -- go_to
HAS illegal_parameter_look_out_sg "That's not something you can look out of.". -- look_out_of
HAS illegal_parameter_look_out_pl "Those are not something you can look out of.".
HAS illegal_parameter_look_through "You can't look through $+1.". -- look_through
HAS illegal_parameter_obj "You can only $v objects.". -- give, put, put_in, put_on, put_against,
-- + put_behind, put_near, put_under,
-- + throw_at, throw_in, throw_to, tie_to,
-- + use, use_with
HAS illegal_parameter_string "Please state inside double quotes ("""") what you want to $v.". -- answer, say, say_to, write
HAS illegal_parameter_talk_sg "That's not something you can talk to.". -- ask, ask_for, say_to, tell
HAS illegal_parameter_talk_pl "Those are not something you can talk to.".
HAS illegal_parameter_there "It's not possible to $v there.". -- look_behind, look_in, look_under
HAS illegal_parameter2_there "It's not possible to $v anything there.". -- empty_in, empty_on, pour_in, pour_on, put_in,
-- + put_on, put_against, put_behind, put_near,
-- + put_under, throw_in, throw_to, tie_to, write
HAS illegal_parameter_what_sg "That's not something I know about.". -- what_is, where_is
HAS illegal_parameter_what_pl "Those are not something I know about.". -- what_is, where_is
HAS illegal_parameter_who_sg "That's not somebody I know about.". -- who_is
HAS illegal_parameter_who_pl "Those are not somebody I know about.". -- who_is
-- verb check messages, found before DOES sections of verbs and used mainly in 'verbs.i':
-- ======================================================================================
-- a) attribute checks
----------------------
-- the general check message for when an instance cannot be used with the verb :
--------------------------------------------------------------------------------
HAS check_obj_suitable_sg "That's not something you can $v.". -- (numerous)
HAS check_obj_suitable_pl "Those are not something you can $v.".
-- variations of the above message, needed e.g. when a preposition is required after the verb:
----------------------------------------------------------------------------------------------
HAS check_obj_suitable_at "You can't $v anything at $+2.". -- fire_at, throw_at, throw_to
HAS check_obj2_suitable_for_sg "That's not something you can $v for.". -- ask_for
HAS check_obj2_suitable_for_pl "Those are not something you can $v for.".
HAS check_obj_suitable_off_sg "That's not something you can $v off.". -- turn_off, switch_off
HAS check_obj_suitable_off_pl "Those are not something you can $v off.".
HAS check_obj_suitable_on_sg "That's not something you can $v on.". -- knock, switch_on, turn_on
HAS check_obj_suitable_on_pl "Those are not something you can $v on." .
HAS check_obj_suitable_with_sg "That's not something you can $v with.". -- play_with
HAS check_obj_suitable_with_pl "Those are not something you can $v with.".
HAS check_obj2_suitable_with_sg "That's not something you can $v things with.". -- break_with, burn_with, close_with, cut_with, fill_with,
HAS check_obj2_suitable_with_pl "Those are not something you can $v things with.". -- + lock_with, open_with, pry_with, push_with,
-- + touch_with, unlock_with
HAS check_obj_suitable_examine_sg "That's not something you can examine.". -- examine
HAS check_obj_suitable_examine_pl "Those are not something you can examine.". -- examine
HAS check_obj_suitable_look_out_sg "That's not something you can look out of.". -- look_out_of
HAS check_obj_suitable_look_out_pl "Those are not something you can look out of.".
HAS check_obj_suitable_look_through "You can't look through $+1.". -- look_through
-- checks for open, closed and locked objects:
----------------------------------------------
HAS check_obj_not_open_sg "$+1 is already open.". -- open, open_with
HAS check_obj_not_open_pl "$+1 are already open.".
HAS check_obj_open1_sg "$+1 is already closed.". -- close, close_with
HAS check_obj_open1_pl "$+1 are already closed.".
HAS check_obj_open2_sg "You can't, since $+1 is closed.". -- empty (in/on), look_in, pour (in/on)
HAS check_obj_open2_pl "You can't, since $+1 are closed.".
HAS check_obj2_open_sg "You can't, since $+2 is closed.". -- empty_in, pour_in, put_in, throw_in
HAS check_obj2_open_pl "You can't, since $+2 are closed.".
HAS check_obj_locked_sg "$+1 is already unlocked.". -- unlock, unlock_with
HAS check_obj_locked_pl "$+1 are already unlocked.".
HAS check_obj_not_locked_sg "$+1 is already locked.". -- lock, lock_with
HAS check_obj_not_locked_pl "$+1 are already locked.".
-- checks for "not reachable" and "distant" objects:
----------------------------------------------------
HAS check_obj_reachable_sg "$+1 is out of your reach.". -- (numerous)
HAS check_obj_reachable_pl "$+1 are out of your reach.".
HAS check_obj2_reachable_sg "$+2 is out of your reach.". -- empty_in, fill_with, put_in, take_from, tie_to
HAS check_obj2_reachable_pl "$+2 are out of your reach.".
HAS check_obj_reachable_ask "$+1 can't reach $+2.". -- ask_for
HAS check_obj_not_distant_sg "$+1 is too far away.". -- (numerous)
HAS check_obj_not_distant_pl "$+1 are too far away.".
HAS check_obj2_not_distant_sg "$+2 is too far away.". -- empty_in, fill_with, pour_in, put_in, show, take_from, -- + throw_at, throw_in, throw_to
HAS check_obj2_not_distant_pl "$+2 are too far away.".
-- checks for the hero sitting or lying_down:
---------------------------------------------
HAS check_hero_not_sitting1 "It is difficult to $v while sitting down.". -- (with many intransitive verbs)
HAS check_hero_not_sitting2 "It is difficult to $v anything while sitting down.". -- (with many transitive verbs)
HAS check_hero_not_sitting3 "It is difficult to $v anywhere while sitting down.". -- (with many verbs of motion)
HAS check_hero_not_sitting4 "You're sitting down already.". -- sit, sit_on
HAS check_hero_not_lying_down1 "It is difficult to $v while lying down.". -- (with many intransitive verbs)
HAS check_hero_not_lying_down2 "It is difficult to $v anything while lying down.". -- (with many transitive verbs)
HAS check_hero_not_lying_down3 "It is difficult to $v anywhere while lying down.". -- (with many verbs of motion)
HAS check_hero_not_lying_down4 "You're lying down already.". -- lie_down, lie_in
-- other attribute checks:
--------------------------
HAS check_act_can_talk_sg "That's not something you can talk to.". -- ask, ask_for, say_to, tell
HAS check_act_can_talk_pl "Those are not something you can talk to.".
HAS check_obj_allowed_in_sg "$+1 doesn't belong in $+2.". -- empty_in, pour_in, put_in, throw_in
HAS check_obj_allowed_in_pl "$+1 don't belong in $+2.".
HAS check_obj_broken_sg "That doesn't need fixing.". -- fix
HAS check_obj_broken_pl "Those don't need fixing.".
HAS check_obj_inanimate1 "$+1 wouldn't probably appreciate that.". -- push, push_with, scratch, search
HAS check_obj_inanimate2 "You are not sure whether $+1 would appreciate that.". -- rub, touch, touch_with
HAS check_obj_movable "It's not possible to $v $+1.". -- lift, pull, push, push_with, shake, take, take_from
HAS check_obj_not_scenery_sg "$+1 is not important.". -- examine, take, take_from
HAS check_obj_not_scenery_pl "$+1 are not important.".
HAS check_obj2_not_scenery_sg "$+1 is not important.". -- ask_for, take_from
HAS check_obj2_not_scenery_pl "$+1 are not important.".
HAS check_obj_suitable_there "It's not possible to $v there.". -- look_behind, look_in, look_under
HAS check_obj2_suitable_there "It's not possible to $v anything there.". -- throw_in, tie_to
HAS check_obj_takeable "You don't have $+1.". -- (numerous; this check is in verbs with implicit taking)
HAS check_obj2_takeable1 "You don't have $+2.". -- fill_with
HAS check_obj2_takeable2 "You can't have $+2.". -- ask_for
HAS check_obj_weight_sg "$+1 is too heavy to $v.". -- lift, take, take_from
HAS check_obj_weight_pl "$+1 are too heavy to $v.".
HAS check_obj_writeable "Nothing can be written there.". -- write
-- b) location and containment checks for actors and objects
------------------------------------------------------------
-- containment checks for actors other than the hero (checks for the hero are listed separately below):
-------------------------------------------------------------------------------------------------------
HAS check_act_near_hero "You don't quite know where $+1 went.
You should state a direction where you want to go.". -- follow
HAS check_obj_in_act_sg "$+2 doesn't have $+1.". -- take_from
HAS check_obj_in_act_pl "$+2 don't have $+1.".
HAS check_obj_not_in_act_sg "$+2 already has $+1.". -- give
HAS check_obj_not_in_act_pl "$+2 already have $+1.".
-- location and containment checks for the hero:
------------------------------------------------
HAS check_count_weapon_in_hero "You are not carrying any firearms.". -- shoot
HAS check_obj_not_at_hero_sg "$+1 is right here.". -- find, follow, go_to, where_is
HAS check_obj_not_at_hero_pl "$+1 are right here.".
HAS check_obj_in_hero "You don't have $+1.". -- drop, fire, fire_at, put, show
HAS check_obj2_in_hero "You don't have $+2.". -- (numerous)
HAS check_obj_not_in_hero1 "It doesn't make sense to $v something you're holding.". -- attack, attack_with, kick, lift, shoot, shoot_with
HAS check_obj_not_in_hero2 "You already have $+1.". -- take, take_from
HAS check_obj2_not_in_hero1 "You are carrying $+2.". -- throw_at, throw_in, throw_to
HAS check_obj2_not_in_hero2 "That would be futile.". -- put_against, put_behind, put_near, put_under
HAS check_obj2_not_in_hero3 "You already have $+2.". -- ask_for
-- checking whether an object is in a container or not:
-------------------------------------------------------
HAS check_cont_not_in_obj "That doesn't make sense.". -- empty_in, pour_in, put_in
HAS check_obj_in_cont_sg "$+1 is not in $+2.". -- take_from
HAS check_obj_in_cont_pl "$+1 are not in $+2.".
HAS check_obj_not_in_cont_sg "$+1 is in $+2 already.". -- put_in, throw_in
HAS check_obj_not_in_cont_pl "$+1 are in $+2 already.".
HAS check_obj_not_in_cont2 "$+1 is already full of $+2.". -- fill_with
-- checking whether an object is on a surface or not:
-----------------------------------------------------
HAS check_obj_on_surface_sg "$+1 is not on $+2.". -- take_from
HAS check_obj_on_surface_pl "$+1 are not on $+2.".
HAS check_obj_not_on_surface_sg "$+1 is already on $+2.". -- put_on
HAS check_obj_not_on_surface_pl "$+1 are already on $+2.".
-- checking whether an object is worn or not:
---------------------------------------------
HAS check_obj_in_worn "You are not wearing $+1.". -- remove, take_off ('classes.i')
HAS check_obj_not_in_worn1 "You are already wearing $+1.". -- put_on, wear ('classes.i')
HAS check_obj_not_in_worn2 "It doesn't make sense to $v something you're wearing.". -- attack, attack_with, kick, shoot, shoot_with
HAS check_obj_not_in_worn3 "You'll have to take off $+1 first.". -- drop
-- c) checking location states
------------------------------
HAS check_current_loc_lit "It is too dark to see.". -- (numerous)
-- d) checks guarding against actions directed at the hero him-/herself
-----------------------------------------------------------------------
HAS check_obj_not_hero1 "It doesn't make sense to $v yourself.". -- ask, ask_for, attack, attack_with, catch, follow
-- kick, listen, pull, push, push_with, take,
-- take_from, tell
HAS check_obj_not_hero2 "There is no need to be that desperate.". -- fire_at, kill, kill_with, shoot, shoot_with
HAS check_obj_not_hero3 "That wouldn't accomplish anything.". -- scratch, touch
HAS check_obj_not_hero4 "You're right here.". -- find, go_to
HAS check_obj_not_hero5 "You don't need to be freed.". -- free
HAS check_obj_not_hero6 "There is no time for that now.". -- kiss, play_with, rub
HAS check_obj_not_hero7 "Turning your head, you notice nothing unusual behind yourself.". -- look_behind
HAS check_obj_not_hero8 "You notice nothing unusual under yourself.". -- look_under
HAS check_obj2_not_hero1 "That doesn't make sense.". -- say_to, show, take_from, touch_with, throw_at/in/to
HAS check_obj2_not_hero2 "That would be futile.". -- put_against, put_behind, put_near, put_under
HAS check_obj2_not_hero3 "You can't $v things to yourself.". -- give, tie_to
-- e) checks guarding against actions where an object is used with itself
-------------------------------------------------------------------------
HAS check_obj_not_obj2_at "It doesn't make sense to $v something at itself.". -- fire_at, throw_at
HAS check_obj_not_obj2_from "It doesn't make sense to $v something from itself.". -- take_from
HAS check_obj_not_obj2_in "It doesn't make sense to $v something into itself.". -- empty_in, pour_in, put_in, throw_in
HAS check_obj_not_obj2_on "It doesn't make sense to $v something onto itself.". -- empty_on, pour_on, put_on
HAS check_obj_not_obj2_to "It doesn't make sense to $v something to itself.". -- give, show, throw_to, tie_to
HAS check_obj_not_obj2_with "It doesn't make sense to $v something with itself.". -- attack_with, break_with, burn_with, close_with, -- + cut_with, fill_with, lock_with,
-- + open_with, push_with, pry_with, shoot_with,
-- + touch_withm unlock_with, use_with
HAS check_obj_not_obj2_put "That doesn't make sense." . -- put_against, put_behind, put_near, put_under
-- f) additional checks for classes:
------------------------------------
HAS check_clothing_sex "On second thoughts you decide $+1 won't really suit you.". -- clothing: wear
HAS check_cont_not_supporter "You can't put $+1 inside $+2.". -- supporter: put_in
HAS check_device_on_sg "$+1 is already off.". -- device: turn_off, switch_off
HAS check_device_on_pl "$+1 are already off.".
HAS check_device_not_on_sg "$+1 is already on.". -- device: turn_on, switch_on
HAS check_device_not_on_pl "$+1 are already on.".
HAS check_door_matching_key "You can't use $+2 to $v $+1.". -- door: lock_with, unlock_with
HAS check_lightsource_lit_sg "But $+1 is not lit.". -- lightsource: extinguish, turn_off
HAS check_lightsource_lit_pl "But $+1 are not lit.".
HAS check_lightsource_not_lit_sg "$+1 is already lit.". -- lightsource: light, turn_on
HAS check_lightsource_not_lit_pl "$+1 are already lit.".
HAS check_lightsource_switchable_sg "That's not something you can switch on and off.". -- lightsource: switch
HAS check_lightsource_switchable_pl "Those are not something you can switch on and off.".
HAS check_liquid_vessel_not_cont "You can't carry $+1 around in your bare hands.". -- liquid: take_from
HAS check_obj_not_broken "Nothing happens.". -- device, lightsource: light, switch, turn_on
-- messages for implicit taking:
-- =============================
HAS implicit_taking_message "(taking $+1 first)$n".
-- The following verbs are preceded by implicit taking:
-- bite, drink, eat, empty, empty_in, empty_on, give, pour, pour_in,
-- pour_on, put_in, put_on, throw, throw_at, throw_in, throw_to, tie_to.
--
-- In ditransitive verbs, only the first parameter (the direct object) is
-- taken implicitly.
-- all verb outcomes (what happens after DOES):
-- ============================================
-- Editing these verbs will affect the default responses for these verbs in your game.
-- You can also add checks of your own to the verbs here, before the "DOES ONLY" section.
VERB 'about'
DOES ONLY
"[This is a text adventure, also called interactive fiction, which means that
what goes on in the story depends on what you type at the prompt. Commands
you can type are for example GO NORTH (or NORTH or just N), WEST,
SOUTHEAST, UP, IN etc for moving around, but you can try many other things
too, like TAKE LAMP, DROP EVERYTHING, EAT APPLE, EXAMINE BIRD or FOLLOW OLD
MAN, to name just a few. LOOK (L) describes your surroundings, and
INVENTORY (I) lists what you are carrying. You can SAVE your game and
RESTORE it later on.
$pType CREDITS to see information about the author and the copyright issues.
$pTo stop playing and end the program, type QUIT.]$p"
END VERB 'about'.
VERB 'again'
DOES ONLY
"[The AGAIN command is not supported in this game. As a workaround, try using
the 'up' and 'down' arrow keys to scroll through your previous commands.]"
END VERB 'again'.
VERB answer
DOES ONLY
"What was the question?"
END VERB answer.
VERB ask
WHEN act
DOES ONLY "There is no reply."
END VERB ask.
VERB ask_for
DOES ONLY
MAKE act compliant.
-- see 'classes.i' -> ACTOR.
-- It's only possible to get something from an NPC if the NPC is 'compliant'.
LOCATE obj IN hero.
SAY THE act. "gives" SAY THE obj. "to you."
MAKE act NOT compliant.
END VERB ask_for.
VERB attack
DOES ONLY
"Resorting to brute force is not the solution here."
END VERB attack.
VERB attack_with
WHEN target
DOES ONLY
"Resorting to brute force is not the solution here."
END VERB attack_with.
VERB bite
DOES ONLY
IF obj IN hero
THEN "You take a bite of" SAY THE obj. "$$."
IF obj IS NOT plural
THEN "It tastes nothing out of the ordinary."
ELSE "They taste nothing out of the ordinary."
END IF.
END IF.
END VERB bite.
VERB break
DOES ONLY
"Resorting to brute force is not the solution here."
END VERB break.
VERB break_with
DOES ONLY
"Trying to break" SAY THE obj. "with" SAY THE instr.
"wouldn't accomplish anything."
END VERB break_with.
VERB 'brief'
DOES ONLY
Visits 1000.
"Brief mode is now on. Location descriptions will only be shown
the first time you visit."
END VERB 'brief'.
VERB burn
DOES ONLY
"You must state what you want to burn" SAY THE obj. "with."
END VERB burn.
VERB burn_with
DOES ONLY
"You can't burn" SAY THE obj. "with" SAY THE instr. "."
END VERB burn_with.
VERB buy
DOES ONLY
IF item IS NOT plural
THEN "That's not"
ELSE "Those are not"
END IF.
"for sale."
END VERB buy.
VERB catch
DOES ONLY
IF obj IS NOT plural
THEN "That doesn't"
ELSE "Those don't"
END IF.
"need to be caught."
END VERB catch.
VERB clean
DOES ONLY
"Nothing would be achieved by that."
END VERB clean.
VERB climb
DOES ONLY
IF obj IS NOT plural
THEN "That's not"
ELSE "Those are not"
END IF.
"something you can climb."
END VERB climb.
VERB climb_on
DOES ONLY
IF surface IS NOT plural
THEN "That's not"
ELSE "Those are not"
END IF.
"something you can climb on."
END VERB climb_on.
VERB climb_through
DOES ONLY
IF obj IS NOT plural
THEN "That's not"
ELSE "Those are not"
END IF.
"something you can climb through."
END VERB climb_through.
VERB close
DOES ONLY
MAKE obj NOT open.
"You close" SAY THE obj. "."
END VERB close.
VERB close_with
DOES ONLY
"You can't $v" SAY THE obj. "with" SAY THE instr. "."
END VERB close_with.
VERB consult
DOES ONLY
"You find nothing useful about" SAY THE topic. "in" SAY THE source. "."
END VERB consult.
VERB credits
DOES ONLY
"The author retains the copyright to this game.
$pThis game was written using the ALAN Adventure Language. ALAN is
an interactive fiction authoring system by Thomas Nilsson.
$nE-mail address: thomas@alanif.se $pFurther information
about the ALAN system can be obtained from
the World Wide Web Internet site
$ihttp://www.alanif.se$p"
END VERB credits.
VERB cut
DOES ONLY
"You need to specify what you want to cut" SAY THE obj. "with."
END VERB cut.
VERB cut_with
DOES ONLY
"You can't cut" SAY THE obj. "with" SAY THE instr. "."
END VERB cut_with.
VERB dance
DOES ONLY
"How about a waltz?"
END VERB dance.
VERB dig
DOES ONLY
"There is nothing suitable to dig here."
END VERB dig.
VERB dive
DOES ONLY
"There is no water suitable for swimming here."
END VERB dive.
VERB dive_in
DOES ONLY
IF liq IS NOT plural
THEN "That's not"
ELSE "Those are not"
END IF.
"something you can dive in."
END VERB dive_in.
VERB drink
DOES ONLY
IF vessel OF liq = null_vessel
-- here, if the liquid is in no container, e.g.
-- the hero takes a sip of water from a river,
-- the action is allowed to succeed so that the hero
-- drinks some of the liquid:
THEN "You drink a bit of" SAY THE liq. "."
ELSE
-- = if the liquid is in a container:
-- implicit taking:
IF vessel OF liq NOT DIRECTLY IN hero
THEN
IF vessel OF liq IS NOT takeable
THEN "You can't carry" SAY THE liq. "around in your bare hands."
-- the action stops here if the container is not takeable.
ELSE
LOCATE vessel OF liq IN hero.
SAY implicit_taking_message OF my_game.
END IF.
END IF.
-- end of implicit taking.
IF liq IN hero
-- i.e. if the implicit taking was successful
THEN
"You drink all of" SAY THE liq. "."
LOCATE liq AT nowhere.
END IF.
END IF.
END VERB drink.
VERB drive
DOES ONLY
IF vehicle IS NOT plural
THEN "That's not"
ELSE "Those are not"
END IF.
"something you can drive."
END VERB drive.
VERB drop
DOES ONLY
LOCATE obj HERE.
"Dropped."
END VERB drop.
VERB eat
DOES ONLY
-- implicit taking:
IF food NOT DIRECTLY IN hero
THEN LOCATE food IN hero.
SAY implicit_taking_message OF my_game.
END IF.
-- end of implicit taking.
"You eat all of" SAY THE food. "."
LOCATE food AT nowhere.
END VERB eat.
VERB 'empty'
DOES ONLY
-- implicit taking:
IF obj NOT DIRECTLY IN hero
THEN LOCATE obj IN hero.
SAY implicit_taking_message OF my_game.
END IF.
-- end of implicit taking.
IF COUNT ISA OBJECT, DIRECTLY IN obj = 0
THEN "There is nothing in" SAY THE obj. "."
ELSE
"You $v the contents of" SAY THE obj.
IF floor HERE
THEN "on the floor."
ELSE "on the ground."
END IF.
EMPTY obj AT hero.
END IF.
END VERB 'empty'.
VERB empty_in, pour_in
DOES ONLY
-- implicit taking:
IF obj NOT DIRECTLY IN hero
THEN LOCATE obj IN hero.
SAY implicit_taking_message OF my_game.
END IF.
-- end of implicit taking.
IF COUNT ISA OBJECT, DIRECTLY IN obj = 0
THEN "There is nothing in" SAY THE obj. "."
ELSE
EMPTY obj IN cont.
"You $v the contents of" SAY THE obj.
"in" SAY THE cont. "."
END IF.
END VERB empty_in.
VERB empty_on, pour_on
DOES ONLY
-- implicit taking:
IF obj NOT DIRECTLY IN hero
THEN LOCATE obj IN hero.
SAY implicit_taking_message OF my_game.
END IF.
-- end of implicit taking.
IF COUNT ISA OBJECT, DIRECTLY IN obj = 0
THEN "There is nothing in" SAY THE obj. "."
ELSE
IF surface = floor OR surface = ground
THEN EMPTY obj AT hero.
ELSE EMPTY obj IN surface.
END IF.
"You $v the contents of" SAY THE obj.
"on" SAY THE surface. "."
END IF.
END VERB empty_on.
VERB enter
DOES ONLY
IF obj IS NOT plural
THEN "That's not"
ELSE "Those are not"
END IF.
"something you can enter."
END VERB enter.
VERB examine
DOES ONLY
IF obj IS readable
-- for readable objects, 'examine' behaves just as 'read'
THEN
IF text OF obj = ""
THEN "There is nothing written on" SAY THE obj. "."
ELSE "You read" SAY THE obj. "."
IF obj IS NOT plural
THEN "It says"
ELSE "They say"
END IF.
"""$$" SAY text OF obj. "$$""."
END IF.
ELSE
IF obj = hero
THEN "You notice nothing unusual about yourself."
ELSE "You notice nothing unusual about" SAY THE obj. "."
END IF.
END IF.
END VERB examine.
VERB 'exit'
DOES ONLY
IF obj IS NOT plural
THEN "That's not"
ELSE "Those are not"
END IF.
"something you can exit."
END VERB 'exit'.
VERB extinguish
DOES ONLY
IF obj IS NOT plural
THEN "That's not"
ELSE "Those are not"
END IF.
"on fire."
END VERB extinguish.
VERB fill
DOES ONLY
"You have to say what you want to fill" SAY THE cont. "with."
END VERB fill.
VERB fill_with
DOES ONLY
"You can't fill" SAY THE cont. "with" SAY THE substance. "."
-- allow the action at individual substances only
END VERB fill_with.
VERB find
DOES ONLY
"You'll have to $v it yourself."
END VERB find.
VERB fire
DOES ONLY
"You fire" SAY THE weapon. "into the air."
END VERB fire.
VERB fire_at
DOES ONLY
"Resorting to violence is not the solution here."
END VERB fire_at.
VERB fix
DOES ONLY
"Please be more specific. How do you intend to fix it?"
END VERB fix.
VERB follow
DOES ONLY
LOCATE hero AT act.
"You follow" SAY THE act. "."
END VERB follow.
VERB free
DOES ONLY
IF obj IS NOT plural
THEN "That doesn't need to be $vd."
ELSE "Those don't need to be $vd."
END IF.
END VERB free.
VERB get_off
DOES ONLY
IF hero IS sitting OR hero IS lying_down
THEN "You get off" SAY THE surface. "."
MAKE hero NOT lying_down.
MAKE hero NOT sitting.