
PIT WITH MONSTERS
by Jim Enness
from ZX Computing Jun/Jul.1983

MONSTER PIT

Dare you delve into the dark recesses of the Monster Pit?
A great adventure for you and your ZX81 from Jim Enness.


Whilst searching a ruined tower you are attacked by a
Screech Bat which knocks you into a pit containing caves,
passages and stairs, etc. Many of the caverns contain
monsters; in fact, they are all over the place and roam the
passages as well! Some caves are empty while others contain
treasures in the form of gold, spells and hit points.

The object is, of course, to make your way out, killing any
monsters you meet and carrying all the gold you can. You
have fallen twenty levels down and to get out you must find
stairs up and then the exit.

If you are faced with a monster, you may 'Combat' it using
your initial 100 hit points; you may 'Cast a spell' on it
which throws a random number 0 to 100 hit points at the
monster; or you may 'Retreat' which takes you down to the
level below - not the way you want to go, but it is one way
of avoiding a nasty incident. If a monster has more hit
points than you and should attack then you lose the game.


Treasure hunt

Various treasures in the caves boost your hit points and
spells as you find them. Gold has a considerable influence
on your score at the end of the game - if you make it out
alive that is. Screech Bats reside all over the roofs but
generally leave you alone. They are, however, attracted by
the movement of large amounts of gold and sometimes attack
if you collect a small fortune of 150 pieces of gold or
more. You can't kill the Screech Bats, they simply knock you
down a floor, take your gold, half your hit points and break
half your spells - not very nice.

If you press the key 'S', when asked "What Direction?" a
status chart tells you your strength and position; Newline
clears the chart leaving the "What Direction?" question to
be answered. If you type in the letter 'A', the program will
SAVE and then continue where it left off. The game can,
therefore, be continued at another time.

All key entries are single letter ones, eg. 'L' for left, or
'F' for forward, etc, using the INKEY$ mode. 'RUN' starts
the game or a new game.

There are many hazards I have not mentioned, but you will no
doubt find them if you think you can get out alive!!! By the
way, the Screech Bats also reside in the tower above the pit
and automatically attack anyone attempting to go above the
ground level.


Programming notes

The program of this game is fairly self-explanatory with the
aid of the REM statements. The main program at line 400
branches to the various sub-routines to select the random
possibilities of the next move and the display.

The main input routine at line 430 converts the value of
your input to the relevant number which is then used to
check the contents of the dimensioned B variable. (B is
dimensioned into 18 and holds six pieces of information on
each of the three directions updated by the main program.)

The variables used in the program are as follows:

P - The highest points scored so far.
G - The amount of gold.
S - The number of spells.
H - The number of hit points.
L - The level of the pit.
K - The number of monsters killed.
E - The end level (allows exit to
be used on level 1 or level 0).

F is used to indicated whether to set up a new field at the
beginning of the main program. C,R,W,X,Z and Z$ are used as
temporary variables for immediate data.

Once the program has been RUN, it is a good idea to use the
SAVE routine at the beginning of a new game to tape out.
RUNning the program again will lose the 'Highest score so
far' variable, and it is always an enticement to see if you
can improve on the last effort.


--
Another Fine Product transcribed by:
Jim Grimwood (jimg@globalnet.co.uk), Weardale, England
--
