This repository has been archived by the owner on Oct 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
ballop.for
102 lines (101 loc) · 2.13 KB
/
ballop.for
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
C BALLOP- BALLOON FUNCTION
C
C COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142
C ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED
C WRITTEN BY R. M. SUPNIK
C
C DECLARATIONS
C
LOGICAL FUNCTION BALLOP(ARG)
IMPLICIT INTEGER (A-Z)
LOGICAL FINDXT,QEMPTY
include 'parser.h'
include 'gamestat.h'
include 'state.h'
include 'rooms.h'
include 'rflag.h'
include 'curxt.h'
include 'xpars.h'
include 'objects.h'
include 'oflags.h'
include 'oindex.h'
include 'clock.h'
include 'verbs.h'
include 'flags.h'
C BALLOP, PAGE 2
C
BALLOP=.TRUE.
C !ASSUME WINS.
IF(ARG.NE.2) GO TO 200
C !READOUT?
IF(PRSA.NE.LOOKW) GO TO 10
C !ONLY PROCESS LOOK.
IF(BINFF.NE.0) GO TO 50
C !INFLATED?
CALL RSPEAK(543)
C !NO.
GO TO 100
50 CALL RSPSUB(544,ODESC2(BINFF))
C !YES.
100 IF(BTIEF.NE.0) CALL RSPEAK(545)
C !HOOKED?
RETURN
C
200 IF(ARG.NE.1) GO TO 500
C !READIN?
IF(PRSA.NE.WALKW) GO TO 300
C !WALK?
IF(FINDXT(PRSO,HERE)) GO TO 250
C !VALID EXIT?
CALL RSPEAK(546)
C !NO, JOKE.
RETURN
C
250 IF(BTIEF.EQ.0) GO TO 275
C !TIED UP?
CALL RSPEAK(547)
C !YES, JOKE.
RETURN
C
275 IF(XTYPE.NE.XNORM) GO TO 10
C !NORMAL EXIT?
IF(IAND(RFLAG(XROOM1),RMUNG).EQ.0) BLOC=XROOM1
10 BALLOP=.FALSE.
RETURN
C
300 IF((PRSA.NE.TAKEW).OR.(PRSO.NE.BINFF)) GO TO 350
CALL RSPSUB(548,ODESC2(BINFF))
C !RECEP CONT TOO HOT.
RETURN
C
350 IF((PRSA.NE.PUTW).OR.(PRSI.NE.RECEP).OR.QEMPTY(RECEP))
& GO TO 10
CALL RSPEAK(549)
RETURN
C
500 IF((PRSA.NE.UNBOAW).OR.(IAND(RFLAG(HERE),RLAND).EQ.0))
& GO TO 600
IF(BINFF.NE.0) CTICK(CEVBAL)=3
C !HE GOT OUT, START BALLOON.
GO TO 10
C
600 IF((PRSA.NE.BURNW).OR.(OCAN(PRSO).NE.RECEP)) GO TO 700
CALL RSPSUB(550,ODESC2(PRSO))
C !LIGHT FIRE IN RECEP.
CTICK(CEVBRN)=OSIZE(PRSO)*20
OFLAG1(PRSO)=IOR(OFLAG1(PRSO),
& IAND((ONBT+FLAMBT+LITEBT), not(TAKEBT+READBT)))
IF(BINFF.NE.0) RETURN
IF(.NOT.BLABF) CALL NEWSTA(BLABE,0,0,BALLO,0)
BLABF=.TRUE.
BINFF=PRSO
CTICK(CEVBAL)=3
CALL RSPEAK(551)
RETURN
C
700 IF((PRSA.EQ.UNBOAW).AND.(BINFF.NE.0).AND.
& (IAND(RFLAG(HERE),RLAND).NE.0))
& CTICK(CEVBAL)=3
GO TO 10
C
END