forked from devshane/zork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sverbs.c
871 lines (760 loc) · 17.2 KB
/
sverbs.c
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
/* SVERBS- SIMPLE VERBS PROCESSOR */
/* ALL VERBS IN THIS ROUTINE MUST BE INDEPENDANT */
/* OF OBJECT ACTIONS */
/*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
/* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
/* WRITTEN BY R. M. SUPNIK */
#include <stdio.h>
#include "funcs.h"
#include "vars.h"
logical sverbs_(ri)
integer ri;
{
/* Initialized data */
const integer mxnop = 39;
const integer mxjoke = 64;
static const integer jokes[25] = { 4,5,3,304,305,306,307,308,309,310,311,
312,313,5314,5319,324,325,883,884,120,120,0,0,0,0 };
static const integer answer[14] = { 0,1,2,3,4,4,4,4,5,5,5,6,7,7};
static const char * const ansstr[14] =
{ "TEMPLE", "FOREST", "30003", "FLASK", "RUB", "FONDLE",
"CARRES", "TOUCH", "BONES", "BODY", "SKELE", "RUSTYKNIFE",
"NONE", "NOWHER" };
/* System generated locals */
integer i__1, i__2;
logical ret_val;
/* Local variables */
logical f;
const char *z, *z2;
integer i, j;
integer k;
integer l;
char ch[1*6];
integer cp, wp;
char pp1[1*6], pp2[1*6];
integer odi2 = 0, odo2 = 0;
ret_val = TRUE_;
/* !ASSUME WINS. */
if (prsvec_1.prso != 0) {
odo2 = objcts_1.odesc2[prsvec_1.prso - 1];
}
/* !SET UP DESCRIPTORS. */
if (prsvec_1.prsi != 0) {
odi2 = objcts_1.odesc2[prsvec_1.prsi - 1];
}
if (ri == 0) {
bug_(7, ri);
}
/* !ZERO IS VERBOTEN. */
if (ri <= mxnop) {
return ret_val;
}
/* !NOP? */
if (ri <= mxjoke) {
goto L100;
}
/* !JOKE? */
switch (ri - mxjoke) {
case 1: goto L65000;
case 2: goto L66000;
case 3: goto L67000;
case 4: goto L68000;
case 5: goto L69000;
case 6: goto L1000;
case 7: goto L2000;
case 8: goto L3000;
case 9: goto L4000;
case 10: goto L5000;
case 11: goto L6000;
case 12: goto L7000;
case 13: goto L8000;
case 14: goto L9000;
case 15: goto L10000;
case 16: goto L11000;
case 17: goto L12000;
case 18: goto L13000;
case 19: goto L14000;
case 20: goto L15000;
case 21: goto L16000;
case 22: goto L17000;
case 23: goto L18000;
case 24: goto L19000;
case 25: goto L20000;
case 26: goto L21000;
case 27: goto L22000;
case 28: goto L23000;
case 29: goto L24000;
case 30: goto L25000;
case 31: goto L26000;
case 32: goto L27000;
}
bug_(7, ri);
/* ALL VERB PROCESSORS RETURN HERE TO DECLARE FAILURE. */
/* L10: */
ret_val = FALSE_;
/* !LOSE. */
return ret_val;
/* JOKE PROCESSOR. */
/* FIND PROPER ENTRY IN JOKES, USE IT TO SELECT STRING TO PRINT. */
L100:
i = jokes[ri - mxnop - 1];
/* !GET TABLE ENTRY. */
j = i / 1000;
/* !ISOLATE # STRINGS. */
if (j != 0) {
i = i % 1000 + rnd_(j);
}
/* !IF RANDOM, CHOOSE. */
rspeak_(i);
/* !PRINT JOKE. */
return ret_val;
/* SVERBS, PAGE 2A */
/* V65-- ROOM */
L65000:
ret_val = rmdesc_(2);
/* !DESCRIBE ROOM ONLY. */
return ret_val;
/* V66-- OBJECTS */
L66000:
ret_val = rmdesc_(1);
/* !DESCRIBE OBJ ONLY. */
if (! play_1.telflg) {
rspeak_(138);
}
/* !NO OBJECTS. */
return ret_val;
/* V67-- RNAME */
L67000:
i__1 = rooms_1.rdesc2[play_1.here - 1];
rspeak_(i__1);
/* !SHORT ROOM NAME. */
return ret_val;
/* V68-- RESERVED */
L68000:
return ret_val;
/* V69-- RESERVED */
L69000:
return ret_val;
/* SVERBS, PAGE 3 */
/* V70-- BRIEF. SET FLAG. */
L1000:
findex_1.brieff = TRUE_;
/* !BRIEF DESCRIPTIONS. */
findex_1.superf = FALSE_;
rspeak_(326);
return ret_val;
/* V71-- VERBOSE. CLEAR FLAGS. */
L2000:
findex_1.brieff = FALSE_;
/* !LONG DESCRIPTIONS. */
findex_1.superf = FALSE_;
rspeak_(327);
return ret_val;
/* V72-- SUPERBRIEF. SET FLAG. */
L3000:
findex_1.superf = TRUE_;
rspeak_(328);
return ret_val;
/* V73-- STAY (USED IN ENDGAME). */
L4000:
if (play_1.winner != aindex_1.amastr) {
goto L4100;
}
/* !TELL MASTER, STAY. */
rspeak_(781);
/* !HE DOES. */
cevent_1.ctick[cindex_1.cevfol - 1] = 0;
/* !NOT FOLLOWING. */
return ret_val;
L4100:
if (play_1.winner == aindex_1.player) {
rspeak_(664);
}
/* !JOKE. */
return ret_val;
/* V74-- VERSION. PRINT INFO. */
L5000:
more_output(NULL);
printf("V%1d.%1d%c\n", vers_1.vmaj, vers_1.vmin, vers_1.vedit);
play_1.telflg = TRUE_;
return ret_val;
/* V75-- SWIM. ALWAYS A JOKE. */
L6000:
i = 330;
/* !ASSUME WATER. */
if ((rooms_1.rflag[play_1.here - 1] & RWATER + RFILL) ==
0) {
i = rnd_(3) + 331;
}
rspeak_(i);
return ret_val;
/* V76-- GERONIMO. IF IN BARREL, FATAL, ELSE JOKE. */
L7000:
if (play_1.here == rindex_1.mbarr) {
goto L7100;
}
/* !IN BARREL? */
rspeak_(334);
/* !NO, JOKE. */
return ret_val;
L7100:
jigsup_(335);
/* !OVER FALLS. */
return ret_val;
/* V77-- SINBAD ET AL. CHASE CYCLOPS, ELSE JOKE. */
L8000:
if (play_1.here == rindex_1.mcycl && qhere_(oindex_1.cyclo, play_1.here)
) {
goto L8100;
}
rspeak_(336);
/* !NOT HERE, JOKE. */
return ret_val;
L8100:
newsta_(oindex_1.cyclo, 337, 0, 0, 0);
/* !CYCLOPS FLEES. */
findex_1.cyclof = TRUE_;
/* !SET ALL FLAGS. */
findex_1.magicf = TRUE_;
objcts_1.oflag2[oindex_1.cyclo - 1] &= ~ FITEBT;
return ret_val;
/* V78-- WELL. OPEN DOOR, ELSE JOKE. */
L9000:
if (findex_1.riddlf || play_1.here != rindex_1.riddl) {
goto L9100;
}
/* !IN RIDDLE ROOM? */
findex_1.riddlf = TRUE_;
/* !YES, SOLVED IT. */
rspeak_(338);
return ret_val;
L9100:
rspeak_(339);
/* !WELL, WHAT? */
return ret_val;
/* V79-- PRAY. IF IN TEMP2, POOF */
/* ! */
L10000:
if (play_1.here != rindex_1.temp2) {
goto L10050;
}
/* !IN TEMPLE? */
if (moveto_(rindex_1.fore1, play_1.winner)) {
goto L10100;
}
/* !FORE1 STILL THERE? */
L10050:
rspeak_(340);
/* !JOKE. */
return ret_val;
L10100:
f = rmdesc_(3);
/* !MOVED, DESCRIBE. */
return ret_val;
/* V80-- TREASURE. IF IN TEMP1, POOF */
/* ! */
L11000:
if (play_1.here != rindex_1.temp1) {
goto L11050;
}
/* !IN TEMPLE? */
if (moveto_(rindex_1.treas, play_1.winner)) {
goto L10100;
}
/* !TREASURE ROOM THERE? */
L11050:
rspeak_(341);
/* !NOTHING HAPPENS. */
return ret_val;
/* V81-- TEMPLE. IF IN TREAS, POOF */
/* ! */
L12000:
if (play_1.here != rindex_1.treas) {
goto L12050;
}
/* !IN TREASURE? */
if (moveto_(rindex_1.temp1, play_1.winner)) {
goto L10100;
}
/* !TEMP1 STILL THERE? */
L12050:
rspeak_(341);
/* !NOTHING HAPPENS. */
return ret_val;
/* V82-- BLAST. USUALLY A JOKE. */
L13000:
i = 342;
/* !DONT UNDERSTAND. */
if (prsvec_1.prso == oindex_1.safe) {
i = 252;
}
/* !JOKE FOR SAFE. */
rspeak_(i);
return ret_val;
/* V83-- SCORE. PRINT SCORE. */
L14000:
score_(0);
return ret_val;
/* V84-- QUIT. FINISH OUT THE GAME. */
L15000:
score_(1);
/* !TELLL SCORE. */
if (! yesno_(343, 0, 0)) {
return ret_val;
}
/* !ASK FOR Y/N DECISION. */
exit_();
/* !BYE. */
/* SVERBS, PAGE 4 */
/* V85-- FOLLOW (USED IN ENDGAME) */
L16000:
if (play_1.winner != aindex_1.amastr) {
return ret_val;
}
/* !TELL MASTER, FOLLOW. */
rspeak_(782);
cevent_1.ctick[cindex_1.cevfol - 1] = -1;
/* !STARTS FOLLOWING. */
return ret_val;
/* V86-- WALK THROUGH */
L17000:
if (screen_1.scolrm == 0 || prsvec_1.prso != oindex_1.scol && (
prsvec_1.prso != oindex_1.wnort || play_1.here != rindex_1.bkbox))
{
goto L17100;
}
screen_1.scolac = screen_1.scolrm;
/* !WALKED THRU SCOL. */
prsvec_1.prso = 0;
/* !FAKE OUT FROMDR. */
cevent_1.ctick[cindex_1.cevscl - 1] = 6;
/* !START ALARM. */
rspeak_(668);
/* !DISORIENT HIM. */
f = moveto_(screen_1.scolrm, play_1.winner);
/* !INTO ROOM. */
f = rmdesc_(3);
/* !DESCRIBE. */
return ret_val;
L17100:
if (play_1.here != screen_1.scolac) {
goto L17300;
}
/* !ON OTHER SIDE OF SCOL? */
for (i = 1; i <= 12; i += 3) {
/* !WALK THRU PROPER WALL? */
if (screen_1.scolwl[i - 1] == play_1.here && screen_1.scolwl[i] ==
prsvec_1.prso) {
goto L17500;
}
/* L17200: */
}
L17300:
if ((objcts_1.oflag1[prsvec_1.prso - 1] & TAKEBT) != 0) {
goto L17400;
}
i = 669;
/* !NO, JOKE. */
if (prsvec_1.prso == oindex_1.scol) {
i = 670;
}
/* !SPECIAL JOKE FOR SCOL. */
rspsub_(i, odo2);
return ret_val;
L17400:
i = 671;
/* !JOKE. */
if (objcts_1.oroom[prsvec_1.prso - 1] != 0) {
i = rnd_(5) + 552;
}
/* !SPECIAL JOKES IF CARRY. */
rspeak_(i);
return ret_val;
L17500:
prsvec_1.prso = screen_1.scolwl[i + 1];
/* !THRU SCOL WALL... */
for (i = 1; i <= 8; i += 2) {
/* !FIND MATCHING ROOM. */
if (prsvec_1.prso == screen_1.scoldr[i - 1]) {
screen_1.scolrm = screen_1.scoldr[i];
}
/* L17600: */
}
/* !DECLARE NEW SCOLRM. */
cevent_1.ctick[cindex_1.cevscl - 1] = 0;
/* !CANCEL ALARM. */
rspeak_(668);
/* !DISORIENT HIM. */
f = moveto_(rindex_1.bkbox, play_1.winner);
/* !BACK IN BOX ROOM. */
f = rmdesc_(3);
return ret_val;
/* V87-- RING. A JOKE. */
L18000:
i = 359;
/* !CANT RING. */
if (prsvec_1.prso == oindex_1.bell) {
i = 360;
}
/* !DING, DONG. */
rspeak_(i);
/* !JOKE. */
return ret_val;
/* V88-- BRUSH. JOKE WITH OBSCURE TRAP. */
L19000:
if (prsvec_1.prso == oindex_1.teeth) {
goto L19100;
}
/* !BRUSH TEETH? */
rspeak_(362);
/* !NO, JOKE. */
return ret_val;
L19100:
if (prsvec_1.prsi != 0) {
goto L19200;
}
/* !WITH SOMETHING? */
rspeak_(363);
/* !NO, JOKE. */
return ret_val;
L19200:
if (prsvec_1.prsi == oindex_1.putty && objcts_1.oadv[oindex_1.putty - 1]
== play_1.winner) {
goto L19300;
}
rspsub_(364, odi2);
/* !NO, JOKE. */
return ret_val;
L19300:
jigsup_(365);
/* !YES, DEAD */
/* ! */
/* ! */
/* ! */
/* ! */
/* ! */
return ret_val;
/* SVERBS, PAGE 5 */
/* V89-- DIG. UNLESS SHOVEL, A JOKE. */
L20000:
if (prsvec_1.prso == oindex_1.shove) {
return ret_val;
}
/* !SHOVEL? */
i = 392;
/* !ASSUME TOOL. */
if ((objcts_1.oflag1[prsvec_1.prso - 1] & TOOLBT) == 0) {
i = 393;
}
rspsub_(i, odo2);
return ret_val;
/* V90-- TIME. PRINT OUT DURATION OF GAME. */
L21000:
gttime_(&k);
/* !GET PLAY TIME. */
i = k / 60;
j = k % 60;
more_output(NULL);
printf("You have been playing Dungeon for ");
if (i >= 1) {
printf("%d hour", i);
if (i >= 2)
printf("s");
printf(" and ");
}
printf("%d minute", j);
if (j != 1)
printf("s");
printf(".\n");
play_1.telflg = TRUE_;
return ret_val;
/* V91-- LEAP. USUALLY A JOKE, WITH A CATCH. */
L22000:
if (prsvec_1.prso == 0) {
goto L22200;
}
/* !OVER SOMETHING? */
if (qhere_(prsvec_1.prso, play_1.here)) {
goto L22100;
}
/* !HERE? */
rspeak_(447);
/* !NO, JOKE. */
return ret_val;
L22100:
if ((objcts_1.oflag2[prsvec_1.prso - 1] & VILLBT) == 0) {
goto L22300;
}
rspsub_(448, odo2);
/* !CANT JUMP VILLAIN. */
return ret_val;
L22200:
if (! findxt_(xsrch_1.xdown, play_1.here)) {
goto L22300;
}
/* !DOWN EXIT? */
if (curxt_1.xtype == xpars_1.xno || curxt_1.xtype == xpars_1.xcond && !
flags[*xflag - 1]) {
goto L22400;
}
L22300:
i__1 = rnd_(5) + 314;
rspeak_(i__1);
/* !WHEEEE */
/* ! */
return ret_val;
L22400:
i__1 = rnd_(4) + 449;
jigsup_(i__1);
/* !FATAL LEAP. */
return ret_val;
/* SVERBS, PAGE 6 */
/* V92-- LOCK. */
L23000:
if (prsvec_1.prso == oindex_1.grate && play_1.here == rindex_1.mgrat) {
goto L23200;
}
L23100:
rspeak_(464);
/* !NOT LOCK GRATE. */
return ret_val;
L23200:
findex_1.grunlf = FALSE_;
/* !GRATE NOW LOCKED. */
rspeak_(214);
exits_1.travel[rooms_1.rexit[play_1.here - 1]] = 214;
/* !CHANGE EXIT STATUS. */
return ret_val;
/* V93-- UNLOCK */
L24000:
if (prsvec_1.prso != oindex_1.grate || play_1.here != rindex_1.mgrat) {
goto L23100;
}
if (prsvec_1.prsi == oindex_1.keys) {
goto L24200;
}
/* !GOT KEYS? */
rspsub_(465, odi2);
/* !NO, JOKE. */
return ret_val;
L24200:
findex_1.grunlf = TRUE_;
/* !UNLOCK GRATE. */
rspeak_(217);
exits_1.travel[rooms_1.rexit[play_1.here - 1]] = 217;
/* !CHANGE EXIT STATUS. */
return ret_val;
/* V94-- DIAGNOSE. */
L25000:
i = fights_(play_1.winner, 0);
/* !GET FIGHTS STRENGTH. */
j = advs_1.astren[play_1.winner - 1];
/* !GET HEALTH. */
/* Computing MIN */
i__1 = i + j;
k = min(i__1,4);
/* !GET STATE. */
if (! cevent_1.cflag[cindex_1.cevcur - 1]) {
j = 0;
}
/* !IF NO WOUNDS. */
/* Computing MIN */
i__1 = 4, i__2 = abs(j);
l = min(i__1,i__2);
/* !SCALE. */
i__1 = l + 473;
rspeak_(i__1);
/* !DESCRIBE HEALTH. */
i = (-j - 1) * 30 + cevent_1.ctick[cindex_1.cevcur - 1];
/* !COMPUTE WAIT. */
if (j != 0) {
more_output(NULL);
printf("You will be cured after %d moves.\n", i);
}
i__1 = k + 478;
rspeak_(i__1);
/* !HOW MUCH MORE? */
if (state_1.deaths != 0) {
i__1 = state_1.deaths + 482;
rspeak_(i__1);
}
/* !HOW MANY DEATHS? */
return ret_val;
/* SVERBS, PAGE 7 */
/* V95-- INCANT */
L26000:
for (i = 1; i <= 6; ++i) {
/* !SET UP PARSE. */
pp1[i - 1] = ' ';
pp2[i - 1] = ' ';
/* L26100: */
}
wp = 1;
/* !WORD POINTER. */
cp = 1;
/* !CHAR POINTER. */
if (prsvec_1.prscon <= 1) {
goto L26300;
}
for (z = input_1.inbuf + prsvec_1.prscon - 1; *z != '\0'; ++z) {
/* !PARSE INPUT */
if (*z == ',')
goto L26300;
/* !END OF PHRASE? */
if (*z != ' ')
goto L26150;
/* !SPACE? */
if (cp != 1) {
++wp;
}
cp = 1;
goto L26200;
L26150:
if (wp == 1) {
pp1[cp - 1] = *z;
}
/* !STUFF INTO HOLDER. */
if (wp == 2) {
pp2[cp - 1] = *z;
}
/* Computing MIN */
i__2 = cp + 1;
cp = min(i__2,6);
L26200:
;
}
L26300:
prsvec_1.prscon = 1;
/* !KILL REST OF LINE. */
if (pp1[0] != ' ') {
goto L26400;
}
/* !ANY INPUT? */
rspeak_(856);
/* !NO, HO HUM. */
return ret_val;
L26400:
encryp_(pp1, ch);
/* !COMPUTE RESPONSE. */
if (pp2[0] != ' ') {
goto L26600;
}
/* !TWO PHRASES? */
if (findex_1.spellf) {
goto L26550;
}
/* !HE'S TRYING TO LEARN. */
if ((rooms_1.rflag[rindex_1.tstrs - 1] & RSEEN) == 0) {
goto L26575;
}
findex_1.spellf = TRUE_;
/* !TELL HIM. */
play_1.telflg = TRUE_;
more_output(NULL);
printf("A hollow voice replies: \"%.6s %.6s\".\n", pp1, ch);
return ret_val;
L26550:
rspeak_(857);
/* !HE'S GOT ONE ALREADY. */
return ret_val;
L26575:
rspeak_(858);
/* !HE'S NOT IN ENDGAME. */
return ret_val;
L26600:
if ((rooms_1.rflag[rindex_1.tstrs - 1] & RSEEN) != 0) {
goto L26800;
}
for (i = 1; i <= 6; ++i) {
if (pp2[i - 1] != ch[i - 1]) {
goto L26575;
}
/* !WRONG. */
/* L26700: */
}
findex_1.spellf = TRUE_;
/* !IT WORKS. */
rspeak_(859);
cevent_1.ctick[cindex_1.cevste - 1] = 1;
/* !FORCE START. */
return ret_val;
L26800:
rspeak_(855);
/* !TOO LATE. */
return ret_val;
/* SVERBS, PAGE 8 */
/* V96-- ANSWER */
L27000:
if (prsvec_1.prscon > 1 && play_1.here == rindex_1.fdoor &&
findex_1.inqstf) {
goto L27100;
}
rspeak_(799);
/* !NO ONE LISTENS. */
prsvec_1.prscon = 1;
return ret_val;
L27100:
for (j = 1; j <= 14; j ++) {
/* !CHECK ANSWERS. */
if (findex_1.quesno != answer[j - 1])
goto L27300;
/* !ONLY CHECK PROPER ANS. */
z = ansstr[j - 1];
z2 = input_1.inbuf + prsvec_1.prscon - 1;
while (*z != '\0') {
while (*z2 == ' ')
z2++;
/* !STRIP INPUT BLANKS. */
if (*z++ != *z2++)
goto L27300;
}
goto L27500;
/* !RIGHT ANSWER. */
L27300:
;
}
prsvec_1.prscon = 1;
/* !KILL REST OF LINE. */
++findex_1.nqatt;
/* !WRONG, CRETIN. */
if (findex_1.nqatt >= 5) {
goto L27400;
}
/* !TOO MANY WRONG? */
i__1 = findex_1.nqatt + 800;
rspeak_(i__1);
/* !NO, TRY AGAIN. */
return ret_val;
L27400:
rspeak_(826);
/* !ALL OVER. */
cevent_1.cflag[cindex_1.cevinq - 1] = FALSE_;
/* !LOSE. */
return ret_val;
L27500:
prsvec_1.prscon = 1;
/* !KILL REST OF LINE. */
++findex_1.corrct;
/* !GOT IT RIGHT. */
rspeak_(800);
/* !HOORAY. */
if (findex_1.corrct >= 3) {
goto L27600;
}
/* !WON TOTALLY? */
cevent_1.ctick[cindex_1.cevinq - 1] = 2;
/* !NO, START AGAIN. */
findex_1.quesno = (findex_1.quesno + 3) % 8;
findex_1.nqatt = 0;
rspeak_(769);
/* !ASK NEXT QUESTION. */
i__1 = findex_1.quesno + 770;
rspeak_(i__1);
return ret_val;
L27600:
rspeak_(827);
/* !QUIZ OVER, */
cevent_1.cflag[cindex_1.cevinq - 1] = FALSE_;
objcts_1.oflag2[oindex_1.qdoor - 1] |= OPENBT;
return ret_val;
} /* sverbs_ */