   SUBROUTINE GETOBJ(OBJECT)
      USE ALLCOM

!     ANALYSE AN OBJECT WORD.  SEE IF THE THING IS HERE, WHETHER WE'VE GOT A VERB YET, AND SO ON.  
!     OBJECT MUST BE HERE UNLESS VERB IS "FIND" OR "INVENT(ORY)" (AND NO NEW VERB YET TO BE ANALYSED).
!     WATER, OIL AND WINE ARE ALSO FUNNY, SINCE THEY ARE NEVER ACTUALLY DROPPED AT ANY LOCATION, BUT MIGHT
!     BE HERE INSIDE THE BOTTLE OR AS A FEATURE OF THE LOCATION.

!     THREE POSSIBLE RETURN VALUES FOR 'OBJECT':
!        VAL > 0 :: A POSITIVE OBJECT NUMBER
!        VAL = 0 :: OBJECT NOT FOUND HERE.  ERROR MESSAGE PRINTED.
!        VAL < 0 :: OBJECT WORD REALLY SOMETHING ELSE.  RETURN NEGATIVE VALUE OF SUBSTITUTED WORD.

      INTEGER   OBJECT,I,K,L1,LIQLOC,LIQ
      CHARACTER ZAPP*20
      LOGICAL   AT,ATHAND,BLIND,HERE,HOLDNG,PLURAL

      IF (HOLDNG(OBJECT)) RETURN
      IF (BLIND()) GO TO 280
      IF (FIXED(OBJECT).EQ.LOC.OR.ATHAND(OBJECT)) RETURN
      IF (HERE(OBJECT)) THEN
         K=335
         IF (PLURAL(OBJECT)) K=373
         OBJECT=0
         CALL SPEAK(RTEXT(K))
      ELSEIF (OBJECT.EQ.GRATE) THEN
         IF (LOC.EQ.1.OR.LOC.EQ.4.OR.LOC.EQ.7) OBJECT=-DPRSSN
         IF (LOC.GT.9.AND.LOC.LT.15) OBJECT=-ENTRNC
         IF (OBJECT.EQ.GRATE) GO TO 280
      ELSEIF (OBJECT.EQ.DWARF) THEN
         L1=DWFMAX-1
         DO I=1,L1
            IF (DLOC(I).EQ.LOC.AND.DFLAG.GE.2) RETURN
         END DO
         GO TO 280
      ELSEIF (OBJECT.EQ.LIQLOC().OR.(ATHAND(BOTTLE).AND.LIQ(BOTTLE).EQ.OBJECT).OR.(ATHAND(CASK).AND.LIQ(CASK).EQ.OBJECT)) THEN
      ELSEIF (OBJECT.EQ.PLANT.AND.AT(PLANT2).AND.PROP(PLANT2).NE.0) THEN
         OBJECT=PLANT2
      ELSEIF (OBJECT.EQ.ROCKS.AND.AT(CARVNG)) THEN
         OBJECT=CARVNG
      ELSEIF (OBJECT.EQ.ROD.AND.ATHAND(ROD2)) THEN
         OBJECT=ROD2
      ELSEIF (OBJECT.NE.DOOR.OR..NOT.(AT(SAFE).OR.AT(TDOOR).OR.AT(TDOOR2).OR.AT(PDOOR))) THEN
         IF (OBJECT.EQ.BOOK.AND.ATHAND(BOOK2)) THEN
            OBJECT=BOOK2
         ELSE
            IF (VRBX.EQ.0) GO TO 280
            IF (VERBS(VRBX).NE.FIND.AND.VERBS(VRBX).NE.INVENT) GO TO 280
         ENDIF
      ELSE
         OBJECT=TDOOR
         IF (AT(TDOOR2)) OBJECT=TDOOR2
         IF (AT(PDOOR)) OBJECT=PDOOR
         IF (AT(SAFE)) OBJECT=SAFE
      ENDIF
      
      RETURN      

!     IT ISN'T HERE.

280   OBJECT=0
      ZAPP=TXT(WDX);  ZAPP(LEN_TRIM(ZAPP)+1:)=' here.'
      CALL LOWER_CASE(ZAPP)
      WRITE(*,"(/' I see no ',A)") ZAPP
      END