1
2
3
4
5 PRINCO(OBJ,DESC,LDESCF)
6 IMPLICIT INTEGER (A-Z)
7 %include dparam
8 LOGICAL QEMPTY,LDESCF,MOREF,QSEEIN,QUAL
9
10
11
12
13
14 QSEEIN(X)=((AND(OFLAG1(X),TRANBT)).NE.0).OR.
15 & ((AND(OFLAG2(X),OPENBT)).NE.0)
16
17
18 QUAL(X,Y)=((AND(OFLAG1(X),VISIBT)).NE.0).AND.
19 & (OCAN(X).EQ.Y).AND.(X.NE.AOBJ(WINNER))
20
21 MOREF=.FALSE.
22 ALSO=0
23 IF(SUPERF.OR..NOT.LDESCF) GO TO 2000
24 DO 1000 I=1,OLNT
25 IF(.NOT.QUAL(I,OBJ)) GO TO 1000
26
27
28 IF((ODESCO(I).EQ.0).OR.
29 & ((AND(OFLAG2(I),TCHBT)).NE.0)) GO TO 700
30 CALL RSPEAK(ODESCO(I))
31 ALSO=1
32 IF(.NOT.QSEEIN(I).OR.QEMPTY(I)) GO TO 1000
33 CALL RSPSUB(573,ODESC2(I))
34 DO 500 J=1,OLNT
35 IF(QUAL(J,I)) CALL RSPSUB(502,ODESC2(J))
36 500 CONTINUE
37 GO TO 1000
38 700 MOREF=.TRUE.
39 1000 CONTINUE
40 IF(.NOT.MOREF) RETURN
41
42 2000 CALL RSPSUB(DESC+ALSO,ODESC2(OBJ))
43 DO 3000 I=1,OLNT
44 IF(.NOT.QUAL(I,OBJ)) GO TO 3000
45
46
47 IF((ALSO.NE.0).AND.(ODESCO(I).NE.0).AND.
48 & ((AND(OFLAG2(I),TCHBT)).EQ.0)) GO TO 3000
49 IF(.NOT.QSEEIN(I).OR.QEMPTY(I)) GO TO 2700
50 CALL RSPSUB(1050,ODESC2(I))
51 DO 2500 J=1,OLNT
52 IF(QUAL(J,I)) CALL RSPSUB(1051,ODESC2(J))
53 2500 CONTINUE
54 GO TO 3000
55 2700 CALL RSPSUB(502,ODESC2(I))
56 3000 CONTINUE
57 RETURN
58
59
60
61
62
63
64
65 LOGICAL MOVETO(NR,WHO)
66 IMPLICIT INTEGER (A-Z)
67 %include dparam
68 LOGICAL NLV,LHR,LNR
69
70 MOVETO=.FALSE.
71
72 LHR=(AND(RFLAG(HERE),RLAND)).NE.0
73
74 LNR=(AND(RFLAG(NR),RLAND)).NE.0
75 J=AVEHIC(WHO)
76
77 IF(J.NE.0) GO TO 100
78 IF(LNR) GO TO 500
79 CALL RSPEAK(427)
80 RETURN
81
82 100 BITS=0
83 IF(J.EQ.RBOAT) BITS=RWATER
84 IF(J.EQ.BALLO) BITS=RAIR
85 IF(J.EQ.BUCKE) BITS=RBUCK
86
87 NLV=(AND(RFLAG(NR),BITS)).EQ.0
88 IF((.NOT.LNR .AND.NLV) .OR.
89 & (LNR.AND.LHR.AND.NLV.AND.(BITS.NE.RLAND)))
90 & GO TO 800
91
92 500 MOVETO=.TRUE.
93
94 IF((AND(RFLAG(NR),RMUNG)).EQ.0) GO TO 600
95 CALL RSPEAK(RDESC1(NR))
96 RETURN
97
98 600 IF(WHO.NE.PLAYER) CALL NEWSTA(AOBJ(WHO),0,NR,0,0)
99 IF(J.NE.0) CALL NEWSTA(J,0,NR,0,0)
100 HERE=NR
101 AROOM(WHO)=HERE
102 CALL SCRUPD(RVAL(NR))
103 RVAL(NR)=0
104 RETURN
105
106 800 CALL RSPSUB(428,ODESC2(J))
107 RETURN
108
109
110
111
112
113
114
115 SCORE(FLG)
116 IMPLICIT INTEGER (A-Z)
117 %include dparam
118 LOGICAL FLG
119 INTEGER RANK(10),ERANK(5)
120
121
122
123 DATA RANK/20,19,18,16,12,8,4,2,1,0/
124 DATA ERANK/20,15,10,5,0/
125
126 AS=ASCORE(WINNER)
127 IF(ENDGMF) GO TO 60
128 IF(FLG) WRITE(OUTCH,100)
129 IF(.NOT.FLG) WRITE(OUTCH,110)
130 IF(MOVES.NE.1) WRITE(OUTCH,120) AS,MXSCOR,MOVES
131 IF(MOVES.EQ.1) WRITE(OUTCH,130) AS,MXSCOR,MOVES
132 IF(AS.LT.0) GO TO 50
133 DO 10 I=1,10
134 IF((AS*20/MXSCOR).GE.RANK(I)) GO TO 20
135 10 CONTINUE
136 I=10
137 20 CALL RSPEAK(484+I)
138 RETURN
139
140 50 CALL RSPEAK(886)
141 RETURN
142
143 60 IF(FLG) WRITE(OUTCH,140)
144 IF(.NOT.FLG) WRITE(OUTCH,150)
145 WRITE(OUTCH,120) EGSCOR,EGMXSC,MOVES
146 DO 70 I=1,5
147 IF((EGSCOR*20/EGMXSC).GE.ERANK(I)) GO TO 80
148 70 CONTINUE
149 I=5
150 80 CALL RSPEAK(786+I)
151 RETURN
152
153 100 FORMAT(' Your score would be',$)
154 110 FORMAT(' Your score is',$)
155 120 FORMAT('+',I4,' [total of',I4,' points], in',I5,' moves.')
156 130 FORMAT('+',I4,' [total of',I4,' points], in',I5,' move.')
157 140 FORMAT(' Your score in the endgame would be',$)
158 150 FORMAT(' Your score in the endgame is',$)
159
160
161
162
163
164
165
166 SCRUPD(N)
167 IMPLICIT INTEGER (A-Z)
168 %include dparam
169
170 IF(ENDGMF) GO TO 100
171 ASCORE(WINNER)=ASCORE(WINNER)+N
172 RWSCOR=RWSCOR+N
173 IF(ASCORE(WINNER).LT.(MXSCOR-(10*MIN0(1,DEATHS)))) RETURN
174 CFLAG(CEVEGH)=.TRUE.
175 CTICK(CEVEGH)=15
176 RETURN
177
178 100 EGSCOR=EGSCOR+N
179 RETURN
180
181
182
183
184
185
186
187 LOGICAL FINDXT(DIR,RM)
188 IMPLICIT INTEGER (A-Z)
189 %include dparam
190
191 FINDXT=.TRUE.
192 XI=REXIT(RM)
193 IF(XI.EQ.0) GO TO 1000
194
195 100 I=TRAVEL(XI)
196
197 XROOM1=AND(I,XRMASK)
198
199 XTYPE=AND(((AND(I,COMPL(XLFLAG)))/XFSHFT),XFMASK)+1
200 GO TO (110,120,130,130),XTYPE
201 CALL BUG(10,XTYPE)
202
203
204 130 XOBJ=AND(TRAVEL(XI+2),XRMASK)
205 XACTIO=TRAVEL(XI+2)/XASHFT
206 120 XSTRNG=TRAVEL(XI+1)
207 110 XI=XI+XELNT(XTYPE)
208
209 IF(AND(I,XDMASK).EQ.DIR) RETURN
210
211 IF(AND(I,XLFLAG).EQ.0) GO TO 100
212 1000 FINDXT=.FALSE.
213 RETURN
214
215