#include <sys/types.h> #include <stdio.h> #include <string.h> #include <time.h> #include "merc.h" #include "interp.h" #include "tables.h" #include "rig_tables.h" #include "rig.h" /* * Weapons Table * * Name * Short * Long * Values[0-4] * Cost, Weight */ const struct rig_weapons_type rig_weapons_table[] = { {"dagger %s", "%s dagger", "%s dagger is on the ground here.", {WEAPON_DAGGER, 1, 6, 11}, 5, 1}, {"tanto %s", "%s tanto", "%s tanto is on the ground here.", {WEAPON_DAGGER, 1, 8, 11}, 10, 2}, {"shortsword %s", "%s shortsword", "%s shortsword is on the ground here.", {WEAPON_SWORD, 1, 8, 11}, 14, 3}, {"staff %s", "%s staff", "%s staff is on the ground here.", {WEAPON_SPEAR, 1, 8, 11}, 5, 3}, {"wakizashi %s", "%s wakizashi", "%s wakizashi is on the ground here.", {WEAPON_SWORD, 1, 10, 11}, 25, 5}, {"broadsword %s", "%s broadsword", "%s broadsword is on the ground here.", {WEAPON_SWORD, 1, 12, 11}, 35, 10}, {"mace %s", "%s mace", "%s mace is on the ground here.", {WEAPON_MACE, 1, 12, 11}, 30, 7}, {"war axe %s", "%s war axe", "%s war axe is on the ground here.", {WEAPON_AXE, 2, 12, 11}, 50, 10}, {"saber %s", "%s saber", "%s saber is on the ground here.", {WEAPON_SWORD, 3, 12, 11}, 55, 8}, {"flail %s", "%s flail", "%s flail is on the ground here.", {WEAPON_FLAIL, 2, 14, 11}, 36, 19}, {"whip %s", "%s whip", "%s whip is on the ground here.", {WEAPON_WHIP, 2, 14, 11}, 36, 19}, {"longsword %s", "%s longsword", "%s longsword is on the ground here.", {WEAPON_SWORD, 2, 16, 11}, 75, 15}, {"battleaxe %s", "%s battleaxe", "%s battleaxe is on the ground here.", {WEAPON_AXE, 2, 16, 11}, 100, 25}, {"katana %s", "%s katana", "%s katana is on the ground here.", {WEAPON_SWORD, 3, 16, 11}, 125, 12}, {"claymore %s", "%s claymore", "%s claymore is on the ground here.", {WEAPON_SWORD, 2, 18, 11}, 200, 40}, {"warhammer %s", "%s warhammer", "%s warhammer is on the ground here.", {WEAPON_MACE, 3, 18, 11}, 250, 75}, {"dia-katana %s", "%s dia-katana", "%s dia-katana is on the ground here.", {WEAPON_SWORD, 3, 21, 11}, 300, 24}, {NULL, NULL, NULL, {-1, -1, -1 -1}, -1, -1} }; /* * Armor Table * * Name * Short * Long * Armor Class, Location * Wear flags * Weight, Cost */ const struct rig_armor_type rig_armor_table[] = { {"helmet %s", "%s helmet", "%s helmet is on the ground here.", 1, LOC_HEAD, ITEM_TAKE | ITEM_WEAR_HEAD, 4, 10}, {"right pauldron %s", "%s right pauldron", "%s right pauldron is on the ground here.", 1, LOC_R_SHOULDER | LOC_UPPER_ARM, ITEM_TAKE | ITEM_WEAR_ARMS, 3, 7}, {"left pauldron %s", "%s left pauldron", "%s left pauldron is on the ground here.", 1, LOC_L_SHOULDER | LOC_UPPER_ARM, ITEM_TAKE | ITEM_WEAR_ARMS, 3, 7}, {"curiass %s", "%s curiass", "%s curiass is on the ground here.", 4, LOC_CHEST | LOC_BACK, ITEM_TAKE | ITEM_WEAR_BODY, 10, 50}, {"right gauntlets %s", "%s right gauntlet", "%s right gauntlet is on the ground here.", 1, LOC_HANDS, ITEM_TAKE | ITEM_WEAR_HANDS, 4, 8}, {"left gauntlets %s", "%s left gauntlet", "%s left gauntlet is on the ground here.", 1, LOC_HANDS, ITEM_TAKE | ITEM_WEAR_HANDS, 4, 8}, {"greaves %s", "%s pair of greaves", "%s pair of greaves is on the ground here.", 3, LOC_WAIST | LOC_UPPER_LEG, ITEM_TAKE | ITEM_WEAR_LEGS, 4, 25}, {"left boots %s", "%s left boot", "%s left boot is on the ground here.", 2, LOC_FEET | LOC_LOWER_LEG, ITEM_TAKE | ITEM_WEAR_FEET, 4, 14}, {"right boots %s", "%s right boot", "%s right boot is on the ground here.", 2, LOC_FEET | LOC_LOWER_LEG, ITEM_TAKE | ITEM_WEAR_FEET, 4, 14}, {NULL, NULL, NULL, -1, -1, -1, -1, -1} }; /* * Material table * * Name * Weapon bonus, Armor Bonus */ const struct rig_material_type rig_material_table[] = { {"iron", "an", FALSE, -1, -1, ARMOR_MEDIUM, 75, 100}, {"goblinish", "a", FALSE, -2, -1, ARMOR_LIGHT, 25, 50}, {"wooden", "a", FALSE, 0, 0, ARMOR_MEDIUM, 25, 50}, {"leather", "a", TRUE, 0, 0, ARMOR_LIGHT, 50, 80}, {"steel", "a", FALSE, 0, 0, ARMOR_MEDIUM, 100, 120}, {"draconian", "a", FALSE, 1, 0, ARMOR_LIGHT, 100, 175}, {"imperial", "an", FALSE, 1, 0, ARMOR_HEAVY, 100, 175}, {"silver", "a", FALSE, 0, 0, ARMOR_MEDIUM, 90, 125}, {"elven", "an", FALSE, 1, 1, ARMOR_LIGHT, 35, 200}, {"orcish", "an", FALSE, 2, 2, ARMOR_MEDIUM, 125, 400}, {"gnomish", "a", FALSE, 1, 3, ARMOR_LIGHT, 66, 1800}, {"dwarven", "a", FALSE, 3, 3, ARMOR_MEDIUM, 125, 600}, {"trollish", "a", FALSE, 2, 4, ARMOR_HEAVY, 125, 600}, {"drowish", "a", FALSE, 5, 1, ARMOR_LIGHT, 66, 1800}, {"mithril", "a", FALSE, 4, 4, ARMOR_LIGHT, 75, 800}, {"ebony", "an", FALSE, 5, 5, ARMOR_HEAVY, 150, 1500}, {NULL, NULL, -1, -1, -1, -1} }; /* * rig_clothing_table[] * * common clothing */ const struct rig_clothing_type rig_clothing_table[] = { {"a common shirt", ITEM_TAKE | ITEM_WEAR_BODY, 1, 1, FALSE}, {"a pair of common pants", ITEM_TAKE | ITEM_WEAR_LEGS, 1, 1, FALSE}, {"a pair of common shoes", ITEM_TAKE | ITEM_WEAR_FEET, 1, 1, FALSE}, {"a pair of common gloves", ITEM_TAKE | ITEM_WEAR_HANDS, 1, 1, FALSE}, {"a common robe", ITEM_TAKE | ITEM_WEAR_ABOUT, 1, 1, FALSE}, {"a common belt", ITEM_TAKE | ITEM_WEAR_WAIST, 1, 1, FALSE}, {"an amulet of Gwendion", ITEM_TAKE | ITEM_WEAR_NECK, 1, 1, FALSE}, {NULL, -1, -1, -1, -1} }; /* * rig_clothing_exp_table[] * * Expensive clothing (noble) */ const struct rig_clothing_type rig_clothing_exp_table[] = { {"an expensive shirt", ITEM_TAKE | ITEM_WEAR_BODY, 1, 1, FALSE}, {"an pair of expensive pants", ITEM_TAKE | ITEM_WEAR_LEGS, 1, 1, FALSE}, {"an pair of expensive shoes", ITEM_TAKE | ITEM_WEAR_FEET, 1, 1, FALSE}, {"an pair of expensive gloves", ITEM_TAKE | ITEM_WEAR_HANDS, 1, 1, FALSE}, {"an expensive robe", ITEM_TAKE | ITEM_WEAR_ABOUT, 1, 1, FALSE}, {"an expensive belt", ITEM_TAKE | ITEM_WEAR_WAIST, 1, 1, FALSE}, {"an amulet", ITEM_TAKE | ITEM_WEAR_NECK, 1, 1, FALSE}, {"a gold ring", ITEM_TAKE | ITEM_WEAR_FINGER, 1, 1, FALSE}, {NULL, -1, -1, -1, -1} }; /* * wizard scrolls */ const struct rig_scroll_type rig_wizscroll_table[] = { {"continual light", 240, CIRCLE_1}, {"create food", 130, CIRCLE_1}, {"create rose", 138, CIRCLE_1}, {"create spring", 182, CIRCLE_1}, {"identify", 230, CIRCLE_1}, {"infravision", 97, CIRCLE_1}, {"see alignment", 121, CIRCLE_1}, {"lesser invisibility", 210, CIRCLE_1}, {"magic missile", 50, CIRCLE_1}, {"mend", 241, CIRCLE_1}, {"orcish strength", 165, CIRCLE_1}, {"refresh", 139, CIRCLE_1}, {"wizard fire", 150, CIRCLE_1}, {"wizard frost", 163, CIRCLE_1}, {"wizard spark", 174, CIRCLE_1}, {"detect hidden", 500, CIRCLE_2}, {"detect invis", 4086, CIRCLE_2}, {"farsight", 3658, CIRCLE_2}, {"fear", 4216, CIRCLE_2}, {"flight", 4515, CIRCLE_2}, {"leech strength", 5077, CIRCLE_2}, {"locate object", 3522, CIRCLE_2}, {"protection from evil", 5095, CIRCLE_2}, {"protection from good", 5092, CIRCLE_2}, {"shield", 6021, CIRCLE_2}, {"spark", 4557, CIRCLE_2}, {"sleep", 5512, CIRCLE_2}, {"summon", 5053, CIRCLE_2}, {"pass door", 4020, CIRCLE_3}, {"fireball", 12569, CIRCLE_3}, {"haste", 10578, CIRCLE_3}, {"ice bolt", 11563, CIRCLE_3}, {"knock", 9042, CIRCLE_3}, {"lightning", 12095, CIRCLE_3}, {"manashield", 10046, CIRCLE_3}, {"wizard eye", 10053, CIRCLE_3}, {NULL, -1, -1} }; /* * Priest scrolls */ const struct rig_scroll_type rig_priscroll_table[] = { {"adept", 551}, {"armor", 510}, {"bark skin", 2232}, {"bless", 581}, {"blindness", 518}, {"brushfire", 5072}, {"calm", 3100}, {"cancellation", 3067}, {"cause critical", 2061}, {"cause light", 1525}, {"cause serious", 1723}, {"create food", 560}, {"create rose", 3072}, {"create spring", 2010}, {"create water", 540}, {"cure blindness", 596}, {"cure critical", 2077}, {"cure disease", 2039}, {"cure light", 1058}, {"cure poison", 522}, {"cure serious", 1525}, {"curse", 2017}, {"demonfire", 2038}, {"detect evil", 522}, {"detect good", 564}, {"detect hidden", 556}, {"detect invis", 592}, {"detect magic", 566}, {"dispel magic", 1599}, {"divinity", 320}, {"earthquake", 1516}, {"fear", 1543}, {"fireproof", 1002}, {"fire storm", 2054}, {"flamestrike", 2002}, {"fly", 1007}, {"frenzy", 3077}, {"grudge", 263}, {"harm", 3579}, {"heal", 5088}, {"heat metal", 2548}, {"holy word", 20038}, {"holy sight", 1515}, {"identify", 1227}, {"infravision", 538}, {"know alignment", 905}, {"malady", 10045}, {"magic missile", 276}, {"mass healing", 10027}, {"pass door", 2005}, {"plague", 2098}, {"protection evil", 571}, {"protection good", 570}, {"ray of truth", 2091}, {"refresh", 1207}, {"replenish", 5084}, {"rejuvination", 20009}, {"restoration", 2096}, {"sacred cloak", 510}, {"scared flame", 312}, {"sanctify", 888}, {"sanctuary", 7575}, {"suppression", 15056}, {"sun ritual", 2048}, {NULL, -1, -1} }; const struct rig_scroll_type rig_thief_tome_table[] = { {"axe", 74, CIRCLE_NONE}, {"dagger", 6, CIRCLE_NONE}, {"flail", 87, CIRCLE_NONE}, {"mace", 20, CIRCLE_NONE}, {"sword", 22, CIRCLE_NONE}, {"agility", 1203, CIRCLE_NONE}, {"backstab", 70, CIRCLE_NONE}, {"blindfighting", 21, CIRCLE_NONE}, {"circle", 1227, CIRCLE_NONE}, {"critical hit", 1259, CIRCLE_NONE}, {"counterattack", 52, CIRCLE_NONE}, {"dirt kicking", 41, CIRCLE_NONE}, {"disarm", 41, CIRCLE_NONE}, {"dodge", 96, CIRCLE_NONE}, {"dual weapons", 9, CIRCLE_NONE}, {"duck", 40, CIRCLE_NONE}, {"envenom", 69, CIRCLE_NONE}, {"fourth attack", 30, CIRCLE_NONE}, {"hand to hand", 78, CIRCLE_NONE}, {"jugular slice", 46, CIRCLE_NONE}, {"parry", 84, CIRCLE_NONE}, {"second attack", 43, CIRCLE_NONE}, {"snare", 6, CIRCLE_NONE}, {"third attack", 73, CIRCLE_NONE}, {"trip", 86, CIRCLE_NONE}, {"untangle", 79, CIRCLE_NONE}, {"vital points", 1242, CIRCLE_NONE}, {"vein slice", 1297, CIRCLE_NONE}, {"hide", 25, CIRCLE_NONE}, {"hunting", 48, CIRCLE_NONE}, {"lore", 57, CIRCLE_NONE}, {"pick lock", 46, CIRCLE_NONE}, {"sneak", 71, CIRCLE_NONE}, {"scrolls", 61, CIRCLE_NONE}, {"wands", 92, CIRCLE_NONE}, {NULL, -1, -1} }; const struct rig_scroll_type rig_fighter_tome_table[] = { {"axe", 20, CIRCLE_NONE}, {"dagger", 13, CIRCLE_NONE}, {"flail", 69, CIRCLE_NONE}, {"mace", 25, CIRCLE_NONE}, {"polearm", 34, CIRCLE_NONE}, {"spear", 44, CIRCLE_NONE}, {"sword", 99, CIRCLE_NONE}, {"whip", 83, CIRCLE_NONE}, {"bash", 6, CIRCLE_NONE}, {"berserk", 26, CIRCLE_NONE}, {"blindfighting", 72, CIRCLE_NONE}, {"counterattack", 23, CIRCLE_NONE}, {"disarm", 74, CIRCLE_NONE}, {"dodge", 78, CIRCLE_NONE}, {"dual weapons", 0, CIRCLE_NONE}, {"enhanced damage", 38, CIRCLE_NONE}, {"flurry", 30, CIRCLE_NONE}, {"fifth attack", 68, CIRCLE_NONE}, {"fourth attack", 17, CIRCLE_NONE}, {"hand to hand", 8, CIRCLE_NONE}, {"jugular slice", 95, CIRCLE_NONE}, {"parry", 86, CIRCLE_NONE}, {"rescue", 27, CIRCLE_NONE}, {"rush", 39, CIRCLE_NONE}, {"second attack", 19, CIRCLE_NONE}, {"shield bash", 48, CIRCLE_NONE}, {"shield block", 53, CIRCLE_NONE}, {"third attack", 88, CIRCLE_NONE}, {"kick", 331, CIRCLE_NONE}, {"fast healing", 78, CIRCLE_NONE}, {"haggle", 67, CIRCLE_NONE}, {"hunting", 66, CIRCLE_NONE}, {"sharpen", 39, CIRCLE_NONE}, {NULL, -1, -1} }; /* potion_spells_table * * This table holds the normal player use spells, like rejuve, etc * Non-healing spells */ const struct rig_potion_type rig_potion_table[] = { {"armor", 100}, {"bless", 250}, {"cancellation", 450}, {"cure blindness", 120}, {"cure disease", 180}, {"cure poison", 70}, {"detect invis", 200}, {"detect hidden", 180}, {"detect magic", 210}, {"detect good", 140}, {"fly", 110}, {"holy sight", 275}, {"pass door", 130}, {"protection evil", 250}, {"protection good", 250}, {"haste", 500}, {"dispel magic", 750}, {"giant strength", 140}, {"immolate", 800}, {"shield", 190}, {"sanctify", 400}, {"sanctuary", 350}, {NULL, -1} }; /* * rig_potion_heal_table() * * Holds 'healing' potions, like restore health, restore mana, etc */ const struct rig_potion_type rig_potion_heal_table[] = { {"cure light", 50}, {"cure serious", 150}, {"cure critical", 300}, {"minor restore health", 75}, {"light restore health", 125}, {"restore health", 175}, {"greater restore health", 225}, {"excellent restore health",275}, {"minor restore mana", 100}, {"light restore mana", 150}, {"restore mana", 200}, {"greater restore mana", 250}, {"excellent restore mana", 300}, {NULL, -1} }; const struct rig_potion_type rig_beer_table[] = { {"elven ale", 10}, {"Budweiser", 12}, {"Budweiser light", 26}, {"Busch", 17}, {"Coors", 13}, {"Coors Light", 15}, {"Michelob", 17}, {"Michelob light", 19}, {"Michelob Amber Bock", 21}, {"Miller Genuine Draft", 10}, {"Miller Genuine Draft Light", 11}, {"Miller High Life", 30}, {"Miller Lite", 20}, {"Miller Lite Ice", 21}, {"Pabst Blue Ribbon", 18}, {"Red Dog", 26}, {"Rolling Rock", 22}, {"Strohs", 28}, {"Jack Daniels", 50}, {"Bourbon", 150}, {"Captian Morgans Rum", 120}, {"Mike's hard lemonade", 70}, {"Southern comfort", 180}, {"Southern comfort light", 200}, {"Skyy Vodka", 190}, {NULL, -1} }; const struct rig_potion_type rig_food_table[] = { {"bread", 1}, {"wheat bread", 1}, {"buttermilk bread", 2}, {"cookie", 2}, {"cheese cracker", 2}, {"french fries", 3}, {"eggs", 3}, {"hot dog", 3}, {"ham sandwich", 5}, {"Quzino's sandwich", 5}, {"beef steak", 10}, {"standard ration", 10}, {"iron ration", 20}, {"C ration", 15}, {"K ration", 25}, {"Z ration", 50}, {"NULL", -1} };