/*************************************************************************** * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, * * Michael Seifert, Hans Henrik Strfeldt, Tom Madsen, and Katja Nyboe. * * * * Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael * * Chastain, Michael Quan, and Mitchell Tse. * * * * In order to use any part of this Merc Diku Mud, you must comply with * * both the original Diku license in 'license.doc' as well the Merc * * license in 'license.txt'. In particular, you may not remove either of * * these copyright notices. * * * * Much time and thought has gone into this software and you are * * benefitting. We hope that you share your changes too. What goes * * around, comes around. * **************************************************************************/ /*************************************************************************** * ROM 2.4 is copyright 1993-1998 Russ Taylor * * ROM has been brought to you by the ROM consortium * * Russ Taylor (rtaylor@hypercube.org) * * Gabrielle Taylor (gtaylor@hypercube.org) * * Brian Moore (zump@rom.org) * * By using this code, you have agreed to follow the terms of the * * ROM license, in the file Rom24/doc/rom.license * **************************************************************************/ #if defined(macintosh) #include <types.h> #else #include <sys/types.h> #endif #include <stdio.h> #include <time.h> #include "merc.h" #include "magic.h" #include "interp.h" #include "skill_trees.h" /* item type list */ const struct item_type item_table[] = { {ITEM_LIGHT, "light"}, {ITEM_SCROLL, "scroll"}, {ITEM_WAND, "wand"}, {ITEM_STAFF, "staff"}, {ITEM_WEAPON, "weapon"}, {ITEM_TREASURE, "treasure"}, {ITEM_ARMOR, "armor"}, {ITEM_POTION, "potion"}, {ITEM_CLOTHING, "clothing"}, {ITEM_FURNITURE, "furniture"}, {ITEM_TRASH, "trash"}, {ITEM_CONTAINER, "container"}, {ITEM_DRINK_CON, "drink"}, {ITEM_KEY, "key"}, {ITEM_FOOD, "food"}, {ITEM_MONEY, "money"}, {ITEM_BOAT, "boat"}, {ITEM_CORPSE_NPC, "npc_corpse"}, {ITEM_CORPSE_PC, "pc_corpse"}, {ITEM_FOUNTAIN, "fountain"}, {ITEM_PILL, "pill"}, {ITEM_PROTECT, "protect"}, {ITEM_MAP, "map"}, {ITEM_PORTAL, "portal"}, {ITEM_WARP_STONE, "warp_stone"}, {ITEM_ROOM_KEY, "room_key"}, {ITEM_GEM, "gem"}, {ITEM_JEWELRY, "jewelry"}, {ITEM_JUKEBOX, "jukebox"}, {ITEM_HERB, "herb"}, {ITEM_RING, "ring"}, {ITEM_AMULET, "amulet"}, {ITEM_SKULL, "skull"}, {ITEM_BOUNTY, "bounty_paper"}, {ITEM_BOW, "bow"}, {ITEM_ARROW, "arrow"}, {ITEM_WINDGATE, "windgate"}, {ITEM_PULLY, "pully"}, {ITEM_WIZ_SCROLL, "wizard_scroll"}, {ITEM_PRI_SCROLL, "priest_scroll"}, {ITEM_FGT_SCROLL, "fighter_tome"}, {ITEM_THI_SCROLL, "thief_tome"}, {0, NULL} }; /* weapon selection table */ const struct weapon_type weapon_table[] = { {"sword", OBJ_VNUM_SCHOOL_SWORD, WEAPON_SWORD, &gsn_sword}, {"mace", OBJ_VNUM_SCHOOL_MACE, WEAPON_MACE, &gsn_mace}, {"dagger", OBJ_VNUM_SCHOOL_DAGGER, WEAPON_DAGGER, &gsn_dagger}, {"axe", OBJ_VNUM_SCHOOL_AXE, WEAPON_AXE, &gsn_axe}, {"staff", OBJ_VNUM_SCHOOL_STAFF, WEAPON_SPEAR, &gsn_spear}, {"flail", OBJ_VNUM_SCHOOL_FLAIL, WEAPON_FLAIL, &gsn_flail}, {"whip", OBJ_VNUM_SCHOOL_WHIP, WEAPON_WHIP, &gsn_whip}, {"polearm", OBJ_VNUM_SCHOOL_POLEARM, WEAPON_POLEARM, &gsn_polearm}, {NULL, 0, 0, NULL} }; /* wiznet table and prototype for future flag setting */ const struct wiznet_type wiznet_table[] = { {"on", WIZ_ON, IM}, {"prefix", WIZ_PREFIX, IM}, {"ticks", WIZ_TICKS, IM}, {"logins", WIZ_LOGINS, IM}, {"sites", WIZ_SITES, L4}, {"links", WIZ_LINKS, L7}, {"newbies", WIZ_NEWBIE, IM}, {"spam", WIZ_SPAM, L5}, {"deaths", WIZ_DEATHS, IM}, {"resets", WIZ_RESETS, L4}, {"mobdeaths", WIZ_MOBDEATHS, L4}, {"flags", WIZ_FLAGS, L5}, {"penalties", WIZ_PENALTIES, L5}, {"saccing", WIZ_SACCING, L5}, {"levels", WIZ_LEVELS, IM}, {"load", WIZ_LOAD, L2}, {"restore", WIZ_RESTORE, L2}, {"snoops", WIZ_SNOOPS, L2}, {"switches", WIZ_SWITCHES, L2}, {"secure", WIZ_SECURE, L1}, {NULL, 0, 0} }; /* attack table -- not very organized :( */ const struct attack_type attack_table[MAX_DAMAGE_MESSAGE] = { {"none", "hit", -1}, /* 0 */ {"slice", "slice", DAM_SLASH}, {"stab", "stab", DAM_PIERCE}, {"slash", "slash", DAM_SLASH}, {"whip", "whip", DAM_SLASH}, {"claw", "claw", DAM_SLASH}, /* 5 */ {"blast", "blast", DAM_BASH}, {"pound", "pound", DAM_BASH}, {"crush", "crush", DAM_BASH}, {"grep", "grep", DAM_SLASH}, {"bite", "bite", DAM_PIERCE}, /* 10 */ {"pierce", "pierce", DAM_PIERCE}, {"suction", "suction", DAM_BASH}, {"beating", "beating", DAM_BASH}, {"digestion", "digestion", DAM_ACID}, {"charge", "charge", DAM_BASH}, /* 15 */ {"slap", "slap", DAM_BASH}, {"punch", "punch", DAM_BASH}, {"wrath", "wrath", DAM_ENERGY}, {"magic", "magic", DAM_ENERGY}, {"divine", "divine power", DAM_HOLY}, /* 20 */ {"cleave", "cleave", DAM_SLASH}, {"scratch", "scratch", DAM_PIERCE}, {"peck", "peck", DAM_PIERCE}, {"peckb", "peck", DAM_BASH}, {"chop", "chop", DAM_SLASH}, /* 25 */ {"sting", "sting", DAM_PIERCE}, {"smash", "smash", DAM_BASH}, {"shbite", "shocking bite", DAM_LIGHTNING}, {"flbite", "flaming bite", DAM_FIRE}, {"frbite", "freezing bite", DAM_COLD}, /* 30 */ {"acbite", "acidic bite", DAM_ACID}, {"chomp", "chomp", DAM_PIERCE}, {"drain", "life drain", DAM_NEGATIVE}, {"thrust", "thrust", DAM_PIERCE}, {"slime", "slime", DAM_ACID}, {"shock", "shock", DAM_LIGHTNING}, {"thwack", "thwack", DAM_BASH}, {"flame", "flame", DAM_FIRE}, {"chill", "chill", DAM_COLD}, {NULL, NULL, 0} }; /* race table */ const struct race_type race_table[] = { /* { name, pc_race?, act bits, aff_by bits, off bits, imm, res, vuln, form, parts }, */ {"unique", FALSE, 0, 0, 0, 0, 0, 0, 0, 0}, {"human", TRUE, 0, 0, 0, 0, 0, 0, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"high-elf", TRUE, 0, AFF_DETECT_MAGIC | AFF_DETECT_HIDDEN, 0, 0, RES_POISON | RES_DISEASE | RES_WOOD, VULN_CHARM, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"wood-elf", TRUE, 0, AFF_DETECT_MAGIC | AFF_DETECT_HIDDEN, 0, 0, RES_POISON, VULN_SOUND, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"drow", TRUE, 0, AFF_DETECT_MAGIC | AFF_DETECT_HIDDEN | AFF_DETECT_GOOD, 0, 0, RES_POISON | RES_NEGATIVE, VULN_LIGHT, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"half-elf", TRUE, 0, AFF_DETECT_HIDDEN, 0, 0, RES_POISON, 0, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"dwarf", TRUE, 0, AFF_BERSERK, 0, 0, RES_SLASH | RES_COLD, VULN_DROWNING, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"halfling", TRUE, 0, AFF_DETECT_HIDDEN, 0, 0, RES_PIERCE | RES_BASH, VULN_FIRE, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"gnome", TRUE, 0, AFF_DETECT_HIDDEN, 0, 0, RES_ACID | RES_MENTAL, VULN_COLD, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"goblin", TRUE, 0, AFF_DETECT_HIDDEN | AFF_DARK_VISION, 0, 0, RES_LIGHTNING | RES_POISON, VULN_MENTAL, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"orc", TRUE, 0, AFF_BERSERK | AFF_DARK_VISION, 0, 0, RES_DISEASE | RES_WEAPON, VULN_MAGIC, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"troll", TRUE, 0, AFF_DARK_VISION | AFF_REGENERATION, 0, 0, RES_BASH | RES_SLASH, VULN_FIRE, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"bat", FALSE, 0, AFF_FLYING | AFF_DARK_VISION, OFF_DODGE | OFF_FAST, 0, 0, VULN_LIGHT, A | G | V, A | C | D | E | F | H | J | K | P}, { "bear", FALSE, 0, 0, OFF_CRUSH | OFF_DISARM | OFF_BERSERK, 0, RES_BASH | RES_COLD, 0, A | G | V, A | B | C | D | E | F | H | J | K | U | V}, { "cat", FALSE, 0, AFF_DARK_VISION, OFF_FAST | OFF_DODGE, 0, 0, 0, A | G | V, A | C | D | E | F | H | J | K | Q | U | V}, { "centipede", FALSE, 0, AFF_DARK_VISION, 0, 0, RES_PIERCE | RES_COLD, VULN_BASH, A | B | G | O, A | C | K}, { "dog", FALSE, 0, 0, OFF_FAST, 0, 0, 0, A | G | V, A | C | D | E | F | H | J | K | U | V}, { "doll", FALSE, 0, 0, 0, IMM_COLD | IMM_POISON | IMM_HOLY | IMM_NEGATIVE | IMM_MENTAL | IMM_DISEASE | IMM_DROWNING, RES_BASH | RES_LIGHT, VULN_SLASH | VULN_FIRE | VULN_ACID | VULN_LIGHTNING | VULN_ENERGY, E | J | M | cc, A | B | C | G | H | K}, {"dragon", FALSE, 0, AFF_INFRARED | AFF_FLYING, 0, 0, RES_FIRE | RES_BASH | RES_CHARM, VULN_PIERCE | VULN_COLD, A | H | Z, A | C | D | E | F | G | H | I | J | K | P | Q | U | V | X}, {"draconian", FALSE, ACT_AGGRESSIVE, AFF_FLYING | AFF_DETECT_INVIS | AFF_DETECT_HIDDEN, OFF_DODGE | OFF_KICK, IMM_LIGHT, RES_FIRE | RES_COLD | RES_LIGHTNING, VULN_SLASH, E | J | M | cc, A | B | C | G | H | K}, {"elemental", FALSE, 0, AFF_FLYING | AFF_DARK_VISION, OFF_DODGE | OFF_FAST, 0, RES_ENERGY, 0, A | G | V, A | C | D | E | F | H | J | K | P}, { "fido", FALSE, 0, 0, OFF_DODGE | ASSIST_RACE, 0, 0, VULN_MAGIC, A | B | G | V, A | C | D | E | F | H | J | K | Q | V}, {"fish", FALSE, ACT_WIMPY, AFF_SNEAK | AFF_CURSE | AFF_SWIM, OFF_DODGE | OFF_FAST, IMM_DROWNING, RES_COLD, VULN_LIGHTNING | VULN_FIRE, A | B | G | V, A | C | D | E | F | H | J | K | Q | V}, { "fox", FALSE, 0, AFF_DARK_VISION, OFF_FAST | OFF_DODGE, 0, 0, 0, A | G | V, A | C | D | E | F | H | J | K | Q | V}, {"giant", FALSE, 0, 0, 0, 0, 0, 0, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K}, {"ghost", FALSE, ACT_UNDEAD, AFF_DETECT_HIDDEN | AFF_DETECT_GOOD | AFF_SLOW | AFF_FLYING, OFF_DODGE, IMM_POISON | IMM_DISEASE | IMM_DROWNING, RES_COLD | RES_PIERCE, VULN_HOLY | VULN_ENERGY, A | B | G | Z, A | C | D | E | F | H | J | K | Q | V | X}, {"ghoul", FALSE, ACT_UNDEAD, AFF_DETECT_HIDDEN | AFF_DETECT_GOOD | AFF_SLOW, OFF_DODGE, IMM_POISON | IMM_DISEASE | IMM_DROWNING, RES_COLD | RES_PIERCE, VULN_HOLY | VULN_ENERGY, A | B | G | Z, A | C | D | E | F | H | J | K | Q | V | X}, {"hobgoblin", FALSE, 0, AFF_INFRARED, 0, 0, RES_DISEASE | RES_POISON, 0, A | H | M | V, A | B | C | D | E | F | G | H | I | J | K | Y}, {"kobold", FALSE, 0, AFF_INFRARED, 0, 0, RES_POISON, VULN_MAGIC, A | B | H | M | V, A | B | C | D | E | F | G | H | I | J | K | Q}, {"lizard", FALSE, 0, 0, 0, 0, RES_POISON, VULN_COLD, A | G | X | cc, A | C | D | E | F | H | K | Q | V}, {"modron", FALSE, 0, AFF_INFRARED, ASSIST_RACE | ASSIST_ALIGN, IMM_CHARM | IMM_DISEASE | IMM_MENTAL | IMM_HOLY | IMM_NEGATIVE, RES_FIRE | RES_COLD | RES_ACID, 0, H, A | B | C | G | H | J | K}, {"pig", FALSE, 0, 0, 0, 0, 0, 0, A | G | V, A | C | D | E | F | H | J | K}, {"rabbit", FALSE, 0, 0, OFF_DODGE | OFF_FAST, 0, 0, 0, A | G | V, A | C | D | E | F | H | J | K}, {"rat", FALSE, 0, 0, OFF_DODGE | OFF_FAST, 0, RES_POISON | RES_DISEASE, VULN_PIERCE | VULN_SLASH | VULN_MAGIC, A | G | V, A | C | D | E | F | H | J | K}, {"school monster", FALSE, ACT_NOALIGN, 0, 0, IMM_CHARM | IMM_SUMMON, 0, VULN_MAGIC | VULN_BASH | VULN_WEAPON | VULN_SLASH | VULN_PIERCE, A | M | V, A | B | C | D | E | F | H | J | K | Q | U}, {"snake", FALSE, 0, 0, 0, 0, RES_POISON, VULN_COLD, A | G | X | Y | cc, A | D | E | F | K | L | Q | V | X}, {"song bird", FALSE, 0, AFF_FLYING, OFF_FAST | OFF_DODGE, 0, 0, 0, A | G | W, A | C | D | E | F | H | K | P}, {"water fowl", FALSE, 0, AFF_SWIM | AFF_FLYING, 0, 0, RES_DROWNING, 0, A | G | W, A | C | D | E | F | H | K | P}, {"wolf", FALSE, 0, AFF_DARK_VISION, OFF_FAST | OFF_DODGE, 0, 0, 0, A | G | V, A | C | D | E | F | J | K | Q | V}, {"wraith", FALSE, ACT_UNDEAD, AFF_DETECT_HIDDEN | AFF_DETECT_GOOD | AFF_FLYING, OFF_PARRY, IMM_POISON | IMM_DISEASE | IMM_DROWNING, RES_COLD | RES_PIERCE, VULN_HOLY | VULN_ENERGY, A | B | G | Z, A | C | D | E | F | H | J | K | Q | V | X}, {"wyvern", FALSE, 0, AFF_FLYING | AFF_DETECT_INVIS | AFF_DETECT_HIDDEN, OFF_BASH | OFF_FAST | OFF_DODGE, IMM_POISON, 0, VULN_LIGHT, A | B | G | Z, A | C | D | E | F | H | J | K | Q | V | X}, {"vampire", FALSE, ACT_UNDEAD, AFF_DETECT_HIDDEN | AFF_DETECT_GOOD | AFF_PROTECT_GOOD | AFF_FLYING, OFF_PARRY, IMM_POISON | IMM_DISEASE | IMM_DROWNING, RES_COLD | RES_PIERCE | RES_MAGIC, VULN_HOLY | VULN_ENERGY | VULN_WOOD, A | B | G | Z, A | C | D | E | F | H | J | K | Q | V | X}, {"undead", FALSE, ACT_UNDEAD, AFF_DETECT_HIDDEN | AFF_DETECT_GOOD, OFF_PARRY, IMM_POISON | IMM_DISEASE | IMM_DROWNING, RES_COLD | RES_PIERCE, VULN_HOLY | VULN_ENERGY, A | B | G | Z, A | C | D | E | F | H | J | K | Q | V | X}, {"zombie", FALSE, ACT_UNDEAD, AFF_DETECT_HIDDEN | AFF_DETECT_GOOD | AFF_SLOW, OFF_PARRY | ASSIST_ALIGN | OFF_DISARM, IMM_POISON | IMM_DISEASE | IMM_DROWNING, RES_COLD | RES_PIERCE, VULN_HOLY | VULN_ENERGY, A | B | G | Z, A | C | D | E | F | H | J | K | Q | V | X}, { "unique", FALSE, 0, 0, 0, 0, 0, 0, 0, 0}, { NULL, 0, 0, 0, 0, 0, 0} }; const struct pc_race_type pc_race_table[] = { {"null race", "", 0, {100, 100, 100, 100}, {""}, {13, 13, 13, 13, 13}, {18, 18, 18, 18, 18}, 0}, /* { "race name", short name, points, { class multipliers }, { bonus skills }, { base stats }, { max stats }, size }, */ {"human", "Human", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {20, 20, 20, 20, 20}, SIZE_MEDIUM}, {"high-elf", "High-Elf", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_SMALL}, {"wood-elf", "Wood-Elf", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_MEDIUM}, {"drow", "Drow", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_MEDIUM}, {"half-elf", "Half-Elf", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_MEDIUM}, {"dwarf", "Dwarf", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_SMALL}, {"halfling", "Halfling", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_TINY}, {"gnome", "Gnome", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_SMALL}, {"goblin", "Goblin", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_SMALL}, {"orc", "Orc", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_LARGE}, {"troll", "Troll", 0, {100, 100, 100, 100}, {""}, {8, 8, 8, 8, 8, 8}, {25, 25, 25, 25, 25, 25}, SIZE_LARGE}, }; /* * Class table. */ struct class_type class_table [MAX_CLASS]; /* * Titles. */ char *const title_table[MAX_CLASS][MAX_LEVEL + 1][2] = { }; /* * Attribute bonus tables. */ const struct str_app_type str_app[26] = { {-5, -4, 0, 0}, /* 0 */ {-5, -4, 3, 1}, /* 1 */ {-3, -2, 3, 2}, {-3, -1, 10, 3}, /* 3 */ {-2, -1, 25, 4}, {-2, -1, 55, 5}, /* 5 */ {-1, 0, 80, 6}, {-1, 0, 90, 7}, {0, 0, 100, 8}, {0, 0, 100, 9}, {0, 0, 115, 10}, /* 10 */ {0, 0, 115, 11}, {0, 0, 130, 12}, {0, 0, 130, 13}, /* 13 */ {0, 1, 140, 14}, {1, 1, 150, 15}, /* 15 */ {1, 2, 165, 16}, {2, 3, 180, 22}, {2, 3, 200, 25}, /* 18 */ {3, 4, 225, 30}, {3, 5, 250, 35}, /* 20 */ {4, 6, 300, 40}, {4, 6, 350, 45}, {5, 7, 400, 50}, {5, 8, 450, 55}, {6, 9, 500, 60} /* 25 */ }; const struct int_app_type int_app[26] = { {3}, /* 0 */ {5}, /* 1 */ {7}, {8}, /* 3 */ {9}, {10}, /* 5 */ {11}, {12}, {13}, {15}, {17}, /* 10 */ {19}, {22}, {25}, {28}, {31}, /* 15 */ {34}, {37}, {40}, /* 18 */ {44}, {49}, /* 20 */ {55}, {60}, {70}, {80}, {85} /* 25 */ }; const struct wis_app_type wis_app[26] = { {0}, /* 0 */ {0}, /* 1 */ {0}, {0}, /* 3 */ {0}, {1}, /* 5 */ {1}, {1}, {1}, {1}, {1}, /* 10 */ {1}, {1}, {1}, {1}, {2}, /* 15 */ {2}, {2}, {3}, /* 18 */ {3}, {3}, /* 20 */ {3}, {4}, {4}, {4}, {5} /* 25 */ }; const struct dex_app_type dex_app[26] = { {60}, /* 0 */ {50}, /* 1 */ {50}, {40}, {30}, {20}, /* 5 */ {10}, {0}, {0}, {0}, {0}, /* 10 */ {0}, {0}, {0}, {0}, {-10}, /* 15 */ {-15}, {-20}, {-30}, {-40}, {-50}, /* 20 */ {-60}, {-75}, {-90}, {-105}, {-120} /* 25 */ }; const struct con_app_type con_app[26] = { {-4, 20}, /* 0 */ {-3, 25}, /* 1 */ {-2, 30}, {-2, 35}, /* 3 */ {-1, 40}, {-1, 45}, /* 5 */ {-1, 50}, {0, 55}, {0, 60}, {0, 65}, {0, 70}, /* 10 */ {0, 75}, {0, 80}, {0, 85}, {0, 88}, {1, 90}, /* 15 */ {2, 95}, {2, 97}, {3, 99}, /* 18 */ {3, 99}, {4, 99}, /* 20 */ {4, 99}, {5, 99}, {6, 99}, {7, 99}, {8, 99} /* 25 */ }; /* * Liquid properties. * Used in world.obj. */ const struct liq_type liq_table[] = { /* name color proof, full, thirst, food, ssize */ {"water", "clear", {0, 1, 10, 0, 16}}, {"beer", "amber", {12, 1, 8, 1, 12}}, {"red wine", "burgundy", {30, 1, 8, 1, 5}}, {"ale", "brown", {15, 1, 8, 1, 12}}, {"dark ale", "dark", {16, 1, 8, 1, 12}}, {"whisky", "golden", {120, 1, 5, 0, 2}}, {"lemonade", "pink", {0, 1, 9, 2, 12}}, {"firebreather", "boiling", {190, 0, 4, 0, 2}}, {"local specialty", "clear", {151, 1, 3, 0, 2}}, {"slime mold juice", "green", {0, 2, -8, 1, 2}}, {"milk", "white", {0, 2, 9, 3, 12}}, {"tea", "tan", {0, 1, 8, 0, 6}}, {"coffee", "black", {0, 1, 8, 0, 6}}, {"blood", "red", {0, 2, -1, 2, 6}}, {"salt water", "clear", {0, 1, -2, 0, 1}}, {"coke", "brown", {0, 2, 9, 2, 12}}, {"root beer", "brown", {0, 2, 9, 2, 12}}, {"elvish wine", "green", {35, 2, 8, 1, 5}}, {"white wine", "golden", {28, 1, 8, 1, 5}}, {"champagne", "golden", {32, 1, 8, 1, 5}}, {"mead", "honey-colored", {34, 2, 8, 2, 12}}, {"rose wine", "pink", {26, 1, 8, 1, 5}}, {"benedictine wine", "burgundy", {40, 1, 8, 1, 5}}, {"vodka", "clear", {130, 1, 5, 0, 2}}, {"cranberry juice", "red", {0, 1, 9, 2, 12}}, {"orange juice", "orange", {0, 2, 9, 3, 12}}, {"absinthe", "green", {200, 1, 4, 0, 2}}, {"brandy", "golden", {80, 1, 5, 0, 4}}, {"aquavit", "clear", {140, 1, 5, 0, 2}}, {"schnapps", "clear", {90, 1, 5, 0, 2}}, {"icewine", "purple", {50, 2, 6, 1, 5}}, {"amontillado", "burgundy", {35, 2, 8, 1, 5}}, {"sherry", "red", {38, 2, 7, 1, 5}}, {"framboise", "red", {50, 1, 7, 1, 5}}, {"rum", "amber", {151, 1, 4, 0, 2}}, {"cordial", "clear", {100, 1, 5, 0, 2}}, {NULL, NULL, {0, 0, 0, 0, 0}} }; /* * The skill and spell table. * Slot numbers must never be changed as they appear in #OBJECTS sections. */ /* * Skill Trees */ /* {"Acrobatics", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_acrobatics, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Alteration", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_alteration, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_ALTERATION}, {"Agriculture", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_agriculture, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Animal Training", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_animal_training, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Armorer", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_armorer, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Astrology", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_astrology, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Blacksmithing", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_forging, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_FORGING}, {"Brewing", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_brewing, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Black magic", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_black_magic, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BLACK_MAGIC}, {"Blocking", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_blocking, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BLOCKING}, {"Carpentry", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_carpentry, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Carving", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_carving, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Conjuration", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_conjuration, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_CONJURATION}, {"Destruction", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_destruction, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_DESTRUCTION}, {"Demonology", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_demonology, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_DEMONOLOGY}, {"Disguise", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_disguise, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_DISGUISE}, {"Dirty Fighting", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_dirty_fight, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_DIRTY_FIGHTING}, {"Enchantment", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_enchantment, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_ENCHANTMENT}, {"Elemental Wind", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_ele_wind, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_ELEMENTAL_WIND}, {"Elemental Fire", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_ele_fire, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_ELEMENTAL_FIRE}, {"Elemental Earth", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_ele_earth, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_ELEMENTAL_EARTH}, {"Elemental Water", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_ele_water, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_ELEMENTAL_WATER}, {"Human Body", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_human_body, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_HUMAN_BODY}, {"Fishing", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_fishing, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Fletching", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_fletcher, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Forgery", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_forgery, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Grey magic", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_grey_magic, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_GREY_MAGIC}, {"Heavy Armor", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_heavy_armor, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_HEAVY_ARMOR}, {"Herbology", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_herbology, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_HERBOLOGY}, {"Illusion", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_illusion, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_ILLUSION}, {"Jewelry", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_jewelry, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Leatherworking", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_leatherworking, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Large shields", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_large_shields, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_LARGE_SHIELDS}, {"Light Armor", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_light_armor, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_LIGHT_ARMOR}, {"Masonry", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_masonry, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Medium Armor", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_medium_armor, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_MEDIUM_ARMOR}, {"Merchantile", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_merchantile, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_MERCHANTILE}, {"Nature", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_nature, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_NATURE}, {"Navigation", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_navigation, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Necromancy", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_necromancy, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_NECROMANCY}, {"Pottery", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_pottery, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Religion", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_religion, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Restoration", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_restoration, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_RESTORATION}, {"Stealth Movement", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_stealth_movement, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_SILENT_MOVEMENT}, {"Security", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_security, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_SECURITY}, {"Seamanship", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_seamanship, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Small shields", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_small_shields, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_SMALL_SHIELDS}, {"Spellcraft", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_spellcraft, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Swimming", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_swimming, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Survival", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_survival, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"White magic", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_white_magic, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_WHITE_MAGIC}, {"Writing", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_writing, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, {"Weaponsmith", {}, {}, spell_null, TAR_IGNORE, POS_STANDING, &gsn_weaponsmith, SLOT(0), 0, 12, "", "", "", TRUE, SKILL_BOB}, */ /* const struct group_type group_table [MAX_GROUP] = { {"rom basics", 0, {"scrolls", "staves", "wands", "recall", "weaponsmaster" }}, {"acrobatics", 3, {"acrobatics", "dodge", "roll", "leap"}}, {"animal handling", 7, {"calm animal", "ride", "speak with animals", "track animal"}}, {"attack sphere", 5, {"demonfire", "dispel evil", "dispel good", "flamestrike", "heat metal", "ray of truth", "earthquake"}}, {"archmagic", 10, {"asphyxiate", "blade barrier", "disperse", "dissonance", "scrye", "solar spike", "thundershock", "xilf'an"}}, {"art of forgery", 7, {"Forgery", "forge coin", "forge gem", "forge documents"}}, {"art of disguise", 6, {"Disguise", "craft disguise"}}, {"black magic arts",10, {"black magic", "grudge", "death ritual", "toxic cloud", "torment", "supression", "nightfall", "erode", "hand of death","death touch"}}, {"beguiling sphere", 4, {"calm", "charm person", "sleep" }}, {"benedictions sphere", 6, {"bless", "calm", "frenzy", "holy word", "remove curse"}}, {"carpentry knowledge", 8, {"Carpentry", "chop wood", "saw", "tree safety", "hammering", "forge nails", "forge hammer"}}, {"combat sphere", 10, {"acid blast", "burning hands","chain lightning", "chill touch", "colour spray", "fireball", "lightning bolt", "magic missile","shocking grasp"}}, {"creation sphere", 6, {"conjuration", "continual light", "create food", "create spring", "create water", "create rose", "floating disc" }}, {"curative sphere", 3, {"cure blindness", "cure disease", "cure poison" }}, {"detection sphere", 4, {"detect evil", "detect good", "detect hidden", "detect invis", "detect magic", "detect poison", "farsight", "identify", "know alignment", "locate object" } }, {"dark necromancy", 9, {"Necromancy", "summon skeleton", "summon zombie", "summon shade", "wither", "suffering", "dark drain", "bone shield", "shielding", "witch curse", "dieased heart", "skin rot", "eternal blindness", "decryptify", "lower resists", "shiver", "hot foot", "iron pole", "shadow cloak"}}, {"draconian sphere", 8, {"acid breath", "fire breath", "frost breath", "gas breath", "lightning breath" }}, {"demonology sphere", 15, {"demonology", "summon lesser demon", "summon greater demon", "devil tounge", "poison tounge", "demonform", "horns", "devilish wings", "devil tail", "weaponform", "steal soul"}}, {"enchantment sphere", 7, {"Enchantment", "enchant armor", "enchant weapon", "fireproof", "recharge" }}, {"enhancement sphere", 2, {"alteration", "giant strength", "haste", "infravision", "refresh" }}, {"earth elements", 6, {"elemental earth", "earthquake", "boulder", "falling rocks", "cave-in", "tunnel", "corroison", "landslide", "mud arrow", "earth elemental", "earthen shield", "quicksand"}}, {"framing", 3, {"agrigculture", "sow seeds", "split seed", "find seed"}}, {"fire elements", 6, {"elemental fire", "scorch", "inferno", "fire arrow", "fireshield", "wake of fire", "fireball", "volcano", "fire breath", "fire elemental", "fire storm", "meteor", "force"}}, {"fishing knowledge", 4, {"Fishing", "prepare bait", "make rod", "fish", "prepare fish", "cook seafood"}}, {"fletching", 5, {"Fletching", "craft bow", "craft arrow", "repair bow"}}, {"forging", 17, {"Armourer", "Weaponsmith", "Blacksmithing", "forge", "smelt", "sharpen", "grind", "mining"}}, {"grey magic arts", 10, {"Grey Magic", "reveal", "identify", "grudge", "balanced aura", "learning", "light", "continious light", "weapons power","defensive power", "anti-magic shell"}}, {"harmful sphere", 4, {"cause critical", "cause light", "cause serious", "harm" }}, {"herbology sphere", 5, {"Herbology", "Brewing", "foraging", "prospect", "mix", "brew", "poison"}}, {"healing sphere", 4, {"white magic", "cure critical", "cure light", "cure serious", "heal", "mass healing", "refresh" }}, {"illusion sphere", 2, {"Illusion", "invis", "mass invis", "ventriloquate" }}, {"jeweler", 9, {"Jewelry", "appraise", "cut gem"}}, {"leatherworking", 2, {"Leatherworking", "tan leather", "make leather pants"}}, {"maladictions sphere", 8, {"destruction", "blindness", "change sex", "curse", "energy drain", "plague", "poison", "slow", "weaken" }}, {"merchant", 5, {"Merchantile", "haggle", "trade"}}, {"melee combat", 14, {"Dirty Fighting", "Human Body", "second attack", "third attack", "fourth attack", "fifth attack", "enhanced damage", "fatal strike", "parry", "counter attack", "blindfighting", "disarm", "berserk", "bash", "crossbody"}}, {"soul sphere", 20, {"soul chill", "soulsurge", "soulgrasp", "soulbolt", "soulblight", "soulbolt", "soultension", "soul strike", "soul drain"}}, {"staff making", 9, {"Carving", "staves", "empower staff", "decipher staff", "create staff"}}, {"protective sphere", 9, {"armor", "cancellation", "dispel magic", "fireproof", "protection evil", "protection good", "sanctuary", "shield", "stone skin" }}, {"transportation sphere", 12, {"fly", "gate", "nexus", "pass door", "portal", "summon", "teleport", "word of recall" }}, {"the art of masonry", 4, {"Masonry", "cut stone", "smooth stone", "lay stone"}}, {"the art of blocking", 5, {"blocking", "shield block", "absorb", "iron fist block"}}, {"thievery", 10, {"Stealth Movement", "Security", "steal", "pick lock", "envenom", "trip", "climb walls", "hide", "backstab", "dual backstab", "snare", "untangle", "sneak"}}, {"survival arts", 8, {"Survival", "Swimming", "tracking", "pursue", "hide", "sneak", "hunting", "forage"}}, {"water Elements", 6, {"elemental water", "chill touch", "ice wall", "ice blast", "rain", "shiver armor", "cone of cold", "chilling armor", "ice storm", "ice shield", "frost breath", "blizzard", "snowstorm", "glacial wall", "ice arrow", "shards of ice", "ice elemental", "water arrow", "water elemental"}}, {"weather sphere", 4, { "call lightning", "control weather", "faerie fire", "faerie fog", "lightning bolt" }}, {"weaponsmaster", 10, { "axe", "dagger", "flail", "mace", "polearm", "spear", "sword","whip" }}, {"white magic arts", 10, {"white magic", "restoration", "scared flame", "scared cloak", "sanctuary", "sanctify", "repenlish", "grudge", "divinity", "sun's ritual", "sunbeam", "holy fire", "divine hammer", "justice", "sticks to snakes", "retrubution", "word of god", "true sight"}}, {"wind Elements", 6, {"elemental wind", "shocking grasp", "spark", "wind strike", "gust of wind", "shock", "wind elemental", "lightning", "thunder", "nova", "striking bolt", "wind arrow", "lightning arrow", "static wind", "tempest", "burst of wind", "thunder storm", "thunder shock","chain lightning", "wind shield", "lightning shield"}}, }; */