(This is the "Dungeon Designs" column from the December 1993 issue of the Eamon Adventurer's Guild newsletter. Copyright 1993 Eamon Adventurer's Guild, 7625 Hawkhaven Dr., Clemmons, NC 27012-9408.  You may reproduce this freely as long as this credit remains attached to the article.)

        Beating Eamon

        or

        Cheating for fun and profit

One of the really friendly things about an interpreted language like Applesoft is that you can stop the program, examine and change the program variables, then resume the program anywhere you want to.  This enables the knowledgeable Eamonaut to look into the workings of the adventure and regain the upper hand in an Eamon adventure that is beating him badly.

*****  Terminology

<RETURN> the key labelled "Return"
<Ctrl-C> hold down the key labelled "Control"
      ("CTRL" on a II+) and then press the "C"
      key. The "Control" key works just like
      the "Shift" key.  <Ctrl-C> is a special
      code that halts a running Applesoft
      program.
(v7)      the version 7.x Eamon MAIN PGM
(v4-6)    earlier versions of the MAIN PGM

*****  To Halt a Running Program

To stop a running Eamon adventure, type <Ctrl-C> then <RETURN> at the YOUR COMMAND? prompt.  Don't do it at any other time, or you may damage the flow of play.

*****  To Resume Play

To resume play of an Eamon program at the YOUR COMMAND? prompt, type:

     POKE 51,0:GOTO 100

The POKE is necessary to tell DOS that a program is running. If you don't add the POKE, the program will eventually crash with a NOT DIRECT COMMAND error.

*****  Variables

Here are some useful variables for you to know:

Rooms
NR...total number of rooms
V%(x) "seen" flag for rooms
      eg: if V%(22) = 1 then you have already
          been in Room 22.  If V%(22) = 0 then
          you have not been in that room yet.
RO...room number of the room you are in
R3...room number of the last room you were in
R2...room number of the room you are moving into

Artifacts
NA........total number of artifacts
A$(x).....name of an artifact (v7)
AN$(x)....name of an artifact (v4-6)
A%(x,4)...location of an artifact (v7)
AD%(x,4)..location of an artifact (v4-6)

Artifact Locations (v7)
1 to 200.......in room 1-200
           eg: 71 means Room 71
201 to 400.....hidden in room 1-200
           eg: 271 means hidden in Room 71
501 to 700.....inside container artifact 1-200
           eg: 524 means inside Artifact 24
-1.............carried by the player
-2 to -201.....carried by monster 1-200
           eg: -62 means carried by Monster 61

Artifact Locations (v4-6)
1 to 100.......in room 1-100
           eg: 71 means Room 71
101 to 200.....inside container artifact 1-100
           eg: 124 means inside Artifact 24
201 to 300.....hidden in room 1-100
           eg: 271 means hidden in Room 71
-1.............carried by the player
-2 to -101.....carried by monster 1-100
           eg: -62 means carried by Monster 61

Monsters
NM........total number of monsters
M$(x).....name of a monster (v7)
MN$(x)....name of a monster (v4-6)
M%(x,5)...location of a monster (v7)
      eg: M%(13,5) = 37 means that Monster 13
          is in Room 37
MD%(x,5)..location of a monster (v4-6)
M%(x,1)...a monster's hardiness (v7)
M%(x,13)..a monster's hit damage (v7)

*****  Peeking into a Running Program

All of these examples are meant to be typed after halting the game with <Ctrl-C> then <RETURN>. Once you have done the
desired operation, resume play as stated above. All examples are for (v7).

To see which rooms you haven't visited:
     FOR I = 1 TO NR: PRINT V%(I): NEXT

To list the numbers and names of all artifacts:
     FOR I = 1 TO NA: PRINT I,A$(I): NEXT

To list the locations of all artifacts:
     FOR I = 1 TO NA: PRINT I,A%(I,4): NEXT

To list the numbers and names of all monsters:
     FOR I = 1 TO NM: PRINT I,M$(I): NEXT

To list the locations of all monsters:
     FOR I = 1 TO NM: PRINT I,M%(I,5): NEXT

*****  An Example

Suppose you are on a Quest for a Magic Sceptre of some sort. You have been everywhere and LOOKed everywhere, and you haven't found it.  You are at your wit's end, and are ready to cheat!  OK, after halting, take these steps: (This example is for v4-6.)

1) First, find the artifact's number:
     FOR I = 1 TO NA: PRINT I,MN$(I): NEXT
(As the artifact list scrolls by, watch for the Sceptre's name in the list.  Use <Ctrl-S> to stop and start the list as it scrolls by.)
Let's say that the Sceptre is Artifact #13.

2) Find the Sceptre's location:
     PRINT AD%(13,4)
Let's say that the Sceptre is in Room 144.
We know that locations in the 101-200 range are containers. Thus, the Sceptre is contained in Artifact #44.

3) Find out the container's name:
     PRINT AN$(44)
Let's say that it is named SMALL DOOR.

4) Find the container's location:
     PRINT AD%(44,4)
Let's say that it's in Room 259. Ah ha!  We know that locations in the 201-400 range have descriptions that are "embedded" in the room's description, and don't appear until they are acted upon. The door is in Room 59.

5) Have we been in Room 59?
     PRINT V%(59)

*****  "Teleporting" to Other Rooms

This is a very simple thing to do.  The entry point for this is line 3500 in the MAIN PGM.  This routine will move you and your companions to whatever room is defined by the variable R2.  This works just like an ordinary move; your enemies may chase you, also!

Let's say that we want to jump to Room 59 where that Sceptre is hidden:
     R2 = 59: POKE 51,0: GOTO 3500

If V%(x) shows that you have not been in the room yet, then you shouldn't "teleport" there, because you may be jumping past important plot elements and may make the adventure impossible to complete.  If you haven't been there yet, list all of the rooms' flags and "teleport" to the nearest room number that you have been in.  Once there, look for the entry to the room you want.  This doesn't always work, because rooms are seldom numbered in exact sequence, but it often works out quite well.

*****  Resurrecting Yourself (DOS 3.3)

When you see that YOU HAVE DIED! Type <Ctrl-C> then <RETURN> at the PRESS ANY KEY TO CONTINUE prompt.  What you type next depends on why you died:

If you fell in combat, or were killed by POWER or a deathtrap:
     DI = 0: M%(0,13) = 0: POKE 51,0: GOTO 29060

If you walked into a deathtrap room that you should better have avoided entering:
     DI = 0: M%(0,13) = 0: R2 = R3: POKE 51,0:      GOTO 3500

*****  Resurrecting Yourself (ProDOS)

When you see that YOU HAVE DIED! Type <Ctrl-C> then <RETURN> at the INSERT EAMON MASTER DISKETTE THEN HIT THE 'C' KEY prompt.  What you type next depends on why you died:

If you fell in combat, or were killed by POWER or a deathtrap:
     DI = 0: M%(0,13) = 0: POKE 51,0: GOTO 29060

If you walked into a deathtrap room that you should better have avoided entering:
     DI = 0: M%(0,13) = 0: R2 = R3: POKE 51,0:      GOTO 3500
The program will immediately crash. Type:
     POKE 51,0: GOTO 29060

*****  Getting Out of No-Exit Traps

After halting at YOUR COMMAND?, type:
     R2 = R3: POKE 51,0: GOTO 3500

*****  Healing Yourself

If you are getting beat up badly in combat, you can halt at YOUR COMMAND? and type:
     M%(0,13) = 0: POKE 51,0: GOTO 100

If you want to beef up the HEAL command after it's pooped out on you:
     S2%(2) = 2000: POKE 51,0: GOTO 100

***** Cutting the Bad Guys Down to Size

If the bad guys in the adventure are impossibly difficult to kill, you can make them one hit away from death with this line:

(V4-6) FOR M = 1 TO NM: MD%(M,13) = MD%(M,1) *
     (MD%(M,14) = 1): NEXT: GOSUB 3600: GOTO 100

(V7) FOR M = 1 TO NM: M%(M,13) = M%(M,1) *
     (M%(M,3) = 1): NEXT: GOSUB 3600: GOTO 100

This will only affect monsters that you have actually met up with that are your enemies.


