1
2
3
4
5
6
7
8
9
10 bug
11
12
13
14
15
16
17
18 LOGICAL CLOCKD(X)
19 IMPLICIT INTEGER (A-Z)
20 %include dparam
21
22 CLOCKD=.FALSE.
23 DO 100 I=1,CLNT
24 IF(.NOT.CFLAG(I) .OR.(CTICK(I).EQ.0)) GO TO 100
25 IF(CTICK(I).LT.0) GO TO 50
26 CTICK(I)=CTICK(I)-1
27 IF(CTICK(I).NE.0) GO TO 100
28 50 CLOCKD=.TRUE.
29 CALL CEVAPP(CACTIO(I))
30 100 CONTINUE
31 RETURN
32
33
34
35
36
37
38
39 CEVAPP(RI)
40 IMPLICIT INTEGER (A-Z)
41 %include dparam
42 INTEGER CNDTCK(10),LMPTCK(12)
43 LOGICAL FINDXT,LIT,RMDESC,QOPEN,MOVETO
44 LOGICAL F,QLEDGE,QHERE,PROB,WASLIT
45
46
47
48
49 QOPEN(R)=AND(OFLAG2(R),OPENBT).NE.0
50 QLEDGE(R)=(R.EQ.LEDG2).OR.(R.EQ.LEDG3).OR.(R.EQ.LEDG4)
51 DATA CNDTCK/50,20,10,5,0,156,156,156,157,0/
52 DATA LMPTCK/50,30,20,10,4,0,154,154,154,154,155,0/
53
54 IF(RI.EQ.0) RETURN
55 WASLIT=LIT(HERE)
56 GO TO (1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,
57 & 11000,12000,13000,14000,15000,16000,17000,18000,19000,
58 & 20000,21000,22000,23000,24000,25000,26000,27000,28000,
59 & 29000,30000),RI
60 CALL BUG(3,RI)
61
62
63
64 50 IF(WASLIT.AND..NOT.LIT(HERE)) CALL RSPEAK(406)
65 RETURN
66
67
68
69
70
71 1000 ASTREN(PLAYER)=MIN0(0,ASTREN(PLAYER)+1)
72 IF(ASTREN(PLAYER).GE.0) RETURN
73 CFLAG(CEVCUR)=.TRUE.
74 CTICK(CEVCUR)=30
75 RETURN
76
77
78
79 2000 IF(HERE.EQ.MAINT) CALL RSPEAK(71+(RVMNT/2))
80 RVMNT=RVMNT+1
81 IF(RVMNT.LE.16) RETURN
82 CTICK(CEVMNT)=0
83
84 RFLAG(MAINT)=OR(RFLAG(MAINT),RMUNG)
85 RDESC1(MAINT)=80
86 IF(HERE.EQ.MAINT) CALL JIGSUP(81)
87 RETURN
88
89
90
91 3000 CALL LITINT(LAMP,ORLAMP,CEVLNT,LMPTCK,12)
92 GO TO 50
93
94
95
96 4000 CALL RSPEAK(153)
97
98 OFLAG1(MATCH)=AND(OFLAG1(MATCH), COMPL((ONBT+FLAMBT+LITEBT)))
99 GO TO 50
100
101
102
103 5000 CALL LITINT(CANDL,ORCAND,CEVCND,CNDTCK,10)
104 GO TO 50
105
106
107
108
109
110 6000 CFLAG(CEVBAL)=.TRUE.
111 CTICK(CEVBAL)=3
112 F=AVEHIC(WINNER).EQ.BALLO
113 IF(BLOC.EQ.VLBOT) GO TO 6800
114 IF(QLEDGE(BLOC)) GO TO 6700
115 IF(QOPEN(RECEP).AND.(BINFF.NE.0))
116 & GO TO 6500
117
118
119
120
121 IF(BLOC.NE.VAIR1) GO TO 6300
122 BLOC=VLBOT
123 CALL NEWSTA(BALLO,0,BLOC,0,0)
124 IF(F) GO TO 6200
125 IF(QLEDGE(HERE).OR.(HERE.EQ.VLBOT))
126 & CALL RSPEAK(530)
127 RETURN
128
129 6200 F=MOVETO(BLOC,WINNER)
130 IF(BINFF.EQ.0) GO TO 6250
131 CALL RSPEAK(531)
132 F=RMDESC(0)
133 RETURN
134
135 6250 CALL NEWSTA(BALLO,532,0,0,0)
136 CALL NEWSTA(DBALL,0,BLOC,0,0)
137 IF(LASTIT.EQ.BALLO) LASTIT=DBALL
138 AVEHIC(WINNER)=0
139 CFLAG(CEVBAL)=.FALSE.
140 CFLAG(CEVBRN)=.FALSE.
141 RETURN
142
143 6300 BLOC=BLOC-1
144 CALL NEWSTA(BALLO,0,BLOC,0,0)
145 IF(F) GO TO 6400
146 IF(QLEDGE(HERE).OR.(HERE.EQ.VLBOT))
147 & CALL RSPEAK(533)
148 RETURN
149
150 6400 F=MOVETO(BLOC,WINNER)
151 CALL RSPEAK(534)
152 F=RMDESC(0)
153 RETURN
154
155
156
157 6500 IF(BLOC.NE.VAIR4) GO TO 6600
158 CFLAG(CEVBRN)=.FALSE.
159 CFLAG(CEVBAL)=.FALSE.
160 BINFF=0
161 BLOC=VLBOT
162 CALL NEWSTA(BALLO,0,0,0,0)
163 CALL NEWSTA(DBALL,0,BLOC,0,0)
164 IF(LASTIT.EQ.BALLO) LASTIT=DBALL
165 IF(F) GO TO 6550
166 IF(QLEDGE(HERE)) CALL RSPEAK(535)
167 IF(HERE.EQ.VLBOT) CALL RSPEAK(925)
168 RETURN
169
170 6550 CALL JIGSUP(536)
171 RETURN
172
173 6600 BLOC=BLOC+1
174 CALL NEWSTA(BALLO,0,BLOC,0,0)
175 IF(F) GO TO 6650
176 IF(QLEDGE(HERE).OR.(HERE.EQ.VLBOT))
177 & CALL RSPEAK(537)
178 RETURN
179
180 6650 F=MOVETO(BLOC,WINNER)
181 CALL RSPEAK(538)
182 F=RMDESC(0)
183 RETURN
184
185
186
187 6700 BLOC=BLOC+(VAIR2-LEDG2)
188 CALL NEWSTA(BALLO,0,BLOC,0,0)
189 IF(F) GO TO 6750
190 IF(QLEDGE(HERE).OR.(HERE.EQ.VLBOT))
191 & CALL RSPEAK(539)
192 CFLAG(CEVVLG)=.TRUE.
193 CTICK(CEVVLG)=10
194 RETURN
195
196 6750 F=MOVETO(BLOC,WINNER)
197 CALL RSPEAK(540)
198 F=RMDESC(0)
199 RETURN
200
201
202
203 6800 IF((BINFF.EQ.0).OR..NOT.QOPEN(RECEP)) RETURN
204 BLOC=VAIR1
205 CALL NEWSTA(BALLO,0,BLOC,0,0)
206 IF(F) GO TO 6850
207 IF(QLEDGE(HERE).OR.(HERE.EQ.VLBOT))
208 & CALL RSPEAK(541)
209 RETURN
210
211 6850 F=MOVETO(BLOC,WINNER)
212 CALL RSPEAK(542)
213 F=RMDESC(0)
214 RETURN
215
216
217
218
219
220 7000 DO 7100 I=1,OLNT
221
222
223 IF((RECEP.EQ.OCAN(I)).AND.((AND(OFLAG1(I),FLAMBT)).NE.0))
224 & GO TO 7200
225 7100 CONTINUE
226 CALL BUG(4,0)
227
228 7200 CALL NEWSTA(I,0,0,0,0)
229 BINFF=0
230 IF(HERE.EQ.BLOC) CALL RSPSUB(292,ODESC2(I))
231 RETURN
232
233
234
235 8000 IF(OCAN(FUSE).NE.BRICK) GO TO 8500
236 BR=OROOM(BRICK)
237 BC=OCAN(BRICK)
238 IF((BR.EQ.0).AND.(BC.NE.0)) BR=OROOM(BC)
239 IF(BR.EQ.0) BR=HERE
240 CALL NEWSTA(FUSE,0,0,0,0)
241 CALL NEWSTA(BRICK,0,0,0,0)
242 IF(BR.NE.HERE) GO TO 8100
243
244
245 RFLAG(HERE)=OR(RFLAG(HERE),RMUNG)
246 RDESC1(HERE)=114
247 CALL JIGSUP(150)
248 RETURN
249
250 8100 CALL RSPEAK(151)
251 MUNGRM=BR
252 CFLAG(CEVSAF)=.TRUE.
253 CTICK(CEVSAF)=5
254 IF(BR.NE.MSAFE) GO TO 8200
255 IF(BC.NE.SSLOT) RETURN
256 CALL NEWSTA(SSLOT,0,0,0,0)
257
258 OFLAG2(SAFE)=OR(OFLAG2(SAFE),OPENBT)
259 SAFEF=.TRUE.
260 RETURN
261
262 8200 DO 8250 I=1,OLNT
263
264
265 IF(QHERE(I,BR) .AND. ((AND(OFLAG1(I),TAKEBT)).NE.0))
266 & CALL NEWSTA(I,0,0,0,0)
267 8250 CONTINUE
268 IF(BR.NE.LROOM) RETURN
269 DO 8300 I=1,OLNT
270 IF(OCAN(I).EQ.TCASE) CALL NEWSTA(I,0,0,0,0)
271 8300 CONTINUE
272 RETURN
273
274 8500 IF(QHERE(FUSE,HERE).OR.(OADV(FUSE).EQ.WINNER))
275 & CALL RSPEAK(152)
276 CALL NEWSTA(FUSE,0,0,0,0)
277 RETURN
278
279
280
281
282
283
284 9000 RFLAG(LEDG4)=OR(RFLAG(LEDG4),RMUNG)
285 RDESC1(LEDG4)=109
286 IF(HERE.EQ.LEDG4) GO TO 9100
287 CALL RSPEAK(110)
288 RETURN
289
290 9100 IF(AVEHIC(WINNER).NE.0) GO TO 9200
291 CALL JIGSUP(111)
292 RETURN
293
294 9200 IF(BTIEF.NE.0) GO TO 9300
295 CALL RSPEAK(112)
296 RETURN
297
298 9300 BLOC=VLBOT
299 CALL NEWSTA(BALLO,0,0,0,0)
300 CALL NEWSTA(DBALL,0,BLOC,0,0)
301 IF(LASTIT.EQ.BALLO) LASTIT=DBALL
302 ODESC1(BTIEF)=1073
303 BTIEF=0
304 BINFF=0
305 CFLAG(CEVBAL)=.FALSE.
306 CFLAG(CEVBRN)=.FALSE.
307 CALL JIGSUP(113)
308 RETURN
309
310
311
312
313 10000 RFLAG(MUNGRM)=OR(RFLAG(MUNGRM),RMUNG)
314 RDESC1(MUNGRM)=114
315 IF(HERE.EQ.MUNGRM) GO TO 10100
316 CALL RSPEAK(115)
317 IF(MUNGRM.NE.MSAFE) RETURN
318 CFLAG(CEVLED)=.TRUE.
319 CTICK(CEVLED)=8
320 RETURN
321
322 10100 I=116
323
324 IF((AND(RFLAG(HERE),RHOUSE)).NE.0) I=117
325 CALL JIGSUP(I)
326 RETURN
327
328
329
330
331
332 11000 IF(QLEDGE(HERE)) GO TO 11100
333 CFLAG(CEVVLG)=.TRUE.
334 CTICK(CEVVLG)=1
335 RETURN
336
337 11100 CALL NEWSTA(GNOME,118,HERE,0,0)
338 RETURN
339
340
341
342 12000 IF(OROOM(GNOME).EQ.HERE) CALL RSPEAK(149)
343 CALL NEWSTA(GNOME,0,0,0,0)
344 RETURN
345
346
347
348 13000 IF(OCAN(WATER).EQ.BUCKE)
349 & CALL NEWSTA(WATER,0,0,0,0)
350 RETURN
351
352
353
354
355 14000 RFLAG(CAGER)=OR(RFLAG(CAGER),RMUNG)
356 RDESC1(CAGER)=147
357 WINNER=PLAYER
358 CALL JIGSUP(148)
359 RETURN
360
361
362
363 15000 ENDGMF=.TRUE.
364 CALL RSPEAK(119)
365 RETURN
366
367
368
369
370
371 16000 CFLAG(CEVFOR)=(HERE.EQ.MTREE).OR.
372 & ((HERE.GE.FORE1).AND.(HERE.LT.CLEAR))
373 IF(CFLAG(CEVFOR).AND.PROB(10,10)) CALL RSPEAK(635)
374 RETURN
375
376
377
378 17000 IF(HERE.EQ.BKVAU) CALL JIGSUP(636)
379 IF(ZGNOMF.OR.(HERE.NE.BKTWI)) RETURN
380 ZGNOMF=.TRUE.
381 CFLAG(CEVZGI)=.TRUE.
382 CTICK(CEVZGI)=5
383 RETURN
384
385
386
387 18000 IF(HERE.NE.BKTWI) RETURN
388 CFLAG(CEVZGO)=.TRUE.
389 CTICK(CEVZGO)=12
390 CALL NEWSTA(ZGNOM,637,BKTWI,0,0)
391 RETURN
392
393
394
395 19000 CALL NEWSTA(ZGNOM,0,0,0,0)
396 IF(HERE.EQ.BKTWI) CALL RSPEAK(638)
397 RETURN
398
399
400
401
402
403 20000 IF(SPELLF) GO TO 20200
404 IF(HERE.NE.CRYPT) RETURN
405 IF(.NOT.LIT(HERE)) GO TO 20100
406 CFLAG(CEVSTE)=.TRUE.
407 CTICK(CEVSTE)=3
408 RETURN
409
410 20100 CALL RSPEAK(727)
411 20200 DO 20300 I=1,OLNT
412 CALL NEWSTA(I,0,OROOM(I),OCAN(I),0)
413 20300 CONTINUE
414 CALL NEWSTA(LAMP,0,0,0,PLAYER)
415 CALL NEWSTA(SWORD,0,0,0,PLAYER)
416
417
418 OFLAG1(LAMP)=AND((OR(OFLAG1(LAMP),LITEBT)), COMPL(ONBT))
419
420 OFLAG2(LAMP)=OR(OFLAG2(LAMP),TCHBT)
421 CFLAG(CEVLNT)=.FALSE.
422 CTICK(CEVLNT)=350
423 ORLAMP=0
424
425 OFLAG2(SWORD)=OR(OFLAG2(SWORD),TCHBT)
426 SWDACT=.TRUE.
427 SWDSTA=0
428
429 THFACT=.FALSE.
430 ENDGMF=.TRUE.
431 CFLAG(CEVEGH)=.FALSE.
432 CFLAG(CEVMAT)=.FALSE.
433 CFLAG(CEVCND)=.FALSE.
434
435 CALL SCRUPD(RVAL(CRYPT))
436 RVAL(CRYPT)=0
437 F=MOVETO(TSTRS,WINNER)
438 F=RMDESC(3)
439 RETURN
440
441
442
443 21000 MRPSHF=.FALSE.
444 MROPNF=.FALSE.
445 IF(HERE.EQ.MRANT) CALL RSPEAK(728)
446 IF((HERE.EQ.INMIR).OR.(MRHERE(HERE).EQ.1))
447 & CALL RSPEAK(729)
448 RETURN
449
450
451
452
453
454 22000 IF(WDOPNF) CALL RSPEAK(730)
455 WDOPNF=.FALSE.
456 RETURN
457
458
459
460 23000 IF(AROOM(PLAYER).NE.FDOOR) RETURN
461 CALL RSPEAK(769)
462 CALL RSPEAK(770+QUESNO)
463 CFLAG(CEVINQ)=.TRUE.
464 CTICK(CEVINQ)=2
465 RETURN
466
467
468
469 24000 IF(AROOM(AMASTR).EQ.HERE) RETURN
470 IF((HERE.NE.CELL).AND.(HERE.NE.PCELL)) GO TO 24100
471 IF(FOLLWF) CALL RSPEAK(811)
472 FOLLWF=.FALSE.
473 RETURN
474
475 24100 FOLLWF=.TRUE.
476 I=812
477 DO 24200 J=XMIN,XMAX,XMIN
478 IF(FINDXT(J,AROOM(AMASTR)).AND.(XROOM1.EQ.HERE))
479 & I=813
480 24200 CONTINUE
481 CALL RSPEAK(I)
482 CALL NEWSTA(MASTER,0,HERE,0,0)
483 AROOM(AMASTR)=HERE
484 RETURN
485
486
487
488 25000 CALL NEWSTA(BROCH,948,0,MAILB,0)
489 BROC2F=.TRUE.
490 RETURN
491
492
493
494
495
496 26000 IF(HERE.NE.MCYCL.OR.MAGICF) GO TO 26500
497 IF(CYCLOF) RETURN
498 IF(IABS(RVCYC).LE.5) GO TO 26200
499 CFLAG(CEVCYC)=.FALSE.
500 CALL JIGSUP(188)
501 RETURN
502
503 26200 IF(RVCYC.LT.0) RVCYC=RVCYC-1
504 IF(RVCYC.GE.0) RVCYC=RVCYC+1
505 CALL RSPEAK(193+IABS(RVCYC))
506 RETURN
507
508 26500 CFLAG(CEVCYC)=.FALSE.
509 RETURN
510
511
512
513 27000 IF((HERE.LT.SLID1).OR.(HERE.GE.SLEDG)) RETURN
514 CALL RSPEAK(1034)
515 F=MOVETO(CELLA,WINNER)
516 F=RMDESC(3)
517 RETURN
518
519
520
521 28000 IF(.NOT.EXORCF.AND.(HERE.EQ.LLD1)) CALL RSPEAK(970)
522 EXORBF=.FALSE.
523 RETURN
524
525
526
527 29000 EXORCF=.FALSE.
528 GO TO 28000
529
530
531
532 30000 CALL NEWSTA(HBELL,0,0,0,0)
533 CALL NEWSTA(BELL,0,LLD1,0,0)
534 IF(LASTIT.EQ.HBELL) LASTIT=BELL
535 IF(HERE.EQ.LLD1) CALL RSPEAK(971)
536 RETURN
537
538
539
540
541
542
543
544 LITINT(OBJ,CTR,CEV,TICKS,TICKLN)
545 IMPLICIT INTEGER (A-Z)
546 %include dparam
547 INTEGER TICKS(TICKLN)
548
549 CTR=CTR+1
550 CTICK(CEV)=TICKS(CTR)
551 IF(CTICK(CEV).NE.0) GO TO 100
552
553 OFLAG1(OBJ)=AND(OFLAG1(OBJ), COMPL(LITEBT+FLAMBT+ONBT))
554 IF((OROOM(OBJ).EQ.HERE).OR.(OADV(OBJ).EQ.WINNER))
555 & CALL RSPSUB(293,ODESC2(OBJ))
556 RETURN
557
558 100 CFLAG(CEV)=.TRUE.
559 IF((OROOM(OBJ).EQ.HERE).OR.(OADV(OBJ).EQ.WINNER))
560 & CALL RSPEAK(TICKS(CTR+(TICKLN/2)))
561 RETURN
562
563
564
565
566
567
568
569 FIGHTD
570 IMPLICIT INTEGER (A-Z)
571 %include dparam
572 LOGICAL PROB,OAPPLI,F
573
574
575
576 DATA ROUT/1/
577
578
579
580 DO 2400 I=1,VLNT
581 VOPPS(I)=0
582 OBJ=VILLNS(I)
583 RA=OACTIO(OBJ)
584 IF(HERE.NE.OROOM(OBJ)) GO TO 2200
585 IF((OBJ.NE.THIEF).OR. .NOT.THFENF) GO TO 2010
586 THFENF=.FALSE.
587 GO TO 2400
588
589 2010 IF(OCAPAC(OBJ).GE.0) GO TO 2050
590 IF((VPROB(I).EQ.0).OR..NOT.PROB(VPROB(I),(100+VPROB(I))/2))
591 & GO TO 2025
592 OCAPAC(OBJ)=IABS(OCAPAC(OBJ))
593 VPROB(I)=0
594 IF(RA.EQ.0) GO TO 2400
595 PRSA=INXW
596 F=OAPPLI(RA,0)
597 GO TO 2400
598
599 2025 VPROB(I)=VPROB(I)+10
600 GO TO 2400
601
602
603 2050 IF((AND(OFLAG2(OBJ),FITEBT)).EQ.0) GO TO 2100
604 VOPPS(I)=OBJ
605 GO TO 2400
606
607 2100 IF(RA.EQ.0) GO TO 2400
608 PRSA=FRSTQW
609 IF(.NOT.OAPPLI(RA,0)) GO TO 2400
610
611 OFLAG2(OBJ)=OR(OFLAG2(OBJ),FITEBT)
612 VOPPS(I)=OBJ
613 PRSCON=0
614 GO TO 2400
615
616
617
618 2200 IF(((AND(OFLAG2(OBJ),FITEBT)).EQ.0).OR.(RA.EQ.0))
619 & GO TO 2300
620 PRSA=FIGHTW
621 F=OAPPLI(RA,0)
622 2300 IF(OBJ.EQ.THIEF) THFENF=.FALSE.
623
624 AFLAG(PLAYER)=AND(AFLAG(PLAYER), COMPL(ASTAG))
625
626 OFLAG2(OBJ)=AND(OFLAG2(OBJ), COMPL(STAGBT+FITEBT))
627 IF((OCAPAC(OBJ).GE.0).OR.(RA.EQ.0))
628 & GO TO 2400
629 PRSA=INXW
630 F=OAPPLI(RA,0)
631 OCAPAC(OBJ)=IABS(OCAPAC(OBJ))
632 2400 CONTINUE
633
634
635
636
637
638 OUT=0
639 2600 DO 2700 I=1,VLNT
640 J=VOPPS(I)
641 IF(J.EQ.0) GO TO 2700
642 PRSCON=0
643 RA=OACTIO(J)
644 IF(RA.EQ.0) GO TO 2650
645 PRSA=FIGHTW
646 IF(OAPPLI(RA,0)) GO TO 2700
647 2650 RES=BLOW(PLAYER,J,VMELEE(I),.FALSE.,OUT)
648 IF(RES.LT.0) RETURN
649 IF(RES.EQ.ROUT) OUT=2+RND(3)
650 2700 CONTINUE
651 OUT=OUT-1
652 IF(OUT.GT.0) GO TO 2600
653 RETURN
654
655
656
657
658
659
660
661 INTEGER BLOW(H,V,RMK,HFLG,OUT)
662 IMPLICIT INTEGER (A-Z)
663 %include dparam
664 LOGICAL HFLG,OAPPLI,PROB,F
665 INTEGER DEF1R(3),DEF2R(4),DEF3R(5)
666 INTEGER RVECTR(66),RSTATE(45)
667
668
669
670 DATA RMISS/0/,ROUT/1/,RKILL/2/,RXXX/3/
671 DATA RSER/4/,RSTAG/5/,RLOSE/6/,RHES/7/,RSIT/8/
672 DATA DEF1R/1,2,3/
673 DATA DEF2R/13,23,24,25/
674 DATA DEF3R/35,36,46,47,57/
675
676 DATA RVECTR/0,0,0,0,5,5,1,1,2,2,2,2,
677 & 0,0,0,0,0,5,5,3,3,1,
678 & 0,0,0,5,5,3,3,3,1,2,2,2,
679 & 0,0,0,0,0,5,5,3,3,4,4,
680 & 0,0,0,5,5,3,3,3,4,4,4,
681 & 0,5,5,3,3,3,3,4,4,4/
682 DATA RSTATE/5000,3005,3008,4011,3015,3018,1021,0,0,
683 & 5022,3027,3030,4033,3037,3040,1043,0,0,
684 & 4044,2048,4050,4054,5058,4063,4067,3071,1074,
685 & 4075,1079,4080,4084,4088,4092,4096,4100,1104,
686 & 4105,2109,4111,4115,4119,4123,4127,3131,3134/
687
688
689
690 RA=OACTIO(V)
691 DV=ODESC2(V)
692 BLOW=RMISS
693
694
695 IF(.NOT.HFLG) GO TO 1000
696
697
698
699 PBLOSE=10
700
701 OFLAG2(V)=OR(OFLAG2(V),FITEBT)
702
703 IF((AND(AFLAG(H),ASTAG)).EQ.0) GO TO 100
704 CALL RSPEAK(591)
705
706 AFLAG(H)=AND(AFLAG(H), COMPL(ASTAG))
707 RETURN
708
709 100 ATT=MAX0(1,FIGHTS(H,.TRUE.))
710 OA=ATT
711 DEF=VILSTR(V)
712 OD=DEF
713 DWEAP=0
714 DO 200 I=1,OLNT
715
716
717 IF((OCAN(I).EQ.V).AND.((AND(OFLAG2(I),WEAPBT)).NE.0))
718 & DWEAP=I
719 200 CONTINUE
720 IF(V.EQ.AOBJ(PLAYER)) GO TO 300
721 IF(DEF.NE.0) GO TO 2000
722 CALL RSPSUB(592,DV)
723 RETURN
724
725 300 CALL JIGSUP(593)
726 RETURN
727
728
729
730 1000 PRSCON=0
731 PBLOSE=50
732
733 AFLAG(H)=AND(AFLAG(H),COMPL(ASTAG))
734
735 IF((AND(OFLAG2(V),STAGBT)).EQ.0) GO TO 1200
736
737 OFLAG2(V)=AND(OFLAG2(V), COMPL(STAGBT))
738 CALL RSPSUB(594,DV)
739 RETURN
740
741 1200 ATT=VILSTR(V)
742 OA=ATT
743 DEF=FIGHTS(H,.TRUE.)
744 IF(DEF.LE.0) RETURN
745 OD=FIGHTS(H,.FALSE.)
746 DWEAP=IABS(FWIM(0,WEAPBT,0,0,H,.TRUE.))
747
748
749
750
751
752
753 2000 CONTINUE
754
755
756 IF(DEF.GT.0) GO TO 2100
757 RES=RKILL
758 IF(HFLG) CALL RSPSUB(595,DV)
759 GO TO 3000
760
761 2100 IF(DEF-2) 2200,2300,2400
762 2200 ATT=MIN0(ATT,3)
763 TBL=DEF1R(ATT)
764 GO TO 2500
765
766 2300 ATT=MIN0(ATT,4)
767 TBL=DEF2R(ATT)
768 GO TO 2500
769
770 2400 ATT=ATT-DEF
771 ATT=MIN0(2,MAX0(-2,ATT))+3
772 TBL=DEF3R(ATT)
773
774 2500 RES=RVECTR(TBL+RND(10))
775 IF(OUT.EQ.0) GO TO 2600
776 IF(RES.EQ.RSTAG) GO TO 2550
777 RES=RSIT
778 GO TO 2600
779 2550 RES=RHES
780 2600 IF((RES.EQ.RSTAG).AND.(DWEAP.NE.0).AND.PROB(25,PBLOSE))
781 & RES=RLOSE
782
783 MI=RSTATE(((RMK-1)*9)+RES+1)
784 IF(MI.EQ.0) GO TO 3000
785 I=(MOD(MI,1000)+RND(MI/1000))+MBASE+1
786 J=DV
787 IF(.NOT.HFLG .AND.(DWEAP.NE.0)) J=ODESC2(DWEAP)
788
789
790 CALL RSPSUB(I,J)
791
792
793
794
795
796 3000 GO TO (4000,3100,3200,3300,3400,3500,3600,4000,3200),RES+1
797
798
799 3100 IF(HFLG) DEF=-DEF
800 GO TO 4000
801
802 3200 DEF=0
803 GO TO 4000
804
805 3300 DEF=MAX0(0,DEF-1)
806 GO TO 4000
807
808 3400 DEF=MAX0(0,DEF-2)
809 GO TO 4000
810
811 3500 IF(HFLG) GO TO 3550
812
813 AFLAG(H)=OR(AFLAG(H),ASTAG)
814 GO TO 4000
815
816
817 3550 OFLAG2(V)=OR(OFLAG2(V),STAGBT)
818 GO TO 4000
819
820 3600 CALL NEWSTA(DWEAP,0,HERE,0,0)
821 DWEAP=0
822 IF(HFLG) GO TO 4000
823 DWEAP=IABS(FWIM(0,WEAPBT,0,0,H,.TRUE.))
824 IF(DWEAP.NE.0) CALL RSPSUB(605,ODESC2(DWEAP))
825
826
827
828 4000 BLOW=RES
829 IF(.NOT.HFLG) GO TO 4500
830 OCAPAC(V)=DEF
831 IF(DEF.NE.0) GO TO 4100
832
833 OFLAG2(V)=AND(OFLAG2(V), COMPL(FITEBT))
834 CALL RSPSUB(572,DV)
835 CALL NEWSTA(V,0,0,0,0)
836 IF(RA.EQ.0) RETURN
837 PRSA=DEADXW
838 F=OAPPLI(RA,0)
839 RETURN
840
841 4100 IF((RES.NE.ROUT).OR.(RA.EQ.0)) RETURN
842 PRSA=OUTXW
843 F=OAPPLI(RA,0)
844 RETURN
845
846 4500 ASTREN(H)=-10000
847 IF(DEF.NE.0) ASTREN(H)=DEF-OD
848 IF(DEF.GE.OD) GO TO 4600
849 CTICK(CEVCUR)=30
850 CFLAG(CEVCUR)=.TRUE.
851 4600 IF(FIGHTS(H,.TRUE.).GT.0) RETURN
852 ASTREN(H)=1-FIGHTS(H,.FALSE.)
853 CALL JIGSUP(596)
854 BLOW=-1
855 RETURN
856
857
858
859
860
861
862
863 SWORDD
864 IMPLICIT INTEGER (A-Z)
865 %include dparam
866 LOGICAL INFEST,FINDXT
867
868 IF(OADV(SWORD).NE.PLAYER) GO TO 500
869 NG=2
870 IF(INFEST(HERE)) GO TO 300
871 NG=1
872 DO 200 I=XMIN,XMAX,XMIN
873 IF(.NOT.FINDXT(I,HERE)) GO TO 200
874 GO TO (50,200,50,50),XTYPE
875 50 IF(INFEST(XROOM1)) GO TO 300
876 200 CONTINUE
877 NG=0
878
879 300 IF(NG.EQ.SWDSTA) RETURN
880 CALL RSPEAK(NG+495)
881 SWDSTA=NG
882 RETURN
883
884 500 SWDACT=.FALSE.
885 RETURN
886