Classic Computer Magazine Archive ANTIC VOL. 4, NO. 9 / JANUARY 1986

Dungeon Master's Apprentice

Dungeons and Dragons Scorekeeper...and more

by Ernie Negus

Our mail shows that quite a few Antic readers are fans of the classic fantasy game Dungeons and Dragons. This program saves your Dungeon Master a lot of drudgery and keeps the game moving a lot faster. Dungeon Master's Apprentice stores all your characters and their abilities on disk, rolls multi-sided dice, and calculates confrontation damages. This BASIC program works on all Atari computers of any memory size, with disk or cassette.

Frumgar the Barbarian was sitting on a log and eating freshly cooked pheasant, when suddenly Morgoth, the Mystic Guardian of the Forest, sprang from within the gnarled, tangled roots of a curiously repulsive tree and attacked from behind!

Frumgar scrambled for his tarnished brass scimitar while avoiding the devastating sweep of Morgoth's iron hammer. His mind whirled frantically. Let's see, he thought, I'm a barbarian with a Druid level of 5 and my Armour Class is 6 – at least it was until last night's downpour.

Morgoth's eyes began to sparkle and the fingernails of his upraised left hand glowed a sickly green.

Oh no!, thought Frumgat, an Illusionist on top of it all. I wonder what his Damage Adjust might be? Of course, his Character Class may be low to begin with.

Who will survive? Everything stops while the Dungeon Master licks the tip of a stubby pencil and figures the odds.


But why should the Dungeon Master waste time and paper while his loyal apprentice, Atari (Cleric, level 64+) can do all the work?

Cleric Atari is fast, accurate, and keeps excellent ledgers of all characters who pass its way. Its memory is unsurpassed. And it'll even roll the dice for you!


Type in Listing 1, DUNGEONS.BAS, check it with TYPO II, and SAVE a copy before you RUN it. Dungeon Master's Apprentice is a tool. It won't play the game for you, but it will take care of a lot of the tedious calculations. It's been tested under fire by hardcore Dungeons and Dragons players, and modified to meet their standards.

The program, when RUN, offers a series of menus which are controlled by joystick. The first menu tells what your apprentice has been trained to do.

You may let the apprentice roll your dice for you, with any number of sides – up to 100.

If you create a character, the apprentice will lead you through a series of questions such as Character Name, Class, Type, etc.

At any time, the apprentice will display all the attributes of any character you have previously created.

The apprentice will keep track of all the characters you have created by dynamically adding DATA statements to its ledgers. Whenever you wish, you may save your collection of characters to a disk file. Any number of files may contain up to 40 characters under various filenames. (Cassette owners should enter C: as a filename, and may have to press [RETURN] during the save to ensure that the computer returns to the program after the save.)

Similarly, the apprentice will call up any collection of characters you have previously filed.


One of the best things about the apprentice is its rapid ability to calculate a fight. Choose Auto-Combat from the main menu, enter the names of your opposing characters (they must already be on a file that has been loaded) and the apprentice will display something very much like this:


	Attacker is a level 5 Druid
	Defender has a 10 Armor class

	Attacker must roll a basic 8 to hit
	Which is modified to a 12 by
	the Defender adjust of 4
	The Attackers bonus to hit of 7
	further modifies this to a 5

	The Attackers Damage Adjust is 13

	The roll is 5 and is a hit


The program uses data entered to figure out who is to survive. Lines 2070 to 3160 are D&D tables for the five major classes. The DATA statements on lines 220 and 230 contain information on subclasses of characters. You can change these subclasses if you wish. Just remember to use a capital Q as the last element. You must also change lines 700 to 730 to reflect the new range of classes.

When creating characters, the program actually adds lines to itself (specifically lines 0 to 42.) Saving characters simply LISTs these lines to disk or cassette, and loading characters ENTERs these lines. Caution should be taken when SAVEing the apprentice program. If you save lines 0 to 40, the characters will be saved along with the program.

Ernie Negus is the author of the first published program for the 130XE, the One-Pass 130XE Disk Copier(Antic, September 1985). He runs a BBS in Portland, Oregon. Just dial (503) BEE-CATS.

Listing 1: DUNGEONS.BAS Download