#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)data.c 5.3 (Berkeley) 5/13/91";
#else
__RCSID("$NetBSD: data.c,v 1.13 2008/02/03 20:11:04 dholland Exp $");
#endif
#endif
#include "header.h"
#include "extern.h"
static char aa1[] = " mighty evil master";
static char aa2[] = "apprentice demi-god";
static char aa3[] = " minor demi-god ";
static char aa4[] = " major demi-god ";
static char aa5[] = " minor deity ";
static char aa6[] = " major deity ";
static char aa7[] = " novice guardian ";
static char aa8[] = "apprentice guardian";
static char aa9[] = " The Creator ";
const char *class[] =
{
" novice explorer ", "apprentice explorer", " practiced explorer",
" expert explorer ", " novice adventurer", " adventurer ",
"apprentice conjurer", " conjurer ", " master conjurer ",
" apprentice mage ", " mage ", " experienced mage ",
" master mage ", " apprentice warlord", " novice warlord ",
" expert warlord ", " master warlord ", " apprentice gorgon ",
" gorgon ", " practiced gorgon ", " master gorgon ",
" demi-gorgon ", " evil master ", " great evil master ",
aa1, aa1, aa1,
aa1, aa1, aa1,
aa1, aa1, aa1,
aa1, aa1, aa1,
aa1, aa1, aa1,
aa2, aa2, aa2,
aa2, aa2, aa2,
aa2, aa2, aa2,
aa3, aa3, aa3,
aa3, aa3, aa3,
aa3, aa3, aa3,
aa4, aa4, aa4,
aa4, aa4, aa4,
aa4, aa4, aa4,
aa5, aa5, aa5,
aa5, aa5, aa5,
aa5, aa5, aa5,
aa6, aa6, aa6,
aa6, aa6, aa6,
aa6, aa6, aa6,
aa7, aa7, aa7,
aa8, aa8, aa8,
aa8, aa8, aa8,
" earth guardian ", " air guardian ", " fire guardian ",
" water guardian ", " time guardian ", " ethereal guardian ",
aa9, aa9, aa9,
};
#define MEG 1000000
long skill[] = {
0, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120,
10240, 20480, 40960, 100000, 200000, 400000, 700000, 1 * MEG,
2 * MEG, 3 * MEG, 4 * MEG, 5 * MEG, 6 * MEG, 8 * MEG, 10 * MEG,
12 * MEG, 14 * MEG, 16 * MEG, 18 * MEG, 20 * MEG, 22 * MEG, 24 * MEG, 26 * MEG, 28 * MEG,
30 * MEG, 32 * MEG, 34 * MEG, 36 * MEG, 38 * MEG, 40 * MEG, 42 * MEG, 44 * MEG, 46 * MEG,
48 * MEG, 50 * MEG, 52 * MEG, 54 * MEG, 56 * MEG, 58 * MEG, 60 * MEG, 62 * MEG, 64 * MEG,
66 * MEG, 68 * MEG, 70 * MEG, 72 * MEG, 74 * MEG, 76 * MEG, 78 * MEG, 80 * MEG, 82 * MEG,
84 * MEG, 86 * MEG, 88 * MEG, 90 * MEG, 92 * MEG, 94 * MEG, 96 * MEG, 98 * MEG, 100 * MEG,
105 * MEG, 110 * MEG, 115 * MEG, 120 * MEG, 125 * MEG, 130 * MEG, 135 * MEG, 140 * MEG,
145 * MEG, 150 * MEG, 155 * MEG, 160 * MEG, 165 * MEG, 170 * MEG, 175 * MEG, 180 * MEG,
185 * MEG, 190 * MEG, 195 * MEG, 200 * MEG, 210 * MEG, 220 * MEG, 230 * MEG, 240 * MEG,
250 * MEG, 260 * MEG, 270 * MEG, 280 * MEG, 290 * MEG, 300 * MEG
};
#undef MEG
u_char *lpbuf, *lpnt, *inbuffer, *lpend;
struct cel *cell;
short hitp[MAXX][MAXY];
short iarg[MAXX][MAXY];
u_char item[MAXX][MAXY];
u_char know[MAXX][MAXY];
u_char mitem[MAXX][MAXY];
u_char moved[MAXX][MAXY];
u_char stealth[MAXX][MAXY];
u_char iven[26];
short ivenarg[26];
char lastmonst[40];
u_char beenhere[MAXLEVEL + MAXVLEVEL] = {0};
char VERSION = VER;
char SUBVERSION = SUBVER;
u_char nosignal = 0;
u_char predostuff = 0;
char loginname[20];
char logname[LOGNAMESIZE];
u_char sex = 1;
u_char boldon = 1;
u_char ckpflag = 0;
u_char cheat = 0;
short level = 0;
u_char wizard = 0;
short lastnum = 0;
short hitflag = 0;
short hit2flag = 0;
short hit3flag = 0;
short playerx, playery;
short lastpx, lastpy;
short oldx, oldy;
short lasthx = 0, lasthy = 0;
short nobeep = 0;
unsigned long randx = 33601;
time_t initialtime = 0;
long gltime = 0;
long outstanding_taxes = 0;
long c[100], cbak[100];
int enable_scroll = 0;
char aborted[] = " aborted";
struct sphere *spheres = 0;
const char *levelname[] =
{" H", " 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9", "10", "V1", "V2", "V3"};
char objnamelist[] = " ATOP%^F&^+M=%^$$f*OD#~][[)))(((||||||||{?!BC}o:@.<<<<EVV))([[]]](^ [H*** ^^ S tsTLc............................................";
char monstnamelist[] = " BGHJKOScjtAELNQRZabhiCTYdegmvzFWflorXV pqsyUkMwDDPxnDDuD ...............................................................";
const char *objectname[] =
{0, "a holy altar", "a handsome jewel encrusted throne", "the orb", "a pit",
"a staircase leading upwards", "an elevator going up", "a bubbling fountain",
"a great marble statue", "a teleport trap", "the college of Larn",
"a mirror", "the DND store", "a staircase going down", "an elevator going down",
"the bank of Larn", "the 5th branch of the Bank of Larn",
"a dead fountain", "gold", "an open door", "a closed door",
"a wall", "The Eye of Larn", "plate mail", "chain mail", "leather armor",
"a sword of slashing", "Bessman's flailing hammer", "a sunsword",
"a two handed sword", "a spear", "a dagger",
"ring of extra regeneration", "a ring of regeneration", "a ring of protection",
"an energy ring", "a ring of dexterity", "a ring of strength",
"a ring of cleverness", "a ring of increase damage", "a belt of striking",
"a magic scroll", "a magic potion", "a book", "a chest",
"an amulet of invisibility", "an orb of dragon slaying",
"a scarab of negate spirit", "a cube of undead control",
"device of theft prevention", "a brilliant diamond", "a ruby",
"an enchanting emerald", "a sparkling sapphire", "the dungeon entrance",
"a volcanic shaft leaning downward", "the base of a volcanic shaft",
"a battle axe", "a longsword", "a flail", "ring mail", "studded leather armor",
"splint mail", "plate armor", "stainless plate armor", "a lance of death",
"an arrow trap", "an arrow trap", "a shield", "your home",
"gold", "gold", "gold", "a dart trap",
"a dart trap", "a trapdoor", "a trapdoor", "the local trading post",
"a teleport trap", "a massive throne",
"a sphere of annihilation", "a handsome jewel encrusted throne",
"the Larn Revenue Service", "a fortune cookie", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""
};
u_char monstlevel[] = {5, 11, 17, 22, 27, 33, 39, 42, 46, 50, 53, 56, 59};
struct monst monster[] = {
{"", 0, 0, 0, 0, 0, 0, 3, 0, 0, 0},
{"bat", 1, 0, 1, 0, 0, 0, 3, 0, 1, 1},
{"gnome", 1, 10, 1, 0, 0, 0, 8, 30, 2, 2},
{"hobgoblin", 1, 14, 2, 0, 0, 0, 5, 25, 3, 2},
{"jackal", 1, 17, 1, 0, 0, 0, 4, 0, 1, 1},
{"kobold", 1, 20, 1, 0, 0, 0, 7, 10, 1, 1},
{"orc", 2, 12, 1, 0, 0, 0, 9, 40, 4, 2},
{"snake", 2, 15, 1, 0, 0, 0, 3, 0, 3, 1},
{"giant centipede", 2, 14, 0, 4, 0, 0, 3, 0, 1, 2},
{"jaculi", 2, 20, 1, 0, 0, 0, 3, 0, 2, 1},
{"troglodyte", 2, 10, 2, 0, 0, 0, 5, 80, 4, 3},
{"giant ant", 2, 8, 1, 4, 0, 0, 4, 0, 5, 5},
{"floating eye", 3, 8, 1, 0, 0, 0, 3, 0, 5, 2},
{"leprechaun", 3, 3, 0, 8, 0, 0, 3, 1500, 13, 45},
{"nymph", 3, 3, 0, 14, 0, 0, 9, 0, 18, 45},
{"quasit", 3, 5, 3, 0, 0, 0, 3, 0, 10, 15},
{"rust monster", 3, 4, 0, 1, 0, 0, 3, 0, 18, 25},
{"zombie", 3, 12, 2, 0, 0, 0, 3, 0, 6, 7},
{"assassin bug", 4, 9, 3, 0, 0, 0, 3, 0, 20, 15},
{"bugbear", 4, 5, 4, 15, 0, 0, 5, 40, 20, 35},
{"hell hound", 4, 5, 2, 2, 0, 0, 6, 0, 16, 35},
{"ice lizard", 4, 11, 2, 10, 0, 0, 6, 50, 16, 25},
{"centaur", 4, 6, 4, 0, 0, 0, 10, 40, 24, 45},
{"troll", 5, 4, 5, 0, 0, 0, 9, 80, 50, 300},
{"yeti", 5, 6, 4, 0, 0, 0, 5, 50, 35, 100},
{"white dragon", 5, 2, 4, 5, 0, 0, 16, 500, 55, 1000},
{"elf", 5, 8, 1, 0, 0, 0, 15, 50, 22, 35},
{"gelatinous cube", 5, 9, 1, 0, 0, 0, 3, 0, 22, 45},
{"metamorph", 6, 7, 3, 0, 0, 0, 3, 0, 30, 40},
{"vortex", 6, 4, 3, 0, 0, 0, 3, 0, 30, 55},
{"ziller", 6, 15, 3, 0, 0, 0, 3, 0, 30, 35},
{"violet fungi", 6, 12, 3, 0, 0, 0, 3, 0, 38, 100},
{"wraith", 6, 3, 1, 6, 0, 0, 3, 0, 30, 325},
{"forvalaka", 6, 2, 5, 0, 0, 0, 7, 0, 50, 280},
{"lama nobe", 7, 7, 3, 0, 0, 0, 6, 0, 35, 80},
{"osequip", 7, 4, 3, 16, 0, 0, 4, 0, 35, 100},
{"rothe", 7, 15, 5, 0, 0, 0, 3, 100, 50, 250},
{"xorn", 7, 0, 6, 0, 0, 0, 13, 0, 60, 300},
{"vampire", 7, 3, 4, 6, 0, 0, 17, 0, 50, 1000},
{"invisible stalker", 7, 3, 6, 0, 0, 0, 5, 0, 50, 350},
{"poltergeist", 8, 1, 4, 0, 0, 0, 3, 0, 50, 450},
{"disenchantress", 8, 3, 0, 9, 0, 0, 3, 0, 50, 500},
{"shambling mound", 8, 2, 5, 0, 0, 0, 6, 0, 45, 400},
{"yellow mold", 8, 12, 4, 0, 0, 0, 3, 0, 35, 250},
{"umber hulk", 8, 3, 7, 11, 0, 0, 14, 0, 65, 600},
{"gnome king", 9, -1, 10, 0, 0, 0, 18, 2000, 100, 3000},
{"mimic", 9, 5, 6, 0, 0, 0, 8, 0, 55, 99},
{"water lord", 9, -10, 15, 7, 0, 0, 20, 0, 150, 15000},
{"bronze dragon", 9, 2, 9, 3, 0, 0, 16, 300, 80, 4000},
{"green dragon", 9, 3, 8, 10, 0, 0, 15, 200, 70, 2500},
{"purple worm", 9, -1, 11, 0, 0, 0, 3, 100, 120, 15000},
{"xvart", 9, -2, 12, 0, 0, 0, 13, 0, 90, 1000},
{"spirit naga", 10, -20, 12, 12, 0, 0, 23, 0, 95, 20000},
{"silver dragon", 10, -1, 12, 3, 0, 0, 20, 700, 100, 10000},
{"platinum dragon", 10, -5, 15, 13, 0, 0, 22, 1000, 130, 24000},
{"green urchin", 10, -3, 12, 0, 0, 0, 3, 0, 85, 5000},
{"red dragon", 10, -2, 13, 3, 0, 0, 19, 800, 110, 14000},
{"type I demon lord", 12, -30, 18, 0, 0, 0, 20, 0, 140, 50000},
{"type II demon lord", 13, -30, 18, 0, 0, 0, 21, 0, 160, 75000},
{"type III demon lord", 14, -30, 18, 0, 0, 0, 22, 0, 180, 100000},
{"type IV demon lord", 15, -35, 20, 0, 0, 0, 23, 0, 200, 125000},
{"type V demon lord", 16, -40, 22, 0, 0, 0, 24, 0, 220, 150000},
{"type VI demon lord", 17, -45, 24, 0, 0, 0, 25, 0, 240, 175000},
{"type VII demon lord", 18, -70, 27, 6, 0, 0, 26, 0, 260, 200000},
{"demon prince", 25, -127, 30, 6, 0, 0, 28, 0, 345, 300000}
};
const char *scrollname[] = {"", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", ""};
const char *scrollhide[] = {
" enchant armor",
" enchant weapon",
" enlightenment",
" blank paper",
" create monster",
" create artifact",
" aggravate monsters",
" time warp",
" teleportation",
" expanded awareness",
" haste monsters",
" monster healing",
" spirit protection",
" undead protection",
" stealth",
" magic mapping",
" hold monsters",
" gem perfection",
" spell extension",
" identify",
" remove curse",
" annihilation",
" pulverization",
" life protection",
" ",
" ",
" ",
" "
};
const char *potionname[] = {"", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", ""};
const char *potionhide[] = {
" sleep",
" healing",
" raise level",
" increase ability",
" wisdom",
" strength",
" raise charisma",
" dizziness",
" learning",
" gold detection",
" monster detection",
" forgetfulness",
" water",
" blindness",
" confusion",
" heroism",
" sturdiness",
" giant strength",
" fire resistance",
" treasure finding",
" instant healing",
" cure dianthroritis",
" poison",
" see invisible",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
u_char spelknow[SPNUM] = {0};
u_char splev[] = {1, 4, 9, 14, 18, 22, 26, 29, 32, 35, 37, 37, 37, 37, 37};
const char *spelcode[] = {
"pro", "mle", "dex", "sle", "chm", "ssp",
"web", "str", "enl", "hel", "cbl", "cre", "pha", "inv",
"bal", "cld", "ply", "can", "has", "ckl", "vpr",
"dry", "lit", "drl", "glo", "flo", "fgr",
"sca", "hld", "stp", "tel", "mfi",
"sph", "gen", "sum", "wtw", "alt", "per"
};
const char *spelname[] = {
"protection", "magic missile", "dexterity",
"sleep", "charm monster", "sonic spear",
"web", "strength", "enlightenment",
"healing", "cure blindness", "create monster",
"phantasmal forces", "invisibility",
"fireball", "cold", "polymorph",
"cancellation", "haste self", "cloud kill",
"vaporize rock",
"dehydration", "lightning", "drain life",
"invulnerability", "flood", "finger of death",
"scare monster", "hold monster", "time stop",
"teleport away", "magic fire",
"sphere of annihilation", "genocide", "summon demon",
"walk through walls", "alter reality", "permanence",
""
};
const char *speldescript[] = {
"generates a +2 protection field",
"creates and hurls a magic missile equivalent to a +1 magic arrow",
"adds +2 to the caster's dexterity",
"causes some monsters to go to sleep",
"some monsters may be awed at your magnificence",
"causes your hands to emit a screeching sound toward what they point",
"causes strands of sticky thread to entangle an enemy",
"adds +2 to the caster's strength for a short term",
"the caster becomes aware of things in the vicinity",
"restores some hp to the caster",
"restores sight to one so unfortunate as to be blinded",
"creates a monster near the caster appropriate for the location",
"creates illusions, and if believed, monsters die",
"the caster becomes invisible",
"makes a ball of fire that burns on what it hits",
"sends forth a cone of cold which freezes what it touches",
"you can find out what this does for yourself",
"negates the ability of a monster to use its special abilities",
"speeds up the caster's movements",
"creates a fog of poisonous gas which kills all that is within it",
"this changes rock to air",
"dries up water in the immediate vicinity",
"your finger will emit a lightning bolt when this spell is cast",
"subtracts hit points from both you and a monster",
"this globe helps to protect the player from physical attack",
"this creates an avalanche of H2O to flood the immediate chamber",
"this is a holy spell and calls upon your god to back you up",
"terrifies the monster so that hopefully it won't hit the magic user",
"the monster is frozen in its tracks if this is successful",
"all movement in the caverns ceases for a limited duration",
"moves a particular monster around in the dungeon (hopefully away from you)",
"this causes a curtain of fire to appear all around you",
"anything caught in this sphere is instantly killed. Warning -- dangerous",
"eliminates a species of monster from the game -- use sparingly",
"summons a demon who hopefully helps you out",
"allows the player to walk through walls for a short period of time",
"god only knows what this will do",
"makes a character spell permanent, i. e. protection, strength, etc.",
""
};
char spelweird[MAXMONST + 8][SPNUM] = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{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},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{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},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0},
{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},
{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},
{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},
{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},
{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}
};
const char *spelmes[] = {"",
"the web had no effect on the %s",
"the %s changed shape to avoid the web",
"the %s isn't afraid of you",
"the %s isn't affected",
"the %s can see you with his infravision",
"the %s vaporizes your missile",
"your missile bounces off the %s",
"the %s doesn't sleep",
"the %s resists",
"the %s can't hear the noise",
"the %s's tail cuts it free of the web",
"the %s burns through the web",
"your missiles pass right through the %s",
"the %s sees through your illusions",
"the %s loves the cold!",
"the %s loves the water!"
};
u_char scprob[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3,
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,
9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14,
15, 15, 16, 16, 16, 17, 17, 18, 18, 19, 19, 19, 20, 20, 20, 20, 21, 22,
22, 22, 23};
u_char potprob[] = {0, 0, 1, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 20, 22, 22, 23, 23};
u_char nlpts[] = {0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7};
u_char nch[] = {0, 0, 0, 1, 1, 1, 2, 2, 3, 4};
u_char nplt[] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 4};
u_char ndgg[] = {0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5};
u_char nsw[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3};