Annotation of early-roguelike/xrogue/rogue.c, Revision 1.1
1.1 ! rubenllo 1: /*
! 2: rogue.c - Global game variables
! 3:
! 4: XRogue: Expeditions into the Dungeons of Doom
! 5: Copyright (C) 1991 Robert Pietkivitch
! 6: All rights reserved.
! 7:
! 8: Based on "Advanced Rogue"
! 9: Copyright (C) 1984, 1985 Michael Morgan, Ken Dalka and AT&T
! 10: All rights reserved.
! 11:
! 12: Based on "Rogue: Exploring the Dungeons of Doom"
! 13: Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman
! 14: All rights reserved.
! 15:
! 16: See the file LICENSE.TXT for full copyright and licensing information.
! 17: */
! 18:
! 19: #include <ctype.h>
! 20: #include <curses.h>
! 21: #include "rogue.h"
! 22:
! 23: /*
! 24: * Now all the global variables
! 25: */
! 26:
! 27: struct trap traps[MAXTRAPS];
! 28: struct room rooms[MAXROOMS]; /* One for each room -- A level */
! 29: struct room *oldrp; /* Roomin(&player.t_oldpos) */
! 30: struct thing player; /* The rogue */
! 31: struct object *cur_armor; /* What a well dresssed rogue wears */
! 32: struct object *cur_ring[NUM_FINGERS]; /* Which rings are being worn */
! 33: struct object *cur_misc[NUM_MM]; /* which MM's are in use */
! 34: int cur_relic[MAXRELIC]; /* Currently used relics */
! 35: struct linked_list *lvl_obj = NULL;
! 36: struct linked_list *mlist = NULL;
! 37: struct linked_list *rlist = NULL; /* list of dead monsters to be reaped */
! 38: struct linked_list *tlist = NULL; /* list of monsters fallen down traps */
! 39: struct linked_list *monst_dead = NULL; /* monster killed by monster */
! 40: struct object *cur_weapon = NULL;
! 41: int char_type = -1; /* what type of character is player */
! 42: int foodlev = 1; /* how fast he eats food */
! 43: int ntraps; /* Number of traps on this level */
! 44: int trader = 0; /* no. of purchases */
! 45: int curprice = -1; /* current price of item */
! 46: int seed; /* Random number seed */
! 47: int max_level; /* Deepest player has gone ever */
! 48: int cur_max; /* Deepest player has gone currently */
! 49: int prev_max; /* A flag indicating worm hole */
! 50: int move_free = 0; /* Movement check (io.c & actions.c) */
! 51: int mpos = 0;
! 52: int level = 0;
! 53: long purse = 0;
! 54: int inpack = 0;
! 55: int total = 0;
! 56: int no_food = 0; /* how long has he gone with no food */
! 57: int foods_this_level = 0; /* foods made per level */
! 58: int count = 0;
! 59: int food_left = STOMACHSIZE-MORETIME-1;
! 60: int group = 1;
! 61: int hungry_state = F_OKAY;
! 62: int infest_dam=0;
! 63: int lost_str=0;
! 64: int lastscore = -1;
! 65: int hold_count = 0;
! 66: int trap_tries = 0;
! 67: int chant_time = 0;
! 68: int pray_time = 0;
! 69: int spell_power = 0;
! 70: long turns = 0; /* Number of turns player has taken */
! 71: int quest_item = 0; /* Item player is looking for */
! 72: int cols = 0; /* number of columns in terminal */
! 73: int lines = 0; /* number of lines on the terminal */
! 74: int nfloors = -1; /* Number of floors in this dungeon */
! 75: char curpurch[LINELEN]; /* name of item ready to buy */
! 76: char PLAYER = VPLAYER; /* what the player looks like */
! 77: char take; /* Thing the rogue is taking */
! 78: char prbuf[LINELEN*2]; /* Buffer for sprintfs */
! 79: char runch; /* Direction player is running */
! 80: char *s_names[MAXSCROLLS]; /* Names of the scrolls */
! 81: char *p_colors[MAXPOTIONS]; /* Colors of the potions */
! 82: char *r_stones[MAXRINGS]; /* Stone settings of the rings */
! 83: char *ws_made[MAXSTICKS]; /* What sticks are made of */
! 84: char whoami[LINELEN]; /* Name of player */
! 85: char huh[LINELEN]; /* The last message printed */
! 86: char *s_guess[MAXSCROLLS]; /* Players guess at what scroll is */
! 87: char *p_guess[MAXPOTIONS]; /* Players guess at what potion is */
! 88: char *r_guess[MAXRINGS]; /* Players guess at what ring is */
! 89: char *ws_guess[MAXSTICKS]; /* Players guess at what wand is */
! 90: char *m_guess[MAXMM]; /* Players guess at what MM is */
! 91: char *ws_type[MAXSTICKS]; /* Is it a wand or a staff */
! 92: char file_name[LINELEN]; /* Save file name */
! 93: char score_file[LINELEN]; /* Score file name */
! 94: char home[LINELEN]; /* User's home directory */
! 95: WINDOW *cw; /* Window that the player sees */
! 96: WINDOW *hw; /* Used for the help command */
! 97: WINDOW *mw; /* Used to store monsters */
! 98: WINDOW *msgw; /* Used to display messages */
! 99: bool pool_teleport = FALSE; /* just teleported from a pool */
! 100: bool inwhgt = FALSE; /* true if from wghtchk() */
! 101: bool after; /* True if we want after daemons */
! 102: bool use_savedir = FALSE; /* Use common save location? */
! 103: bool waswizard; /* Was a wizard sometime */
! 104: bool s_know[MAXSCROLLS]; /* Does he know what a scroll does */
! 105: bool p_know[MAXPOTIONS]; /* Does he know what a potion does */
! 106: bool r_know[MAXRINGS]; /* Does he know what a ring does */
! 107: bool ws_know[MAXSTICKS]; /* Does he know what a stick does */
! 108: bool m_know[MAXMM]; /* Does he know what a MM does */
! 109:
! 110: /* options */
! 111: bool playing = TRUE; /* Defaults */
! 112: bool running = FALSE;
! 113: bool wizard = FALSE;
! 114: bool notify = TRUE;
! 115: bool fight_flush = FALSE;
! 116: bool terse = FALSE;
! 117: bool auto_pickup = FALSE;
! 118: bool def_attr = FALSE; /* default attributes */
! 119: bool menu_overlay = TRUE;
! 120: bool door_stop = TRUE;
! 121: bool jump = TRUE;
! 122: bool slow_invent = FALSE;
! 123: bool firstmove = FALSE;
! 124: bool askme = TRUE;
! 125: bool in_shell = FALSE;
! 126: bool daytime = TRUE;
! 127: bool funfont = FALSE;
! 128:
! 129: FILE *scorefi = NULL;
! 130: FILE *logfile = NULL;
! 131:
! 132: LEVTYPE levtype; /* what type of level am i'm on? */
! 133:
! 134: char *nothing = "Nothing seems to happen. ";
! 135: char *spacemsg = "--Press space to continue--";
! 136: char *morestr = " --More--";
! 137: char *retstr = "[Press return to continue]";
! 138:
! 139: /*
! 140: * This lays out all the class specific details
! 141: *
! 142: * Here are the beginning experience levels for all players.
! 143: * All further experience levels are computed by muliplying by 2
! 144: * up through MAXDOUBLE. Then exp pts are calculated by adding
! 145: * in the cap figure. You must change MAXDOUBLE if you change the
! 146: * cap figure.
! 147: */
! 148:
! 149: struct character_types char_class[NUM_CHARTYPES] = {
! 150: /* name exppts cap hitpts Base Maxlvl, Factor, Offset, Range */
! 151: { "fighter", 90, 1310720, 13, 10, 30, 2, 1, 3 },
! 152: { "ranger", 110, 2293760, 10, 10, 22, 2, 1, 2 },
! 153: { "paladin", 110, 1966080, 10, 10, 23, 2, 1, 2 },
! 154: { "magician", 105, 2129920, 9, 10, 24, 2, 1, 2 },
! 155: { "cleric", 105, 1802240, 9, 10, 24, 2, 1, 2 },
! 156: { "thief", 95, 1228800, 11, 10, 28, 2, 1, 3 },
! 157: { "assassin", 95, 1392640, 11, 10, 26, 2, 1, 3 },
! 158: { "druid", 105, 1638400, 9, 10, 24, 2, 1, 2 },
! 159: { "monk", 100, 1556480, 10, 10, 25, 2, 1, 2 },
! 160: { "monster", 0, 0, 8, 10, 20, 1, 0, 2 },
! 161: };
! 162:
! 163: /*
! 164: * This array lists the names of the character's abilities. It must be ordered
! 165: * according to the ability definitions in rogue.h.
! 166: */
! 167:
! 168: struct words abilities[NUMABILITIES] = {
! 169: { "Intelligence" }, { "Strength" }, { "Wisdom" },
! 170: { "Dexterity" }, { "Constitution" }, { "Charisma" }
! 171: };
! 172:
! 173: /*
! 174: * NOTE: the ordering of the points in this array is critical. They MUST
! 175: * be listed in the following sequence:
! 176: *
! 177: * 7 4 6
! 178: * 1 0 2
! 179: * 5 3 8
! 180: */
! 181:
! 182: coord grid[9] = {{0,0},
! 183: { 0,-1}, { 0, 1}, {-1, 0}, { 1, 0},
! 184: {-1,-1}, { 1, 1}, { 1,-1}, {-1, 1}
! 185: };
! 186:
! 187: struct death_type deaths[DEATHNUM] = {
! 188: { D_ARROW, "an arrow"},
! 189: { D_DART, "a dart"},
! 190: { D_BOLT, "a bolt"},
! 191: { D_POISON, "poison"},
! 192: { D_POTION, "a cursed potion"},
! 193: { D_PETRIFY, "petrification"},
! 194: { D_SUFFOCATION, "suffocation"},
! 195: { D_INFESTATION, "a parasite"},
! 196: { D_DROWN, "drowning"},
! 197: { D_ROT, "body rot"},
! 198: { D_CONSTITUTION, "poor health"},
! 199: { D_STRENGTH, "being too weak"},
! 200: { D_SIGNAL, "a bug"},
! 201: { D_CHOKE, "dust of choking"},
! 202: { D_STRANGLE, "strangulation"},
! 203: { D_FALL, "a fall"},
! 204: { D_RELIC, "an artifact's wrath"},
! 205: { D_STARVATION, "starvation"},
! 206: { D_FOOD_CHOKE, "choking on food"},
! 207: { D_SCROLL, "reading a scroll"},
! 208: { D_FRIGHT, "being too frightened"},
! 209: { D_CRYSTAL, "being absorbed"},
! 210: { D_CARD, "the face of death"},
! 211: };
! 212:
! 213: /*
! 214: * weapons and their attributes
! 215: */
! 216:
! 217: struct init_weps weaps[MAXWEAPONS] = {
! 218: { "mace", "2d10","2d10", NONE, ISMETAL, 6, 150, 15 },
! 219: { "long sword", "3d4", "2d8", NONE, ISMETAL, 5, 200, 25 },
! 220: { "short bow", "1d1", "1d1", NONE, 0, 8, 50, 4 },
! 221: { "arrow", "2d4", "1d6", BOW, ISMANY|ISMISL, 1, 5, 4 },
! 222: { "dagger", "2d8", "1d6", NONE, ISMETAL|ISMISL|ISMANY, 2,10,7},
! 223: { "rock", "2d4", "1d6", SLING, ISMANY|ISMISL, 1, 20, 3 },
! 224: { "two-handed sword","3d10","3d8", NONE, ISMETAL, 4, 250, 40 },
! 225: { "sling", "1d1", "1d1", NONE, 0, 8, 25, 3 },
! 226: { "dart", "2d4", "2d6", NONE, ISMANY|ISMISL, 2, 15, 7 },
! 227: { "crossbow", "1d1", "1d1", NONE, 0, 8, 75, 5 },
! 228: { "crossbow bolt", "2d4", "2d4", CROSSBOW, ISMANY|ISMISL, 1, 10, 5 },
! 229: { "spear", "2d6", "3d10", NONE, ISMISL, 7, 100, 15 },
! 230: { "trident", "3d6", "3d4", NONE, ISMETAL, 4, 200, 30 },
! 231: { "spetum", "2d6", "2d8", NONE, ISMETAL, 6, 150, 20 },
! 232: { "bardiche", "3d4", "2d10", NONE, ISMETAL, 5, 150, 25 },
! 233: { "pike", "2d8", "2d8", NONE, ISMETAL, 7, 100, 15 },
! 234: { "bastard sword", "3d8", "3d6", NONE, ISMETAL, 4, 175, 30 },
! 235: { "halberd", "2d8", "2d4", NONE, ISMETAL, 6, 100, 10 },
! 236: { "battle axe", "2d8", "3d8", NONE, ISMETAL, 5, 150, 15 },
! 237: } ;
! 238:
! 239: struct init_armor armors[MAXARMORS] = {
! 240: { "leather armor", 10, 8, 200, 100 },
! 241: { "ring mail", 20, 7, 250, 200 },
! 242: { "studded leather armor", 30, 5, 320, 250 },
! 243: { "scale mail", 40, 7, 280, 250 },
! 244: { "padded armor", 50, 6, 350, 300 },
! 245: { "chain mail", 60, 6, 350, 600 },
! 246: { "splint mail", 70, 5, 370, 400 },
! 247: { "banded mail", 80, 5, 370, 350 },
! 248: { "plate mail", 90, 4, 400, 400 },
! 249: { "plate armor", 100, 3, 500, 450 },
! 250: };
! 251:
! 252: struct magic_item things[NUMTHINGS] = {
! 253: { "potion", 220, 10 }, /* potion */
! 254: { "scroll", 220, 30 }, /* scroll */
! 255: { "food", 190, 20 }, /* food */
! 256: { "weapon", 90, 0 }, /* weapon */
! 257: { "armor", 90, 0 }, /* armor */
! 258: { "ring", 70, 5 }, /* ring */
! 259: { "stick", 70, 0 }, /* stick */
! 260: { "miscellaneous magic", 50, 50 }, /* miscellaneous magic */
! 261: { "artifact", 0, 10 }, /* artifact */
! 262: };
! 263:
! 264: struct magic_item s_magic[MAXSCROLLS] = {
! 265: { "monster confusion", 40, 125, 0, 0 },
! 266: { "magic mapping", 60, 150, 0, 5 },
! 267: { "light", 60, 100, 15, 15 },
! 268: { "hold monster", 30, 200, 20, 20 },
! 269: { "sleep", 20, 150, 25, 0 },
! 270: { "enchantment", 130, 200, 15, 15 },
! 271: { "identify", 170, 100, 0, 20 },
! 272: { "scare monster", 40, 250, 20, 30 },
! 273: { "gold detection", 30, 110, 0, 0 },
! 274: { "teleportation", 60, 165, 20, 20 },
! 275: { "create monster", 20, 75, 0, 0 },
! 276: { "remove curse", 80, 120, 15, 15 },
! 277: { "petrification", 30, 185, 0, 0 },
! 278: { "genocide", 10, 300, 0, 0 },
! 279: { "cure disease", 80, 160, 0, 0 },
! 280: { "acquirement", 10, 700, 0, 5 },
! 281: { "protection", 30, 190, 10, 0 },
! 282: { "trap finding", 50, 180, 0, 0 },
! 283: { "runes", 20, 50, 0, 0 },
! 284: { "charm monster", 30, 275, 0, 20 },
! 285: };
! 286:
! 287: struct magic_item p_magic[MAXPOTIONS] = {
! 288: { "clear thought", 50, 180, 10, 5 },
! 289: { "gain ability", 160, 210, 10, 10 },
! 290: { "see invisible", 40, 150, 20, 20 },
! 291: { "healing", 140, 130, 15, 15 },
! 292: { "monster detection", 40, 120, 0, 0 },
! 293: { "magic detection", 70, 105, 0, 0 },
! 294: { "raise level", 10, 450, 10, 5 },
! 295: { "haste self", 50, 180, 20, 5 },
! 296: { "restore abilities", 130, 140, 0, 15 },
! 297: { "phasing", 60, 210, 10, 10 },
! 298: { "invisibility", 20, 230, 0, 10 },
! 299: { "flying", 50, 130, 0, 15 },
! 300: { "food detection", 20, 150, 0, 0 },
! 301: { "skill", 10, 200, 20, 5 },
! 302: { "fire resistance", 40, 250, 10, 5 },
! 303: { "cold resistance", 40, 250, 10, 5 },
! 304: { "lightning protection", 40, 250, 20, 5 },
! 305: { "poison", 30, 205, 25, 0 },
! 306: };
! 307:
! 308: struct magic_item r_magic[MAXRINGS] = {
! 309: { "protection", 60, 200, 25, 25 },
! 310: { "add strength", 50, 200, 25, 25 },
! 311: { "sustain ability", 50, 500, 0, 0 },
! 312: { "searching", 40, 400, 0, 0 },
! 313: { "extra sight", 60, 350, 0, 0 },
! 314: { "alertness", 40, 380, 0, 0 },
! 315: { "aggravate monster", 30, 100, 100, 0 },
! 316: { "dexterity", 50, 220, 25, 25 },
! 317: { "increase damage", 60, 220, 25, 25 },
! 318: { "regeneration", 40, 600, 0, 0 },
! 319: { "slow digestion", 50, 240, 20, 20 },
! 320: { "teleportation", 20, 100, 90, 0 },
! 321: { "stealth", 20, 300, 0, 0 },
! 322: { "add intelligence", 50, 240, 25, 25 },
! 323: { "increase wisdom", 40, 220, 25, 25 },
! 324: { "sustain health", 80, 500, 0, 0 },
! 325: { "carrying", 10, 100, 90, 0 },
! 326: { "illumination", 30, 520, 0, 0 },
! 327: { "delusion", 10, 100, 100, 0 },
! 328: { "fear", 20, 100, 75, 0 },
! 329: { "heroism", 50, 390, 0, 0 },
! 330: { "fire resistance", 40, 400, 0, 0 },
! 331: { "warmth", 40, 400, 0, 0 },
! 332: { "vampiric regeneration", 10,1000, 0, 0 },
! 333: { "free action", 40, 370, 0, 0 },
! 334: { "teleport control", 10, 700, 0, 0 },
! 335: };
! 336:
! 337: struct magic_item ws_magic[MAXSTICKS] = {
! 338: { "light", 80, 120, 15, 15 },
! 339: { "striking", 50, 115, 0, 0 },
! 340: { "lightning", 40, 200, 0, 0 },
! 341: { "fire", 30, 200, 0, 0 },
! 342: { "cold", 30, 200, 0, 0 },
! 343: { "polymorph", 80, 150, 0, 0 },
! 344: { "magic missile", 90, 170, 0, 0 },
! 345: { "slow", 70, 220, 20, 10 },
! 346: { "drain life", 50, 210, 20, 0 },
! 347: { "charging", 70, 400, 0, 0 },
! 348: { "teleport", 90, 140, 20, 10 },
! 349: { "cancellation", 50, 130, 0, 0 },
! 350: { "confusion", 30, 100, 20, 0 },
! 351: { "disintegration", 20, 300, 25, 0 },
! 352: { "petrification", 30, 240, 0, 0 },
! 353: { "paralyzation", 30, 180, 10, 0 },
! 354: { "degeneration", 30, 250, 20, 0 },
! 355: { "curing", 50, 250, 20, 5 },
! 356: { "wonder", 40, 110, 20, 20 },
! 357: { "fear", 40, 180, 0, 0 },
! 358: };
! 359:
! 360: /*
! 361: * WARNING: unique miscellaneous magic items must be put at the end
! 362: * of this list. They MUST be the last items. The function
! 363: * create_obj() in wizard.c depends on it.
! 364: */
! 365:
! 366: struct magic_item m_magic[MAXMM] = {
! 367: { "alchemy jug", 40, 240, 0, 0 },
! 368: { "beaker of potions", 60, 300, 0, 0 },
! 369: { "book of spells", 60, 300, 0, 0 },
! 370: { "boots of elvenkind", 50, 500, 0, 0 },
! 371: { "bracers of defense", 80, 400, 20, 10 },
! 372: { "chime of opening", 30, 250, 0, 0 },
! 373: { "chime of hunger", 20, 100, 100, 0 },
! 374: { "cloak of displacement", 60, 500, 0, 0 },
! 375: { "cloak of protection", 80, 400, 20, 10 },
! 376: { "drums of panic", 60, 350, 0, 0 },
! 377: { "dust of disappearance", 30, 300, 0, 0 },
! 378: { "dust of choking", 30, 100, 100, 0 },
! 379: { "gauntlets of dexterity", 40, 600, 25, 0 },
! 380: { "gauntlets of ogre power", 40, 600, 25, 0 },
! 381: { "jewel of attacks", 50, 150, 100, 0 },
! 382: { "keoghtoms ointment", 60, 350, 0, 0 },
! 383: { "robe of powerlessness", 20, 100, 100, 0 },
! 384: { "gauntlets of fumbling", 30, 100, 100, 0 },
! 385: { "necklace of adaptation", 50, 500, 0, 0 },
! 386: { "necklace of strangulation", 30, 110, 100, 0 },
! 387: { "boots of dancing", 40, 120, 100, 0 },
! 388: { "book of skills", 30, 650, 0, 0 },
! 389: { "medicine crystal", 10, 800, 25, 5 },
! 390: };
! 391:
! 392: struct magic_item rel_magic[MAXRELIC] = {
! 393: { "Daggers of Musty Doit", 0, 50000, 0, 0},
! 394: { "Cloak of Emori", 0, 50000, 0, 0},
! 395: { "Ankh of Heil", 0, 50000, 0, 0},
! 396: { "Staff of Ming", 0, 50000, 0, 0},
! 397: { "Wand of Orcus", 0, 50000, 0, 0},
! 398: { "Rod of Asmodeus", 0, 50000, 0, 0},
! 399: { "Amulet of Yendor", 0, 50000, 0, 0},
! 400: { "Mandolin of Brian", 0, 50000, 0, 0},
! 401: { "Horn of Geryon", 0, 50000, 0, 0},
! 402: { "Morning Star of Hruggek", 0, 50000, 0, 0},
! 403: { "Flail of Yeenoghu", 0, 50000, 0, 0},
! 404: { "Eye of Vecna", 0, 50000, 0, 0},
! 405: { "Axe of Aklad", 0, 50000, 0, 0},
! 406: { "Quill of Nagrom", 0, 50000, 0, 0},
! 407: { "Amulet of Stonebones", 0, 50000, 0, 0},
! 408: { "Ring of Surtur", 0, 50000, 0, 0},
! 409: { "Card of Alteran", 0, 50000, 0, 0},
! 410: };
! 411:
! 412: /*
! 413: * food and fruits that you get
! 414: */
! 415: struct magic_item foods[MAXFOODS] = {
! 416:
! 417: { "food ration", 690, 50, 750, 0},
! 418: { "apple", 10, 20, 300, 0},
! 419: { "banana", 30, 20, 300, 0},
! 420: { "blueberry", 30, 20, 300, 0},
! 421: { "candleberry", 10, 20, 300, 0},
! 422: { "caprifig", 20, 20, 300, 0},
! 423: { "dewberry", 10, 20, 300, 0},
! 424: { "elderberry", 30, 20, 300, 0},
! 425: { "gooseberry", 20, 20, 300, 0},
! 426: { "guanabana", 30, 20, 300, 0},
! 427: { "hagberry", 10, 20, 300, 0},
! 428: { "jaboticaba", 10, 20, 300, 0},
! 429: { "peach", 10, 20, 300, 0},
! 430: { "pitanga", 10, 20, 300, 0},
! 431: { "prickly pear", 10, 20, 300, 0},
! 432: { "rambutan", 10, 20, 300, 0},
! 433: { "sapodilla", 10, 20, 300, 0},
! 434: { "soursop", 10, 20, 300, 0},
! 435: { "strawberry", 10, 20, 300, 0},
! 436: { "sweetsop", 10, 20, 300, 0},
! 437: { "whortleberry", 10, 20, 300, 0},
! 438: { "slime-mold", 10, 10, 100, 0},
! 439: };
! 440:
! 441: /*
! 442: * these are the spells that a magician can cast
! 443: */
! 444:
! 445: struct spells magic_spells[MAXSPELLS] = {
! 446: { P_TFIND, 3, TYP_POTION, 0 },
! 447: { S_IDENT, 5, TYP_SCROLL, 0 },
! 448: { S_LIGHT, 7, TYP_SCROLL, ISBLESSED },
! 449: { S_REMOVE, 10, TYP_SCROLL, 0 },
! 450: { S_FINDTRAPS, 15, TYP_SCROLL, 0 },
! 451: { P_FLY, 20, TYP_POTION, 0 },
! 452: { S_TELEP, 25, TYP_SCROLL, 0 },
! 453: { S_SLEEP, 30, TYP_SCROLL, 0 },
! 454: { P_SEEINVIS, 35, TYP_POTION, ISBLESSED },
! 455: { P_CLEAR, 40, TYP_POTION, 0 },
! 456: { WS_COLD, 45, TYP_STICK, 0 },
! 457: { P_PHASE, 50, TYP_POTION, 0 },
! 458: { WS_FIRE, 55, TYP_STICK, 0 },
! 459: { P_HASTE, 60, TYP_POTION, ISBLESSED },
! 460: { WS_ELECT, 65, TYP_STICK, 0 },
! 461: { S_HOLD, 70, TYP_SCROLL, ISBLESSED },
! 462: };
! 463:
! 464: /*
! 465: * these are the spells that a cleric can cast
! 466: */
! 467:
! 468: struct spells cleric_spells[MAXPRAYERS] = {
! 469: { P_MFIND, 3, TYP_POTION, 0 },
! 470: { P_TFIND, 5, TYP_POTION, 0 },
! 471: { S_LIGHT, 7, TYP_SCROLL, ISBLESSED },
! 472: { S_REMOVE, 10, TYP_SCROLL, 0 },
! 473: { P_FFIND, 15, TYP_POTION, 0 },
! 474: { P_FLY, 20, TYP_POTION, 0 },
! 475: { P_HEALING, 25, TYP_POTION, 0 },
! 476: { S_CURING, 30, TYP_SCROLL, 0 },
! 477: { P_RESTORE, 35, TYP_POTION, 0 },
! 478: { S_MAP, 40, TYP_SCROLL, 0 },
! 479: { P_SEEINVIS, 45, TYP_POTION, ISBLESSED },
! 480: { P_CLEAR, 50, TYP_POTION, 0 },
! 481: { P_PHASE, 55, TYP_POTION, 0 },
! 482: { WS_CURING, 60, TYP_STICK, ISBLESSED },
! 483: { WS_PARALYZE, 65, TYP_STICK, 0 },
! 484: { S_ALLENCH, 70, TYP_SCROLL, 0 },
! 485: };
! 486:
! 487: /*
! 488: * these are the spells that a druid can chant
! 489: */
! 490:
! 491: struct spells druid_spells[MAXCHANTS] = {
! 492: { P_MFIND, 3, TYP_POTION, 0 },
! 493: { P_TFIND, 5, TYP_POTION, 0 },
! 494: { S_LIGHT, 7, TYP_SCROLL, ISBLESSED },
! 495: { S_REMOVE, 10, TYP_SCROLL, 0 },
! 496: { S_FINDTRAPS, 15, TYP_SCROLL, 0 },
! 497: { S_CONFUSE, 20, TYP_SCROLL, 0 },
! 498: { P_FFIND, 25, TYP_POTION, 0 },
! 499: { P_HEALING, 30, TYP_POTION, 0 },
! 500: { S_MAP, 35, TYP_SCROLL, 0 },
! 501: { P_CLEAR, 40, TYP_POTION, 0 },
! 502: { P_COLD, 45, TYP_POTION, 0 },
! 503: { P_FIRE, 50, TYP_POTION, 0 },
! 504: { P_PHASE, 55, TYP_POTION, 0 },
! 505: { P_LIGHTNING, 60, TYP_POTION, 0 },
! 506: { S_CHARM, 65, TYP_SCROLL, ISBLESSED },
! 507: { S_HOLD, 70, TYP_SCROLL, ISBLESSED },
! 508: };
! 509:
! 510: /*
! 511: * these are the scrolls that a quill can write
! 512: */
! 513:
! 514: struct spells quill_scrolls[MAXQUILL] = {
! 515: { S_GFIND, 5, },
! 516: { S_IDENT, 10, },
! 517: { S_LIGHT, 10, },
! 518: { S_REMOVE, 15, },
! 519: { S_MAP, 20, },
! 520: { S_CONFUSE, 25, },
! 521: { S_SLEEP, 30, },
! 522: { S_CURING, 40, },
! 523: { S_TELEP, 50, },
! 524: { S_SCARE, 60, },
! 525: { S_HOLD, 70, },
! 526: { S_PETRIFY, 80, },
! 527: { S_PROTECT, 90, },
! 528: { S_ALLENCH, 100, },
! 529: };
! 530:
! 531: /*
! 532: * Experience-level names of each character (see NUM_CNAMES in rogue.h)
! 533: */
! 534:
! 535: const char *cnames[NUM_CHARTYPES-1][NUM_CNAMES] = {
! 536: { "Veteran", "Fighter", /* Fighter */
! 537: "Ruffian", "Tussler",
! 538: "Swordsman", "Hero",
! 539: "Bravo", "Picador",
! 540: "Stalwart", "Bashar",
! 541: "Swashbuckler", "Myrmidon",
! 542: "Fusileer", "Pugilist",
! 543: "Champion", "Superhero",
! 544: "Warrior", "Lord",
! 545: "Lord I", "Lord II",
! 546: "Lord III", "Lord IV",
! 547: "Lord V", "Lord VI",
! 548: "Lord VII", "Warrior Lord"
! 549: },
! 550: { "Runner", "Strider", /* Ranger */
! 551: "Warden", "Steward",
! 552: "Scout", "Courser",
! 553: "Tracker", "Guide",
! 554: "Protector", "Bartizan",
! 555: "Gendarme", "Sentinel",
! 556: "Vigilant", "Pathfinder",
! 557: "Guardian", "Overseer",
! 558: "Castellan", "Ranger",
! 559: "Lord Ranger I", "Lord Ranger II",
! 560: "Lord Ranger III", "Lord Ranger IV",
! 561: "Lord Ranger V", "Lord Ranger VI",
! 562: "Lord Ranger VII", "Master Ranger"
! 563: },
! 564: { "Gallant", "Keeper", /* Paladin */
! 565: "Bravado", "Brazen",
! 566: "Protector", "Defender",
! 567: "Warder", "Guardian",
! 568: "Champion", "Bulwark",
! 569: "Venturist", "Inspirator",
! 570: "Chevalier", "Justiciar",
! 571: "Undaunteer", "Plautus",
! 572: "Knight", "Paladin",
! 573: "Paladin I", "Paladin II",
! 574: "Paladin III", "Paladin IV",
! 575: "Paladin V", "Paladin VI",
! 576: "Paladin VII", "Lord Paladin"
! 577: },
! 578: { "Prestidigitator", "Evoker", /* Magic User */
! 579: "Summoner", "Invoker",
! 580: "Conjurer", "Theurgist",
! 581: "Illusionist", "Diviner",
! 582: "Thaumaturgist", "Magician",
! 583: "Thelemist", "Magus",
! 584: "Enchanter", "Warlock",
! 585: "Witch", "Shaman",
! 586: "Sorcerer", "Wizard",
! 587: "Wizard I", "Wizard II",
! 588: "Wizard III", "Wizard IV",
! 589: "Wizard V", "Wizard VI",
! 590: "Wizard VII", "Lord Magus"
! 591: },
! 592: { "Acolyte", "Adept", /* Cleric */
! 593: "Charmer", "Friar",
! 594: "Priest", "Curate",
! 595: "Vicar", "Deacon",
! 596: "Sabiast", "Cabalist",
! 597: "Prefect", "Canon",
! 598: "Minister", "Cardinal",
! 599: "Bishop", "Patriarch",
! 600: "Exorcist", "Archdeacon",
! 601: "High Priest I", "High Priest II",
! 602: "High Priest III", "High Priest IV",
! 603: "High Priest V", "High Priest VI",
! 604: "High Priest VII", "Reverend Lord"
! 605: },
! 606: { "Rogue", "Footpad", /* Thief */
! 607: "Cutpurse", "Robber",
! 608: "Vagrant", "Truant",
! 609: "Burglar", "Filcher",
! 610: "Sharper", "Magsman",
! 611: "Racketeer", "Prowler",
! 612: "Crook", "Bounder",
! 613: "Quisling", "Malfeasor",
! 614: "Swindler", "Thief",
! 615: "Master Thief I", "Master Thief II",
! 616: "Master Thief III", "Master Thief IV",
! 617: "Master Thief V", "Master Thief VI",
! 618: "Master Thief VII", "Master Rogue"
! 619: },
! 620: { "Bravo", "Rutterkin", /* Assassin */
! 621: "Waghalter", "Murderer",
! 622: "Butcher", "Desperado",
! 623: "Thug", "Killer",
! 624: "Cutthroat", "Executioner",
! 625: "Eradicator", "Obliterator",
! 626: "Mechanic", "Wiseguy",
! 627: "Nihilist", "Berserker",
! 628: "Assassin", "Expert Assassin",
! 629: "Prime Assassin I", "Prime Assassin II",
! 630: "Prime Assassin III", "Prime Assassin IV",
! 631: "Prime Assassin V", "Prime Assassin VI",
! 632: "Prime Assassin VII", "Master Assassin"
! 633: },
! 634: { "Aspirant", "Ovate", /* Druid */
! 635: "Practitioner", "Devoutist",
! 636: "Initiate 1st Circle", "Initiate 2nd Circle",
! 637: "Initiate 3rd Circle", "Initiate 4th Circle",
! 638: "Initiate 5th Circle", "Initiate 6th Circle",
! 639: "Initiate 7th Circle", "Initiate 8th Circle",
! 640: "Initiate 9th Circle", "Illuminati",
! 641: "Lesser Druid", "Arch Druid",
! 642: "Druid", "Master Druid",
! 643: "Master Druid I", "Master Druid II",
! 644: "Master Druid III", "Master Druid IV",
! 645: "Master Druid V", "Master Druid VI",
! 646: "Master Druid VII", "Lord Druid"
! 647: },
! 648: { "Novice", "Initiate", /* Monk */
! 649: "Brother", "Disciple",
! 650: "Canon", "Elder",
! 651: "Precept", "Lama",
! 652: "Immaculate", "Wizard",
! 653: "Shaman", "Master",
! 654: "Superior Master", "Master of Dragons",
! 655: "Master of North Wind", "Master of West Wind",
! 656: "Master of South Wind", "Master of East Wind",
! 657: "Grand Master I", "Grand Master II",
! 658: "Grand Master III", "Grand Master IV",
! 659: "Grand Master V", "Grand Master VI",
! 660: "Grand Master VII", "Lord Monk"
! 661: }
! 662: };
! 663:
CVSweb