-+-+-+-+-+-+-+-+ START OF PART 2 -+-+-+-+-+-+-+-+
X#define ARROWDIST `0920  /* maximum arrow travel distance */
X#define MAXVIEWDIST`0920  /* maximum distance a player can see in one dir */
X#define timeout `090   /* Timeout for player input - don't change */
X
X#define TRUE`09`091
X#define FALSE`09`090
X
X/* Define for movement */
X#define UP `09`09'i'`20
X#define DOWN `09`09'k'
X#define LEFT`09`09'j'
X#define RIGHT`09`09'l'
X
X/* Define for monster movement */
X#define NORTH`09`09-1
X#define SOUTH`09`091
X#define WEST`09`09-2
X#define EAST`09`092
X
X/* Define for characters in screen file */
X#define SPACE `09`09' '
X#define WALL `09`09'#'
X
X/* use weapon defines below for other weapons/objects */
X/* reserve A through Z for all monsters */
X
X/* Define itemchars for inventory */
X/* All items below are displayed in the store inventory */
X#define HANDS`09`09 0 `09/* Beginning player has no weapon */
X#define HAXE            '\\'
X#define AXE`09`09'`7C'`20
X#define ARROW  `09`09'%'
X#define SWORD`09`09'/'
X#define LSWORD          '_'
X#define BOW`09`09'`7D'
X#define ARMOR`09`09')'`09/* Does negative damage when you get hit */
X#define SCROLL`09`09'`7E'`09/* Magic scrolls */
X#define HEALTH`09`09'&'     /* Healing salve  -  also negative damage */
X#define POTION`09`09'!'`09/* potion of speed/slowness/etc. */
X#define ORB `09`09'*'`09/* Magic Orb */
X#define MINE`09`09'.'`09/* Exploding mine */
X/* Total items above: 13 */
X
X/* Define for dungeon screen comparison (no qualities to chars below) */
X#define NUMITEMS`0910`09/* number of items below - for viewing */
X#define KEY `09`09'>'     /* also must be defined in ITEM_PROPS & obj_names
V */
X#define CASH `09`09'$'
X#define DOOR `09`09'+'
X#define STORE`09`09'`5E'
X#define ARENA`09`09':'
X#define BONES`09`09'?'
X#define BRIDGE`09`09'='
X#define BRIDGE2`09`09'"'
X#define WATER`09`09'`7B'
X#define PIT`09`09'-'
X
X/* Define for inventory properties */
X#define MAXOBJECTS`0923`09/* total number of objects ==> 13 + NUMITEMS */
X#define ITEMCHAR`090`09/* character defined for weapon */
X#define DAMAGE `09`091
X#define WEIGHT`09`092  `09/* weight per object */
X#define WEARABLE`093`09/* Also WIELDABLE (boolean) */
X#define COMBINE`09`094       /* Object combinable in inventory? (boolean) */
X#define MAGIC`09`095`09/* magic flag (for fags) */
X#define COST `09`096  `09/* cost per item */
X#define MAXQUALIF`097`09/* itemchar,damage,weight, etc... (total) */
X
X#define MAXROWS`09`0960      /* file must be 132 columns by 60 rows */
X#define MAXCOLS`09`09132`20
X
X/* Defines for the inventory (backpack) */
X#define MAXINVEN`0911`09/* inventory size = 10 */
X#define SPELLNAMES `096`09/* number of spells in Orb */
X
X/* Define for flags */
X#define IMMUNITY`090
X#define SPEED`09`091
X#define CONFUSE`09`092
X#define MON_CONFUSE   `093
X#define BLIND`09`094
X#define NUMFLAGS`095 `09/* total above */
X
X/* Define for monsters */
X#define MAXMONSTERS `093   /* # different monsters per level */
X#define DIFFMON `0925  /* # of different monsters possible */
X#define MONCRYPT`0965  /* makes decimal to ascii upper case (start w/0) */
X#define MAGIC_NUMBER`0996  /* makes ascii lower case to decimal (start w/1)
V */
X
X/* Define for error messages */
X#define E_WIND`09`091
X#define E_OPENSCREEN    2
X#define E_CLOSESCREEN   3
X#define E_NOPLAYPOS     4
X#define E_NOENDSCREEN   5
X#define E_PRINTWIND     6
X#define E_ENDGAME`097
X#define E_USAGE`09`098
X#define E_CREATED`099                                      `20
X#define E_OPENSAVE`0910
X#define E_OPENSCORE `0911
X#define E_NOTSUPER`0912
X#define E_SAVED`09`0913
X#define E_GAINLEVEL`0914
X#define E_WRITESAVE`0915
X#define E_DATACORRUPT `0916
X#define E_READSAVE`0917
X#define E_NOSAVEFILE`0918
X#define E_WRITESCORE`0919
X#define E_READSCORE`0920
X#define E_OPENMON`0921
X
X/* begin initialization */
X/* Integers and strings for global variables */
Xshort operator;`09`09/* superuser flag */
Xshort dead;`09`09/* Character is dead if true */
Xshort GAINLEVEL;`09/* If true, character advances */
Xshort KEYPOSESS;`09/* if true, character can exit through door */
Xshort dely, delx; `09/* variables for scrolling viewport */
Xshort monkilled; `09/* number of monsters you have killed/level */
Xshort timeout_count;`09/* number of timeouts there are for monster movement
V */
Xlong moves;`09`09/* number of moves per level */
Xshort stop_monst;`09/* God flag for stopping monster movement */
Xshort in_arena;`09`09/* Is the player inside the arena? */
Xshort can_exit;`09`09/* Can the player exit the arena? */
Xshort in_store;`09`09/* Is the player in the store? */
Xint a_posx, a_posy;`09/* Position for the monster in the arena */
Xint rival_num;`09`09/* Monster number in the arena */
Xdouble DIFFICULTY;`09/* Difficulty level - DO NOT CHANGE in CREATE.C! */
X`09`09`09/* define the following for the windows */
Xint pb, kboard, dsp_main, dsp_status, dsp_inven, dsp_command, dsp_help;
X
Xint random_seed, random_incl;`09/* for randomize functions */
X
Xstruct `7B
X  int valid;       `09/* flag activated? */
X  int moves;`09`09/* number of moves remaining */
X`7D flags`5BNUMFLAGS`5D;
X
Xstruct `7B
X  char mapchar;`09`09/* char you see on screen */
X  int number;`09`09/* generic number => monster#, quantity or condition */
X`7D map`5BMAXROWS`5D`5BMAXCOLS+5`5D;
Xchar maparray`5BMAXROWS`5D`5BMAXCOLS+5`5D;
X
Xstruct `7B
X   int y, x, num;
X   char holdchar;
X`7D holdmap`5B300`5D;
X
Xchar username`5B10`5D;
Xchar underchar;
Xdouble speed;
Xint experience, wealth, kills, level, health;
Xint STR, INT, CON, DEX, BUSE, CURWEIGHT, MAXWEIGHT, MAXHEALTH, WIELD, WORN;
Xint ALTWEAP;
X
X
Xtypedef struct player_a `7B
X    char username`5B10`5D;
X    char underchar;   `09/* what are you standing on? */
X    short operator;     /* is he playing an OP game? */
X    short monkilled;    /* total number of monsters killed per level */
X    short KEYPOSESS;    /* keep the keyposession */
X    double speed;  `09/* player's speed */
X    double DIFFICULTY;  /* current speed of the game */
X    int level;`09`09/* current level */
X    int health;  `09/* current health level */
X    int experience;`09/* current exp */
X    int wealth;`09`09/* cash flow */
X    int kills;
X    int delx;`09`09/* the following are strictly for the savefile */
X    int dely;
X    int STR, INT, CON;`09/* attributes */
X    int DEX, BUSE;      /* more attributes */
X    int CURWEIGHT;`09/* current weight of backpack */
X    int MAXWEIGHT;`09/* max weight a player can carry in the backpack */
X    int MAXHEALTH; `09/* max health to start player */
X    int WIELD;          /* keep track of what the player is wielding - attac
Vk */
X    int WORN;`09`09/* same comment */
X    int ALTWEAP;`09/* alternate weapon in backpack */
X`7D player_struct;
Xplayer_struct player;
X
X   `20
Xtypedef struct backpack_a `7B
X    char name`5B20`5D;
X    char invenchar;
X    int quantity;
X    int condition;
X`7D backpack_struct;
Xbackpack_struct BACKPACK`5BMAXINVEN`5D;
X
X
Xtypedef struct monsters_a `7B
X    char mon_char;
X    char underchar;`09/* character of the object walked on */
X    int number;`09`09/* number of monster */
X    int n_num; `09`09/* name number (array below) */
X    int a_num;  `09/* attack number (array below) */
X    int f_num;`09`09/* fire number (array below) */
X    int max_mon;`09/* maximum number of this type of monster per level */
X    int fly;`09`09/* can the monster float through walls, etc. */
X    int magic;`09`09/* are the monsters magical? */
X    int hlspd;`09`09/* heal speed of monsters */
X    int dir;`09`09/* previous direction moved */
X    int dam;`09`09/* damage the monster does */
X    int health;  `09/* current health of monster */
X    int follow;`09`09/* how well the creature follows you */
X    int reschance;      /* chance of ressurection per round */
X    int dead;           /* obvious */
X    int speed;`09`09/* move speed */
X    int firec;`09`09/* chance monster fires/moves per round */
X    int range;`09`09/* how close monster has to be before moving */
X    int posy;
X    int posx;
X`7D monsters_struct;
Xmonsters_struct monsters`5B100`5D;
X
X
Xtypedef struct position_a `7B
X    int x, y;`09`09/* my position on the screen */
X`7D position_struct;
Xposition_struct ppos;
X
X
X/* set object properties */
X/* `7B itemchar, damage, weight, wearable, combine, magic, cost `7D */
Xint ITEM_PROPS`5BMAXOBJECTS`5D`5BMAXQUALIF`5D = `7B `20
X   `7B HANDS, 1,  0, 0, 0, 0, 0 `7D,     `20
X   `7B  HAXE, 4,  70, 1, 0, 0, 100 `7D,
X   `7B   AXE, 8,  110, 1, 0, 0, 300 `7D,
X   `7B ARROW, 2,  8, 0, 1, 0, 10 `7D,  `20
X   `7B SWORD, 3,  50, 1, 0, 0, 50 `7D,
X   `7B LSWORD, 6,  70, 1, 0, 0, 200 `7D,`20
X   `7B   BOW, 2,  50, 1, 0, 0, 200 `7D,
X   `7B ARMOR, 10, 200, 1, 0, 0, 300 `7D,
X   `7B SCROLL, 0, 5, 0, 1, 1, 60 `7D,
X   `7B HEALTH, -20, 5, 0, 1, 0, 100 `7D,
X   `7B POTION, 0, 10, 0, 1, 0, 100 `7D,`20
X   `7B  ORB, 15, 10, 0, 0, 1, 1000 `7D,
X   `7B MINE, 15, 50, 0, 1, 0, 15 `7D,
X/* the following objects are only defined for viewing purposes */
X   `7B  KEY, 0, 0, 0, 0, 0, 0 `7D,    `20
X   `7B CASH, 0, 0, 0, 0, 0, 0 `7D,
X   `7B DOOR, 0, 0, 0, 0, 0, 0 `7D,
X   `7B STORE, 0, 0, 0, 0, 0, 0 `7D,
X   `7B ARENA, 0, 0, 0, 0, 0, 0 `7D,
X   `7B BONES, 0, 0, 0, 0, 0, 0 `7D,
X   `7B BRIDGE, 0, 0, 0, 0, 0, 0 `7D,
X   `7B BRIDGE2, 0, 0, 0, 0, 0, 0 `7D,
X   `7B WATER, 0, 0, 0, 0, 0, 0 `7D,
X   `7B PIT, 0, 0, 0, 0, 0, 0 `7D
X`7D;
X
X
Xchar *spells`5BSPELLNAMES`5D = `7B
X   "lightning bolt",
X   "fireball",
X   "ball of acid",
X   "word of destruction",
X   "confuse monster",
X   "teleport self"
X`7D;
X
X
Xchar *deaths`5B`5D = `7B
X    "shrivels up into a greasy black pile of ash and dies",
X    "pays the debt which cancels all others",
X    "kicks the bucket","meets his maker","is knocking at the pearly gates",
X    "dies"
X`7D;
X
X
Xchar *object_names`5B`5D = `7B
X    "hands",
X    "hand axe",
X    "two-hand axe",
X    "arrow",
X    "short sword",
X    "longsword",
X    "longbow",
X    "chain mail armor",
X    "*magic* scroll",
X    "healing salve",
X    "potion",
X    "magic orb",
X    "exploding mine",
X    "key to freedom",
X    "few gold pieces",
X    "exit up to the next level",
X    "store entrance",
X    "arena entrance",
X    "small pile of bones",
X    "bridge across raging rapids",
X    "bridge across raging rapids",
X    "section of raging rapids",
X    "deep dark pit"
X`7D;
X
X
Xchar *mon_names`5B`5D = `7B
X    "the giant ant",
X    "the berserker","the clam","the dragon","the earth slime","the flagorian
V",
X    "the grey ghost","the Harpy","the insect","the strawberry jelly",
X    "<unknown>","the Verxis","the warthog","the Xourn","Your Mother",
X    "the Zumbasu","a troll","itsy and bitsy","Vorpal bunnies",
X    "the Dancing Sword","the jabberwock","Dan English","Phil Kilinskas",
X    "the relska bottle","Aralu himself"
X`7D;
X
Xchar *attacks`5B`5D = `7B
X    "crawls on you","tears your flesh off","spits on you",
X    "summons lightning","slimes you","kicks you","bites you",
X    "turns you to stone","hits you","slimes you","sends you to Limbo",
X    "takes your soul","gores you","kicks you","sends you to your room",
X    "spears you","clubs you","give you the finger","nip at your heels",
X    "hacks you to bits","bites you","blinks at you","steals your password",
X    "makes you sick","sends you to Hell"
X`7D;
X
Xchar *monfire`5B`5D = `7B
X    "spits at you","throws a spear at you","scorches you with flames",
X    "covers you in ooze","hits you with a firebolt","throws a dagger at you"
V,
X    "pukes on you","vaporizes your helpless body"
X`7D;
X
X
Xchar *errors`5B`5D = `7B
X    NULL,
X    "error creating windows",
X    "can't open screen file",
X    "can't close screen file",
X    "no player position in screen file",
X    "no ending to screen file",
X    "error writing to windows",
X    "successful end game",
X    "error - Usage:  aralu `5B-csm`5D",
X    "score file created",
X    "error opening savefile",
X    "error opening scorefile",
X    "only superuser can do this",
X    "game saved",
X    "level gained",
X    "error writing to savefile",
X    "data corruption - illegal syntax",`09`09/* let them figure it out */
X    "error reading from savefile",
X    "no savefile present",
X    "error writing to scorefile",
X    "error reading scorefile",
X    "error opening monster datafile"
X`7D;
X
X/* end initialization */
$ CALL UNPACK ARALU.H;1 1527942459
$ create 'f'
X    0    V119MATC         6       150     13970                      `20
X    1    V052HGYZ         5       174     11456                      `20
X    2     MASANDY         6       112     10442                      `20
X    3    V094P8UV         4       112      6663                      `20
X    4    V108PE85         4        51      3384                      `20
X    5      MASDAN         4        46      4049                      `20
X    6    V128LL9E         3        92      3942                      `20
X    7    V063RB8D         3        54      2922                      `20
X    8    V096KDUZ         3        30      2004                      `20
X    9      MASDOC         3        17      1943                      `20
X   10    V118LLP5         3        27      1902                      `20
X   11    V097J5JF         3        25      1911                      `20
X   12    V409EPK3         2        37      1699                      `20
X   13     MASJEFF         3        24      1691                      `20
X   14    MASDOUGH         3        14      1622                      `20
X   15    V072PDM6         3        16      1568                      `20
X   16    V077PW3W         3        13      1471                      `20
X   17    V077L5LX         3        12      1175                      `20
X   18    V105PB5E         2        30      1169                      `20
X   19    V104NH2A         2        18       969                      `20
X   20       Joker         1         1        10                      `20
$ CALL UNPACK ARALU.SCORE;1 510420647
$ create 'f'
X#include stdio
X#include smgdef
X#include "aralu.h"
X
Xmake_choice( attribute, value, row, display)
Xint value, display, row;
Xchar *attribute;
X`7B
Xchar choices`5B20`5D;
X
Xsprintf(choices,"%s: %5d",attribute,value);
Xprt_in_disp(display,choices,row,1);
X`7D
X
X
X
Xshort add_points( changes, dsp_create, cboard)
Xint changes, dsp_create, cboard;
X`7B
Xint add;
X
+-+-+-+-+-+-+-+-  END  OF PART 2 +-+-+-+-+-+-+-+-
