Newsgroups: rec.games.int-fiction
Path: gmd.de!Germany.EU.net!EU.net!uunet!world!ADLLib
From: ADLLib@world.std.com (ADL HealthIndustries)
Subject: Another Bug in Dungeon v 3.0
Message-ID: <CK3uI9.1BA@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
X-Newsreader: TIN [version 1.2 PL2]
Date: Sun, 23 Jan 1994 22:58:56 GMT
Lines: 68

I finally did it, and finished Dungeon 3.0, Volker Blasius's
post to MSDOS of the new and improved DECUS Fortran version.

One additional problem (I already noted the bug in the "dead man"
puzzle in a previous post; while irritating, it doesn't prevent
one from finishing the adventure) is yet another bug, this
time in the endgame.
(Spoiler alert, though nothing of importance is given away..)
^L

Within the endgame, one eventually reaches a wooden door. The
dungeon master will only open the door if you successfully answer
three questions which he poses to you.

Currently, it is IMPOSSIBLE to pass the quiz. The first question is 
randomly selected using RND(8) and each subsequent question is selected
via MOD (old question # + 3, 8). If the first question randomly chosen
is #0, then the next one is 3, then 6 [then 1,4,7,2,5,0 again]. 
The problem is that while question numbers 0,1,2,3, and 4 can be answered,
the program does not accept the "right" answers for 5,6, or 7. It also 
doesn't accept one of the "right" answers for 4.

The basis of the error is in file VERBS.FOR:

The question number and length of the answer is stored in array ANSWER,
so 
DATA ANSWER /0,6,1,6,2,5...
tells the program that the answer to question 0 is 6 characters, to #1 is
6 characters, to #2 is 5 characters. This also allows implementation of
multiple "right" answers"

These lengths are relative offsets into the array ANSSTR. To avoid giving
away the right answer, we will pretend that the answer to #0 is AAAAAA,
to #1 is BBBBBB, to #2 is CCCCC:
      DATA ANSSTR/'AAAAAABBBBBBCCCCCDDDDDEEEeeeeeeEEEEEEE
     1eeeeeFFFFFffff....'/
Because the first line doesn't end in a quote, my strong guess is that
Microsoft Fortran somehow reads BLANKS following the final EEEEEEE,
rather than immediately following with the next continuation line.
Result: the final "right" answer for #4 is not correctly recognized, nor are
any of the answers to questions 5,6, or 7.

Two possible solutions:

1) For right now it is possible to "cheat" and get past the door, to finish
the game. After the dungeon master flunks you, type:
GDT               (enter debug mode)
AO                 (alter object; program responds with something like:
                    "Number, Index ?")
173,6              (program types "OLD=0  NEW="
8
EX                 (exits debugger)
Now if you look, the door is open. What we did was to alter the door (object
number 173) and change its second flag (index 6) to 8 (third bit on = open)
This is less than satisfactory, but allows one to bypass the problem.

2) Change the line in VERBS.FOR to:
DATA ANSSTR/'AAAAAA...EEEEEEE',
1'eeeee..'/
that is, make it two strings separated by a comma, with the second
string beginning on the continuation line.

I am uploading the two fixed source files, and hopefully when Volker
has time he can try recompiling; they should quash both bugs.

Larry Brenkus
ADLLib@world.std.com

