Language contents
Vocabulary.
12Constant AGAIN1__WD = 'again';
13Constant AGAIN2__WD = 'g//';
14Constant AGAIN3__WD = 'again';
15Constant OOPS1__WD = 'oops';
16Constant OOPS2__WD = 'o//';
17Constant OOPS3__WD = 'oops';
18Constant UNDO1__WD = 'undo';
19Constant UNDO2__WD = 'undo';
20Constant UNDO3__WD = 'undo';
21
22Constant ALL1__WD = 'all';
23Constant ALL2__WD = 'each';
24Constant ALL3__WD = 'every';
25Constant ALL4__WD = 'everything';
26Constant ALL5__WD = 'both';
27Constant AND1__WD = 'and';
28Constant AND2__WD = 'and';
29Constant AND3__WD = 'and';
30Constant BUT1__WD = 'but';
31Constant BUT2__WD = 'except';
32Constant BUT3__WD = 'but';
33Constant ME1__WD = 'me';
34Constant ME2__WD = 'myself';
35Constant ME3__WD = 'self';
36Constant OF1__WD = 'of';
37Constant OF2__WD = 'of';
38Constant OF3__WD = 'of';
39Constant OF4__WD = 'of';
40Constant OTHER1__WD = 'another';
41Constant OTHER2__WD = 'other';
42Constant OTHER3__WD = 'other';
43Constant THEN1__WD = 'then';
44Constant THEN2__WD = 'then';
45Constant THEN3__WD = 'then';
46
47Constant NO1__WD = 'n//';
48Constant NO2__WD = 'no';
49Constant NO3__WD = 'no';
50Constant YES1__WD = 'y//';
51Constant YES2__WD = 'yes';
52Constant YES3__WD = 'yes';
53
54Constant AMUSING__WD = 'amusing';
55Constant FULLSCORE1__WD = 'fullscore';
56Constant FULLSCORE2__WD = 'full';
57Constant QUIT1__WD = 'q//';
58Constant QUIT2__WD = 'quit';
59Constant RESTART__WD = 'restart';
60Constant RESTORE__WD = 'restore';
65Array LanguagePronouns table
66
67
68
69
70
71
72
73 'it' $$001000111000 NULL
74 'him' $$100000000000 NULL
75 'her' $$010000000000 NULL
76 'them' $$000111000111 NULL;
81Array LanguageDescriptors table
82
83
84
85
86
87
88
89 'my' $$111111111111 POSSESS_PK 0
90 'this' $$111111111111 POSSESS_PK 0
91 'these' $$000111000111 POSSESS_PK 0
92 'that' $$111111111111 POSSESS_PK 1
93 'those' $$000111000111 POSSESS_PK 1
94 'his' $$111111111111 POSSESS_PK 'him'
95 'her' $$111111111111 POSSESS_PK 'her'
96 'their' $$111111111111 POSSESS_PK 'them'
97 'its' $$111111111111 POSSESS_PK 'it'
98 'the' $$111111111111 DEFART_PK NULL
99 'a//' $$111000111000 INDEFART_PK NULL
100 'an' $$111000111000 INDEFART_PK NULL
101 'some' $$000111000111 INDEFART_PK NULL
102 'lit' $$111111111111 light NULL
103 'lighted' $$111111111111 light NULL
104 'unlit' $$111111111111 (-light) NULL;
109Array LanguageNumbers table
110 'one' 1 'two' 2 'three' 3 'four' 4 'five' 5
111 'six' 6 'seven' 7 'eight' 8 'nine' 9 'ten' 10
112 'eleven' 11 'twelve' 12 'thirteen' 13 'fourteen' 14 'fifteen' 15
113 'sixteen' 16 'seventeen' 17 'eighteen' 18 'nineteen' 19 'twenty' 20
114 'twenty-one' 21 'twenty-two' 22 'twenty-three' 23 'twenty-four' 24
115 'twenty-five' 25 'twenty-six' 26 'twenty-seven' 27 'twenty-eight' 28
116 'twenty-nine' 29 'thirty' 30
117;
118
119[ LanguageNumber n f;
120 if (n == 0) { print "zero"; rfalse; }
121 if (n < 0) { print "minus "; n = -n; }
122#Iftrue (WORDSIZE == 4);
123 if (n >= 1000000000) {
124 if (f == 1) print ", ";
125 print (LanguageNumber) n/1000000000, " billion"; n = n%1000000000; f = 1;
126 }
127 if (n >= 1000000) {
128 if (f == 1) print ", ";
129 print (LanguageNumber) n/1000000, " million"; n = n%1000000; f = 1;
130 }
131#Endif;
132 if (n >= 1000) {
133 if (f == 1) print ", ";
134 print (LanguageNumber) n/1000, " thousand"; n = n%1000; f = 1;
135 }
136 if (n >= 100) {
137 if (f == 1) print ", ";
138 print (LanguageNumber) n/100, " hundred"; n = n%100; f = 1;
139 }
140 if (n == 0) rfalse;
141 #Ifdef DIALECT_US;
142 if (f == 1) print " ";
143 #Ifnot;
144 if (f == 1) print " and ";
145 #Endif;
146 switch (n) {
147 1: print "one";
148 2: print "two";
149 3: print "three";
150 4: print "four";
151 5: print "five";
152 6: print "six";
153 7: print "seven";
154 8: print "eight";
155 9: print "nine";
156 10: print "ten";
157 11: print "eleven";
158 12: print "twelve";
159 13: print "thirteen";
160 14: print "fourteen";
161 15: print "fifteen";
162 16: print "sixteen";
163 17: print "seventeen";
164 18: print "eighteen";
165 19: print "nineteen";
166 20 to 99: switch (n/10) {
167 2: print "twenty";
168 3: print "thirty";
169 4: print "forty";
170 5: print "fifty";
171 6: print "sixty";
172 7: print "seventy";
173 8: print "eighty";
174 9: print "ninety";
175 }
176 if (n%10 ~= 0) print "-", (LanguageNumber) n%10;
177 }
178];
183[ LanguageTimeOfDay hours mins i;
184 i = hours%12;
185 if (i == 0) i = 12;
186 if (i < 10) print " ";
187 print i, ":", mins/10, mins%10;
188 if ((hours/12) > 0) print " pm"; else print " am";
189];
194[ LanguageDirection d;
195 print (name) d;
196];
201[ LanguageToInformese; ];
206Constant LanguageAnimateGender = male;
207Constant LanguageInanimateGender = neuter;
208
209Constant LanguageContractionForms = 2;
210
211
212
213[ LanguageContraction text;
214 if (text->0 == 'a' or 'e' or 'i' or 'o' or 'u'
215 or 'A' or 'E' or 'I' or 'O' or 'U') return 1;
216 return 0;
217];
218
219Array LanguageArticles -->
220
221
222
223
224 "The " "the " "a " "The " "the " "an "
225 "The " "the " "some " "The " "the " "some ";
226
227
228
229
230
231Array LanguageGNAsToArticles --> 0 0 0 1 1 1 0 0 0 1 1 1;
Commands.
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.
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.
248[ LanguageVerb i;
249 switch (i) {
250 'i//','inv','inventory':
251 print "take inventory";
252 'l//': print "look";
253 'x//': print "examine";
254 'z//': print "wait";
255 default: rfalse;
256 }
257 rtrue;
258];
259
260[ LanguageVerbLikesAdverb w;
261 if (w == 'look' or 'go' or 'push' or 'walk')
262 rtrue;
263 rfalse;
264];
265
266[ LanguageVerbMayBeName w;
267 if (w == 'long' or 'short' or 'normal' or 'brief' or 'full' or 'verbose')
268 rtrue;
269 rfalse;
270];