home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1994 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1994.iso
/
compsrcs
/
games
/
vmsnet
/
funadv
/
part06
< prev
next >
Wrap
Internet Message Format
|
1992-03-07
|
48KB
Path: uunet!think.com!yale.edu!heifetz!emory!dragon.com!cts
From: cts@dragon.com
Newsgroups: vmsnet.sources.games
Subject: funadv Part 06/08
Message-ID: <1992Mar7.222233.829@dragon.com>
Date: 8 Mar 92 03:22:32 GMT
Organization: Computer Projects Unlimited
Lines: 1463
-+-+-+-+-+-+-+-+ START OF PART 6 -+-+-+-+-+-+-+-+
X* MESSAGE FOR OBJECT N. OTHERWISE, N SHOULD BE 000, 100, 200, ETC.,
V AND
X* THE MESSAGE SHOULD BE THE DESCRIPTION OF THE PRECEDING OBJECT WHEN
V ITS
X* PROP VALUE IS N/100. THE N/100 IS USED ONLY TO DISTINGUISH MULTIPL
VE
X* MESSAGES FROM MULTI-LINE MESSAGES; THE PROP INFO ACTUALLY REQUIRES
V ALL
X* ME SSAGES FOR AN OBJECT TO BE PRESENT AND CONSECUTIVE. PROPERTIES W
VHICH
X* PRODUCE NO MESSAGE SHOULD BE GIVEN THE MESSAGE '>$<'.`20
X*
X*
X* SECTION 6: ARBITRARY MESSAGES. SAME FORMAT AS SECTIONS 1, 2, AND 5,`2
V0
X* EXCEPTTHE NUMBERS BEAR NO RELATION TO ANYTHING (EXCEPT FOR SPECIAL`
V20
X* VERBS IN SECTION 4).
X*
X*
X* SECTION 7: ACTION DEFAULTS. EACH LINE CONTAINS AN 'ACTION-VERB' NUMBE
VR
X* AND THE INDEX (IN SECTION 6) OF THE DEFAULT MESSAGE FOR THE VERB.`20
X*
X*
X* SECTION 8: LIQUID ASSETS, ETC. EACH LINE CONTAINS A NUMBER (N) AND UP
V TO
X* 20 LOCATION NUMBERS. BIT N (WHERE 0 IS THE UNITS BIT) IS SET IN`20
X* COND(LOC) FOR EACH LOC GIVEN. THE COND BITS CURRENTLY ASSIGNED ARE
V: `20
X*
X* 0 LIGHT`20
X* 1 IF BIT 2 IS ON: ON FOR OIL, OFF FOR WATER`20
X* 2 LIQUID ASSET, SEE BIT 1`20
X* 3 PIRATE DOESN'T GO HERE UNLESS FOLLOWING PLAYER
X*
X* OTHER BITS ARE USED TO INDICATE AREAS OF INTEREST TO 'HINT' ROUTINE
VS:`20
X*
X* 4 TRYING TO GET INTO CAVE`20
X* 5 TRYING TO CATCH MONGOOS`20
X* 6 TRYING TO DEAL WITH SNAKE`20
X* 7 LOST IN MAZE
X* 8 PONDERING DARK ROOM`20
X* 9 AT WITT'S END`20
X*
X* COND(LOC) IS SET TO 2, OVERRIDING ALL OTHER BITS, IF LOC HAS FORCED
V`20
X* MOTION.`20
X*
X*
X* SECTION 9: CLASS MESSAGES. EACH LINE CONTAINS A NUMBER (N), A TAB, AN
VD A
X* MESSAGE DESCRIBING A CLASSIFICATION OF PLAYER. THE SCORING SECTION
V`20
X* SELECTS THE APPROPRIATE MESSAGE, WHERE EACH MESSAGE IS CONSIDERED T
VO
X* APPLY TO PLAYERS WHOSE SCORES ARE HIGHER THAN THE PREVIOUS N BUT NO
VT
X* HIGHER THAN THIS N. NOTE THAT THESE SCORES PROBABLY CHANGE WITH EV
VERY
X* MODIFICATION (AND PARTICULARLY EXPANSION) OF THE PROGRAM.`20
X* SECTION 10: HINTS. EACH LINE CONTAINS A HINT NUMBER (CORRESPONDING TO
V A`20
X* COND BIT, SEE SECTION 9), THE NUMBER OF TURNS HE MUST BE AT THE RIG
VHT`20
X* LOC(S) BEFORE TRIGGERING THE HINT, THE POINTS DEDUCTED FOR TAKING T
VHE`20
X* HINT, THE MESSAGE NUMBER (SECTION 6) OF THE QUESTION, AND THE MESSA
VGE`20
X* NUMBER OF THE HINT. THESE VALUES ARE STASHED IN THE 'HINTS' ARRAY.
V`20
X* HNTMAX IS SET TO THE MAX HINT NUMBER (<= HNTSIZ). NUMBERS 1-3 ARE
X* UNUSABLE SINCE COND BITS ARE OTHERWISE ASSIGNED, SO 2 IS USED TO
X* REMEMBER IF HE'S READ THE CLUE IN THE REPOSITORY, AND 3 IS USED TO
X* REMEMBER WHETHER HE ASKED FOR INSTRUCTIONS (GETS MORE TURNS, BUT LO
VSES
X* POINTS).
X*
X*
X* SECTION 0: END OF DATABASE.
X*`20
X
X
X WRITE(6,1000)`20
X 1000 FORMAT(/,' Initializing...')
X `20
X***CLEAR OUT THE VARIOUS TEXT-POINTER ARRAYS. ALL TEXT IS STORED IN ARRAY
X* LINES; EACH LINE IS PRECEDED BY A WORD POINTING TO THE NEXT POINTER (I.E.
X* THE WORD FOLLOWING THE END OF THE LINE). THE POINTER IS NEGATIVE IF THIS
V IS
X* FIRST LINE OF A MESSAGE. THE TEXT-POINTER ARRAYS CONTAIN INDICES OF`20
X* POINTER-WORDS IN LINES. STEXT(N) IS SHORT DESCRIPTION OF LOCATION N.
X* LTEXT(N) IS LONG DESCRIPTION. PTEXT(N) POINTS TO MESSAGE FOR PROP(N)=0.`
V20
X* SUCCESSIVE PROP MESSAGES ARE FOUND BY CHASING POINTERS. RTEXT CONTAINS
X* SECTION 6'S STUFF.CTEXT(N) POINTS TO A PLAYER-CLASS MESSAGE. MTEXT IS FO
VR`20
X* SECTION 12. WE ALSO CLEAR COND. SEE DESCRIPTION OF SECTION 9 FOR DETAIL
VS`20
X
X call image_dir (filedir)
X
X open (Unit=1, err=201,
X + file=filedir//'funadv.dat',
X + carriagecontrol='none', status='old')
X goto 300
X 201 WRITE(6,200)
X 200 FORMAT(' Data base not found.'/' See program maintainer.')
X 300 LIT=.FALSE.`20
X BLKLIN=.FALSE.
X `20
X TABSIZ=400
X SETUP=1`20
X LINUSE=1
X TRVS=1
X CLSSES=1
X `20
X***START NEW DATA SECTION. SECT IS THE SECTION NUMBER.`20
X `20
X 1002 READ(1,1003)SECT
X 1003 FORMAT(I8)
X OLDLOC=-1`20
X SECT1=SECT+1
X IF(SECT1.LT.1.OR.SECT1.GT.11) CALL BUG(9)`20
X GOTO(1100,1004,1004,1030,1040,1004,1004,1060,1070,1004,1080),SECT1
X* (0) (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
X `20
X* SECTIONS 1, 2, 5, 6, 9. READ MESSAGES AND SET UP POINTERS.
X `20
X 1004 READ(1,1005)LOC,TEXT,INCHECK
X 1005 FORMAT(1I8,80A,80A)
X IF(INCHECK.NE.' ') WRITE(6,310) LOC,TEXT
X 310 FORMAT(' *Line is over 80 char. long* CALL BUG(0)',/,I8,80A)`20
X IF(LOC.EQ.-1)GOTO 1002
X DO 1006 LOOP=1,80
X KK=81-LOOP`20
X IF (TEXT(KK:KK).NE.' ')GOTO 1007
X 1006 CONTINUE
X CALL BUG(1)`20
X 1007 Lines(LINUSE).STRING = text
X
X 1008 CONTINUE
X KK=LINUSE+KK
X LINES(LINUSE).COUNT=linuse+1
X IF(LOC.EQ.OLDLOC)GOTO 1020
X LINES(LINUSE).COUNT=-linuse-1
X IF(SECT.EQ.9)GOTO 1012
X IF(SECT.EQ.6)GOTO 1011
X IF(SECT.EQ.5)GOTO 1010
X IF(SECT.EQ.1)GOTO 1009
X `20
X STEXT(LOC)=LINUSE`20
X GOTO 1020`20
X `20
X 1009 LTEXT(LOC)=LINUSE`20
X GOTO 1020`20
X `20
X 1010 IF(LOC.GT.0.AND.LOC.LE.100)PTEXT(LOC)=LINUSE
X GOTO 1020`20
X `20
X 1011 IF(LOC.GT.RTXSIZ)CALL BUG(6)
X RTEXT(LOC)=LINUSE`20
X GOTO 1020`20
X `20
X 1012 CTEXT(CLSSES)=LINUSE
X CVAL(CLSSES)=LOC
X CLSSES=CLSSES+1`20
X `20
X 1020 LINUSE=LINUSE+1`20
X LINES(LINUSE).COUNT=-1
X OLDLOC=LOC
X IF(LINUSE+1.GT.LINSIZ)CALL BUG(2)
X GOTO 1004`20
X `20
X***THE STUFF FOR SECTION 3 IS ENCODED HERE. EACH 'FROM-LOCATION' GETS A
X* CONTIGUOUS SECTION OF THE 'TRAVEL' ARRAY. EACH ENTRY IN TRAVEL IS`20
X* NEWLOC*1000 + KEYWORD (FROM SECTION 4, MOTION VERBS), AND IS NEGATED IF
X* THIS IS THE LAST ENTRY FOR THIS LOCATION. KEY(N) IS THE INDEX IN TRAVEL`
V20
X* OF THE FIRST OPTION AT LOCATION N.`20
X `20
X 1030 READ(1,1031)LOC,NEWLOC,(TK(I),I=1,8)
X 1031 FORMAT(10I8)
X IF(LOC.EQ.-1)GOTO 1002
X IF(KEY(LOC).NE.0)GOTO 1033
X KEY(LOC)=TRVS`20
X GOTO 1035`20
X 1033 TRAVEL(TRVS-1)=-TRAVEL(TRVS-1)
X 1035 DO 1037 LOOP=1,8
X IF(TK(LOOP).EQ.0)GOTO 1039
X TRAVEL(TRVS)=NEWLOC*1000+TK(LOOP)`20
X TRVS=TRVS+1`20
X IF(TRVS.EQ.TRVSIZ)CALL BUG(3)`20
X 1037 CONTINUE
X 1039 TRAVEL(TRVS-1)=-TRAVEL(TRVS-1)
X GOTO 1030`20
X `20
X***HERE WE READ IN THE VOCABULARY. KTAB(N) IS THE WORD NUMBER, ATAB(N) IS
X* THE CORRESPONDING WORD. THE -1 AT THE END OF SECTION 4 IS LEFT IN KTAB
X* AS AN END-MARKER. THE WORDS ARE GIVEN A MINIMAL HASH TO MAKE READING THE
X* CORE-IMAGE HARDER.`20
X `20
X 1040 DO 1042 LOOP=1,TABSIZ`20
X TABNDX=LOOP`20
X READ(1,1041)KTAB(TABNDX),TEXT(1:10), J, K
X 1041 FORMAT(I8,1A10,2I8)`20
X OBJ=KTAB(LOOP)
X IF(OBJ.EQ.-1)GOTO 1002
X `20
X***READ IN THE INITIAL LOCATIONS FOR EACH OBJECT. ALSO THE IMMOVABILITY INF
VO.
X* PLAC CONTAINS INITIAL LOCATIONS OF OBJECTS. FIXD IS -1 FOR IMMOVABLE
X* OBJECTS (INCLUDING THE SNAKE), OR = SECOND LOC FOR TWO-PLACED OBJECTS.`20
X `20
X IF((OBJ/1000) .NE. 1) GOTO 1042`20
X OBJ=OBJ-1000
X PLAC(OBJ)=J`20
X FIXD(OBJ)=K`20
X 1042 ATAB(TABNDX) = text(1:10)
X CALL BUG(4)`20
X `20
X* READ DEFAULT MESSAGE NUMBERS FOR ACTION VERBS, STORE IN ACTSPK.
X `20
X 1060 READ(1,1031)VERB,J
X IF(VERB.EQ.-1)GOTO 1002`20
X ACTSPK(VERB)=J
X GOTO 1060`20
X `20
X* READ INFO ABOUT AVAILABLE LIQUIDS AND OTHER CONDITIONS, STORE IN COND.`20
X `20
X 1070 READ(1,1031)K,(TK(I),I=1,9)`20
X IF(K.EQ.-1)GOTO 1002
X DO 1071 LOOP=1,9
X LOC=TK(LOOP)
X IF(LOC.EQ.0)GOTO 1070`20
X IF(BITSET(LOC,K))CALL BUG(8)
X 1071 COND(LOC)=COND(LOC)+SHIFT(1,K)
X GOTO 1070`20
X `20
X* READ DATA FOR HINTS.`20
X `20
X 1080 HNTMAX=0
X 1081 READ(1,1031)K,(TK(I),I=1,8)`20
X IF(K.EQ.-1)GOTO 1002
X IF(K.EQ.0)GOTO 1081`20
X IF(K.LT.0.OR.K.GT.HNTSIZ)CALL BUG(7)
X DO 1083 LOOP=1,4
X 1083 HINTS(K,LOOP)=TK(LOOP)
X HNTMAX=MAX0(HNTMAX,K)`20
X GOTO 1081`20
X***`20
X* FINISH CONSTRUCTING INTERNAL DATA FORMAT`20
X*`20
X* IF SETUP=2 WE DON'T NEED TO DO THIS. IT'S ONLY NECESSARY IF WE HAVEN'T
X* DONE IT AT ALL OR IF THE PROGRAM HAS BEEN RUN SINCE THEN.
X 1100 close (1) `20
X IF(SETUP.EQ.2)GOTO 1
X IF(SETUP.NE.-1)GOTO 8305
X SETUP=3`20
X K=NULL
X GOTO 2900`20
X `20
X***HAVING READ IN THE DATABASE, CERTAIN THINGS ARE NOW CONSTRUCTED. PROPS A
VRE
X* SET TO ZERO. WE FINISH SETTING UP COND BY CHECKING FOR FORCED-MOTION TRA
VVEL`20
X* ENTRIES. THE PLAC AND FIXD ARRAYS ARE USED TO SET UP ATLOC(N) AS THE FIR
VST
X* OBJECT AT LOCATION N, AND LINK(OBJ) AS THE NEXT OBJECT AT THE SAME LOCATI
VON
X* AS OBJ. (OBJ>100 INDICATES THAT FIXED(OBJ-100)=LOC; LINK(OBJ) IS STILL T
VHE
X* CORRECT LINK TO USE.) ABB IS ZEROED; IT CONTROLS WHETHER THE ABBREVIATED
X* DESCRIPTION IS PRINTED. COUNTS MOD 5 UNLESS 'LOOK' IS USED.`20
X `20
X 8305 DO 1102 LOOP=1,LOCSIZ`20
X IF(LTEXT(LOOP).EQ.0.OR.KEY(LOOP).EQ.0)GOTO 1102`20
X K=KEY(LOOP)`20
X IF(MOD(IABS(TRAVEL(K)),1000).EQ.1)COND(LOOP)=2
X 1102 CONTINUE
X `20
X***SET UP THE ATLOC AND LINK ARRAYS AS DESCRIBED ABOVE. WE'LL USE THE DROP`
V20
X* SUBROUTINE, WHICH PREFACES NEW OBJECTS ON THE LISTS. SINCE WE WANT THING
VS`20
X* IN THE OTHER ORDER, WE'LL RUN THE LOOP BACKWARDS. IF THE OBJECT IS IN TW
VO`20
X* LOCS, WE DROP IT TWICE. THIS ALSO SETS UP 'PLACE' AND 'FIXED' AS COPIES
V OF
X* 'PLAC' AND 'FIXD'. ALSO, SINCE TWO-PLACED OBJECTS ARE TYPICALLY BEST
X* DESCRIBED LAST, WE'LL DROP THEM FIRST.`20
X `20
X DO 1106 LOOP=1,100
X K=101-LOOP
X IF(FIXD(K).LE.0)GOTO 1106`20
X CALL DROP(K+100,FIXD(K))
X CALL DROP(K,PLAC(K))
X 1106 CONTINUE
X `20
X DO 1107 LOOP=1,100
X K=101-LOOP
X FIXED(K)=FIXD(K)
X IF(PLAC(K).NE.0.AND.FIXD(K).LE.0)CALL DROP(K,PLAC(K))`20
X 1107 CONTINUE
X `20
X***CLEAR THE HINT STUFF. HINTLC(I) IS HOW LONG HE'S BEEN AT LOC WITH COND B
VIT
X* I. HINTED(I) IS TRUE IFF HINT I HAS BEEN USED.
X `20
X DO 1300 LOOP=1,HNTMAX`20
X HINTED(LOOP)=.FALSE.
X 1300 CONTINUE
X `20
X* DEFINE SOME HANDY MNEMONICS. THESE CORRESPOND TO OBJECT NUMBERS.
X `20
X KEYS= VOCAB('KEYS ',1)`20
X LAMP= VOCAB('LAMP ',1)`20
X GRATE= VOCAB('GRATE ',1)`20
X SACK= VOCAB('SACK ',1)`20
X ROD= VOCAB('ROD ',1)`20
X ROD2= ROD+1`20
X STEPS= VOCAB('STEPS ',1)`20
X MONGOOS=VOCAB('MONGOOSE ',1)`20
X DOOR= VOCAB('DOOR ',1)`20
X PILLOW= VOCAB('PILLOW ',1)`20
X SNAKE= VOCAB('SNAKE ',1)`20
X FISSUR= VOCAB('FISSURE ',1)`20
X TABLET= VOCAB('TABLET ',1)`20
X CLAM= VOCAB('CLAM ',1)`20
X OYSTER= VOCAB('OYSTER ',1)`20
X MAGZIN= VOCAB('MAGAZINES ',1)`20
X PIRATE= VOCAB('PIRATE ',1)`20
X DWARF= VOCAB('DWARF ',1)`20
X KNIFE= VOCAB('KNIFE ',1)`20
X FOOD= VOCAB('FOOD ',1)`20
X BOTTLE= VOCAB('BOTTLE ',1)`20
X WATER= VOCAB('WATER ',1)`20
X OIL= VOCAB('OIL ',1)`20
X PLANT= VOCAB('PLANT ',1)`20
X PLANT2= PLANT+1`20
X AXE= VOCAB('AXE ',1)`20
X MIRROR= VOCAB('MIRROR ',1)`20
X DRAGON= VOCAB('DRAGON ',1)`20
X CHASM= VOCAB('CHASM ',1)`20
X TROLL= VOCAB('TROLL ',1)`20
X TROLL2= TROLL+1`20
X BEAR= VOCAB('BEAR ',1)`20
X MESSAG= VOCAB('MESSAGE ',1)`20
X VEND= VOCAB('MACHINE ',1)`20
X BATTER= VOCAB('BATTERIES ',1)`20
X RUNES= VOCAB('RUNES ',1)`20
X ROPE= VOCAB('ROPE ',1)`20
X COAL= VOCAB('COAL ',1)`20
X BOOK= VOCAB('BOOK ',1)`20
X FOUNTN= VOCAB('FOUNTAIN ',1)`20
X POTION= VOCAB('POTION ',1)`20
X SWITCH= VOCAB('SWITCH ',1)`20
X SHIT= VOCAB('SHIT ',1)`20
X BOAT= VOCAB('BOAT ',1)`20
X TRAP= VOCAB('TRAP ',1)`20
X chair= vocab('CHAIR ',1)
X `20
X* OBJECTS FROM TRSURE THROUGH WHATEVER ARE TREASURES. HERE ARE A FEW.`20
X `20
X NUGGET= VOCAB('GOLD ',1)`20
X COINS= VOCAB('COINS ',1)`20
X CHEST= VOCAB('CHEST ',1)`20
X EGGS= VOCAB('EGGS ',1)`20
X TRIDNT= VOCAB('TRIDENT ',1)`20
X VASE= VOCAB('VASE ',1)`20
X EMRALD= VOCAB('EMERALD ',1)`20
X PYRAM= VOCAB('PYRAMID ',1)`20
X PEARL= VOCAB('PEARL ',1)`20
X RUG= VOCAB('RUG ',1)`20
X CHAIN= VOCAB('CHAIN ',1)`20
X SPICES= VOCAB('SPICES ',1)`20
X MAIL= VOCAB('MAIL ',1)`20
X LISTING=VOCAB('LISTINGS ',1)`20
X RING= VOCAB('RING ',1)`20
X `20
X* THESE ARE MOTION-VERB NUMBERS.`20
X `20
X BACK= VOCAB('BACK ',0)`20
X LOOK= VOCAB('LOOK ',0)`20
X CAVE= VOCAB('CAVE ',0)`20
X NULL= VOCAB('NULL ',0)`20
X ENTRNC= VOCAB('ENTRANCE ',0)`20
X DPRSSN= VOCAB('DEPRE ',0)`20
X GO2= VOCAB('GOTO ',0)`20
X SIT= VOCAB('SIT ',0)`20
X `20
X* AND SOME ACTION VERBS.`20
X `20
X SAY= VOCAB('SAY ',2)`20
X LOCK= VOCAB('LOCK ',2)`20
X THROW= VOCAB('THROW ',2)`20
X FIND= VOCAB('FIND ',2)`20
X INVENT= VOCAB('INVEN ',2)`20
X SUSPND= VOCAB('SUSPE ',2)`20
X ON= VOCAB('ON ',2)`20
X OFF= VOCAB('OFF ',2)`20
X `20
X***TREASURES, AS NOTED EARLIER, ARE OBJECTS TRSURE THROUGH MAXTRS (CURRENTLY
V 79).`20
X* THEIR PROPS ARE INITIALLY -1, AND ARE SET TO 0 THE FIRST TIME THEY ARE`20
X* DESCRIBED. TALLY KEEPS TRACK OF HOW MANY ARE NOT YET FOUND, SO WE KNOW
X* WHEN TO CLOSE THE CAVE. TALLY2 COUNTS HOW MANY CAN NEVER BE FOUND (E.G.
V IF
X* LOST MONGOOS OR BRIDGE).`20
X `20
X TRSURE=NUGGET`20
X MAXTRS=RING`20
X TALLY=0`20
X TALLY2=0
X DO 1200 LOOP=TRSURE,MAXTRS
X IF(PTEXT(LOOP).NE.0)PROP(LOOP)=-1`20
X TALLY=TALLY-PROP(LOOP)
X 1200 CONTINUE
X `20
X***PUT THE MONGOOSE IN THE SACK.
X `20
X CALL CARRY(MONGOOS,PLAC(MONGOOS))`20
X PROP(MONGOOS)=1`20
X PROP(SACK)=1
X CALL DROP(MONGOOS,PLAC(SACK))`20
X `20
X***HIDE THE RING.`20
X `20
X RINGLOC=PLAC(RING)
X CALL MOVE(RING,0)`20
X PLAC(RING)=0
X `20
X***INITIALIZE THE DWARVES. DLOC IS LOC OF DWARVES, HARD-WIRED IN. ODLOC IS
X* PRIOR LOC OF EACH DWARF, INITIALLY GARBAGE. DALTLC IS ALTERNATE INITIAL
V LOC`20
X* FOR DWARF, IN CASE ONE OF THEM STARTS OUT ON TOP OF THE ADVENTURER. (NO
V TWO`20
X* OF THE 7 INITIAL LOCS ARE ADJACENT.) DSEEN IS TRUE IF DWARF HAS SEEN HIM
V.`20
X* DFLAG CONTROLS THE LEVEL OF ACTIVATION OF ALL THIS: `20
X* 0 NO DWARF STUFF YET (WAIT UNTIL REACHES HALL OF MISTS)`20
X* 1 REACHED HALL OF MISTS, BUT HASN'T MET FIRST DWARF`20
X* 2 MET FIRST DWARF, OTHERS START MOVING, NO KNIVES THROWN YET
X* 3 A KNIFE HAS BEEN THROWN (FIRST SET ALWAYS MISSES)`20
X* 3+ DWARVES ARE MAD (INCREASES THEIR ACCURACY)
X* EIGHTH DWARF IS SPECIAL (THE PIRATE). HE ALWAYS STARTS AT HIS CHEST'S`20
X* EVENTUAL LOCATION INSIDE THE MAZE. THIS LOC IS SAVED IN CHLOC FOR REF.
X* THE DEAD END IN THE OTHER MAZE HAS ITS LOC STORED IN CHLOC2.`20
X `20
X CHLOC=PLAC(CHEST)`20
X CALL MOVE(CHEST,0)
X PLAC(CHEST)=0`20
X CHLOC2=PLAC(VEND)`20
X DO 1700 LOOP=1,8
X 1700 DSEEN(LOOP)=.FALSE.`20
X DFLAG=0`20
X MISTS = 24
X DLOC(1)=MISTS`20
X DLOC(2)=31
X DLOC(3)=42
X DLOC(4)=50
X DLOC(5)=53
X DLOC(6)=65
X DLOC(7)=113`20
X DLOC(8)=CHLOC`20
X DALTLC=97`20
X `20
X***OTHER RANDOM FLAGS AND COUNTERS, AS FOLLOWS:`20
X* TURNS TALLIES HOW MANY COMMANDS HE'S GIVEN (IGNORES YES/NO)`20
X* LIMIT LIFETIME OF LAMP (NOT SET HERE)`20
X* IWEST HOW MANY TIMES HE'S SAID 'WEST' INSTEAD OF 'W'
X* KNFLOC 0 IF NO KNIFE HERE, LOC IF KNIFE HERE, -1 AFTER CAVEAT
X* DETAIL HOW OFTEN WE'VE SAID 'NOT ALLOWED TO GIVE MORE DETAIL'
X* ABBNUM HOW OFTEN WE SHOULD PRINT NON-ABBREVIATED DESCRIPTIONS
X* MAXDIE NUMBER OF REINCARNATION MESSAGES AVAILABLE (UP TO 5)
X* NUMDIE NUMBER OF TIMES KILLED SO FAR`20
X* HOLDNG NUMBER OF OBJECTS BEING CARRIED`20
X* DKILL NUMBER OF DWARVES KILLED (UNUSED IN SCORING, NEEDED FOR MSG)
X* FOOBAR CURRENT PROGRESS IN SAYING 'FEE FIE FOE FOO'.`20
X* BONUS USED TO DETERMINE AMOUNT OF BONUS IF HE REACHES CLOSING`20
X* CLOCK1 NUMBER OF TURNS FROM FINDING LAST TREASURE TILL CLOSING`20
X* CLOCK2 NUMBER OF TURNS FROM FIRST WARNING TILL BLINDING FLASH
X*`20
X* WZDARK SAYS WHETHER THE LOC HE'S LEAVING WAS DARK
X* LMWARN SAYS WHETHER HE'S BEEN WARNED ABOUT LAMP GOING DIM
X* CLOSNG SAYS WHETHER ITS CLOSING TIME YET`20
X* PANIC SAYS WHETHER HE'S FOUND OUT HE'S TRAPPED IN THE CAVE`20
X* CLOSED SAYS WHETHER WE'RE ALL THE WAY CLOSED`20
X* GAVEUP SAYS WHETHER HE EXITED VIA 'QUIT'`20
X* SCORNG INDICATES TO THE SCORE ROUTINE WHETHER WE'RE DOING A 'SCORE' COMMA
VND
X* BFULL INDICATES WEITHER HIS BLADDER IS FULL.`20
X* LOOSE TELLS IF THE MONGOOSE IS LOOSE.
X `20
X TURNS=0`20
X IWEST=0`20
X KNFLOC=0
X DETAIL=0
X ABBNUM=5
X WCOUNT=0
X MAXDIE=10`20
X NUMDIE=0
X HOLDNG=0
X HLDMAX=7
X DKILL=0`20
X FOOBAR=0
X BONUS=0`20
X CLOCK1=40`20
X CLOCK2=50`20
X SAVED=0`20
X WAITNG=9999999
X OOPS=9999999
X LMWARN=.FALSE.
X CLOSNG=.FALSE.
X PANIC=.FALSE.`20
X CLOSED=.FALSE.
X GAVEUP=.FALSE.
X SCORNG=.FALSE.
X BFULL=.FALSE.`20
X LOOSE=.FALSE.`20
X ROW=.FALSE.`20
X YESCALL=.FALSE.`20
X `20
X***IF SETUP=1, REPORT ON AMOUNT OF ARRAYS ACTUALLY USED, TO PERMIT REDUCTION
VS.
X `20
X IF(SETUP.NE.1)GOTO 19990
X SETUP=2`20
X `20
X DO 1998 LOOP=1,LOCSIZ`20
X KK=LOCSIZ+1-LOOP
X IF(LTEXT(KK).NE.0)GOTO 1997`20
X 1998 CONTINUE
X `20
X OBJ=0`20
X 1997 DO 1996 LOOP=1,100
X 1996 IF(PTEXT(LOOP).NE.0)OBJ=OBJ+1`20
X `20
X DO 1995 LOOP=1,TABNDX`20
X 1995 IF(KTAB(LOOP)/1000.EQ.2)VERB=KTAB(LOOP)-2000
X `20
X DO 1994 LOOP=1,RTXSIZ`20
X J=RTXSIZ+1-LOOP`20
X IF(RTEXT(J).NE.0)GOTO 1991
X 1994 CONTINUE
X `20
X 1991 K=100`20
X WRITE(6,1999)LINUSE,LINSIZ,TRVS,TRVSIZ,TABNDX,TABSIZ,KK`20
X $,LOCSIZ,OBJ,K,VERB,VRBSIZ,J,RTXSIZ,CLSSES,CLSMAX
X $,HNTMAX,HNTSIZ
X 1999 FORMAT (' Table space used:',/
X $' ',I6,' OF ',I6,' Lines of messages',/`20
X $' ',I6,' OF ',I6,' Travel options',/
X $' ',I6,' OF ',I6,' Vocabulary words',/
X $' ',I6,' OF ',I6,' Locations',/`20
X $' ',I6,' OF ',I6,' Objects',/`20
X $' ',I6,' OF ',I6,' Action verbs',/
X $' ',I6,' OF ',I6,' Rtext messages',/
X $' ',I6,' OF ',I6,' Class messages',/
X $' ',I6,' OF ',I6,' Hints')
X `20
X***FINALLY, SINCE WE'RE CLEARLY SETTING THINGS UP FOR THE FIRST TIME...`20
X `20
X19990 CONTINUE
X `20
X**
X* MAKE SURE HE DOESN'T TERMINATE ACCIDENTALLY.`20
X*`20
X WRITE(6,19991)
X19991 FORMAT(' Initialization completed.')
X `20
X***START-UP`20
X*`20
X 1 seed = ifix (secnds (0.0))
X!CALL RANSET(SECOND(I))
X I=random(1)
X WIZKID=WIZARD(0)
X IF(.NOT.WIZKID) HINTED(3)=YES(65,1,0,WCOUNT)
X NEWLOC=1
X SETUP=3`20
X LIMIT=400`20
X IF(HINTED(3))LIMIT=1000`20
X `20
X***CAN'T LEAVE CAVE ONCE IT'S CLOSING (EXCEPT BY MAIN OFFICE).
X `20
X 2 IF(NEWLOC.GE.13.OR.NEWLOC.EQ.0.OR..NOT.CLOSNG)GOTO 71`20
X CALL RSPEAK(130)
X NEWLOC=LOC
X IF(.NOT.PANIC)CLOCK2=15`20
X PANIC=.TRUE.
X `20
X*** *******************
X* ***** DWARVES *****
X* *******************
X*`20
X* SEE IF A DWARF HAS SEEN HIM AND HAS COME FROM WHERE HE WANTS TO GO. IF S
VO,
X* THE DWARF'S BLOCKING HIS WAY. IF COMING FROM PLACE FORBIDDEN TO PIRATE
X* (DWARVES ROOTED IN PLACE) LET HIM GET OUT (AND ATTACKED).
X `20
X 71 IF(NEWLOC.EQ.LOC.OR.FORCED(LOC).OR.BITSET(LOC,3))GOTO 74
X DO 73 LOOP=1,7
X IF(ODLOC(LOOP).NE.NEWLOC.OR..NOT.DSEEN(LOOP))GOTO 73
X NEWLOC=LOC
X CALL RSPEAK(2)
X GOTO 74`20
X 73 CONTINUE
X 74 LOC=NEWLOC
X `20
X***DWARF STUFF. SEE EARLIER COMMENTS FOR DESCRIPTION OF VARIABLES. REMEMBE
VR`20
X* EIGHTH DWARF IS PIRATE AND IS THUS VERY DIFFERENT EXCEPT FOR MOTION RUN.`
V20
X*`20
X* FIRST OFF, DON'T LET THE DWARVES FOLLOW HIM INTO A PIT OR A WALL. ACTIVA
VTE
X* THE WHOLE MESS THE FIRST TIME HE GETS AS FAR AS THE HALL OF MISTS.`20
X* IF NEWLOC IS FORBIDDEN TO PIRATE (IN PARTICULAR, IF IT'S BEYOND THE TROLL
X* BRIDGE), BYPASS DWARF STUFF. THAT WAY PIRATE CAN'T STEAL RETURN TOLL AND
X* DWARVES CAN'T MEET THE BEAR. ALSO MEANS DWARVES WON'T FOLLOW HIM INTO DE
VAD
X* END IN MAZE, BUT C'EST LA VIE. THEY'LL WAIT FOR HIM OUTSIDE THE DEAD END
V.`20
X `20
X IF(LOC.EQ.0.OR.FORCED(LOC).OR.BITSET(NEWLOC,3))GOTO 2000
X IF(DFLAG.NE.0)GOTO 6000`20
X IF(LOC.GE.MISTS)DFLAG=1`20
X GOTO 2000`20
X `20
X***WHEN WE ENCOUNTER THE FIRST DWARF, WE KILL 0, 1, OR 2 OF THE 5 DWARVES. I
VF`20
X* ANY OF THE SURVIVORS IS AT LOC, REPLACE HIM WITH THE ALTERNATE.
X `20
X 6000 IF(DFLAG.NE.1)GOTO 6010`20
X IF(LOC.LT.MISTS.OR.PCT(95))GOTO 2000
X DFLAG=2`20
X DO 6001 LOOP=1,2
X J=1+random(5)
X `20
X* IF SAVED NOT = -1, HE BYPASSED THE 'START' CALL.`20
X `20
X IF(PCT(50).AND.SAVED.EQ.-1)DLOC(J)=0
X 6001 CONTINUE
X DO 6002 LOOP=1,7
X IF(DLOC(LOOP).EQ.LOC)DLOC(LOOP)=DALTLC
X 6002 ODLOC(LOOP)=DLOC(LOOP)
X CALL RSPEAK(3)
X CALL DROP(AXE,LOC)
X GOTO 2000`20
X `20
X***THINGS ARE IN FULL SWING. MOVE EACH DWARF AT RANDOM, EXCEPT IF HE'S BEEN
V SEEN`20
X* HE STICKS WITH US. DWARVES NEVER GO TO LOCS <MISTS. IF WANDERING AT RAN
VDOM`20
X* THEY DON'T BACK UP UNLESS THERE'S NO ALTERNATIVE. IF THEY DON'T HAVE TO`
V20
X* MOVE, THEY ATTACK. AND, OF COURSE, DEAD DWARVES DON'T DO MUCH OF ANYTHIN
VG.
X `20
X 6010 DTOTAL=0
X ATTACK=0
X STICK=0`20
X DO 6030 LOOP=1,8
X IF(DLOC(LOOP).EQ.0)GOTO 6030
X J=1`20
X KK=DLOC(LOOP)`20
X KK=KEY(KK)
X IF(KK.EQ.0)GOTO 6016
X 6012 NEWLOC=MOD(IABS(TRAVEL(KK))/1000,1000)
X IF(NEWLOC.GT.300.OR.NEWLOC.LT.MISTS.OR.NEWLOC.EQ.ODLOC(LOOP)
X $.OR.(J.GT.1.AND.NEWLOC.EQ.TK(J-1)).OR.J.GE.20`20
X $.OR.NEWLOC.EQ.DLOC(LOOP).OR.FORCED(NEWLOC)
X $.OR.(LOOP.EQ.8.AND.BITSET(NEWLOC,3))
X $.OR.IABS(TRAVEL(KK))/1000000.EQ.100)GOTO 6014`20
X TK(J)=NEWLOC
X J=J+1`20
X 6014 KK=KK+1`20
X IF(TRAVEL(KK-1).GE.0)GOTO 6012
X 6016 TK(J)=ODLOC(LOOP)`20
X IF(J.GE.2)J=J-1`20
X J=1+random(J)
X ODLOC(LOOP)=DLOC(LOOP)
X DLOC(LOOP)=TK(J)
X DSEEN(LOOP)=(DSEEN(LOOP).AND.LOC.GE.MISTS)
X $.OR.(DLOC(LOOP).EQ.LOC.OR.ODLOC(LOOP).EQ.LOC)`20
X IF(.NOT.DSEEN(LOOP))GOTO 6030`20
X DLOC(LOOP)=LOC
X IF(LOOP.NE.8)GOTO 6027
X `20
X***THE PIRATE'S SPOTTED HIM. HE LEAVES HIM ALONE ONCE WE'VE FOUND CHEST.`20
X* K COUNTS IF A TREASURE IS HERE. IF NOT, AND TALLY=TALLY2 PLUS ONE FOR`20
X* AN UNSEEN CHEST, LET THE PIRATE BE SPOTTED.
X `20
X IF(LOC.EQ.CHLOC.OR.PROP(CHEST).GE.0)GOTO 6030`20
X K=0`20
X DO 6020 LOOP2=TRSURE,MAXTRS`20
X `20
X***PIRATE WON'T TAKE PYRAMID FROM PLOVER ROOM OR DARK ROOM (TOO EASY!).`20
X `20
X IF(LOOP2.EQ.PYRAM.AND.(LOC.EQ.PLAC(PYRAM)`20
X $.OR.LOC.EQ.PLAC(EMRALD)))GOTO 6020
X IF (LOOP2.EQ.RING.OR.LOOP2.EQ.MAIL) GOTO 6020`20
X IF(TOTING(LOOP2))GOTO 6022
X 6020 IF(HERE(LOOP2))K=1
X IF(TALLY.EQ.TALLY2+1.AND.K.EQ.0.AND.PLACE(CHEST).EQ.0`20
X $.AND.HERE(LAMP).AND.PROP(LAMP).EQ.1)GOTO 6025`20
X IF(ODLOC(8).NE.DLOC(8).AND.PCT(20))CALL RSPEAK(127)`20
X GOTO 6030`20
X `20
X 6022 CALL RSPEAK(128)
X `20
X***DON'T STEAL CHEST BACK FROM TROLL!`20
X `20
X IF(PLACE(MESSAG).EQ.0)CALL MOVE(CHEST,CHLOC)
X CALL MOVE(MESSAG,CHLOC2)
X DO 6023 LOOP2=TRSURE,MAXTRS`20
X IF(LOOP2.EQ.PYRAM.AND.(LOC.EQ.PLAC(PYRAM)`20
X $.OR.LOC.EQ.PLAC(EMRALD)))GOTO 6023
X IF (LOOP2.EQ.RING.OR.LOOP2.EQ.MAIL) GOTO 6023`20
X IF(AT(LOOP2).AND.FIXED(LOOP2).EQ.0)CALL CARRY(LOOP2,LOC)
X IF(TOTING(LOOP2))CALL DROP(LOOP2,CHLOC)`20
X 6023 CONTINUE
X 6024 DLOC(8)=CHLOC`20
X ODLOC(8)=CHLOC
X DSEEN(8)=.FALSE.
X GOTO 6030`20
X `20
X 6025 CALL RSPEAK(186)
X CALL MOVE(CHEST,CHLOC)
X CALL MOVE(MESSAG,CHLOC2)
X GOTO 6024`20
X `20
X***THIS THREATENING LITTLE DWARF IS IN THE ROOM WITH HIM!`20
X `20
X 6027 DTOTAL=DTOTAL+1`20
X IF(ODLOC(LOOP).NE.DLOC(LOOP))GOTO 6030
X ATTACK=ATTACK+1`20
X IF(KNFLOC.GE.0)KNFLOC=LOC`20
X `20
X***IF A DWARF GETS HIM, THE DWARF RUNS AWAY.
X `20
X IF(random(1000).GE.95*(DFLAG-2)) GOTO 6030`20
X STICK=STICK+1`20
X DLOC(LOOP)=random(8)+MISTS`20
X IF(WIZKID) DLOC(LOOP)=0`20
X 6030 CONTINUE
X `20
X***NOW WE KNOW WHAT'S HAPPENING. LET'S TELL THE POOR SUCKER ABOUT IT.
X `20
X IF(DTOTAL.EQ.0)GOTO 2000
X IF(DTOTAL.EQ.1)GOTO 75
X WRITE(6,67)DTOTAL`20
X 67 FORMAT(/,' There are ',I1,' threatening little dwarves in the'
X $,' room with you.')`20
X GOTO 77`20
X 75 CALL RSPEAK(4)
X 77 IF(ATTACK.EQ.0)GOTO 2000
X IF(DFLAG.EQ.2)DFLAG=3`20
X `20
X***IF SAVED NOT = -1, HE BYPASSED THE 'START' CALL. DWARVES GET *VERY* MAD.
X `20
X IF(SAVED.NE.-1)DFLAG=20`20
X IF(ATTACK.EQ.1)GOTO 79
X WRITE(6,78)ATTACK`20
X 78 FORMAT(/,' ',I1,' of them throw knives at you!')
X K=6`20
X 82 IF (WIZKID) GOTO 88`20
X IF(WEARING(1).OR.WEARING(2)) STICK=0
X IF(STICK.GT.1)GOTO 83`20
X CALL RSPEAK(K+STICK)
X IF(STICK.EQ.0)GOTO 2000`20
X GOTO 84`20
X 83 WRITE(6,68)STICK
X 68 FORMAT(/,' ',I1,' of them get you!')
X 84 OLDLC2=LOC
X GOTO 99`20
X `20
X 88 IF(STICK .NE. 0) WRITE(6,89) STICK
X 89 FORMAT(/' ',I2,' of the dwarves just died for attacking',
X $' a wizard!')
X GOTO 2000`20
X `20
X 79 CALL RSPEAK(5)
X K=52
X GOTO 82`20
X*** *******************
X* ***** REPEAT ******
X* *******************
X*`20
X* DESCRIBE THE CURRENT LOCATION AND (MAYBE) GET NEXT COMMAND.
X*`20
X* PRINT TEXT FOR CURRENT LOC.
X `20
X 2000 IF(LOC.EQ.0)GOTO 99`20
X IF(ROW) CALL MOVE(BOAT,LOC)`20
X ROW=.FALSE.`20
X KK=STEXT(LOC)`20
X IF(MOD(ABB(LOC),ABBNUM).EQ.0.OR.KK.EQ.0)KK=LTEXT(LOC)`20
X IF(FORCED(LOC).OR..NOT.DARK(0))GOTO 2001
X IF(WZDARK.AND.PCT(35))GOTO 90`20
X KK=RTEXT(16)
X 2001 IF(TOTING(BEAR))CALL RSPEAK(141)
X CALL SPEAK(KK)
X K=1`20
X IF(FORCED(LOC))GOTO 3000
X IF(LOC.EQ.42.AND.DARK(0).AND..NOT.CLOSNG)CALL RSPEAK(8)`20
X `20
X***PRINT OUT DESCRIPTIONS OF OBJECTS AT THIS LOCATION. IF NOT CLOSING AND
X* PROPERTY VALUE IS NEGATIVE, TALLY OFF ANOTHER TREASURE. RUG IS SPECIAL
X* CASE; ONCE SEEN, ITS PROP IS 1 (DRAGON ON IT) TILL DRAGON IS KILLED.`20
X* SIMILARLY FOR CHAIN; PROP IS INITIALLY 1 (LOCKED TO BEAR). THESE HACKS
X* ARE BECAUSE PROP=0 IS NEEDED TO GET FULL SCORE.
X `20
X IF(DARK(0))GOTO 2012
X ABB(LOC)=ABB(LOC)+1`20
X I=ATLOC(LOC)
X 2004 IF(I.EQ.0)GOTO 2012`20
X OBJ=I`20
X IF(OBJ.GT.100)OBJ=OBJ-100`20
X IF(OBJ.EQ.STEPS.AND.TOTING(NUGGET))GOTO 2008
X IF(PROP(OBJ).GE.0)GOTO 2006`20
X IF(CLOSED)GOTO 2008`20
X PROP(OBJ)=0`20
X IF(OBJ.EQ.RUG.OR.OBJ.EQ.CHAIN)PROP(OBJ)=1`20
X TALLY=TALLY-1`20
X `20
X* IF REMAINING TREASURES TOO ELUSIVE, ZAP HIS LAMP.
X `20
X IF(TALLY.EQ.TALLY2.AND.TALLY.NE.0)LIMIT=MIN0(35,LIMIT)
X 2006 KK=PROP(OBJ)
X IF(OBJ.EQ.STEPS.AND.LOC.EQ.FIXED(STEPS))KK=1
X CALL PSPEAK(OBJ,KK)`20
X 2008 I=LINK(I)`20
X GOTO 2004`20
X `20
X 2009 K=54
X 2010 SPK=K`20
X 2011 CALL RSPEAK(SPK)
X 2012 VERB=0
X OBJ=0`20
X `20
X***MOVE MONGOOSE IF HE'S LOOSE.`20
X `20
X IF(.NOT.LOOSE) GOTO 2600
X 2550 IF(PLACE(TRAP).NE.PLACE(MONGOOS)) GOTO 2525`20
X LOOSE=.FALSE.`20
X IF(LOC.EQ.PLACE(TRAP)) CALL RSPEAK(229)`20
X PROP(MONGOOS)=1`20
X PROP(TRAP)=1
X GOTO 2600`20
X 2525 CALL MOVE(MONGOOS,(random(18)+15))`20
X IF(.NOT.HERE(MONGOOS)) GOTO 2600
X CALL RSPEAK(60)`20
X `20
X***THE QUICK MONGOOSE RUNS AWAY... 90% OF THE TIME.`20
X `20
X 2500 IF(PCT(10)) GOTO 2550`20
X CALL MOVE(MONGOOS,(random(18)+15))`20
X CALL RSPEAK(61)`20
X `20
X***CHECK IF THIS LOC IS ELIGIBLE FOR ANY HINTS. IF BEEN HERE LONG ENOUGH`20
X* BRANCH TO HELP SECTION (ON LATER PAGE). HINTS ALL COME BACK HERE EVERY T
VIME`20
X* TO FINISH THE LOOP. IGNORE 'HINTS' < 4 (SPECIAL STUFF, SEE DATABASE DESC
VRIPTION)
X `20
X 2600 DO 2601 LOOP=4,HNTMAX`20
X HINT=LOOP`20
X IF(HINTED(HINT))GOTO 2602`20
X IF(.NOT.BITSET(LOC,HINT))HINTLC(HINT)=-1
X HINTLC(HINT)=HINTLC(HINT)+1`20
X IF(HINTLC(HINT).GE.HINTS(HINT,1))GOTO 40000`20
X 2601 CONTINUE
X 2602 CONTINUE
X `20
X***KICK THE RANDOM NUMBER GENERATOR JUST TO ADD VARIETY TO THE CHASE. AND
X* IF CLOSING TIME, CHECK FOR ANY OBJECTS BEING TOTED WITH PROP < 0 AND SET`
V20
X* THE PROP TO -1-PROP. THIS WAY OBJECTS WON'T BE DESCRIBED UNTIL THEY'VE
X* BEEN PICKED UP AND PUT DOWN SEPARATE FROM THEIR RESPECTIVE PILES. DON'T`
V20
X* TICK CLOCK1 UNLESS WELL INTO CAVE (AND NOT AT Y2).`20
X `20
X IF(.NOT.CLOSED)GOTO 2605
X IF(PROP(OYSTER).LT.0.AND.TOTING(OYSTER))
X $CALL PSPEAK(OYSTER,1)`20
X DO 2604 LOOP=1,100
X 2604 IF(TOTING(LOOP).AND.PROP(LOOP).LT.0)PROP(LOOP)=-1-PROP(LOOP)
X 2605 WZDARK=DARK(0)
X IF(KNFLOC.GT.0.AND.KNFLOC.NE.LOC)KNFLOC=0`20
X I=random(1)
X CALL GETIN(WD1,WD2,WCOUNT)
X***EVERY INPUT, CHECK 'FOOBAR' FLAG. IF ZERO, NOTHING'S GOING ON. IF POS
X* MAKE NEG. IF NEG, HE SKIPPED A WORD, SO MAKE IT ZERO.`20
X `20
X 2608 FOOBAR=MIN0(0,-FOOBAR)
X `20
X***THIS IS WHERE RESTORE WOULD COME, IF IT WAS WORKING.`20
X IF(TURNS.EQ.0.AND.WD1.EQ.'RESTORE ')GOTO 8400`20
X `20
X 2606 TURNS=TURNS+1`20
X `20
X IF(TURNS.LT.WAITNG) GOTO 2607`20
X IF(TURNS.LT.OOPS) CALL RSPEAK(220)
X IF(TURNS.LT.OOPS) GOTO 2607`20
X CALL RSPEAK(221)
X BFULL=.FALSE.`20
X WAITNG=9999999
X OOPS=9999999
X 2607 IF(TURNS.EQ.3) XXM=MINPMID(0)`20
X IF(TURNS.NE.45)GOTO 2609
X `20
X***CHECK IF PLAYER HAS ZAPPED TIMING ROUTINE; IF SO, HE'S CHEATING.
X `20
X YYM=MINPMID(0)
X IF(XXM.EQ.YYM) SAVED=0
X `20
X 2609 IF(VERB.EQ.SAY.AND.WD2.NE.' ')VERB=0
X IF(VERB.EQ.SAY)GOTO 4090
X IF(TALLY.EQ.0.AND.LOC.GE.MISTS.AND.LOC.NE.42)CLOCK1=CLOCK1-1
X IF(CLOCK1.EQ.0)GOTO 10000`20
X IF(CLOCK1.LT.0)CLOCK2=CLOCK2-1
X IF(CLOCK2.EQ.0)GOTO 11000`20
X IF(PROP(LAMP).EQ.1)LIMIT=LIMIT-1
X IF(LIMIT.LE.30.AND.HERE(BATTER).AND.PROP(BATTER).EQ.0`20
X $.AND.HERE(LAMP))GOTO 12000
X IF(LIMIT.EQ.0)GOTO 12400
X IF(LIMIT.LT.0.AND.LOC.LE.8)GOTO 12600`20
X IF(LIMIT.LE.30)GOTO 12200`20
X19999 IF(WD1.EQ.'ENTER '.AND.
X $ (WD2.EQ.'STREAM '.OR.WD2.EQ.'WATER '.OR.
X $ WD2.EQ.'RIVER ')) WD1='SWIM '
X IF(WD1.EQ.'ENTER '.AND.WD2.NE.' ')GOTO 2800`20
X IF((WD1.NE.'WATER '.AND.WD1.NE.'OIL ')
X $.OR.(WD2.NE.'PLANT '.AND.WD2.NE.'DOOR ')) GOTO 2610`20
X IF(AT(VOCAB(WD2,1)))WD2='POUR '
X 2610 IF(WD1.NE.'WEST ')GOTO 2630
X IWEST=IWEST+1`20
X IF(IWEST.EQ.10)CALL RSPEAK(17)
X 2630 I=VOCAB(WD1,-1)`20
X text (1:10) = wd1
X IF(I.EQ.-1)GOTO 2900
X K=MOD(I,1000)`20
X KQ=I/1000+1`20
X GOTO (3000,5000,4000,2010), KQ
X*** LOC,OBJ.,VERB,REPEAT
X CALL BUG(22)
X `20
X***GET SECOND WORD FOR ANALYSIS.
X `20
X 2800 WD1=WD2`20
X WD2=' '`20
X GOTO 2610`20
X `20
X***GEE, I DON'T UNDERSTAND.`20
X `20
X 2900 WRITE(6,2910) WD1`20
X 2910 FORMAT(/,' I don''t understand ''',A10,'''.')`20
X GOTO 2600`20
X `20
X*** *******************
X* **** LOCATIONS ****
X* *******************
X* FIGURE OUT THE NEW LOCATION
X*`20
X* GIVEN THE CURRENT LOCATION IN 'LOC', AND A MOTION VERB NUMBER IN 'K', AND
X* THE NEW LOCATION IN 'NEWLOC'. THE CURRENT LOC IS SAVED IN 'OLDLOC' IF`20
X* HE WANTS TO RETREAT. THE CURRENT OLDLOC IS SAVED IN OLDLC2, IN CASE HE
X* DIES. (IF HE DOES, NEWLOC WILL BE LIMBO, AND OLDLOC WILL BE WHAT KILLED`
V20
X* HIM, SO WE NEED OLDLC2, WHICH IS THE LAST PLACE HE WAS SAFE.)
X `20
X 3000 KK=KEY(LOC)`20
X NEWLOC=LOC
X IF(KK.EQ.0)CALL BUG(26)`20
X IF(K.EQ.NULL)GOTO 2`20
X IF(K.EQ.BACK)GOTO 20
X IF(K.EQ.LOOK)GOTO 30
X IF(K.EQ.SIT)GOTO 35`20
X IF(K.EQ.CAVE)GOTO 40
X IF(K.EQ.GO2)GOTO 45`20
X OLDLC2=OLDLOC`20
X OLDLOC=LOC
X `20
X 9 LL=IABS(TRAVEL(KK))`20
X IF(MOD(LL,1000).EQ.1.OR.MOD(LL,1000).EQ.K)GOTO 10`20
X IF(TRAVEL(KK).LT.0)GOTO 50
X KK=KK+1`20
X GOTO 9
X `20
X 10 LL=LL/1000
X 11 NEWLOC=LL/1000
X K=MOD(NEWLOC,100)`20
X IF(NEWLOC.LE.300)GOTO 13
X IF(PROP(K).NE.NEWLOC/100-3)GOTO 16
X 12 IF(TRAVEL(KK).LT.0)CALL BUG(25)`20
X KK=KK+1`20
X NEWLOC=IABS(TRAVEL(KK))/1000
X IF(NEWLOC.EQ.LL)GOTO 12`20
X LL=NEWLOC`20
X GOTO 11`20
X `20
X 13 IF(NEWLOC.LE.100)GOTO 14
X IF(TOTING(K).OR.(NEWLOC.GT.200.AND.AT(K)))GOTO 16`20
X GOTO 12`20
X `20
X 14 IF(NEWLOC.NE.0.AND..NOT.PCT(NEWLOC))GOTO 12`20
X 16 NEWLOC=MOD(LL,1000)`20
X IF(NEWLOC.LE.300)GOTO 2`20
X IF(NEWLOC.LE.500)GOTO 30000`20
X CALL RSPEAK(NEWLOC-500)`20
X NEWLOC=LOC
X GOTO 2
X `20
X***SPECIAL MOTIONS COME HERE. LABELLING CONVENTION: STATEMENT NUMBERS N
X* (XX=00-99) ARE USED FOR SPECIAL CASE NUMBER NNN (NNN=301-500).`20
X `20
X30000 NEWLOC=NEWLOC-300`20
X IF(NEWLOC.LE.0.OR.NEWLOC.GT.5) CALL BUG(20)`20
X GOTO(30100,30200,30300,30400,30500),NEWLOC
X `20
X***TRAVEL 301. PLOVER-ALCOVE PASSAGE. CAN CARRY ONLY EMERALD. NOTE: T
X* TABLE MUST INCLUDE 'USELESS' ENTRIES GOING THROUGH PASSAGE, WHICH CAN
X* BE USED FOR ACTUAL MOTION, BUT CAN BE SPOTTED BY 'GO BACK'.
X `20
X30100 NEWLOC = (2 * PLAC(EMERALD) - 1 ) - LOC`20
X IF(HOLDNG.EQ.0.OR.(HOLDNG.EQ.1.AND.TOTING(EMRALD)))GOTO 2`20
X NEWLOC=LOC
X CALL RSPEAK(117)
X GOTO 2
X `20
X***TRAVEL 302. PLOVER TRANSPORT. DROP THE EMERALD (ONLY USE SPECIAL TR
X* TOTING IT), SO HE'S FORCED TO USE THE PLOVER-PASSAGE TO GET IT OUT.
X* DROPPED IT, GO BACK AND PRETEND HE WASN'T CARRYING IT AFTER ALL.`20
X `20
X30200 CALL DROP(EMRALD,LOC)`20
X GOTO 12`20
X `20
X***TRAVEL 303. TROLL BRIDGE. MUST BE DONE ONLY AS SPECIAL MOTION SO TH
X* DWARVES WON'T WANDER ACROSS AND ENCOUNTER THE BEAR. (THEY WON'T FOLL
X* PLAYER THERE BECAUSE THAT REGION IS FORBIDDEN TO THE PIRATE.) IF
X* PROP(TROLL)=1, HE'S CROSSED SINCE PAYING, SO STEP OUT AND BLOCK HIM.`20
X* (STANDARD TRAVEL ENTRIES CHECK FOR PROP(TROLL)=0.) SPECIAL STUFF FOR
X `20
X30300 IF(PROP(TROLL).NE.1)GOTO 30310
X CALL PSPEAK(TROLL,1)
X PROP(TROLL)=0`20
X CALL MOVE(TROLL2,0)`20
X CALL MOVE(TROLL2+100,0)`20
X CALL MOVE(TROLL,PLAC(TROLL))
X CALL MOVE(TROLL+100,FIXD(TROLL))
X CALL JUGGLE(CHASM)
X NEWLOC=LOC
X GOTO 2
X `20
X30310 NEWLOC=PLAC(TROLL)+FIXD(TROLL)-LOC
X IF(PROP(TROLL).EQ.0)PROP(TROLL)=1`20
X IF(.NOT.TOTING(BEAR))GOTO 2`20
X CALL RSPEAK(162)
X PROP(CHASM)=1`20
X PROP(TROLL)=2`20
X CALL DROP(BEAR,NEWLOC)
X FIXED(BEAR)=-1
X PROP(BEAR)=3
X IF(PROP(SPICES).LT.0)TALLY2=TALLY2+1
X OLDLC2=NEWLOC`20
X GOTO 99`20
X `20
X***TRAVEL 304. ROWING THE BOAT. SINCE HE CAN'T CARRY THE BOAT HIMSELF,
X* (IT'S TOO HEAVY) WE MUST MOVE THE BOAT FOR HIM.
X `20
X30400 ROW=.TRUE.
X GOTO 12`20
X `20
X***TRAVEL 305. CROSSING THE FRAYED ROPE... IT MIGHT BREAK.`20
X `20
X30500 IF(PROP(ROPE).EQ.1) GOTO 30510
X IF(PCT(60)) GOTO 30510
X PROP(ROPE)=2
X CALL RSPEAK(225)
X NEWLOC=20`20
X GOTO 2
X `20
X30510 OLDLC2=OLDLOC`20
X OLDLOC=LOC
X NEWLOC=PLAC(ROPE)+FIXD(ROPE)-OLDLOC`20
X GOTO 2
X `20
X***END OF SPECIALS.`20
X `20
X***HANDLE 'GO BACK'. LOOK FOR VERB WHICH GOES FROM LOC TO OLDLOC, OR TO
X* IF OLDLOC HAS FORCED-MOTION. K2 SAVES ENTRY -> FORCED LOC -> PREVIOU
X `20
X 20 K=OLDLOC
X IF(FORCED(K))K=OLDLC2`20
X OLDLC2=OLDLOC`20
X OLDLOC=LOC
X K2=0
X IF(K.NE.LOC)GOTO 21`20
X CALL RSPEAK(91)`20
X GOTO 2
X `20
X 21 LL=MOD((IABS(TRAVEL(KK))/1000),1000)
X IF(LL.EQ.K)GOTO 25
X IF(LL.GT.300)GOTO 22
X J=KEY(LL)`20
X IF(FORCED(LL).AND.MOD((IABS(TRAVEL(J))/1000),1000).EQ.K)K2=KK`20
X 22 IF(TRAVEL(KK).LT.0)GOTO 23
X KK=KK+1`20
X GOTO 21`20
X `20
X 23 KK=K2`20
X IF(KK.NE.0)GOTO 25
X CALL RSPEAK(140)
X GOTO 2
X `20
X 25 K=MOD(IABS(TRAVEL(KK)),1000)
X KK=KEY(LOC)`20
X GOTO 9
X `20
X***LOOK. CAN'T GIVE MORE DETAIL. PRETEND IT WASN'T DARK (THOUGH IT MAY
X* BE DARK) SO HE WON'T FALL INTO A PIT WHILE STARING INTO THE GLOOM.`20
X `20
X 30 IF(DETAIL.LT.3)CALL RSPEAK(15)
X DETAIL=DETAIL+1`20
X WZDARK=.FALSE.
X ABB(LOC)=0
X GOTO 2
X `20
X*** SIT. HE SITS ON THE GROUND,
X* OR IF HE TRIES THE CHAIR,
X* HE DIES.`20
X*`20
X 35 IF ( WIZKID ) GOTO 37`20
X IF ( HERE(CHAIR) ) GOTO 36
X SPK = 232`20
X GOTO 2011`20
X `20
X 36 CALL RSPEAK (233)`20
X NUMDIE = MAXDIE`20
X GOTO 99`20
X `20
X 37 SPK = 54
X GOTO 2011`20
X `20
X***CAVE. DIFFERENT MESSAGES DEPENDING ON WHETHER ABOVE GROUND.`20
X `20
X 40 IF(LOC.LT.8)CALL RSPEAK(57)`20
X IF(LOC.GE.8)CALL RSPEAK(58)`20
X GOTO 2
X `20
X***GOTO. LETS A WIZARD GO ANYWHERE HE WANTS.
X `20
X 45 IF(.NOT.WIZKID) GOTO 2900`20
X IF(WD2.EQ.' ') GOTO 2900
X WD1=WD2`20
X WD2=' '
X WHERE=0`20
X DO 46 LOOP=1,3
X IF(WD1(LOOP:LOOP).LT.'0'.OR.WD1(LOOP:LOOP).GT.'9') GOTO 46
X WHERE=(WHERE*10)+(ICHAR(WD1(LOOP:LOOP)) - ICHAR('0'))
X 46 CONTINUE
X IF(WHERE.GT.0.AND.WHERE.LE.LOCSIZ) GOTO 47
X I=VOCAB(WD1,-1)`20
X `20
X***IF LOCATION IS NOT A ROOM NUMBER THE WORD MUST BE AN OBJECT.`20
X `20
X IF(I/1000.NE.1) GOTO 2900`20
X IF(I-1000 .EQ. PIRATE) GOTO 48
X IF(PLACE(I-1000).EQ.0) GOTO 2900
X WHERE=PLACE(I-1000)`20
X 47 OLDLC2=OLDLOC`20
X OLDLOC=LOC
X NEWLOC=WHERE
X GOTO 2
X `20
X 48 WHERE=DLOC(8)`20
X IF(WHERE .NE. 0) GOTO 47
X WRITE(6,49)`20
X 49 FORMAT (' The pirate is dead!')`20
X GOTO 2600`20
X `20
X***NON-APPLICABLE MOTION. VARIOUS MESSAGES DEPENDING ON WORD GIVEN.
X `20
X 50 SPK=12
X IF(K.GE.43.AND.K.LE.50)SPK=9
X IF(K.EQ.29.OR.K.EQ.30)SPK=9`20
X IF(K.EQ.7.OR.K.EQ.36.OR.K.EQ.37)SPK=10
X IF(K.EQ.11.OR.K.EQ.19)SPK=11
X IF(VERB.EQ.FIND.OR.VERB.EQ.INVENT)SPK=59
X IF(K.EQ.62.OR.K.EQ.65)SPK=42
X IF(K.EQ.17)SPK=80`20
X CALL RSPEAK(SPK)
X GOTO 2
X***`20
X* YOU ARE NOW SLIGHTLY DEAD.
X*`20
X* IF THE CURRENT LOC IS ZERO, IT MEANS THE CLOWN GOT HIMSELF KILLED. We
X* ALLOW THIS MAXDIE TIMES. MAXDIE IS AUTOMATICALLY SET BASED ON THE NUMBER
X* SNIDE MESSAGES AVAILABLE. EACH DEATH RESULTS IN A MESSAGE (81, 83, E
X* WHICH OFFERS REINCARNATION; IF ACCEPTED, THIS RESULTS IN MESSAGE 82,`20
X* ETC. THE LAST TIME, IF HE WANTS ANOTHER CHANCE, HE GETS A SNIDE REMA
X* WE EXIT. WHEN REINCARNATED, ALL OBJECTS BEING CARRIED GET DROPPED AT
X* (PRESUMABLY THE LAST PLACE PRIOR TO BEING KILLED) WITHOUT CHANGE OF P
X* THE LOOP RUNS BACKWARDS TO ASSURE THAT THE MONGOOS IS DROPPED BEFORE THE`
V20
X* (THIS KLUGE COULD BE CHANGED ONCE WE'RE SURE ALL REFERENCES TO MONGOOS A`
V20
X* ARE DONE BY KEYWORDS.) THE LAMP IS A SPECIAL CASE (IT WOULDN'T DO TO
X* IT IN THE CAVE). IT IS TURNED OFF AND LEFT OUTSIDE THE BUILDING (ONL
X* WAS CARRYING IT, OF COURSE). HE HIMSELF IS LEFT INSIDE THE BUILDING`20
X* HEAVEN HELP HIM IF HE TRIES TO ZZZZADV BACK INTO THE CAVE WITHOUT THE L
X* OLDLOC IS ZAPPED SO HE CAN'T JUST 'RETREAT'.`20
X*`20
X* THE EASIEST WAY TO GET KILLED IS TO FALL INTO A PIT IN PITCH DARKNESS
X `20
X 90 CALL RSPEAK(23)`20
X OLDLC2=LOC
X `20
X***OKAY, HE'S DEAD. LET'S GET ON WITH IT.
X `20
X 99 IF (.NOT.WIZKID) GOTO 91
X CALL RSPEAK(224)
X LOC=OLDLC2
X GOTO 2000`20
X `20
X 91 IF(CLOSNG)GOTO 95`20
X NUMDIE=NUMDIE+1`20
X I=83
X J=84
X IF(NUMDIE.NE.1) GOTO 92`20
X I=81
X J=82
X 92 IF(NUMDIE.LE.MAXDIE) GOTO 93
X I=85
X J=86
X 93 IF(NUMDIE.EQ.MAXDIE.OR..NOT.YES(I,J,54,WCOUNT)) GOTO 20000
X IF(OLDLOC.EQ.FIXD(TROLL)) OLDLC2=PLAC(TROLL)
X DO 98 LOOP=1,100
X I=101-LOOP
X IF(.NOT.TOTING(I))GOTO 98`20
X K=OLDLC2
X CALL DROP(I,K)
X IF(I.EQ.MONGOOS) LOOSE=.TRUE.`20
X 98 CONTINUE
X IF(LOC.LT.MISTS) GOTO 100`20
X LOC=OLDLC2
X OLDLOC=LOC
X GOTO 2000`20
X `20
X 100 LOC=3`20
X OLDLOC=LOC
X IF(PLACE(LAMP).NE.OLDLC2) GOTO 2000`20
X CALL MOVE(LAMP,1)`20
X PROP(LAMP)=0
X GOTO 2000`20
X `20
X***HE DIED DURING CLOSING TIME. NO RESURRECTION. TALLY UP A DEATH AND`20
X `20
X 95 CALL RSPEAK(131)
X NUMDIE=NUMDIE+1`20
X GOTO 20000
X `20
X*** *******************
X* ****** VERBS ******
X* *******************
X* ANALYSE A VERB. REMEMBER WHAT IT WAS, GO BACK FOR OBJECT IF SECOND W
X* UNLESS VERB IS 'SAY' OR 'SUSPEND', WHICH SNARFS ARBITRARY SECOND WORD
X `20
X 4000 VERB=K
X SPK=ACTSPK(VERB)
X IF(WD2.NE.' '.AND.
X $ (VERB.NE.SAY.AND.VERB.NE.SUSPND))GOTO 2800
X IF(VERB.EQ.SAY.OR.VERB.EQ.SUSPND)OBJ=-1
X***IF HE WANTS LIGHT, LET HIM TRY TO FLIP THE SWITCH.`20
X `20
X IF(OBJ.EQ.SWITCH) GOTO 5150`20
X IF(OBJ.NE.0)GOTO 4090`20
X `20
X***ANALYSE AN INTRANSITIVE VERB (IE, NO OBJECT GIVEN YET).
X `20
X GOTO(8010,8000,8000,8040,2009,8040,9070,9080,8000,8000,`20
X $2011,9120,9130,8140,9150,8000,8000,8180,8000,8200,
X $8000,9220,9230,8240,8250,8260,8270,8000,8000,8300,
X $8310,8320,8330),VERB
X* TAKE DROP SAY OPEN NOTH LOCK ON OFF WAVE CALM
X* WALK KILL POUR EAT DRNK RUB TOSS QUIT FIND INVN`20
X* FEED FILL BLST SCOR FOO BRF READ BREK WAKE SUSP`20
X* WEAR PISS SWIM
X CALL BUG(23)
X `20
X***ANALYSE A TRANSITIVE VERB.`20
X `20
X 4090 GOTO(9010,9020,9030,9040,2009,9040,9070,9080,9090,2011,`20
X $2011,9120,9130,9140,9150,9160,9170,2011,9190,9190,
X $9210,9220,9230,2011,2011,2011,9270,9280,9290,8300,
X $9310,9320,9330),VERB
X* TAKE DROP SAY OPEN NOTH LOCK ON OFF WAVE CALM
X* WALK KILL POUR EAT DRNK RUB TOSS QUIT FIND INVN`20
X* FEED FILL BLST SCOR FOO BRF READ BREK WAKE SUSP`20
X* WEAR PISS SWIM
X CALL BUG(24)
X `20
X***ROUTINES FOR PERFORMING THE VARIOUS ACTION VERBS`20
X `20
X***STATEMENT NUMBERS IN THIS SECTION ARE 8000 FOR INTRANSITIVE VERBS, 90
X* TRANSITIVE, PLUS TEN TIMES THE VERB NUMBER. MANY INTRANSITIVE VERBS`20
X* TRANSITIVE CODE, AND SOME VERBS USE CODE FOR OTHER VERBS, AS NOTED BE
X `20
XC RANDOM INTRANSITIVE VERBS COME HERE. CLEAR OBJ JUST IN CASE (SEE 'AT
X `20
X 8000 WRITE(6,8002) WD1
X 8002 FORMAT(/,' ',A10,x,'What?')
X GOTO 2600`20
X `20
X***CARRY, NO OBJECT GIVEN YET. OK IF ONLY ONE OBJECT PRESENT.
X `20
X 8010 IDUMY=ATLOC(LOC)
X IF(IDUMY.EQ.0.OR.LINK(IDUMY).NE.0) GOTO 8000
X DO 8012 LOOP=1,7
X IF(DLOC(LOOP).EQ.LOC.AND.DFLAG.GE.2)GOTO 8000`20
X 8012 CONTINUE
X OBJ=ATLOC(LOC)
X `20
X***CARRY AN OBJECT. SPECIAL CASES FOR MONGOOS AND SACK (IF MONGOOS IN SACK,
V C
X* TAKE ONE WITHOUT THE OTHER. LIQUIDS ALSO SPECIAL, SINCE THEY DEPEND`20
X* STATUS OF BOTTLE. ALSO VARIOUS SIDE EFFECTS, ETC.`20
X `20
X 9010 IF(TOTING(OBJ))GOTO 2011
X TEM=LOC`20
X IF(.NOT.WIZKID.OR.FIXED(OBJ).NE.0.OR.OBJ.EQ.WATER.OR.OBJ.EQ.OIL)
X $GOTO 9011`20
X CALL MOVE(OBJ,LOC)
X IF((OBJ.EQ.SACK.OR.OBJ.EQ.MONGOOS).AND.PROP(SACK).EQ.1)`20
X $CALL MOVE(SACK+MONGOOS-OBJ,LOC)`20
X 9011 SPK=25
X IF(OBJ.EQ.PLANT.AND.PROP(PLANT).LE.0)SPK=115
X IF(OBJ.EQ.BEAR.AND.PROP(BEAR).EQ.1)SPK=169
X IF(OBJ.EQ.CHAIN.AND.PROP(BEAR).NE.0)SPK=170`20
X IF(PLAC(OBJ).EQ.PLAC(BOOK)) SPK=234`20
X IF(FIXED(OBJ).NE.0)GOTO 2011
X IF(OBJ.NE.WATER.AND.OBJ.NE.OIL)GOTO 9017
X IF(HERE(BOTTLE).AND.LIQ(0).EQ.OBJ)GOTO 9018`20
X OBJ=BOTTLE
X IF(TOTING(BOTTLE).AND.PROP(BOTTLE).EQ.1)GOTO 9220`20
X IF(PROP(BOTTLE).NE.1)SPK=105
X IF(.NOT.TOTING(BOTTLE))SPK=104
X GOTO 2011`20
X 9018 OBJ=BOTTLE
X 9017 IF(HOLDNG.LT.HLDMAX.OR.WIZKID)GOTO 9016`20
X CALL RSPEAK(92)`20
X GOTO 2012`20
X 9016 IF(OBJ.NE.MONGOOS)GOTO 9014`20
X IF(PROP(MONGOOS).NE.0)GOTO 9014`20
X IF(TOTING(SACK))GOTO 9015`20
X CALL RSPEAK(27)`20
X GOTO 2012`20
X 9015 PROP(MONGOOS)=1`20
X PROP(SACK)=1
X LOOSE=.FALSE.`20
X 9014 IF((OBJ.EQ.MONGOOS.OR.OBJ.EQ.SACK).AND.PROP(MONGOOS).NE.0)
X $CALL CARRY(MONGOOS+SACK-OBJ,LOC)
X IF(HERE(TRAP)) PROP(TRAP)=0`20
X CALL CARRY(OBJ,LOC)`20
X IF(HERE(TRAP)) PROP(TRAP)=0`20
X K=LIQ(0)
X IF(OBJ.EQ.BOTTLE.AND.K.NE.0)PLACE(K)=-1`20
X GOTO 2009`20
X `20
X***DISCARD OBJECT. 'THROW' ALSO COMES HERE FOR MOST OBJECTS. SPECIAL C
X* MONGOOS (MIGHT ATTACK SNAKE OR DRAGON) AND SACK (MIGHT CONTAIN MONGOOS) A
VND
X* DROP COINS AT VENDING MACHINE FOR EXTRA BATTERIES.`20
X `20
X 9020 IF(TOTING(ROD2).AND.OBJ.EQ.ROD.AND..NOT.TOTING(ROD))OBJ=ROD2
X IF(.NOT.TOTING(OBJ))GOTO 2011`20
X IF(OBJ.EQ.RING) PROP(RING)=0
X IF(OBJ.EQ.RING) WEARING(1)=.FALSE.
X IF(OBJ.EQ.MAIL) PROP(MAIL)=0
X IF(OBJ.EQ.MAIL) WEARING(2)=.FALSE.
X IF(OBJ.NE.MONGOOS)GOTO 9024`20
X PROP(MONGOOS)=0`20
X PROP(SACK)=0
X LOOSE=.TRUE.
X IF(.NOT.HERE(SNAKE)) GOTO 9024
X CALL RSPEAK(30)`20
X IF(CLOSED)GOTO 19000
X CALL MOVE(SNAKE,0)
X `20
X***SET PROP FOR USE BY TRAVEL OPTIONS`20
X `20
X PROP(SNAKE)=1`20
X 9021 K=LIQ(0)
X IF(K.EQ.OBJ)OBJ=BOTTLE
X IF(OBJ.EQ.BOTTLE.AND.K.NE.0)PLACE(K)=0
X IF(OBJ.EQ.SACK.AND.PROP(MONGOOS).NE.0)CALL DROP(MONGOOS,LOC)
X CALL DROP(OBJ,LOC)
X IF(OBJ.EQ.MONGOOS) CALL RSPEAK(61)
X IF(LOC.GE.117 .AND. LOC.LE.126)CALL MOVE(OBJ,125)`20
X GOTO 2012`20
X `20
X 9024 IF(OBJ.NE.COINS.OR..NOT.HERE(VEND))GOTO 9025
X CALL MOVE(COINS,0)
X CALL DROP(BATTER,LOC)`20
X CALL PSPEAK(BATTER,0)`20
X GOTO 2012`20
X `20
X 9025 IF(OBJ.NE.MONGOOS.OR..NOT.AT(DRAGON).OR.PROP(DRAGON).NE.0)
X $GOTO 9026`20
X CALL RSPEAK(154)
X CALL MOVE(MONGOOS,0)
X PROP(MONGOOS)=0`20
X IF(PLACE(SNAKE).EQ.PLAC(SNAKE))TALLY2=TALLY2+1
X GOTO 2012`20
X `20
X 9026 IF(OBJ.NE.BEAR.OR..NOT.AT(TROLL))GOTO 9027
X CALL RSPEAK(163)
X CALL MOVE(TROLL,0)
X CALL MOVE(TROLL+100,0)
X CALL MOVE(TROLL2,PLAC(TROLL))`20
X CALL MOVE(TROLL2+100,FIXD(TROLL))`20
X CALL JUGGLE(CHASM)
X PROP(TROLL)=2`20
X GOTO 9021`20
X `20
X 9027 IF(OBJ.EQ.VASE.AND.LOC.NE.PLAC(PILLOW))GOTO 9028
X CALL RSPEAK(54)`20
X GOTO 9021`20
X `20
X 9028 PROP(VASE)=2
X IF(AT(PILLOW))PROP(VASE)=0
X CALL PSPEAK(VASE,PROP(VASE)+1)
X IF(PROP(VASE).NE.0)FIXED(VASE)=-1`20
X GOTO 9021`20
X `20
X***SAY. ECHO WD2 (OR WD1 IF NO WD2 (SAY WHAT?, ETC.).) MAGIC WORDS OVE
X `20
X 9030 IF(WD2.NE.'QUESTION ') GOTO 9031`20
X WIZKID=WIZARD(0)
X GOTO 2012`20
X 9031 IF(.NOT.WIZKID) GOTO 9032`20
X IF(WD2.EQ.'WHERE') WRITE(6,9034) LOC`20
X 9034 FORMAT(' You are currently at location',I4,'.')`20
X IF(WD2.NE.'CLOSING ') GOTO 9032
X CLOSNG=.TRUE.`20
X PANIC=.TRUE.
X CLOSED=.TRUE.`20
X GOTO 2012`20
X 9032 IF(WD2.NE.' ')WD1=WD2`20
X I=VOCAB(WD1,-1)`20
X IF(I.EQ.62.OR.I.EQ.65.OR.I.EQ.71.OR.I.EQ.2025)GOTO 9035`20
X WRITE(6,9033) WD1
X 9033 FORMAT(/,' Okay, ',A10,'.')`20
X GOTO 2012`20
X `20
X 9035 WD2=' '`20
X OBJ=0`20
X GOTO 2630`20
X `20
+-+-+-+-+-+-+-+- END OF PART 6 +-+-+-+-+-+-+-+-