Path: news.larc.nasa.gov!amiga-request
From: amiga-request@ab20.larc.nasa.gov (Amiga Sources/Binaries Moderator)
Subject: v91i158: Larn 12.3 - dungeon type adventure game, Part14/17
Reply-To: Sie <S.Raybould@fulcrum.bt.co.uk>
Newsgroups: comp.sources.amiga
Message-ID: <comp.sources.amiga.v91i158@ab20.larc.nasa.gov>
References: <comp.sources.amiga.v91i145@ab20.larc.nasa.gov>
Date: 29 Aug 91 10:11:00 GMT
Approved: tadguy@uunet.UU.NET (Tad Guy)
X-Mail-Submissions-To: amiga@uunet.uu.net
X-Post-Discussions-To: comp.sys.amiga.misc

Submitted-by: Sie <S.Raybould@fulcrum.bt.co.uk>
Posting-number: Volume 91, Issue 158
Archive-name: games/larn-12.3/part14

#!/bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 14 (of 17)."
# Contents:  data.c
# Wrapped by tadguy@ab20 on Mon Aug 26 21:51:54 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'data.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'data.c'\"
else
echo shar: Extracting \"'data.c'\" \(31296 characters\)
sed "s/^X//" >'data.c' <<'END_OF_FILE'
X#include "header.h"
X#include "monsters.h"
X#include "objects.h"
X
X#define VER    12
X#define SUBVER  3
X
X/*
X    class[c[LEVEL]-1] gives the correct name of the players experience level
X*/
Xstatic char aa1[] = " mighty evil master";
Xstatic char aa2[] = "apprentice demi-god";
Xstatic char aa3[] = "  minor demi-god   ";
Xstatic char aa4[] = "  major demi-god   ";
Xstatic char aa5[] = "    minor deity    ";
Xstatic char aa6[] = "    major deity    ";
Xstatic char aa7[] = "  novice guardian  ";
Xstatic char aa8[] = "apprentice guardian";
Xstatic char aa9[] = "    The Creator    ";
Xchar *class[]=
X{   "  novice explorer  ", "apprentice explorer", " practiced explorer",/*  -3*/
X    "   expert explorer ", "  novice adventurer", "     adventurer    ",/*  -6*/
X    "apprentice conjurer", "     conjurer      ", "  master conjurer  ",/*  -9*/
X    "  apprentice mage  ", "        mage       ", "  experienced mage ",/* -12*/
X    "     master mage   ", " apprentice warlord", "   novice warlord  ",/* -15*/
X    "   expert warlord  ", "   master warlord  ", " apprentice gorgon ",/* -18*/
X    "       gorgon      ", "  practiced gorgon ", "   master gorgon   ",/* -21*/
X    "    demi-gorgon    ", "    evil master    ", " great evil master ",/* -24*/
X      aa1       ,   aa1       ,   aa1       ,/* -27*/
X      aa1       ,   aa1       ,   aa1       ,/* -30*/
X      aa1       ,   aa1       ,   aa1       ,/* -33*/
X      aa1       ,   aa1       ,   aa1       ,/* -36*/
X      aa1       ,   aa1       ,   aa1       ,/* -39*/
X      aa2       ,   aa2       ,   aa2       ,/* -42*/
X      aa2       ,   aa2       ,   aa2       ,/* -45*/
X      aa2       ,   aa2       ,   aa2       ,/* -48*/
X      aa3       ,   aa3       ,   aa3       ,/* -51*/
X      aa3       ,   aa3       ,   aa3       ,/* -54*/
X      aa3       ,   aa3       ,   aa3       ,/* -57*/
X      aa4       ,   aa4       ,   aa4       ,/* -60*/
X      aa4       ,   aa4       ,   aa4       ,/* -63*/
X      aa4       ,   aa4       ,   aa4       ,/* -66*/
X      aa5       ,   aa5       ,   aa5       ,/* -69*/
X      aa5       ,   aa5       ,   aa5       ,/* -72*/
X      aa5       ,   aa5       ,   aa5       ,/* -75*/
X      aa6       ,   aa6       ,   aa6       ,/* -78*/
X      aa6       ,   aa6       ,   aa6       ,/* -81*/
X      aa6       ,   aa6       ,   aa6       ,/* -84*/
X      aa7       ,   aa7       ,   aa7       ,/* -87*/
X      aa8       ,   aa8       ,   aa8       ,/* -90*/
X      aa8       ,   aa8       ,   aa8       ,/* -93*/
X    "  earth guardian   ", "   air guardian    ", "   fire guardian   ",/* -96*/
X    "  water guardian   ", "  time guardian    ", " ethereal guardian ",/* -99*/
X      aa9       ,   aa9       ,   aa9       ,/* -102*/
X};
X
X/*
X    table of experience needed to be a certain level of player
X    skill[c[LEVEL]] is the experience required to attain the next level
X */
X#define MEG 1000000
Xlong skill[] = {
X0, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120,                  /*  1-11 */
X10240, 20480, 40960, 100000, 200000, 400000, 700000, 1*MEG,          /* 12-19 */
X2*MEG,3*MEG,4*MEG,5*MEG,6*MEG,8*MEG,10*MEG,                          /* 20-26 */
X12*MEG,14*MEG,16*MEG,18*MEG,20*MEG,22*MEG,24*MEG,26*MEG,28*MEG,      /* 27-35 */
X30*MEG,32*MEG,34*MEG,36*MEG,38*MEG,40*MEG,42*MEG,44*MEG,46*MEG,      /* 36-44 */
X48*MEG,50*MEG,52*MEG,54*MEG,56*MEG,58*MEG,60*MEG,62*MEG,64*MEG,      /* 45-53 */
X66*MEG,68*MEG,70*MEG,72*MEG,74*MEG,76*MEG,78*MEG,80*MEG,82*MEG,      /* 54-62 */
X84*MEG,86*MEG,88*MEG,90*MEG,92*MEG,94*MEG,96*MEG,98*MEG,100*MEG,     /* 63-71 */
X105*MEG,110*MEG,115*MEG,120*MEG, 125*MEG, 130*MEG, 135*MEG, 140*MEG, /* 72-79 */
X145*MEG,150*MEG,155*MEG,160*MEG, 165*MEG, 170*MEG, 175*MEG, 180*MEG, /* 80-87 */
X185*MEG,190*MEG,195*MEG,200*MEG, 210*MEG, 220*MEG, 230*MEG, 240*MEG, /* 88-95 */
X250*MEG,260*MEG,270*MEG,280*MEG, 290*MEG, 300*MEG                    /* 96-101*/
X};
X#undef MEG
X
Xchar *lpbuf,*lpnt,*inbuffer,*lpend; /* input/output pointers to the buffers */
X# ifdef MSDOS
XRAMBLOCK *ramblks;
XDISKBLOCK *diskblks;
X# else
Xstruct cel *cell;   /*  pointer to the dungeon storage  */
X# endif
Xshort hitp[MAXX][MAXY];     /*  monster hp on level     */
Xshort iarg[MAXX][MAXY]; /*  arg for the item array  */
Xchar item[MAXX][MAXY];  /*  objects in maze if any  */
Xchar know[MAXX][MAXY];  /*  1 or 0 if here before   */
Xchar mitem[MAXX][MAXY]; /*  monster item array      */
Xchar stealth[MAXX][MAXY];   /*  0=sleeping 1=awake monst*/
Xchar lastmonst[40];     /*  this has the name of the current monster    */
Xchar beenhere[MAXLEVEL+MAXVLEVEL];  /*  1 if have been on this level */
Xchar VERSION=VER;   /*  this is the present version # of the program    */
Xchar SUBVERSION=SUBVER;
Xchar nosignal=0;    /* set to 1 to disable the signals from doing anything */
Xchar predostuff=0;  /*  2 means that the trap handling routines must do a
X                        showplayer() after a trap.  0 means don't showplayer()
X                        0 - we are in create player screen
X                        1 - we are in welcome screen
X                        2 - we are in the normal game   */
Xchar loginname[20];     /* players login name */
Xchar logname[LOGNAMESIZE];  /* players name storage for scoring             */
Xchar sex=1;             /*  default is a man  0=woman                       */
Xchar boldon=1;          /*  1=bold objects  0=inverse objects               */
Xchar ckpflag=0;         /*  1 if want checkpointing of game, 0 otherwise    */
Xchar cheat=0;           /*  1 if the player has fudged save file            */
Xchar level=0;           /*  cavelevel player is on = c[CAVELEVEL]           */
Xchar wizard=0;          /*  the wizard mode flag                            */
Xshort lastnum=0;        /* the number of the monster last hitting player    */
Xshort hitflag=0;        /*  flag for if player has been hit when running    */
Xshort hit2flag=0;       /*  flag for if player has been hit when running    */
Xshort hit3flag=0;       /*  flag for if player has been hit flush input     */
Xshort playerx,playery;  /*  the room on the present level of the player     */
Xshort lastpx,lastpy;    /*  0 --- MAXX-1  or  0 --- MAXY-1                  */
Xshort oldx,oldy;
Xchar  prayed = 1;       /* did player pray at an altar (command mode)? needs
X                           to be saved, but I don't want to add incompatibility
X                           right now.  KBR 1/11/90 */
Xshort lasthx=0,lasthy=0;/* location of monster last hit by player       */
Xshort nobeep=0;         /* true if program is not to beep                   */
Xunsigned long lrandx=33601;  /*  the random number seed                      */
Xlong initialtime=0;         /* time playing began                           */
Xlong gtime=0;               /*  the clock for the game                      */
Xlong outstanding_taxes=0;   /* present tax bill from score file             */
Xlong c[100],cbak[100];      /*  the character description arrays            */
Xint enable_scroll=0;        /* constant for enabled/disabled scrolling regn */
Xchar aborted[] = " aborted";
Xstruct sphere *spheres=0; /*pointer to linked list for spheres of annihilation*/
Xchar *levelname[]=
X{ " H"," 1"," 2"," 3"," 4"," 5"," 6"," 7"," 8"," 9","10","V1","V2","V3" };
X
Xchar original_objnamelist[]=".AT_P<_F&^+M=>_$$f*OD#~][[)))(((||||||||{?!BC}o:;,@@@@EVV))([[]]](^.[H***.^^.S.tsTLc_____________________________________________";
Xchar hacklike_objnamelist[]=".:\\_^<_{%^6|2>_55}$'+#~[[[))))))========-?!?&~~~~~****899)))[[[[[)^.[1$$$.^^.3./0\\4,____________________________________________";
Xchar objnamelist[MAXOBJECT+1];
Xchar monstnamelist[]=".BGHJKOScjtAELNQRZabhiCTYdegmvzFWflorXV.pqsyUkMwDDPxnDDuD........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";
Xchar floorc = '.';
Xchar wallc  = '#';
Xchar boldobjects = FALSE ;
Xchar auto_pickup = FALSE ;
X
X# ifdef MSDOS
X  int DECRainbow, keypad;
X# endif
X
Xchar *objectname[]=
X{ 0,"a holy altar","a handsome jewel encrusted throne","the orb","a pit",
X  "a staircase leading upwards","an elevator going up","a bubbling fountain",
X  "a great marble statue","a teleport trap","the college of Larn",
X  "a mirror","the DND store","a staircase going down","an elevator going down",
X  "the bank of Larn","the 5th branch of the Bank of Larn",
X  "a dead fountain","gold","an open door","a closed door",
X  "a wall","The Eye of Larn","plate mail","chain mail","leather armor",
X  "a sword of slashing","Bessman's flailing hammer","a sunsword",
X  "a two handed sword","a spear","a dagger",
X  "ring of extra regeneration","a ring of regeneration","a ring of protection",
X  "an energy ring","a ring of dexterity","a ring of strength",
X  "a ring of cleverness","a ring of increase damage","a belt of striking",
X  "a magic scroll","a magic potion","a book","a chest",
X  "an amulet of invisibility","an orb of dragon slaying",
X  "a scarab of negate spirit","a cube of undead control",
X  "device of theft prevention","a brilliant diamond","a ruby",
X  "an enchanting emerald","a sparkling sapphire","the dungeon entrance",
X  "a volcanic shaft leaning downward","the base of a volcanic shaft",
X  "a battle axe","a longsword","a flail","ring mail","studded leather armor",
X  "splint mail","plate armor","stainless plate armor","a lance of death",
X  "an arrow trap","an arrow trap","a shield","your home",
X  "gold","gold","gold","a dart trap",
X  "a dart trap","a trapdoor","a trapdoor","the local trading post",
X  "a teleport trap", "a massive throne",
X  "a sphere of annihilation","a handsome jewel encrusted throne",
X  "the Larn Revenue Service","a fortune cookie","","","","","","",
X  "","","","","","","","","","","","","","","","","","","",""
X };
X
X
X/*
X *  for the monster data
X *
X *  array to do rnd() to create monsters <= a given level
X */
Xchar monstlevel[] = { 5, 11, 17, 22, 27, 33, 39, 42, 46, 50, 53, 56, 59 };
X
Xstruct monst monster[] = {
X/*  NAME            LV  AC  DAM ATT DEF GEN INT GOLD    HP  EXP
X----------------------------------------------------------------- */
X{ "",               0,  0,  0,  0,  0,   0,  3,   0,    0,  0   },
X{ "bat",            1,  0,  1,  0,  0,   0,  3,   0,    1,  1   },
X{ "gnome",          1,  10, 1,  0,  0,   0,  8,  30,    2,  2   },
X{ "hobgoblin",      1,  14, 2,  0,  0,   0,  5,  25,    3,  2   },
X{ "jackal",         1,  17, 1,  0,  0,   0,  4,   0,    1,  1   },
X{ "kobold",         1,  20, 1,  0,  0,   0,  7,  10,    1,  1   },
X
X{ "orc",            2,  12, 1,  0,  0,   0,  9,  40,    4,  2   },
X{ "snake",          2,  15, 1,  0,  0,   0,  3,   0,    3,  1   },
X{ "giant centipede",2,  14, 0,  4,  0,   0,  3,   0,    1,  2   },
X{ "jaculi",         2,  20, 1,  0,  0,   0,  3,   0,    2,  1   },
X{ "troglodyte",     2,  10, 2,  0,  0,   0,  5,  80,    4,  3   },
X{ "giant ant",      2,  8,  1,  4,  0,   0,  4,   0,    5,  5   },
X
X/*  NAME            LV  AC  DAM ATT DEF GEN INT GOLD    HP  EXP
X----------------------------------------------------------------- */
X
X{ "floating eye",   3,  8,  1,  0,  0,   0,  3,   0,     5,  2  },
X{ "leprechaun",     3,  3,  0,  8,  0,   0,  3,1500,    13, 45  },
X{ "nymph",          3,  3,  0,  14, 0,   0,  9,   0,    18, 45  },
X{ "quasit",         3,  5,  3,  0,  0,   0,  3,   0,    10, 15  },
X{ "rust monster",   3,  4,  0,  1,  0,   0,  3,   0,    18, 25  },
X{ "zombie",         3,  12, 2,  0,  0,   0,  3,   0,     6,  7  },
X
X{ "assassin bug",   4,  9,  3,  0,  0,   0,  3,   0,    20, 15  },
X{ "bugbear",        4,  5,  4,  15, 0,   0,  5,  40,    20, 35  },
X{ "hell hound",     4,  5,  2,  2,  0,   0,  6,   0,    16, 35  },
X{ "ice lizard",     4,  11, 2,  10, 0,   0,  6,  50,    16, 25  },
X{ "centaur",        4,  6,  4,  0,  0,   0, 10,  40,    24, 45  },
X
X/*  NAME            LV  AC  DAM ATT DEF GEN INT GOLD    HP  EXP
X----------------------------------------------------------------- */
X
X{ "troll",          5,  4,  5,  0,  0,   0,  9,  80,    50, 300 },
X{ "yeti",           5,  6,  4,  0,  0,   0,  5,  50,    35, 100 },
X{ "white dragon",   5,  2,  4,  5,  0,   0, 16, 500,    55, 1000},
X{ "elf",            5,  8,  1,  0,  0,   0, 15,  50,    22, 35  },
X{ "gelatinous cube",5,  9,  1,  0,  0,   0,  3,   0,    22, 45  },
X
X{ "metamorph",      6,  7,  3,  0,  0,   0,  3,  0,     30, 40  },
X{ "vortex",         6,  4,  3,  0,  0,   0,  3,  0,     30, 55  },
X{ "ziller",         6,  15, 3,  0,  0,   0,  3,  0,     30, 35  },
X{ "violet fungi",   6,  12, 3,  0,  0,   0,  3,  0,     38, 100 },
X{ "wraith",         6,  3,  1,  6,  0,   0,  3,  0,     30, 325 },
X{ "forvalaka",      6,  2,  5,  0,  0,   0,  7,  0,     50, 280 },
X
X/*  NAME            LV  AC  DAM ATT DEF GEN INT GOLD    HP  EXP
X----------------------------------------------------------------- */
X
X{ "lama nobe",      7,  7,  3,  0,  0,   0,  6,  0,     35, 80  },
X{ "osequip",        7,  4,  3,  16, 0,   0,  4,  0,     35, 100 },
X{ "rothe",          7,  15, 5,  0,  0,   0,  3,  100,   50, 250 },
X{ "xorn",           7,  0,  6,  0,  0,   0, 13,  0,     60, 300 },
X{ "vampire",        7,  3,  4,  6,  0,   0, 17,  0,     50, 1000},
X{ "invisible stalker",7,3,  6,  0,  0,   0,  5,  0,     50, 350 },
X
X{ "poltergeist",    8,  1,  4,  0,  0,   0,  3,  0,     50, 450 },
X{ "disenchantress", 8,  3,  0,  9,  0,   0,  3,  0,     50, 500 },
X{ "shambling mound",8,  2,  5,  0,  0,   0,  6,  0,     45, 400 },
X{ "yellow mold",    8,  12, 4,  0,  0,   0,  3,  0,     35, 250 },
X{ "umber hulk",     8,  3,  7,  11, 0,   0, 14,  0,     65, 600 },
X
X/*  NAME            LV  AC  DAM ATT DEF GEN INT GOLD    HP  EXP
X----------------------------------------------------------------- */
X
X{ "gnome king",     9,  -1, 10, 0,  0,   0, 18,  2000,  100,3000    },
X{ "mimic",          9,   5, 6,  0,  0,   0,  8,  0,     55, 99      },
X{ "water lord",     9, -10, 15, 7,  0,   0, 20,  0,     150,15000   },
X{ "bronze dragon",  9,   2, 9,  3,  0,   0, 16,  300,   80, 4000    },
X{ "green dragon",   9,   3, 8,  10, 0,   0, 15,  200,   70, 2500    },
X{ "purple worm",    9,  -1, 11, 0,  0,   0,  3,  100,   120,15000   },
X{ "xvart",          9,  -2, 12, 0,  0,   0, 13,  0,     90, 1000    },
X
X{ "spirit naga",    10, -20,12, 12, 0,   0, 23,  0,     95, 20000   },
X{ "silver dragon",  10, -1, 12, 3,  0,   0, 20,  700,   100,10000   },
X{ "platinum dragon",10, -5, 15, 13, 0,   0, 22,  1000,  130,24000   },
X{ "green urchin",   10, -3, 12, 0,  0,   0,  3,  0,     85, 5000    },
X{ "red dragon",     10, -2, 13, 3,  0,   0, 19,  800,   110,14000   },
X
X{ "type I demon lord",  12,-30, 18, 0,   0,  0, 20, 0,  140,50000   },
X{ "type II demon lord", 13,-30, 18, 0,   0,  0, 21, 0,  160,75000   },
X{ "type III demon lord",14,-30, 18, 0,   0,  0, 22, 0,  180,100000  },
X{ "type IV demon lord", 15,-35, 20, 0,   0,  0, 23, 0,  200,125000  },
X{ "type V demon lord",  16,-40, 22, 0,   0,  0, 24, 0,  220,150000  },
X{ "type VI demon lord", 17,-45, 24, 0,   0,  0, 25, 0,  240,175000  },
X{ "type VII demon lord",18,-70, 27, 6,   0,  0, 26, 0,  260,200000  },
X{ "demon prince",       25,-127,30, 6,   0,  0, 28, 0,  345,300000  }
X
X/*  NAME                LV  AC  DAM ATT DEF GEN INT GOLD    HP  EXP
X--------------------------------------------------------------------- */
X };
X
X/*  name array for scrolls      */
X
Xchar *scrollname[MAXSCROLL+1] = {
X"\0enchant armor",
X"\0enchant weapon",
X"\0enlightenment",
X"\0blank paper",
X"\0create monster",
X"\0create artifact",
X"\0aggravate monsters",
X"\0time warp",
X"\0teleportation",
X"\0expanded awareness",
X"\0haste monsters",
X"\0monster healing",
X"\0spirit protection",
X"\0undead protection",
X"\0stealth",
X"\0magic mapping",
X"\0hold monsters",
X"\0gem perfection",
X"\0spell extension",
X"\0identify",
X"\0remove curse",
X"\0annihilation",
X"\0pulverization",
X"\0life protection",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0zzzzzzzzzzzzzz"    /* sentinel, for the sorted known objects inventory */
X };
X
X/*  name array for magic potions    */
Xchar *potionname[MAXPOTION+1] = {
X"\0sleep",
X"\0healing",
X"\0raise level",
X"\0increase ability",
X"\0wisdom",
X"\0strength",
X"\0raise charisma",
X"\0dizziness",
X"\0learning",
X"\0object detection",
X"\0monster detection",
X"\0forgetfulness",
X"\0water",
X"\0blindness",
X"\0confusion",
X"\0heroism",
X"\0sturdiness",
X"\0giant strength",
X"\0fire resistance",
X"\0treasure finding",
X"\0instant healing",
X" cure dianthroritis",
X"\0poison",
X"\0see invisible",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0 ",
X"\0zzzzzzzzzzzzzz"    /* sentinel, for the sorted known objects inventory */
X };
X
X
X/*
X    spell data
X */
Xchar spelknow[SPNUM];
Xchar splev[] = { 1, 4, 9, 14, 18, 22, 26, 29, 32, 35, 37, 37, 37, 37, 37 };
X
Xchar *spelcode[SPNUM+1]={
X    "pro",  "mle",  "dex",  "sle",  "chm",  "ssp",
X    "web",  "str",  "enl",  "hel",  "cbl",  "cre",  "pha",  "inv",
X    "bal",  "cld",  "ply",  "can",  "has",  "ckl",  "vpr",
X    "dry",  "lit",  "drl",  "glo",  "flo",  "fgr",
X    "sca",  "hld",  "stp",  "tel",  "mfi", /* 31 */
X    "sph",  "gen",  "sum",  "wtw",  "alt",  "per", "zzz"
X };
X
Xchar *spelname[]={
X    "protection",               "magic missile",        "dexterity",
X    "sleep",                    "charm monster",        "sonic spear",
X
X    "web",                      "strength",             "enlightenment",
X    "healing",                  "cure blindness",       "create monster",
X    "phantasmal forces",        "invisibility",
X
X    "fireball",                 "cold",                 "polymorph",
X    "cancellation",             "haste self",           "cloud kill",
X    "vaporize rock",
X
X    "dehydration",              "lightning",            "drain life",
X    "invulnerability",          "flood",                "finger of death",
X
X    "scare monster",            "hold monster",         "time stop",
X    "teleport away",            "magic fire",
X
X    "sphere of annihilation",   "genocide",             "summon demon",
X    "walk through walls",       "alter reality",        "permanence",
X    ""
X };
X
Xchar *speldescript[]={
X/* 1 */
X    "generates a +2 protection field",
X    "creates and hurls a magic missile equivalent to a + 1 magic arrow",
X    "adds +2 to the casters dexterity",
X    "causes some monsters to go to sleep",
X    "some monsters may be awed at your magnificence",
X    "causes your hands to emit a screeching sound toward what they point",
X/* 7 */
X    "causes strands of sticky thread to entangle an enemy",
X    "adds +2 to the casters strength for a short term",
X    "the caster becomes aware of things around him",
X    "restores some hp to the caster",
X    "restores sight to one so unfortunate as to be blinded",
X    "creates a monster near the caster appropriate for the location",
X    "creates illusions, and if believed, monsters die",
X    "the caster becomes invisible",
X/* 15 */
X    "makes a ball of fire that burns on what it hits",
X    "sends forth a cone of cold which freezes what it touches",
X    "you can find out what this does for yourself",
X    "negates the ability of a monster to use his special abilities",
X    "speeds up the casters movements",
X    "creates a fog of poisonous gas which kills all that is within it",
X    "this changes rock to air",
X/* 22 */
X    "dries up water in the immediate vicinity",
X    "you finger will emit a lightning bolt when this spell is cast",
X    "subtracts hit points from both you and a monster",
X    "this globe helps to protect the player from physical attack",
X    "this creates an avalanche of H2O to flood the immediate chamber",
X    "this is a holy spell and calls upon your god to back you up",
X/* 28 */
X    "terrifies the monster so that hopefully he wont hit the magic user",
X    "the monster is frozen in his tracks if this is successful",
X    "all movement in the caverns ceases for a limited duration",
X    "moves a particular monster around in the dungeon (hopefully away from you)",
X    "this causes a curtain of fire to appear all around you",
X/* 33 */
X    "anything caught in this sphere is instantly killed.  Warning -- dangerous",
X    "eliminates a species of monster from the game -- use sparingly",
X    "summons a demon who hopefully helps you out",
X    "allows the player to walk through walls for a short period of time",
X    "god only knows what this will do",
X    "makes a character spell permanent, i. e. protection, strength, etc.",
X    ""
X };
X
Xchar spelweird[MAXMONST+8][SPNUM] = {
X/*                      p m d s c s    w s e h c c p i    b c p c h c v    d l d g f f    s h s t m    s g s w a p */
X/*                      r l e l h s    e t n e b r h n    a l l a a k p    r i r l l g    c l t e f    p e u t l e */
X/*                      o e x e m p    b r l l l e a v    l d y n s l r    y t l o o r    a d p l i    h n m w t r */
X    
X
X/*            bat */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*          gnome */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,5,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*      hobgoblin */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*         jackal */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*         kobold */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,5,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*            orc */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   4,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*          snake */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*giant centipede */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*         jaculi */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*     troglodyte */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*      giant ant */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*   floating eye */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*     leprechaun */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*          nymph */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*         quasit */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*   rust monster */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   4,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*         zombie */ {  0,0,0,8,0,4,   0,0,0,0,0,0,0,0,   0,0,0,0,0,4,0,   4,0,0,0,0,4,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*   assassin bug */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*        bugbear */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,5,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*     hell hound */ {  0,6,0,0,0,0,   12,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*     ice lizard */ {  0,0,0,0,0,0,   11,0,0,0,0,0,0,0,  0,15,0,0,0,0,0,  0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*        centaur */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*          troll */ {  0,7,0,0,0,0,   0,0,0,0,0,0,0,5,   0,0,0,0,0,0,0,   4,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*           yeti */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,15,0,0,0,0,0,  0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*   white dragon */ {  0,0,0,0,0,0,   0,0,0,0,0,0,14,0,  0,15,0,0,0,0,0,  4,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*            elf */ {  0,0,0,0,0,0,   0,0,0,0,0,0,14,5,  0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*gelatinous cube */ {  0,0,0,0,0,0,   2,0,0,0,0,0,0,0,   0,0,0,0,0,4,0,   0,0,0,0,0,4,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*      metamorph */ {  0,13,0,0,0,0,  2,0,0,0,0,0,0,0,   0,0,0,0,0,4,0,   4,0,0,0,0,4,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*         vortex */ {  0,13,0,0,0,10, 1,0,0,0,0,0,0,0,   0,0,0,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*         ziller */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*   violet fungi */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*         wraith */ {  0,0,0,8,0,4,   0,0,0,0,0,0,0,0,   0,0,0,0,0,4,0,   4,0,0,0,0,4,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*      forvalaka */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,5,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*      lama nobe */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*        osequip */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*          rothe */ {  0,7,0,0,0,0,   0,0,0,0,0,0,0,5,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*           xorn */ {  0,7,0,0,0,0,   0,0,0,0,0,0,0,5,   0,0,0,0,0,0,0,   4,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*        vampire */ {  0,0,0,8,0,4,   0,0,0,0,0,0,0,0,   0,0,0,0,0,4,0,   0,0,0,0,0,4,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*invisible staker*/ {  0,0,0,0,0,0,   1,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*    poltergeist */ {  0,13,0,8,0,4,  1,0,0,0,0,0,0,0,   0,4,0,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/* disenchantress */ {  0,0,0,8,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*shambling mound */ {  0,0,0,0,0,10,  0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*    yellow mold */ {  0,0,0,8,0,0,   1,0,0,0,0,0,4,0,   0,0,0,0,0,4,0,   0,0,0,0,0,4,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*     umber hulk */ {  0,7,0,0,0,0,   0,0,0,0,0,0,0,5,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*     gnome king */ {  0,7,0,0,3,0,   0,0,0,0,0,0,0,5,   0,0,9,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*          mimic */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*     water lord */ {  0,13,0,8,3,4,  1,0,0,0,0,0,0,0,   0,0,9,0,0,4,0,   0,0,0,0,16,4,  0,0,0,0,0,   0,0,0,0,0,0 },
X/*  bronze dragon */ {  0,7,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*   green dragon */ {  0,7,0,0,0,0,   11,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*    purple worm */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*          xvart */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*    spirit naga */ {  0,13,0,8,3,4,  1,0,0,0,0,0,0,5,   0,4,9,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*  silver dragon */ {  0,6,0,9,0,0,   12,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*platinum dragon */ {  0,7,0,9,0,0,   11,0,0,0,0,0,14,0, 0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*   green urchin */ {  0,0,0,0,0,0,   0,0,0,0,0,0,0,0,   0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X/*     red dragon */ {  0,6,0,0,0,0,   12,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,   0,0,0,0,0,0,   0,0,0,0,0,   0,0,0,0,0,0 },
X
X/*                      p m d s c s    w s e h c c p i    b c p c h c v    d l d g f f    s h s t m    s g s w a p */
X/*                      r l e l h s    e t n e b r h n    a l l a a k p    r i r l l g    c l t e f    p e u t l e */
X/*                      o e x e m p    b r l l l e a v    l d y n s l r    y t l o o r    a d p l i    h n m w t r */
X
X/*     demon lord */ {  0,7,0,4,3,0,   1,0,0,0,0,0,14,5,  0,0,4,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   9,0,0,0,0,0 },
X/*     demon lord */ {  0,7,0,4,3,0,   1,0,0,0,0,0,14,5,  0,0,4,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   9,0,0,0,0,0 },
X/*     demon lord */ {  0,7,0,4,3,0,   1,0,0,0,0,0,14,5,  0,0,4,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   9,0,0,0,0,0 },
X/*     demon lord */ {  0,7,0,4,3,0,   1,0,0,0,0,0,14,5,  0,0,4,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   9,0,0,0,0,0 },
X/*     demon lord */ {  0,7,0,4,3,0,   1,0,0,0,0,0,14,5,  0,0,4,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   9,0,0,0,0,0 },
X/*     demon lord */ {  0,7,0,4,3,0,   1,0,0,0,0,0,14,5,  0,0,4,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   9,0,0,0,0,0 },
X/*     demon lord */ {  0,7,0,4,3,0,   1,0,0,0,0,0,14,5,  0,0,4,0,0,4,0,   4,0,0,0,4,4,   0,0,0,0,0,   9,0,0,0,0,0 },
X/*   demon prince */ {  0,7,0,4,3,9,   1,0,0,0,0,0,14,5,  0,0,4,0,0,4,0,   4,0,0,0,4,4,   4,0,0,0,4,   9,0,0,0,0,0 }
X
X };
X
Xchar *spelmes[] = { "",
X/*  1 */    "the web had no effect on the %s",
X/*  2 */    "the %s changed shape to avoid the web",
X/*  3 */    "the %s isn't afraid of you",
X/*  4 */    "the %s isn't affected",
X/*  5 */    "the %s can see you with his infravision",
X/*  6 */    "the %s vaporizes your missile",
X/*  7 */    "your missile bounces off the %s",
X/*  8 */    "the %s doesn't sleep",
X/*  9 */    "the %s resists",
X/* 10 */    "the %s can't hear the noise",
X/* 11 */    "the %s's tail cuts it free of the web",
X/* 12 */    "the %s burns through the web",
X/* 13 */    "your missiles pass right through the %s",
X/* 14 */    "the %s sees through your illusions",
X/* 15 */    "the %s loves the cold!",
X/* 16 */    "the %s loves the water!"
X };
X
X/*
X *  function to create scroll numbers with appropriate probability of 
X *  occurrence
X *
X *  0 - armor           1 - weapon      2 - enlightenment   3 - paper
X *  4 - create monster  5 - create item 6 - aggravate       7 - time warp
X *  8 - teleportation   9 - expanded awareness              10 - haste monst
X *  11 - heal monster   12 - spirit protection      13 - undead protection
X *  14 - stealth        15 - magic mapping          16 - hold monster
X *  17 - gem perfection 18 - spell extension        19 - identify
X *  20 - remove curse   21 - annihilation           22 - pulverization
X *  23 - life protection
X */
Xchar scprob[]= { 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3,
X    3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9,
X    9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14,
X    15, 15, 16, 16, 16, 17, 17, 18, 18, 19, 19, 19, 20, 20, 20, 20, 21, 22,
X    22, 22, 23 };
X
X/*
X *  function to return a potion number created with appropriate probability
X *  of occurrence
X *
X *  0 - sleep               1 - healing                 2 - raise level
X *  3 - increase ability    4 - gain wisdom             5 - gain strength
X *  6 - increase charisma   7 - dizziness               8 - learning
X *  9 - object detection    10 - monster detection      11 - forgetfulness
X *  12 - water              13 - blindness              14 - confusion
X *  15 - heroism            16 - sturdiness             17 - giant strength
X *  18 - fire resistance    19 - treasure finding       20 - instant healing
X *  21 - cure dianthroritis 22 - poison                 23 - see invisible
X */
Xchar potprob[] = { 0, 0, 1, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 9, 9,
X               10, 10, 10, 11, 11, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19,
X               20, 20, 22, 22, 23, 23 };
X
Xchar nlpts[] = { 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7 };
Xchar nch[] = { 0, 0, 0, 1, 1, 1, 2, 2, 3, 4 };
Xchar nplt[] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 4 };
Xchar ndgg[] = { 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5 };
Xchar nsw[] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3 };
END_OF_FILE
if test 31296 -ne `wc -c <'data.c'`; then
    echo shar: \"'data.c'\" unpacked with wrong size!
fi
# end of 'data.c'
fi
echo shar: End of archive 14 \(of 17\).
cp /dev/null ark14isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 17 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 
Mail submissions (sources or binaries) to <amiga@uunet.uu.net>.
Mail comments to the moderator at <amiga-request@uunet.uu.net>.
Post requests for sources, and general discussion to comp.sys.amiga.misc.
