Module: Inform::English

Included in:
Inform::Ephemeral::Object, Object, Parser, Verbs
Defined in:
lib/inform/English.h.rb

Overview

The English module

Defined Under Namespace

Classes: CompassDirection

Constant Summary collapse

ENGLISH_DIALECT =
true
NONSENSE =
10
REPEATED_ORDER =
20
NOTHING_TO_REPEAT =
21
UNEXPECTED_COMMA =
22
CANT_TALK =
24
SPEECH_THERAPY =
25
CANNOT_UNDERSTAND =
27
PARTIALLY_UNDERSTOOD =
28
NUMBER_UNRECOGNIZED =
29
CANT_SEE =
30
TOOLITTLE =
31
NOT_HELD =
32
NO_MULTIPLES =
33
VAGUE =
35
EXCEPTED_UNECESSARILY =
36
ANIMATE_EXPECTED =
37
UNRECOGNIZED =
38
SCENERY_IS_IRRELEVANT =
39
TOOFEW =
42
NOTHING =
44
AMBIGUOUS =
46
TOOMANY =
49
NO_OBJECT =
98
TREE_ERROR =
99
POSSESS_PK =
0x0100
DEFART_PK =
0x0101
INDEFART_PK =
0x0102
MANUAL_PRONOUNS =
true
Compass =
Inform::Ephemeral::Object.new "compass"
AGAIN1__WD =

Part II.   Vocabulary

'again'
AGAIN2__WD =
'g'
AGAIN3__WD =
'again'
OOPS1__WD =
'oops'
OOPS2__WD =
'o'
OOPS3__WD =
'oops'
UNDO1__WD =
'undo'
UNDO2__WD =
'undo'
UNDO3__WD =
'undo'
ALL1__WD =
'all'
ALL2__WD =
'each'
ALL3__WD =
'every'
ALL4__WD =
'everything'
ALL5__WD =
'both'
AND1__WD =
'and'
AND2__WD =
'and'
AND3__WD =
'and'
BUT1__WD =
'but'
BUT2__WD =
'except'
BUT3__WD =
'but'
ME1__WD =
'me'
ME2__WD =
'myself'
ME3__WD =
'self'
OF1__WD =
'of'
OF2__WD =
'of'
OF3__WD =
'of'
OF4__WD =
'of'
OTHER1__WD =
'another'
OTHER2__WD =
'other'
OTHER3__WD =
'other'
THEN1__WD =
'then'
THEN2__WD =
'then'
THEN3__WD =
'then'
NO1__WD =
'n'
NO2__WD =
'no'
NO3__WD =
'no'
YES1__WD =
'y'
YES2__WD =
'yes'
YES3__WD =
'yes'
AMUSING__WD =
'amusing'
FULLSCORE1__WD =
'fullscore'
FULLSCORE2__WD =
'full'
QUIT1__WD =
'q'
QUIT2__WD =
'quit'
RESTART__WD =
'restart'
RESTORE__WD =
'restore'
LanguagePronouns =
defined?(Java) ? java.util.concurrent.ConcurrentHashMap.new : {}
LanguageDescriptors =
defined?(Java) ? java.util.concurrent.ConcurrentHashMap.new : {}
LanguageNumbers =
{
  'one' => 1, 'two' => 2, 'three' => 3, 'four' => 4, 'five' => 5,
  'six' => 6, 'seven' => 7, 'eight' => 8, 'nine' => 9, 'ten' => 10,
  'eleven' => 11, 'twelve' => 12, 'thirteen' => 13, 'fourteen' => 14, 'fifteen' => 15,
  'sixteen' => 16, 'seventeen' => 17, 'eighteen' => 18, 'nineteen' => 19, 'twenty' => 20
}
NumbersLanguage =
LanguageNumbers.invert
Prepositions =
[
  'about', 'after', 'apart', 'around', 'at', 'beneath',
  'beside', 'besides', 'by', 'for', 'from', 'in', 'inside',
  'into', 'nearby', 'of', 'off', 'on', 'onto', 'out', 'over',
  'through', 'to', 'under', 'underneath', 'with', 'within',
  'without'
]
LanguageAnimateGender =

Part IV.   Printing

:male
LanguageInanimateGender =
:neuter
LanguageContractionForms =
2
LanguageArticles =
[

  # Contraction form 0:       Contraction form 1:
  # Cdef    Def   Indef       Cdef    Def   Indef

  ['The', 'the', 'a'],    ['The', 'the', 'an'],  # Articles 0
  ['The', 'the', 'some'], ['The', 'the', 'some'] # Articles 1
]
LanguageGNAsToArticles =

a i

s     p     s     p
m f n m f n m f n m f n
[0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1]
NKEY__TX =
"N = next subject"
PKEY__TX =
"P = previous"
QKEY1__TX =
"  Q = resume game"
QKEY2__TX =
"Q = previous menu"
RKEY__TX =
"RETURN = read subject"
NKEY1__KY =
'N'
NKEY2__KY =
'n'
PKEY1__KY =
'P'
PKEY2__KY =
'p'
QKEY1__KY =
'Q'
QKEY2__KY =
'q'
SCORE__TX =
"Score: "
MOVES__TX =
"Moves: "
TIME__TX =
"Time: "
CANTGO__TX =
"You can't go that way."
FORMER__TX =
"your former self"
YOURSELF__TX =
"yourself"
YOU__TX =
"You"
YOU2__TX =
"you"
YOUR__TX =
"Your"
YOUR2__TX =
"your"
DARKNESS__TX =
"Darkness"
THOSET__TX =
"those things"
THAT__TX =
"that"
OR__TX =
" or "
NOTHING__TX =
"nothing"
IS__TX =
" is"
ARE__TX =
" are"
IS2__TX =
"is "
ARE2__TX =
"are "
AND__TX =
" and "
LISTAND__TX =
", and "
LISTAND2__TX =
" and "
WHOM__TX =
"whom "
WHICH__TX =
"which "
COMMA__TX =
", "

Instance Method Summary collapse

Instance Method Details

#CThatorThose(obj) ⇒ Object

Used in the nominative



454
455
456
457
458
459
460
461
462
# File 'lib/inform/English.h.rb', line 454

def CThatorThose(obj) # Used in the nominative
  if obj == player             ; return "You"; end
  if obj.has?(:pluralname)     ; return "Those"; end
  if obj.has?(:animate)
    if obj.has?(:female)       ; return "She"
    elsif obj.hasnt?(:neuter)  ; return "He"; end
  end
  return "That"
end

#CTheyreorThats(obj) ⇒ Object



464
465
466
467
468
469
470
471
472
# File 'lib/inform/English.h.rb', line 464

def CTheyreorThats(obj)
  if obj == player             ; return "You're"; end
  if obj.has?(:pluralname)     ; return "They're"; end
  if obj.has?(:animate)
    if obj.has?(:female)       ; return "She's"
    elsif obj.hasnt?(:neuter)  ; return "He's"; end
  end
  return "That's"
end

#IsorAre(obj) ⇒ Object



449
450
451
452
# File 'lib/inform/English.h.rb', line 449

def IsorAre(obj)
  return (obj.to_i == 1 ? "is " : "are ") + obj if obj.number?
  if obj.has?(:pluralname) || obj == player then "are" else "is" end
end

#ItorThem(obj) ⇒ Object



439
440
441
442
443
444
445
446
447
# File 'lib/inform/English.h.rb', line 439

def ItorThem(obj)
  if obj == player              ; return "yourself"; end
  if obj.has?(:pluralname)     ; return "them"; end
  if obj.has?(:animate)
    if obj.has?(:female)       ; return "her"
    elsif obj.hasnt?(:neuter)  ; return "him"; end
  end
  return "it"
end

#language_lm(sw__var, n = 1, x1 = nil) ⇒ Object



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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
# File 'lib/inform/English.h.rb', line 474

def language_lm(sw__var, n = 1, x1 = nil)
  # if defined? NI_BUILD_COUNT then @say__p = 1
  # end
  # # defined? NI_BUILD_COUNT
  case sw__var
  when :Answer, :Ask
                  "There is no reply."
  # when :Ask then # see Answer
  when :Attack then   "Violence isn't the answer to this one."
  when :Blow then     "You can't usefully blow " + thatorthose(x1) + "."
  when :Boot then case n
    when 1 then   "Boot whom?"
    end
  when :Burn then     "This dangerous act would achieve little."
  when :Buy then      "Nothing is on sale."
  when :Climb then    "I don't think much is to be achieved by that."
  when :Close then case n
    when 1 then  println ctheyreorthats(x1) + " not something you can close."
    when 2 then  println ctheyreorthats(x1) + " already closed."
    when 3 then  "You close " + the(x1) + "."
    end
  when :CommandsOff then case n
    when 1 then "[Command recording off.]"
    # if defined? TARGET_GLULX
    when 2 then "[Command recording already off.]"
    # end
    # # defined? TARGET_GLULX
    end
  when :CommandsOn then case n
    when 1 then "[Command recording on.]"
    # if defined? TARGET_GLULX
    when 2 then "[Commands are currently replaying.]"
    when 3 then "[Command recording already on.]"
    when 4 then "[Command recording failed.]"
    # end
    # # defined? TARGET_GLULX
    end
  when :CommandsRead then case n
    when 1 then "[Replaying commands.]"
    # if defined? TARGET_GLULX
    when 2 then "[Commands are already replaying.]"
    when 3 then "[Command replay failed.  Command recording is on.]"
    when 4 then "[Command replay failed.]"
    when 5 then "[Command replay complete.]"
    # end
    # # defined? TARGET_GLULX
    end
  when :Consult then   "You discover nothing of interest in " + the(x1) + "."
  when :Cut then       "Cutting " + thatorthose(x1) + " up would achieve little."
  when :Dig then       "Digging would achieve nothing here."
  when :Disrobe then case n
    when 1 then "You're not wearing " + thatorthose(x1) + "."
    when 2 then "You take off " + the(x1) + "."
    when 3 then A(player) + " takes off " + hisorher(player, x1) + "."
    end
  when :Drink then     "There's nothing suitable to drink here."
  when :Drop then case n
    when 1 then if x1.has?(:pluralname); print The(x1) + " are "; else; print The(x1) + " is "; end
            "already here."
    when 2 then "You haven't got " + thatorthose(x1) + "."
    # if defined? NI_BUILD_COUNT
    when 3 then print "(first taking " + the(x1) + " off)\n"; @say__p = 0; return
    # else
    # when 3 then "(first taking " + the(x1) + " off)"
    # end
    # # defined? NI_BUILD_COUNT
    when 4 then "Dropped."
    when 5 then A(player) + " drops " + a(x1) + "."
    when 6 then A(player) + " drops " + a(x1) + " on " + the(second) + "."
    end
  when :Eat then case n
    when 1 then println ctheyreorthats(x1) + " plainly inedible."
    when 2 then "You eat " + the(x1) + ". Not bad."
    when 3 then A(player) + " eats " + a(x1) + "."
    end
  when :EmptyT then case n
    when 1 then println The(x1) + " can't contain things."
    when 2 then println The(x1) + " " + isorare(x1) + " closed."
    when 3 then println The(x1) + " " + isorare(x1) + " empty already."
    when 4 then "That would scarcely empty anything."
    end
  when :Enter then case n
    when 1 then print "But you're already "
            if x1.has? :supporter
              print "on "
            else
              print "in "
            end
            println the(x1) + "."
    when 2 then if x1.has?(:pluralname); print "They're"; else; print "That's"; end
            print " not something you can "
            case @verb_word
              when 'stand' then  println "stand on."
              when 'sit' then    println "sit down on."
              when 'lie' then    println "lie down on."
              else println "enter."
            end
    when 3 then "You can't get into the closed " + x1 + "."
    when 4 then "You can only get into something free-standing."
    when 5 then print "You get "
            if x1.has? :supporter
              print "onto "
            else
              print "into "
            end
            println the(x1) + "."
    # if defined? NI_BUILD_COUNT
    when 6 then print "(getting "
            if x1.has? :supporter
              print "off "
            else
              print "out of "
            end
            print the(x1); print ")\n"; @say__p = 0; return
    when 7 then @say__p = 0
            if x1.has?(:supporter); println "(getting onto " + the(x1) + ")"; end
            if x1.has?(:container); println "(getting into " + the(x1) + ")"; end
            "(entering " + the(x1) + ")\n"
    # else # NI_BUILD_COUNT
    # when 6 then print "(getting "
    #         if x1.has? :supporter
    #           print "off "
    #         else
    #           print "out of "
    #         end
    #         print the(x1;) ")"
    # when 7 then if x1.has?(:supporter); println "(getting onto " + the(x1) + ")"; end
    #         if x1.has?(:container); println "(getting into " + the(x1) + ")"; end
    #         "(entering " + the(x1) + ")\n"
    # end
    # # defined? NI_BUILD_COUNT
    when 8 then s = The(player) + " gets "
            s << if x1.has? :supporter
              "onto "
            else
              "into "
            end
            s << the(x1) + "."
    end
  when :Examine then case n
    when 1 then "Darkness, noun.  An absence of light to see by."
    when 2 then print "You see nothing special about " + the(x1)
      i = parent(x1)
      if !i.nil? && i.has?(:supporter)
        " on " + the(i) + "."
      elsif !i.nil? && i.has?(:container) && i.hasany?(:open, :transparent)
        " in " + the(i) + "."
      else
        "."
      end
    when 3 then print The(x1) + " " + isorare(x1) + " currently switched "
            if x1.has? :on then println "on." else println "off." end
    end
  when :Exit then case n
    when 1 then "But you aren't in anything at the moment."
    when 2 then "You can't get out of the closed " + x1 + "."
    when 3 then print "You get "
            if x1.has? :supporter
              print "off "
            else
              print "out of "
            end
            println the(x1) + "."
    when 4 then print "But you aren't "
            if x1.has? :supporter
              print "on "
            else
              print "in "
            end
            println the(x1) + "."
    when 5 then s = The(player) + " gets "
            s << if x1.has? :supporter
              "off "
            else
              "out of "
            end
            s << the(x1) + "."
    end
  when :Fill then     "But there's no water here to carry."
  when :FullScore then case n
    when 1 then if @deadflag
              print "The score was "
            else
              print "The score is "
            end
            "made up as follows:\n"
    when 2 then "finding sundry items"
    when 3 then "visiting various places"
    when 4 then print "total (out of " + MAX_SCORE; ")"
    end
  when :GetOff then "But you aren't on " + the(x1) + " at the moment."
  when :Give then case n
    when 1 then "You aren't holding " + the(x1) + "."
    when 2 then "You juggle " + the(x1) + " for a while, but don't achieve much."
    when 3 then print The(x1)
            if x1.has? :pluralname
              print " don't"
            else
              print " doesn't"
            end
            " seem interested."
    # if defined? NI_BUILD_COUNT
    when 4 then print The(x1)
            if x1.has?(:pluralname); print " aren't"
            else print " isn't"
            end
            " able to receive things."
    # end
    # # defined? NI_BUILD_COUNT
    end
  when :Go then case n
    when 1 then print "You'll have to get "
            if x1.has? :supporter then print "off " else print "out of " end
            println the(x1) + " first."
    when 2 then println CANTGO__TX;   # "You can't go that way."
    when 3 then "You are unable to climb " + the(x1) + "."
    when 4 then "You are unable to descend by " + the(x1) + "."
    when 5 then "You can't, since " + the(x1) + " " + isorare(x1) + " in the way."
    when 6 then print "You can't, since " + the(x1)
            if x1.has? :pluralname
              " lead nowhere."
            else
              " leads nowhere."
            end
    when 7 then A(player) + " " + exitsorleaves(player) + " " + (x1 ? upordown('to', x1) : "") + "."
    when 8 then A(player) + " " + entersorarrives(player) + " " + (x1 ? upordown('from', x1) : "") + "."
    when 9 then A(player) + " " + exitsorleaves(player) + (x1 ? " through " + the(x1) : "") + "."
    when 10 then A(player) + " " + entersorarrives(player) + (x1 ? " through " + the(x1) : "") + "."
    when 11,12,13
      print "You cannot do that while "
      case n
        when 11 then "kneeling."
        when 12 then "laying down."
        when 13 then "sitting."
      end
    end
  when :Insert then case n
    when 1 then "You need to be holding " + the(x1) + " before you can put " + itorthem(x1) +
            " into something else."
    when 2 then println Cthatorthose(x1) + " can't contain things."
    when 3 then println The(x1) + " " + isorare(x1) + " closed."
    when 4 then "You'll need to take " + itorthem(x1) + " off first."
    when 5 then "You can't put something inside itself."
    # if defined? NI_BUILD_COUNT
    when 6 then print "(first taking " + itorthem(x1) + " off)\n"; @say__p = 0; return
    # else
    # when 6 then "(first taking " + itorthem(x1) + " off)\n"
    # end
    # # defined? NI_BUILD_COUNT
    when 7 then "There is no more room in " + the(x1) + "."
    when 8 then "Done."
    when 9 then "You put " + the(x1) + " into " + the(second) + "."
    when 10 then A(player) + " puts " + a(x1) + " into " + a(parent(x1)) + "."
    end
  when :Inv then case n
    when 1 then "You are carrying nothing."
    when 2 then print "You are carrying"
    when 3 then print ":\n"
    when 4 then print ".\n"
    end
  when :Jump then case n
    when 1 then "You jump on the spot, fruitlessly."
    when 2 then A(x1) + " leaps into the air and then lands back in place."
    end
  when :JumpOver, :Tie
            "You would achieve nothing by this."
  when :Kiss then     "Keep your mind on the game."
  when :Listen then   "You hear nothing unexpected."
  when :ListMiscellany then case n
    when 1 then print " (providing light)"
    # if defined? NI_BUILD_COUNT
    # when 2 then print " (closed)"
    # when 4 then print " (empty)"
    # when 6 then print " (closed and empty)"
    # else # NI_BUILD_COUNT
    when 2 then print " (which " + isorare(x1) + " closed)"
    when 4 then print " (which " + isorare(x1) + " empty)"
    # when 6 then print " (which " + isorare(x1) + " closed and empty)"
    # end
    # # defined? NI_BUILD_COUNT
    when 3 then print " (closed and providing light)"
    when 5 then print " (empty and providing light)"
    when 7 then print " (closed, empty and providing light)"
    when 8 then print " (providing light and being worn"
    when 9 then print " (providing light"
    when 10 then print " (being worn"
    # if defined? NI_BUILD_COUNT
    # when 11 then print " ("
    # else
    when 11 then print " (which " + isorare(x1) + " "
    # end
    # # defined? NI_BUILD_COUNT
    when 12 then print "open"
    when 13 then print "open but empty"
    when 14 then print "closed"
    when 15 then print "closed and locked"
    when 16 then print " and empty"
    # if defined? NI_BUILD_COUNT
    # when 17 then print " (empty)"
    # else
    when 17 then print " (which " + isorare(x1) + " empty)"
    # end
    # # defined? NI_BUILD_COUNT
    when 18 then print " containing "
    when 19 then print " (on "
    when 20 then print ", on top of "
    when 21 then print " (in "
    when 22 then print ", inside "
    end
  when :LMode1 then   " is now in its normal \"brief\" printing mode, which gives long descriptions " +
             "of places never before visited and short descriptions otherwise."
  when :LMode2 then   " is now in its \"verbose\" mode, which always gives long descriptions " +
             "of locations (even if you've been there before)."
  when :LMode3 then   " is now in its \"superbrief\" mode, which always gives short descriptions " +
             "of locations (even if you haven't been there before)."
  when :Lock then case n
    when 1 then if x1.has? :pluralname then print "They don't " else print "That doesn't " end
            "seem to be something you can lock."
    when 2 then println ctheyreorthats(x1) + " locked at the moment."
    when 3 then "First you'll have to close " + the(x1) + "."
    when 4 then if x1.has? :pluralname then print "Those don't " else print "That doesn't " end
            "seem to fit the lock."
    when 5 then "You lock " + the(x1) + "."
    when 6 then A(player) + " locks " + the(x1) + " with " + hisorher(player, second) + "."
    end
  when :Look then case n
    when 1 then print " (on " + the(x1) + ")"
    when 2 then print " (in " + the(x1) + ")"
    when 3 then print " (as " + object(x1) + ")"
    when 4 then print "On " + the(x1)
            WriteListFrom(child(x1), ENGLISH_BIT + RECURSE_BIT + PARTINV_BIT + TERSE_BIT + CONCEAL_BIT + ISARE_BIT)
            "."
    when 5,6
            if x1 != @visibility_ceiling
              if x1.has? :supporter then print "On " else print "In " end
              print the(x1) + " you"
            else print "You" end
            print " can "
            print "also " if n == 5
            print "see "
            WriteListFrom(
              child(x1),
              ENGLISH_BIT + RECURSE_BIT + PARTINV_BIT + TERSE_BIT + CONCEAL_BIT + WORKFLAG_BIT
            )
            if x1 != @visibility_ceiling
              "."
            else
              " here."
            end
    when 7 then "You see nothing of interest in that direction."
    when 8 then if x1.has?(:supporter); print " (on "; else; print " (in "; end
            print the(x1) + ")"
    end
  when :LookUnder then case n
    when 1 then "But it's dark."
    when 2 then "You find nothing of interest."
    when 3 then A(player) + " seems to be looking for something underneath " + a(x1) + "."
    end
  when :Mild then     "Quite."
  when :Miscellany then case n
    when 1 then "(considering the first sixteen objects only)\n"
    when 2 then "Nothing to do!"
    when 3 then print " You have died "
    when 4 then print " You have won "
    when 5 then print "\nWould you like to RESTART, RESTORE a saved game"
            # if defined? DEATH_MENTION_UNDO
            #   print ", UNDO your last move"
            # end
            # # defined? DEATH_MENTION_UNDO
            print ", give the FULL score for that game" if TASKS_PROVIDED == 0
            # if defined? NI_BUILD_COUNT
            #   if (@deadflag == 2 && (I7_Amusing_Provided()))
            #     print ", see some suggestions for AMUSING things to do"
            #   end
            # else
            #   if (@deadflag == 2 && AMUSING_PROVIDED == 0)
            #     print ", see some suggestions for AMUSING things to do"
            #   end
            # end
            # # defined? NI_BUILD_COUNT
            # if defined? I7_SERIAL_COMMA
            #   print ","
            # end
            # # defined? I7_SERIAL_COMMA
            " or QUIT?"
    when 6 then "[Your interpreter does not provide \"undo\".  Sorry!]"
    when 7 then "\"Undo\" failed.  [Not all interpreters provide it.]"
    # when 7 then "[You cannot \"undo\" any further.]"
    when 8 then "Please give one of the answers above."
    when 9 then "It is now pitch dark in here!"
    when 10 then "I beg your pardon?"
    when 11 then "[You can't \"undo\" what hasn't been done!]"
    when 12 then "[Can't \"undo\" twice in succession. Sorry!]"
    when 13 then "[Previous turn undone.]"
    when 14 then "Sorry, that can't be corrected."
    when 15 then "Think nothing of it."
    when 16 then "\"Oops\" can only correct a single word."
    when 17 then "It is pitch dark, and you can't see a thing."
    when 18 then "yourself" # print "yourself"
    when 19 then "As good-looking as ever."
    when 20 then "To repeat a command like \"frog, jump\", just say \"again\", not \"frog, again\"."
    when 21 then "You can hardly repeat that."
    when 22 then "You can't begin with a comma."
    when 23 then "You seem to want to talk to someone, but I can't see whom."
    when 24 then "You can't talk to " + the(x1) + "."
    when 25 then "To talk to someone, try \"someone, hello\" or some such."
    when 26 then "(first taking " + the(@not_holding) + ")"
    when 27 then "I didn't understand that sentence."
    when 28 then print "I only understood you as far as wanting to "
    when 29 then "I didn't understand that number."
    when 30 then "You can't see any such thing."
    when 31 then "You seem to have said too little!"
    when 32 then "You aren't holding that!"
    when 33 then "You can't use multiple objects with that verb."
    when 34 then "You can only use multiple objects once on a line."
    when 35 then "I'm not sure what \"" + @pronoun_word + "\" refers to."
    when 36 then "You excepted something not included anyway!"
    when 37 then "You can only do that to something animate."
    when 38 then if defined? DIALECT_US
               "That's not a verb I recognize."
             else
               "That's not a verb I recognise."
             end
    when 39 then "That's not something you need to refer to in the course of this game."
    when 40 then "You can't see \"" + @pronoun_word + "\" (" + the(@pronoun_obj) +
            ") at the moment."
    when 41 then "I didn't understand the way that finished."
    when 42 then if x1 == 0; print "None"; else; print "Only " + number(x1); end
            print " of those "
            if x1 == 1
              print "is"
            else
              print "are"
            end
            " available."
    when 43 then "Nothing to do!"
    when 44 then "There are none at all available!"
    when 45 then print "Who do you mean, "
    when 46 then print "Which do you mean, "
    when 47 then "Sorry, you can only have one item here. Which exactly?"
    when 48 then print "Whom do you want"
            print " " + the(@actor) if @actor != @player
            print " to "; PrintCommand(); print "?\n"
    when 49 then print "What do you want"
            print " " + the(@actor) if @actor != @player
            print " to "; PrintCommand(); print "?\n"
    when 50 then print "Your score has just gone "
            if x1 > 0; print "up"; else x1 = -x1; print "down"; end
            print " by " + number(x1) + " point"
            if x1 > 1; print "s"; end
    when 51 then "(Since something dramatic has happened, your list of commands has been cut short.)"
    when 52 then "\nType a number from 1 to " + x1 + ", 0 to redisplay or press ENTER."
    when 53 then "\n[Please press SPACE.]"
    when 54 then "[Comment recorded.]"
    when 55 then "[Comment NOT recorded.]"
    when 56 then print ".\n"
    when 57 then print "?\n"
    when 98 then "No object with that id."
    when 99 then "That would break the object tree."
    end
  when :No, :Yes then   "That was a rhetorical question."
  when :NotifyOff
            "Score notification off."
  when :NotifyOn then  "Score notification on."
  when :Objects then case n
    when 1 then "Objects you have handled:\n"
    when 2 then "None."
    when 3 then print "   (worn)"
    when 4 then print "   (held)"
    when 5 then print "   (given away)"
    when 6 then print "   (in " + x1 + ")"
    when 7 then print "   (in " + the(x1) + ")"
    when 8 then print "   (inside " + the(x1) + ")"
    when 9 then print "   (on " + the(x1) + ")"
    when 10 then print "   (lost)"
    end
  when :Open then case n
    when 1 then println ctheyreorthats(x1) + " not something you can open."
    when 2 then if x1.has?(:pluralname); print "They seem "; else; print "It seems "; end
            "to be locked."
    when 3 then println ctheyreorthats(x1) + " already open."
    when 4 then print "You open " + the(x1) + ", revealing "
            if WriteListFrom(child(x1), ENGLISH_BIT + TERSE_BIT + CONCEAL_BIT) == 0; return "nothing."; end
            "."
    when 5 then "You open " + the(x1) + "."
    end
  when :Order then     print The(x1)
            if x1.has? :pluralname then print " have" else print " has" end
            " better things to do."
  when :Places then case n
    when 1 then print "You have visited: "
    when 2 then print ".\n"
    end
  when :Pray then      "Nothing practical results from your prayer."
  when :Prompt then    print "\n>"
  when :Pronouns then case n
    when 1 then print "At the moment, "
    when 2 then print "means "
    when 3 then print "is unset"
    when 4 then "no pronouns are known to the game."
    when 5 then "."
    end
  when :Pull, :Push, :Turn then case n
    when 1 then if x1.has?(:pluralname); print "Those are "; else; print "It is "; end
            "fixed in place."
    when 2 then "You are unable to."
    when 3 then "Nothing obvious happens."
    when 4 then "That would be less than courteous."
    end
  # when Push then # see Pull
  when :PushDir then case n
    when 1 then "Is that the best you can think of?"
    when 2 then "That's not a direction."
    when 3 then "Not that way you can't."
    end
  when :PutOn then case n
    when 1 then "You need to be holding " + the(x1) + " before you can put " +
                itorthem(x1) + " on top of something else."
    when 2 then "You can't put something on top of itself."
    when 3 then "Putting things on " + the(x1) + " would achieve nothing."
    when 4 then "You lack the dexterity."
    # if defined? NI_BUILD_COUNT
    when 5 then print "(first taking " + itorthem(x1) + " off)\n"; @say__p = 0; return
    # else
    # when 5 then "(first taking " + itorthem(x1) + " off)\n"
    # end
    # # defined? NI_BUILD_COUNT
    when 6 then "There is no more room on " + the(x1) + "."
    when 7 then "Done."
    when 8 then "You put " + the(x1) + " on " + the(parent(x1)) + "."
    when 9 then A(player) + " puts " + a(x1) + " on " + a(parent(x1)) + "."
    end
  when :Quit then case n
    when 1 then print "Please answer yes or no."
    when 2 then print "Are you sure you want to quit? "
    end
  when :Remove then case n
    when 1 then if x1.has?(:pluralname); print "They are"; else; print "It is"; end
            " unfortunately closed."
    when 2 then if x1.has?(:pluralname); print "But they aren't"; else; print "But it isn't"; end
            " there now."
    when 3 then "Removed."
    end
  when :Restart then case n
    when 1 then print "Are you sure you want to restart? "
    when 2 then "Failed."
    end
  when :Restore then case n
    when 1 then "Restore failed."
    when 2 then "Ok."
    end
  when :Rub then case n
    when 1 then "You achieve nothing by this."
    end
  when :Save then case n
    when 1 then "Save failed."
    when 2 then "Ok."
    end
  when :Score then case n
    when 1 then if @deadflag
              print "In that game you scored "
            else
              print "You have so far scored "
            end
            print score + " out of a possible " + MAX_SCORE + ", in " + turns + " turn"
            print "s" if turns != 1
            return
    when 2 then "There is no score in this story."
    end
  when :ScriptOff then case n
    when 1 then "Transcripting is already off."
    when 2 then "\nEnd of transcript."
    when 3 then "Attempt to end transcript failed."
    end
  when :ScriptOn then case n
    when 1 then "Transcripting is already on."
    when 2 then "Start of a transcript of"
    when 3 then "Attempt to begin transcript failed."
    end
  when :Search then case n
    when 1 then "But it's dark."
    when 2
            print "There is nothing "
            if x1.has? :container
              print "in "
            else
              print "on "
            end
            the(x1) + "."
    when 3 then print "On " + the(x1)
            WriteListFrom(child(x1), ENGLISH_BIT + TERSE_BIT + CONCEAL_BIT + ISARE_BIT)
            "."
    when 4 then "You find nothing of interest."
    when 5 then "You can't see inside, since " + the(x1) + " " + isorare(x1) + " closed."
    when 6 then println The(x1) + " " + isorare(x1) + " empty."
    when 7 then print "In " + the(x1)
            WriteListFrom(child(x1), ENGLISH_BIT + TERSE_BIT + CONCEAL_BIT + ISARE_BIT)
            "."
    when 8 then A(player) + " searches " + a(x1) + "."
    end
  when :Set then       "No, you can't set " + thatorthose(x1) + "."
  when :SetTo then     "No, you can't set " + thatorthose(x1) + " to anything."
  when :Show then case n
    when 1 then "You aren't holding " + the(x1) + "."
    when 2 then println The(x1) + " " + isorare(x1) + " unimpressed."
    end
  when :Sing then case n
    when 1 then "Your singing is abominable."
    when 2 then A(player) + " begins to sing a little ditty."
    end
  when :Sleep then case n
    when 1 then "You aren't feeling especially drowsy."
    when 2 then A(player) + " seems rather tired."
    end
  when :Smell then case n
    when 1 then "You smell nothing unexpected."
    when 2 then if x1.in? player
                  A(player) + " puts " + hisorher(player, 'nose') + " up to " +
                  hisorher(player, x1) + " and inhales deeply."
                elsif !x1.nil? && x1.has?(:animate)
                  A(player) + " sniffs in " + the(x1) + "'s direction."
                elsif !x1.nil?
                  A(player) + " sniffs at " + the(x1) + "."
                else
                  A(player) + " sniffs the air."
                end
    end
  when :Sorry then case n
    when 1 then if defined? ENGLISH_DIALECT then "Oh, don't apologize." else "Oh, don't apologise." end
    when 2 then A(player) + " apologizes profusely."
    end
  when :Squeeze then case n
    when 1 then "Keep your hands to yourself."
    when 2 then "You achieve nothing by this."
    end
  when :Strong then    "Real adventurers do not use such language."
  when :Swim then      "There's not enough water to swim in."
  when :Swing then     "There's nothing sensible to swing here."
  when :SwitchOff then case n
    when 1 then println ctheyreorthats(x1) + " not something you can switch."
    when 2 then println ctheyreorthats(x1) + " already off."
    when 3 then "You switch " + the(x1) + " off."
    when 4 then A(player) + " switches " + a(x1) + " off."
    end
  when :SwitchOn then case n
    when 1 then println ctheyreorthats(x1) + " not something you can switch."
    when 2 then println ctheyreorthats(x1) + " already on."
    when 3 then "You switch " + the(x1) + " on."
    when 4 then A(player) + " switches " + a(x1) + " on."
    end
  when :Take then case n
    when 1 then "Taken."
    when 2 then "You are always self-possessed."
    when 3 then "I don't suppose " + the(x1) + " would care for that."
    when 4 then print "You'd have to get "
            if x1.has? :supporter
              print "off "
            else
              print "out of "
            end
            println the(x1) + " first."
    when 5 then println "You already have " + thatorthose(x1) + "."
    when 6 then if noun.has?(:pluralname); print "Those seem "; else; print "That seems "; end
            println "to belong to " + the(x1) + "."
    when 7 then if noun.has?(:pluralname); print "Those seem "; else; print "That seems "; end
            println "to be a part of " + the(x1) + "."
    when 8 then println Cthatorthose(x1) + " " + isorare(x1) + "n't available."
    when 9 then println The(x1) + " " + isorare(x1) + "n't open."
    when 10 then if x1.has?(:pluralname); print "They're "; else; print "That's "; end
             "hardly portable."
    when 11 then if x1.has?(:pluralname); print "They're "; else; print "That's "; end
             "fixed in place."
    when 12 then "You're carrying too many things already."
    # if defined? NI_BUILD_COUNT
    when 13 then print "(putting " + the(x1) + " into " + the(SACK_OBJECT) +
             " to make room)\n"; @say__p = 0; return
    when 14 then "You can't reach into " + the(x1) + "."
    # else
    # when 13 then "(putting " + the(x1) + " into " + the(SACK_OBJECT) + " to make room)"
    # end
    # # defined? NI_BUILD_COUNT
    when 15 then x2 = second || parent(x1)
             if x2.has? :supporter
               A(player) + " takes " + a(x1) + " from " + a(x2) + "."
             elsif x2.has? :container
               A(player) + " takes " + a(x1) + " out of " + a(x2) + "."
             elsif x2.has?(:cover) && noun.has?(:underneath)
               A(player) + " takes " + a(x1) + " out from underneath " + a(x2) + "."
             else
               A(player) + " picks " + a(x1) + " up from " + the($d_obj) + "."
             end
    when 16 then println The(x1) + " " + isorare(x1) + " too far away."
    end
  when :Taste then     "You taste nothing unexpected."
  when :Tell then case n
    when 1 then "You talk to yourself a while."
    when 2 then "This provokes no reaction."
    end
  when :Think then case n
    when 1 then "What a good idea."
    when 2 then A(player) + " seems momentarily lost in thought."
    end
  when :ThrowAt then case n
    when 1 then "Futile."
    when 2 then "You lack the nerve when it comes to the crucial moment."
    end
  # when Tie then # see JumpOver.
  when :Touch then case n
    when 1 then "Keep your hands to yourself!"
    when 2 then "You feel nothing unexpected."
    when 3 then "If you think that'll help."
    when 4 then A(player) + " touches " + a(x1) + " with " + hisorher(player, 'finger') + "."
    end
  # when Turn then # see Pull.
  when :Unlock then case n
    when 1 then if x1.has?(:pluralname); print "They don't "; else; print "That doesn't "; end
            "seem to be something you can unlock."
    when 2 then println ctheyreorthats(x1) + " unlocked at the moment."
    when 3 then if x1.has?(:pluralname); print "Those don't "; else; print "That doesn't "; end
            "seem to fit the lock."
    when 4 then "You unlock " + the(x1) + "."
    when 5 then A(player) + " unlocks " + the(x1) + " with " + hisorher(player, second) + "."
    end
  when :VagueGo then   "You'll have to say which compass direction to go in."
  when :Verify then case n
    when 1 then "The game file has verified as intact."
    when 2 then "The game file did not verify as intact, and may be corrupt."
    end
  when :Wait then case n
    when 1 then "Time passes."
    when 2 then A(player) + " seems momentarily preoccupied with anticipation."
    end
  when :Wake then      "The dreadful truth is, this is not a dream."
  when :WakeOther then "That seems unnecessary."
  when :Wave then case n
    when 1 then "But you aren't holding " + thatorthose(x1) + "."
    when 2 then "You look ridiculous waving " + the(x1) + "."
    when 3 then A(player) + " waves " + hisorher(player, x1) + " above " + hisorher(player, 'head') + "."
    end
  when :WaveHands then case n
    when 1 then "You wave, feeling foolish."
    when 2 then A(player) + " waves."
    when 3 then "You wave to " + the(noun) + "."
    when 4 then A(player) + " waves to " + a(noun) + "."
    end
  when :Wear then case n
    when 1 then "You can't wear " + thatorthose(x1) + "!"
    when 2 then "You're not holding " + thatorthose(x1) + "!"
    when 3 then "You're already wearing " + thatorthose(x1) + "!"
    when 4 then "You put on " + the(x1) + "."
    when 5 then A(player) + " puts on " + a(x1) + "."
    end
  else
    raise MissingLanguage, sw__var
  end
end

#LanguageContraction(text) ⇒ Object

English has two: 0 = starting with a consonant 1 = starting with a vowel



240
241
242
243
# File 'lib/inform/English.h.rb', line 240

def LanguageContraction(text)
  return 1 if !text.nil? && %i[a e i o u].include?(text.downcase.to_sym)
  0
end

#LanguageDirection(d) ⇒ Object



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/inform/English.h.rb', line 260

def LanguageDirection(d)
  case d.to_sym
  when :n_to   then  print "north"
  when :s_to   then  print "south"
  when :e_to   then  print "east"
  when :w_to   then  print "west"
  when :ne_to  then  print "northeast"
  when :nw_to  then  print "northwest"
  when :se_to  then  print "southeast"
  when :sw_to  then  print "southwest"
  when :u_to   then  print "up"
  when :d_to   then  print "down"
  when :in_to  then  print "in"
  when :out_to then  print "out"
  else return RunTimeError(9, d)
  end
end

#LanguageNumber(n) ⇒ Object



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
# File 'lib/inform/English.h.rb', line 278

def LanguageNumber(n)
  if n == 0;       print "zero"; return false; end
  if n < 0;        print "minus "; n = -n; end
  if n >= 1000;    print LanguageNumber((n / 1000.to_f).to_i) + " thousand"; n = n % 1000; f = 1; end
  if n >= 100
    print COMMA__TX if f == 1
    print LanguageNumber((n / 100.to_f).to_i) + " hundred"
    n = n % 100
    f = 1
  end
  return false if n == 0
  if defined? DIALECT_US
  print " " if f == 1
  else
  print " and " if f == 1
  end
  case n
  when 1 then    print "one"
  when 2 then    print "two"
  when 3 then    print "three"
  when 4 then    print "four"
  when 5 then    print "five"
  when 6 then    print "six"
  when 7 then    print "seven"
  when 8 then    print "eight"
  when 9 then    print "nine"
  when 10 then   print "ten"
  when 11 then   print "eleven"
  when 12 then   print "twelve"
  when 13 then   print "thirteen"
  when 14 then   print "fourteen"
  when 15 then   print "fifteen"
  when 16 then   print "sixteen"
  when 17 then   print "seventeen"
  when 18 then   print "eighteen"
  when 19 then   print "nineteen"
  when 20..99
    case (n / 10).to_i
    when 2 then  print "twenty"
    when 3 then  print "thirty"
    when 4 then  print "forty"
    when 5 then  print "fifty"
    when 6 then  print "sixty"
    when 7 then  print "seventy"
    when 8 then  print "eighty"
    when 9 then  print "ninety"
    end
    if (n % 10) != 0
      print "-"
      LanguageNumber(n % 10)
    end
  end
end

#LanguageTimeOfDay(hours, mins) ⇒ Object



332
333
334
335
336
337
338
# File 'lib/inform/English.h.rb', line 332

def LanguageTimeOfDay(hours, mins)
  i = hours % 12
  i = 12 if i == 0
  print " " if i < 10
  print i + ":" + (mins / 10.to_f).to_i + (mins % 10)
  if (hours / 12.to_f).to_i > 0 then print " pm" else print " am" end
end

#LanguageToInformeseObject


Part III.   Translation



227
# File 'lib/inform/English.h.rb', line 227

def LanguageToInformese; end

#LanguageVerb(i) ⇒ Object



340
341
342
343
344
345
346
347
348
349
350
# File 'lib/inform/English.h.rb', line 340

def LanguageVerb(i)
  case i
  when 'i', 'inv', 'inventory'
                  print "take inventory"
  when 'l' then   print "look"
  when 'x' then   print "examine"
  when 'z' then   print "wait"
  else return false
  end
  true
end

#LanguageVerbIsDebugging(word) ⇒ Object


LanguageVerbIsDebugging is called by SearchScope.  It should return true
if word w is a debugging verb which needs all objects to be in scope.



357
358
359
360
# File 'lib/inform/English.h.rb', line 357

def LanguageVerbIsDebugging(word)
  return false unless defined? DEBUG
  word.in? 'purloin', 'tree', 'abstract', 'gonear', 'scope', 'showobj', 'showme'
end

#LanguageVerbLikesAdverb(word) ⇒ Object


LanguageVerbLikesAdverb is called by PrintCommand when printing an UPTO_PE
error or an inference message.  Words which are intransitive verbs, i.e.,
which require a direction name as an adverb ('walk west'), not a noun
('I only understood you as far as wanting to touch /the/ ground'), should
cause the routine to return true.



370
371
372
373
# File 'lib/inform/English.h.rb', line 370

def LanguageVerbLikesAdverb(word)
  return true if word.in? 'look', 'go', 'push', 'walk'
  false
end

#LanguageVerbMayBeName(word) ⇒ Object


LanguageVerbMayBeName is called by NounDomain when dealing with the
player's reply to a "Which do you mean, the short stick or the long
stick?" prompt from the parser. If the reply is another verb (for example,
LOOK) then then previous ambiguous command is discarded /unless/
it is one of these words which could be both a verb /and/ an
adjective in a 'name' property.



384
385
386
387
# File 'lib/inform/English.h.rb', line 384

def LanguageVerbMayBeName(word)
  return true if word.in? 'long', 'short', 'normal', 'brief', 'full', 'verbose'
  false
end

#library_messages(sw__var, n = 1, x1 = nil) ⇒ Object Also known as: l___m, l__m, L__M



1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
# File 'lib/inform/English.h.rb', line 1231

def library_messages(sw__var, n = 1, x1 = nil)
  # TODO: FIXME
  plugin_library_messages = :"#{sw__var}Messages"
  if self.respond_to? plugin_library_messages
    result = send(plugin_library_messages, n, x1)
    return result if result
  end
  result = language_lm(sw__var, n, x1)
  # TODO: FIXME
  # modules.each { |m| m.name == 'English' && m.provides? :language_lm }
  return result
end

#ThatorThose(obj) ⇒ Object

Used in the accusative



429
430
431
432
433
434
435
436
437
# File 'lib/inform/English.h.rb', line 429

def ThatorThose(obj) # Used in the accusative
  if obj == player             ; return "you"; end
  if obj.has?(:pluralname)     ; return "those"; end
  if obj.has?(:animate)
    if obj.has?(:female)       ; return "her"
    elsif obj.hasnt?(:neuter)  ; return "him"; end
  end
  return "that"
end