/*************************************************************************** * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, * * Michael Seifert, Hans Henrik St{rfeldt, 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-1995 Russ Taylor * * ROM has been brought to you by the ROM consortium * * Russ Taylor (rtaylor@pacinfo.com) * * Gabrielle Taylor (gtaylor@pacinfo.com) * * Brian Moore (rom@rom.efn.org) * * By using this code, you have agreed to follow the terms of the * * ROM license, in the file Rom24/doc/rom.license * ***************************************************************************/ /*************************************************************************** * ROT 1.4 is copyright 1996-1997 by Russ Walsh * * By using this code, you have agreed to follow the terms of the * * ROT license, in the file doc/rot.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" char * const dir_name [] = { "north", "east", "south", "west", "up", "down", "north", "east", "south", "west", "up", "down" }; const sh_int rev_dir [] = { 2, 3, 0, 1, 5, 4, 2, 3, 0, 1, 5, 4 }; const sh_int movement_loss [SECT_MAX] = { 1, 2, 2, 3, 4, 6, 4, 1, 6, 10, 6 }; const struct spec_type spec_table[] = { { "spec_breath_any" }, { "spec_breath_acid" }, { "spec_breath_fire" }, { "spec_breath_frost" }, { "spec_breath_gas" }, { "spec_breath_lightning" }, { "spec_cast_adept" }, { "spec_cast_cleric" }, { "spec_cast_judge" }, { "spec_cast_mage" }, { "spec_cast_undead" }, { "spec_executioner" }, { "spec_fido" }, { "spec_guard" }, { "spec_janitor" }, { "spec_mayor" }, { "spec_poison" }, { "spec_thief" }, { "spec_nasty" }, { "spec_troll_member" }, { "spec_ogre_member" }, { "spec_patrolman" }, { "spec_dog_pee" }, { "spec_cast_clan_adept" }, { NULL } }; /* item type list */ const struct item_type item_table [] = { { ITEM_NULL, "null" }, { ITEM_LIGHT, "light" }, { ITEM_SCROLL, "scroll" }, { ITEM_WAND, "wand" }, { ITEM_STAFF, "staff" }, { ITEM_WEAPON, "weapon" }, { ITEM_NULL, "null" }, { ITEM_NULL, "null" }, { ITEM_TREASURE, "treasure" }, { ITEM_ARMOR, "armor" }, { ITEM_POTION, "potion" }, { ITEM_CLOTHING, "clothing" }, { ITEM_FURNITURE, "furniture" }, { ITEM_TRASH, "trash" }, { ITEM_NULL, "null" }, { ITEM_CONTAINER, "container" }, { ITEM_NULL, "null" }, { ITEM_DRINK_CON, "drink" }, { ITEM_KEY, "key" }, { ITEM_FOOD, "food" }, { ITEM_MONEY, "money" }, { ITEM_NULL, "null" }, { 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_DEMON_STONE,"demon_stone" }, { ITEM_EXIT, "exit" }, { ITEM_PIT, "pit" }, { ITEM_PASSBOOK, "passbook" }, { 0, NULL } }; /* weapon selection table */ const struct weapon_type weapon_table [] = { { "exotic", WEAPON_EXOTIC }, { "sword", WEAPON_SWORD }, { "dagger", WEAPON_DAGGER }, { "staff", WEAPON_SPEAR }, { "mace", WEAPON_MACE }, { "axe", WEAPON_AXE }, { "flail", WEAPON_FLAIL }, { "whip", WEAPON_WHIP }, { "polearm", WEAPON_POLEARM }, { NULL, 0 } }; /* attack table -- not very organized :( * Be sure to keep MAX_DAMAGE_MESSAGE up * to date in merc.h */ const struct attack_type attack_table [] = { { "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 }, { "typo", "typo", DAM_SLASH }, /* 40 */ { NULL, NULL, 0 } }; /* mobile hp,damage,ac table, for level-changing mobs */ const struct moblev_type moblev_table [MAX_LEVEL+9] = { /* { hpdice, hpsides, hpbonus, damdice, damsides, dambonus, mobac }, * Starts with level -4, not with 0 * */ { 1, 2, 2, 1, 2, 0, 15 }, { 1, 2, 3, 1, 2, 1, 14 }, { 1, 2, 4, 1, 2, 1, 13 }, { 1, 2, 5, 1, 2, 2, 12 }, { 1, 3, 5, 1, 2, 2, 11 }, { 1, 5, 8, 1, 2, 2, 10 }, { 2, 2, 12, 1, 3, 2, 9 }, { 2, 4, 16, 1, 3, 2, 9 }, { 2, 6, 21, 1, 3, 3, 8 }, { 3, 5, 26, 1, 5, 3, 8 }, { 4, 5, 35, 1, 5, 4, 7 }, { 5, 5, 43, 2, 2, 4, 7 }, { 5, 6, 51, 2, 3, 5, 6 }, { 2, 21, 59, 2, 3, 6, 6 }, { 5, 8, 67, 2, 4, 6, 5 }, { 4, 12, 75, 2, 4, 7, 5 }, { 7, 7, 82, 2, 5, 8, 4 }, { 6, 9, 91, 2, 6, 8, 4 }, { 6, 10, 99, 2, 6, 9, 3 }, { 6, 11, 107, 3, 4, 9, 3 }, { 7, 10, 116, 3, 5, 10, 2 }, { 7, 11, 125, 3, 5, 11, 2 }, { 8, 10, 135, 2, 9, 11, 1 }, { 6, 15, 146, 2, 9, 12, 1 }, { 9, 10, 157, 4, 4, 13, 0 }, { 9, 11, 168, 3, 7, 13, 0 }, { 3, 39, 181, 3, 7, 14, -1 }, { 10, 11, 194, 4, 5, 14, -1 }, { 6, 21, 208, 3, 8, 15, -2 }, { 7, 19, 223, 3, 8, 16, -2 }, { 6, 24, 238, 4, 6, 16, -3 }, { 11, 13, 254, 4, 6, 17, -3 }, { 7, 23, 271, 5, 5, 18, -4 }, { 7, 24, 289, 4, 7, 18, -4 }, { 12, 14, 307, 4, 7, 19, -5 }, { 7, 27, 327, 3, 11, 19, -5 }, { 4, 51, 347, 5, 6, 20, -6 }, { 14, 14, 367, 5, 6, 21, -6 }, { 13, 16, 389, 3, 12, 21, -7 }, { 7, 33, 411, 3, 12, 22, -7 }, { 8, 30, 434, 5, 7, 23, -8 }, { 14, 17, 458, 2, 21, 23, -8 }, { 9, 29, 482, 2, 21, 24, -9 }, { 16, 16, 508, 4, 10, 24, -9 }, { 15, 18, 534, 5, 8, 25, -10 }, { 13, 22, 561, 5, 8, 26, -10 }, { 7, 44, 589, 4, 11, 26, -11 }, { 14, 21, 623, 4, 11, 27, -11 }, { 17, 17, 658, 5, 9, 28, -12 }, { 5, 65, 687, 4, 12, 28, -12 }, { 10, 35, 705, 4, 12, 29, -13 }, { 10, 36, 737, 2, 27, 29, -13 }, { 14, 26, 769, 5, 10, 30, -14 }, { 15, 25, 802, 6, 8, 31, -14 }, { 16, 24, 835, 7, 7, 31, -15 }, { 13, 31, 869, 7, 7, 32, -15 }, { 11, 38, 904, 5, 11, 33, -16 }, { 20, 20, 946, 6, 9, 33, -16 }, { 16, 27, 977, 6, 9, 34, -17 }, { 17, 26, 1015, 4, 15, 34, -17 }, { 8, 59, 1054, 7, 8, 35, -18 }, { 6, 81, 1095, 7, 8, 36, -18 }, { 17, 28, 1136, 6, 10, 36, -19 }, { 18, 27, 1178, 6, 10, 37, -19 }, { 8, 65, 1221, 5, 13, 38, -20 }, { 9, 59, 1266, 7, 9, 38, -20 }, { 20, 26, 1313, 7, 9, 39, -21 }, { 13, 42, 1361, 6, 11, 39, -21 }, { 22, 24, 1418, 8, 8, 40, -22 }, { 23, 24, 1463, 8, 8, 41, -22 }, { 18, 32, 1516, 2, 39, 41, -23 }, { 24, 24, 1572, 2, 39, 42, -23 }, { 11, 56, 1629, 6, 12, 43, -24 }, { 22, 27, 1696, 3, 27, 43, -24 }, { 23, 27, 1752, 3, 27, 44, -25 }, { 20, 32, 1817, 4, 20, 44, -25 }, { 24, 27, 1884, 5, 16, 45, -26 }, { 10, 69, 1956, 6, 13, 46, -26 }, { 22, 31, 2029, 4, 21, 46, -27 }, { 14, 51, 2107, 4, 21, 47, -27 }, { 23, 31, 2188, 5, 17, 48, -28 }, { 21, 35, 2272, 6, 14, 48, -28 }, { 15, 51, 2361, 8, 10, 49, -29 }, { 14, 56, 2454, 9, 9, 49, -29 }, { 10, 81, 2552, 5, 18, 50, -30 }, { 16, 51, 2654, 5, 18, 51, -30 }, { 28, 29, 2762, 6, 15, 51, -31 }, { 24, 35, 2874, 6, 15, 52, -31 }, { 26, 33, 2992, 7, 13, 53, -32 }, { 19, 47, 3117, 2, 51, 53, -32 }, { 28, 32, 3247, 2, 51, 54, -33 }, { 25, 37, 3384, 4, 25, 54, -33 }, { 27, 35, 3527, 5, 20, 55, -34 }, { 14, 71, 3678, 5, 20, 56, -34 }, { 31, 31, 3848, 7, 14, 56, -35 }, { 17, 61, 4003, 8, 12, 57, -35 }, { 21, 49, 4190, 6, 17, 58, -36 }, { 32, 33, 4361, 9, 11, 58, -36 }, { 14, 80, 4553, 9, 11, 59, -37 }, { 28, 39, 4767, 7, 15, 59, -37 }, { 25, 45, 4979, 8, 13, 60, -38 }, { 15, 80, 5187, 10, 10, 61, -38 }, { 30, 39, 5433, 3, 39, 61, -39 }, { 33, 37, 5662, 3, 39, 62, -39 }, { 18, 71, 5917, 5, 23, 63, -40 }, { 22, 59, 6184, 7, 16, 63, -40 }, { 28, 47, 6463, 9, 12, 64, -41 }, { 35, 38, 6755, 8, 14, 64, -41 }, { 27, 51, 7060, 10, 11, 65, -42 }, { 27, 52, 7380, 10, 11, 66, -42 }, { 31, 46, 7713, 7, 17, 66, -43 }, { 37, 39, 8061, 7, 17, 67, -43 }, { 15, 101, 8425, 9, 13, 68, -44 }, { 13, 119, 8804, 8, 15, 68, -44 }, { 39, 39, 9201, 8, 15, 69, -45 }, { 39, 44, 9401, 8, 17, 69, -45 }, { 39, 49, 9601, 8, 19, 70, -46 }, { 39, 54, 9801, 8, 21, 70, -46 }, { 39, 56, 9901, 9, 21, 71, -46 } }; /* object defaults, for level-changing objects */ const struct objlev_type objlev_table [MAX_LEVEL+7] = { /* { weapdice, weapsides, armorac }, * Starts with level -3, not with 0 * */ { 1, 1, 0 }, { 1, 2, 0 }, { 1, 3, 1 }, { 1, 4, 1 }, { 1, 5, 1 }, { 1, 6, 1 }, { 1, 7, 1 }, { 1, 9, 1 }, { 2, 3, 1 }, { 2, 4, 2 }, { 2, 5, 2 }, { 3, 3, 2 }, { 2, 6, 2 }, { 2, 7, 2 }, { 3, 4, 3 }, { 2, 8, 3 }, { 3, 5, 3 }, { 2, 9, 3 }, { 3, 6, 3 }, { 4, 4, 4 }, { 3, 7, 4 }, { 2, 12, 4 }, { 4, 5, 4 }, { 3, 8, 4 }, { 3, 9, 5 }, { 4, 6, 5 }, { 5, 5, 5 }, { 4, 7, 5 }, { 2, 17, 5 }, { 3, 11, 6 }, { 4, 8, 6 }, { 2, 19, 6 }, { 3, 12, 6 }, { 4, 9, 6 }, { 2, 21, 7 }, { 3, 14, 7 }, { 4, 10, 7 }, { 5, 8, 7 }, { 4, 11, 7 }, { 5, 9, 8 }, { 6, 7, 8 }, { 4, 12, 8 }, { 2, 27, 8 }, { 5, 10, 8 }, { 6, 8, 8 }, { 7, 7, 9 }, { 5, 11, 9 }, { 6, 9, 9 }, { 3, 21, 9 }, { 4, 15, 9 }, { 7, 8, 10 }, { 6, 10, 10 }, { 5, 13, 10 }, { 4, 17, 10 }, { 7, 9, 10 }, { 6, 11, 11 }, { 5, 14, 11 }, { 2, 39, 11 }, { 5, 15, 11 }, { 3, 27, 11 }, { 4, 20, 12 }, { 8, 9, 12 }, { 7, 11, 12 }, { 4, 21, 12 }, { 5, 17, 12 }, { 8, 10, 13 }, { 9, 9, 13 }, { 5, 18, 13 }, { 6, 15, 13 }, { 7, 13, 13 }, { 8, 11, 14 }, { 2, 51, 14 }, { 9, 10, 14 }, { 5, 20, 14 }, { 8, 12, 14 }, { 6, 17, 15 }, { 9, 11, 15 }, { 7, 15, 15 }, { 10, 10, 15 }, { 3, 39, 15 }, { 5, 23, 16 }, { 9, 12, 16 }, { 8, 14, 16 }, { 10, 11, 16 }, { 7, 17, 16 }, { 9, 13, 16 }, { 8, 15, 17 }, { 6, 21, 17 }, { 10, 12, 17 }, { 11, 11, 17 }, { 9, 14, 17 }, { 7, 19, 18 }, { 4, 35, 18 }, { 10, 13, 18 }, { 9, 15, 18 }, { 11, 12, 18 }, { 6, 24, 19 }, { 3, 51, 19 }, { 10, 14, 19 }, { 9, 16, 19 }, { 11, 13, 19 }, { 2, 81, 20 }, { 12, 12, 20 }, { 10, 15, 20 }, { 4, 41, 20 }, { 7, 23, 20 }, { 2, 87, 21 }, { 12, 13, 21 }, { 7, 24, 21 }, { 8, 21, 21 }, { 11, 15, 21 }, { 9, 19, 22 }, { 10, 17, 22 }, { 12, 14, 22 }, { 12, 15, 22 }, { 13, 17, 23 }, { 13, 18, 23 } }; /* race table */ const struct race_type race_table [] = { /* { name, pc_race?, act bits, aff_by bits, off bits, imm, res, vuln, shd bits, form, parts }, */ { "unique", FALSE, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { "human", TRUE, 0, 0, 0, 0, 0, 0, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "elf", TRUE, 0, AFF_INFRARED, 0, 0, RES_CHARM, VULN_IRON, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "dwarf", TRUE, 0, AFF_INFRARED, 0, 0, RES_POISON|RES_DISEASE, VULN_DROWNING, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "giant", TRUE, 0, 0, 0, 0, RES_FIRE|RES_COLD, VULN_MENTAL|VULN_LIGHTNING, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "pixie", TRUE, 0, AFF_FLYING|AFF_DETECT_MAGIC|AFF_INFRARED, 0, 0, RES_CHARM|RES_MENTAL, VULN_IRON, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K|P }, { "halfling", TRUE, 0, AFF_PASS_DOOR, 0, 0, RES_POISON|RES_DISEASE, VULN_LIGHT, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "halforc", TRUE, 0, AFF_BERSERK, 0, 0, RES_MAGIC|RES_WEAPON, VULN_MENTAL, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "goblin", TRUE, 0, AFF_INFRARED, 0, 0, RES_MENTAL, VULN_SILVER|VULN_LIGHT|VULN_WOOD|VULN_HOLY, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "halfelf", TRUE, 0, AFF_FARSIGHT, 0, 0, 0, 0, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "avian", TRUE, 0, AFF_FLYING|AFF_DETECT_INVIS|AFF_DETECT_HIDDEN|AFF_FARSIGHT|AFF_INFRARED, 0, 0, RES_LIGHTNING, VULN_DISEASE|VULN_POISON, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K|P }, { "gnome", TRUE, 0, AFF_INFRARED, 0, 0, RES_MENTAL, VULN_DROWNING, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "draconian", TRUE, 0, AFF_FLYING, 0, IMM_POISON|IMM_DISEASE, RES_FIRE|RES_COLD, VULN_SLASH|VULN_PIERCE|VULN_LIGHTNING, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K|P|Q }, { "centaur", TRUE, 0, 0, 0, 0, 0, 0, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "gnoll", TRUE, 0, AFF_DETECT_HIDDEN|AFF_DARK_VISION, 0, 0, 0, VULN_SILVER, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K|U|V }, { "heucuva", TRUE, 0, AFF_DARK_VISION, 0, IMM_NEGATIVE|IMM_POISON|IMM_DISEASE, RES_WEAPON, VULN_HOLY|VULN_LIGHT|VULN_SILVER, 0, A|H|M|V, A|B|C|G|H|I|J|K }, { "kenku", TRUE, 0, AFF_FARSIGHT|AFF_DETECT_HIDDEN|AFF_INFRARED|AFF_FLYING, 0, 0, RES_COLD, 0, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K|P }, { "minotaur", TRUE, 0, AFF_FARSIGHT, 0, IMM_POISON, 0, VULN_BASH, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K|W }, { "satyr", TRUE, 0, AFF_DETECT_HIDDEN|AFF_DETECT_EVIL|AFF_DETECT_GOOD, 0, IMM_FIRE, RES_NEGATIVE, VULN_HOLY|VULN_LIGHT, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "titan", TRUE, 0, AFF_DETECT_INVIS|AFF_BERSERK, 0, IMM_CHARM, RES_WEAPON, 0, 0, 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, 0, 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, 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, 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, 0, A|B|G|O, A|C|K }, { "dog", FALSE, 0, 0, OFF_FAST, 0, 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, 0, 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, 0, A|H|Z, A|C|D|E|F|G|H|I|J|K|P|Q|U|V|X }, { "fido", FALSE, 0, 0, OFF_DODGE|ASSIST_RACE, 0, 0, VULN_MAGIC, 0, 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, 0, A|G|V, A|C|D|E|F|H|J|K|Q|V }, { "hobgoblin", FALSE, 0, AFF_INFRARED, 0, 0, RES_DISEASE|RES_POISON, 0, 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, 0, 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, 0, 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, 0, H, A|B|C|G|H|J|K }, { "orc", FALSE, 0, AFF_INFRARED, 0, 0, RES_DISEASE, VULN_LIGHT, 0, A|H|M|V, A|B|C|D|E|F|G|H|I|J|K }, { "pig", FALSE, 0, 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, 0, 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, 0, A|M|V, A|B|C|D|E|F|H|J|K|Q|U }, { "snake", FALSE, 0, 0, 0, 0, RES_POISON, VULN_COLD, 0, 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, 0, A|G|W, A|C|D|E|F|H|K|P }, { "troll", FALSE, 0, AFF_REGENERATION|AFF_INFRARED|AFF_DETECT_HIDDEN, OFF_BERSERK, 0, RES_CHARM|RES_BASH, VULN_FIRE|VULN_ACID, 0, A|B|H|M|V, A|B|C|D|E|F|G|H|I|J|K|U|V }, { "water fowl", FALSE, 0, AFF_SWIM|AFF_FLYING, 0, 0, RES_DROWNING, 0, 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, 0, A|G|V, A|C|D|E|F|J|K|Q|V }, { "wyvern", FALSE, 0, AFF_FLYING|AFF_DETECT_INVIS|AFF_DETECT_HIDDEN, OFF_BASH|OFF_FAST|OFF_DODGE, IMM_POISON, 0, VULN_LIGHT, 0, 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, 0 }, { NULL, 0, 0, 0, 0, 0, 0 } }; /* * Class table. */ const struct class_type class_table [MAX_CLASS] = { /* { name, who, attr_prime, thac0_00, thac0_32, hp_min, hp_max, mana?, base_group, default_group } */ { "mage", "Mag", STAT_INT, 75, 20, 6, 6, 8, TRUE, "mage basics", "mage default" }, { "cleric", "Cle", STAT_WIS, 75, 20, 2, 7, 10, TRUE, "cleric basics", "cleric default" }, { "thief", "Thi", STAT_DEX, 75, 20, -4, 8, 13, FALSE, "thief basics", "thief default" }, { "warrior", "War", STAT_STR, 75, 20, -10, 13, 18, FALSE, "warrior basics", "warrior default" }, { "ranger", "Ran", STAT_STR, 75, 20, -4, 9, 13, TRUE, "ranger basics", "ranger default" }, { "druid", "Dru", STAT_WIS, 75, 20, 0, 7, 10, TRUE, "druid basics", "druid default" }, { "vampire", "Vam", STAT_CON, 75, 20, -30, 6, 8, TRUE, "vampire basics", "vampire default" }, { "wizard", "Wiz", STAT_INT, 75, 10, -4, 6, 18, TRUE, "wizard basics", "wizard default" }, { "priest", "Prs", STAT_WIS, 75, 10, 2, -3, 20, TRUE, "priest basics", "priest default" }, { "mercenary", "Mer", STAT_DEX, 75, 10, -14, 8, 23, FALSE, "mercenary basics", "mercenary default" }, { "gladiator", "Gla", STAT_STR, 75, 10, -20, 14, 25, FALSE, "gladiator basics", "gladiator default" }, { "strider", "Str", STAT_INT, 75, 10, -14, 10, 25, TRUE, "strider basics", "strider default" }, { "sage", "Sag", STAT_WIS, 75, 10, -10, 7, 20, TRUE, "sage basics", "sage default" }, { "lich", "Lic", STAT_CON, 75, 10, -40, 6, 18, TRUE, "lich basics", "lich default" } }; /* * 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. * Be sure MAX_LIQUID in merc.h matches * the number of entries below. */ 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 } }, { "dr pepper", "brown", { 0, 2, 9, 2, 12 } }, { NULL, NULL, { 0, 0, 0, 0, 0 } } }; /* * The skill and spell table. * Slot numbers must never be changed as they appear in #OBJECTS sections. */ #define SLOT(n) n const struct skill_type skill_table [MAX_SKILL] = { { "", SLOT( 0) }, { "acid blast", SLOT(70) }, { "animate", SLOT(239) }, { "armor", SLOT( 1) }, { "bless", SLOT( 3) }, { "blindness", SLOT( 4) }, { "burning hands", SLOT( 5) }, { "call lightning", SLOT( 6) }, { "calm", SLOT(509) }, { "cancellation", SLOT(507) }, { "cause critical", SLOT(63) }, { "cause light", SLOT(62) }, { "cause serious", SLOT(64) }, { "chain lightning", SLOT(500) }, { "change sex", SLOT(82) }, { "charm person", SLOT( 7) }, { "chill touch", SLOT( 8) }, { "colour spray", SLOT(10) }, { "conjure", SLOT(280) }, { "continual light", SLOT(57) }, { "control weather", SLOT(11) }, { "create food", SLOT(12) }, { "create rose", SLOT(511) }, { "create spring", SLOT(80) }, { "create water", SLOT(13) }, { "cure blindness", SLOT(14) }, { "cure critical", SLOT(15) }, { "cure disease", SLOT(501) }, { "cure light", SLOT(16) }, { "cure poison", SLOT(43) }, { "cure serious", SLOT(61) }, { "curse", SLOT(17) }, { "demonfire", SLOT(505) }, { "detect evil", SLOT(18) }, { "detect good", SLOT(513) }, { "detect hidden", SLOT(44) }, { "detect invis", SLOT(19) }, { "detect magic", SLOT(20) }, { "detect poison", SLOT(21) }, { "dispel evil", SLOT(22) }, { "dispel good", SLOT(512) }, { "dispel magic", SLOT(59) }, { "earthquake", SLOT(23) }, { "empower", SLOT(234) }, { "enchant armor", SLOT(510) }, { "enchant weapon", SLOT(24) }, { "energy drain", SLOT(25) }, { "faerie fire", SLOT(72) }, { "faerie fog", SLOT(73) }, { "farsight", SLOT(521) }, { "fireball", SLOT(26) }, { "fireproof", SLOT(523) }, { "fireshield", SLOT(411) }, { "flamestrike", SLOT(65) }, { "floating disc", SLOT(522) }, { "fly", SLOT(56) }, { "frenzy", SLOT(504) }, { "gate", SLOT(83) }, { "giant strength", SLOT(39) }, { "harm", SLOT(27) }, { "haste", SLOT(502) }, { "heal", SLOT(28) }, { "heat metal", SLOT(516) }, { "holy word", SLOT(506) }, { "iceshield", SLOT(410) }, { "identify", SLOT(53) }, { "infravision", SLOT(77) }, { "invisibility", SLOT(29) }, { "know alignment", SLOT(58) }, { "lightning bolt", SLOT(30) }, { "locate object", SLOT(31) }, { "magic missile", SLOT(32) }, { "mass healing", SLOT(508) }, { "mass invis", SLOT(69) }, { "nexus", SLOT(520) }, { "pass door", SLOT(74) }, { "plague", SLOT(503) }, { "poison", SLOT(33) }, { "portal", SLOT(519) }, { "protection evil", SLOT(34) }, { "protection good", SLOT(514) }, { "protection voodoo", SLOT(345) }, { "quest pill", SLOT(530) }, { "ray of truth", SLOT(518) }, { "recharge", SLOT(517) }, { "refresh", SLOT(81) }, { "remove curse", SLOT(35) }, { "restore mana", SLOT(251) }, { "resurrect", SLOT(235) }, { "sanctuary", SLOT(36) }, { "shield", SLOT(67) }, { "shocking grasp", SLOT(53) }, { "shockshield", SLOT(412) }, { "sleep", SLOT(38) }, { "slow", SLOT(515) }, { "stone skin", SLOT(66) }, { "summon", SLOT(40) }, { "teleport", SLOT( 2) }, { "transport", SLOT(524) }, { "ventriloquate", SLOT(41) }, { "voodoo", SLOT(286) }, { "weaken", SLOT(68) }, { "word of recall", SLOT(42) }, { "acid breath", SLOT(200) }, { "fire breath", SLOT(201) }, { "frost breath", SLOT(202) }, { "gas breath", SLOT(203) }, { "lightning breath", SLOT(204) }, { "general purpose", SLOT(401) }, { "high explosive", SLOT(402) } };