item descriptions have been moved to dat/descript/items.txt and dat/descript/unident.txt.
STL maps are now used to look up exact matches for the names of monsters, features and spells, so that looking them up with "?/" won't get too slow if there's a large descriptions DB and each key has to be tested if its a monster/spell/etc.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3009 c06c8d41-db1a-0410-9941-cceddc491573
VCG3BRIYRTNNWYC3LOXD6KFGXOX37HAFW2HNV7WXVG2V7EUHLDZQC WFQH23BWXTHXKIGOAWWT45ZTSJQAUX6CZWLT7KPGQMDOEYC24HWAC SL4H3NXHK4VIROWPSQDGO7YIYDKDWZWMUDGH5U7Y6NG63MUQXRPAC 3D6NWJ44UYHLZMD3BOQIWXJUEGITAVCHK6Z2WWDQONVQC4HSBRXQC CLIEHAE2PP7ZIGLLIMYCWM4FC54KBOAN5AILOLAZJ5S26GTJM4RQC VM7ZJXYXF3XTGYLWW5RXTEFGG46FOOWWEATC6S565BGHBGM3CXUAC MLZSEZWNNZMSIDQNAAIOJJR4K7VSVJICL5SAGHD3ROM7SYDVZABAC 4PGOIN7EO5PXZHDRHBIWFTT4UI6QTINSWVN333R7S6VHFMOYQYIAC 7Q33YEI26IBNMOJEG2PMW7ULDJBXU4SRA3ZIPHBUFUXXM2VUTBPQC LBTLHHRZTKOBOGAEWQH7VFEDG4WY5IDUEIZARAUFR6SBVWTTMYJQC W2KRIXSCRJPS6WDIYTHVF5IRMF3V5DWECRAWUPVTB7VZ6A2BLD4QC SVY2PTCLXR3KNPQAWXVXTTGCC5DR334HOAKHYO3VDDRWM2BWMALAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC DDU4A3JGN5IUIPP5IASOODKPR2WBHSDSV4FITZ6HNXNSXXQACWAQC PAYI4UTJCR3XZSFOX5L35EURHRXQ6STO4Z7AQ3525QPNL3QYLNBAC MO63AQNSXTPSLZE4AQEEEZXXBDZ6HFB4PYB6GS3QHL3HX3JMCA2AC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC W5VEC2PBIM5DMU5233HOWAZUEPTGWJRZZIA3H35YYQQW6BTP6XUAC H7BW6SEIQ57X6V4BM2RX54W42W6BH5XJBAS6FYCYKLQQG43ZMU4QC KAL42YT6OQXFPMKKKHE2NQM47W5KMLSRI6KWFRTJFAO4WKP4MMLAC 3JOOHBLF6D4362LD2TQGKYB5JVTNX34DD7DPXVJL5E2K2QN2EFLQC 2KTJHQUX2LTU2BCLS5YXVRRKMOYKKIZAPF2LBKORFGSHEN5IO3IAC BWAQ3FHBBM6G3K3KYP75CRTR343RDQZJRYX5ZGYUEXYBAC3APDLAC 5V47S4NNTHWTSAHV3YLO2VGH7JTUIYJ3GBPDN5ZM4UQALT2ZEXDQC 6GDKXNFXPKQ6AVNOSMJECN7CLELM2KCMVRM2A7BARLK2NNILN6SAC VNHFP63ZLLZU3A3PLXP4BITX57DUIYDHFOHQYK3BOBHV3S64G26QC CIPVRZGLOZHCERK6YPOBV3P2E4IAB4H6D5EHLRQE2O5E4P4VCBUAC 5HBRQ2QZTFBQE2Z2CFADUI2D52LO5Z5CNHXHA7BJP3LGO7FJPUCQC BW3XFNOS6LDAQLHOZ6RXARCMKCY5JVLVDSXDSSAX4DSYM3FANQBAC EGV2HM7SD7UQSWJGLR65NQJTUBAJ7WHLM67FMH4UFP7JRSFKREPAC 3KAINFIXO7WNWGUGZB43EUNFRS2ZPBLQZDTY456QACMRHYIJ7WDAC E5DMZFW6WCFAKTKKOQPYTQXZ2CGLWMVH64LRXDUI2UIG4VYUHIVQC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC VBG2GGMVC66LQM4OSI67VKXGAQK4GVOEHX3OL6V3IFOO52MQL72QC IVVTHLTTLOP5TSULXJWUSSXHOKYWVU3OWKYVK45A7RIB6V34MYQAC F3QNVID4E6YMUGVIL34FR426GYY3W7GHW4XJN33LTJBAF6HBY46QC T7GULEUSVPY445FZAYPNTGCXYW3CKC5RQ2Q4KS7WF5W6LJV55YUQC RYT42Z6CED4KV5CCJ45CHZ3DQGLFMDCVH6CSQZNXOILULDG4MXVQC OQ4KB7QCJSK7GSW3DYBARH4DCB75HFKLUSOSOZZZ4IUFKNGFRUDQC 74LQ7JXVLAFSHLI7LCBKFX47CNTYSKGUQSXNX5FCIUIGCC2JTR3QC UFNXOEBCAUO3QMYOF6EXYILHZ44AXVMCOV76SFV3VV7DMVUPZWBAC IHIJSWVOONSTA2WCHKW3YKBLETUQECFVBVLMET5SGQZ4C6U3GCUQC P2ZCF3BBG523ZEOD6XQA4X5YEHBTWH3IM33YVHXP2SQ5POXZIH4QC JK3HFJG76OOQHJMXJUSZRTR5CX5ZMS52LRVBLOR7E2NBI6PRSHHAC DS2GZKISEP2DM2VU6EJ525Q7W3WVOKJXG5PY2OY4VNFCLBHVVOTAC OONYLF4DAPLIYLBNNRW74IVT5BBTWI4XHQBXSNSPVRX3FTKJBTRAC QVVC7AYGVA6U64PTNA7L27422NLMO327P22BQKXEVIMPZHIHO7MQC EHCZCD3WGKXB4KDQKZXE7FZQHJ6E4IHHCM7GZJBRMDEQSDC223YAC 4MCEU2XTDWAYPBWAD5ZYEUPIXLEK5DOIACAQWVXZTX6TB5QHDSFAC 5ZYOO2RVGH53ONV4U5NO6MTINQXET6GV6TETPVCFAVOX44LDNR4QC 6ZZO2QBB46RZM6OXVS7OIKC5M3SEAULSSJFXW5PJG556JDKKUHWAC 3A3OAIFRFU3IHF6SDNDPCN3XYOFYIBYCEYJAXAFASCFDY76SMFXQC OQXMUX5JEITCP2QXJKKOQRLRVTD3LTSDWGI6HTK5GVDIAJ7VKO6AC RR2J4VLJCZSAKY3HNS334KI4YUAPOMSETO2HGCGEEIUCUJAYAGSQC CRX4RG35C3DH57NIXCW4CG4X7SBMSX7TAJR2BAFQ4LQKCLYUNANQC J6APXOT4QOGQFONWB7G546VTVF6QG42HVOROMHF7YBDJPR4K26OAC Y56C5OMUQ5XF2G6DKDV4R5MED44UOIUPTBBQVWQBUHYIXYA5MOZAC I7QLYOTE6DLQZM7YWUWYLKHRJRB2A3STQ42ALSRGQICEWKD2QTEQC ZIFFVCQ72K35WGIUMZYN3KOXIUXF2CNXWKG6ZWEZ6LT3NSF3XOQAC KR655YT3I3U5DMN5NS3FPUGMDNT4BI56K3SFF2FNJ77C45NFKL5AC BUUPPUTWFL2NTMFJWP7LKDXON74CX47E37WDAZ3QI4N55UOUQTXAC typedef std::map<std::string, dungeon_feature_type> feat_desc_map;static feat_desc_map feat_desc_cache;void init_feat_desc_cache(){for (int i = 0; i < NUM_FEATURES; i++){dungeon_feature_type grid = static_cast<dungeon_feature_type>(i);std::string desc = feature_description(grid);
lowercase(desc);if (feat_desc_cache.find(desc) == feat_desc_cache.end())feat_desc_cache[desc] = grid;}}dungeon_feature_type feat_by_desc(std::string desc){lowercase(desc);if (desc[desc.size() - 1] != '.')desc += ".";feat_desc_map::iterator i = feat_desc_cache.find(desc);if (i != feat_desc_cache.end())return (i->second);return (DNGN_UNSEEN);}
typedef std::map<std::string, spell_type> spell_name_map;static spell_name_map spell_name_cache;void init_spell_name_cache(){for (int i = 0; i < NUM_SPELLS; i++){spell_type type = static_cast<spell_type>(i);const char *sptitle = spell_title(type);if (!sptitle)continue;const std::string spell_name = lowercase_string(sptitle);spell_name_cache[spell_name] = type;}}
}typedef std::map<std::string, unsigned> mon_name_map;static mon_name_map mon_name_cache;void init_mon_name_cache(){for (unsigned i = 0; i < sizeof(mondata) / sizeof(*mondata); ++i){std::string name = mondata[i].name;lowercase(name);const int mtype = mondata[i].mc;const monster_type mon = monster_type(mtype);mon_name_cache[name] = mon;}
if (get_helmet_type(item) == THELM_HELM ||get_helmet_type(item) == THELM_HELMET){const short dhelm = get_helmet_desc( item );result +=(dhelm == THELM_DESC_PLAIN) ? "" :(dhelm == THELM_DESC_WINGED) ? "winged " :(dhelm == THELM_DESC_HORNED) ? "horned " :(dhelm == THELM_DESC_CRESTED) ? "crested " :(dhelm == THELM_DESC_PLUMED) ? "plumed " :(dhelm == THELM_DESC_SPIKED) ? "spiked " :(dhelm == THELM_DESC_VISORED) ? "visored " :(dhelm == THELM_DESC_JEWELLED) ? "jewelled ": "buggy ";}
const bool know_cosmetic = !__know_pluses && !terse & !basename;
const bool know_brand = ident && !basename && !qualname && !dbname;const bool know_ego = know_brand;const bool know_cosmetic = !__know_pluses && !terse & !basename&& !qualname && !dbname;
}if (!basename && !dbname && sub_type == ARM_HELMET){if (get_helmet_type(*this) == THELM_HELM ||get_helmet_type(*this) == THELM_HELMET){const short dhelm = get_helmet_desc( *this );buff <<((dhelm == THELM_DESC_PLAIN) ? "" :(dhelm == THELM_DESC_WINGED) ? "winged " :(dhelm == THELM_DESC_HORNED) ? "horned " :(dhelm == THELM_DESC_CRESTED) ? "crested " :(dhelm == THELM_DESC_PLUMED) ? "plumed " :(dhelm == THELM_DESC_SPIKED) ? "spiked " :(dhelm == THELM_DESC_VISORED) ? "visored " :(dhelm == THELM_DESC_JEWELLED) ? "jewelled ": "buggy ");}
}typedef std::map<std::string, item_types_pair> item_names_map;static item_names_map item_names_cache;typedef std::map<unsigned, std::vector<std::string> > item_names_by_glyph_map;static item_names_by_glyph_map item_names_by_glyph_cache;void init_item_name_cache(){const int sub_type_limits[] = {NUM_WEAPONS,NUM_MISSILES,NUM_ARMOURS,NUM_WANDS,NUM_FOODS,0, // Unknown INUM_SCROLLS,NUM_JEWELLERY,NUM_POTIONS,0, // Unknown IINUM_BOOKS,NUM_STAVES,1, // OrbsNUM_MISCELLANY,0, // Corpses1, // Gold-1};for (int i = 0; sub_type_limits[i] != -1; i++){object_class_type base_type = static_cast<object_class_type>(i);unsigned char num_sub_types = (unsigned char) sub_type_limits[i];for (unsigned char sub_type = 0; sub_type < num_sub_types; sub_type++){int o = items(0, base_type, sub_type, true, 1,MAKE_ITEM_NO_RACE);if (o == NON_ITEM)continue;item_def &item(mitm[o]);item_types_pair pair = {base_type, sub_type};// Make sure item isn't an artifactitem.flags &= ~ISFLAG_ARTEFACT_MASK;item.special = 0;std::string name = item.name(DESC_DBNAME, true, true);unsigned glyph;unsigned short colour;get_item_glyph(&item, &glyph, &colour);destroy_item(o);lowercase(name);if (base_type == OBJ_JEWELLERY && name == "buggy jewellery")continue;// else if (base_type == OBJ_MISSILES && name == "eggplant")// continue;else if (item.base_type == OBJ_ARMOUR&& get_armour_slot( item ) == EQ_HELMET){// Why do we handle helmets this way?continue;}else if (name.find("buggy") != std::string::npos){crawl_state.add_startup_error("Bad name for item name "" cache: " + name);continue;}if (item_names_cache.find(name) == item_names_cache.end()){item_names_cache[name] = pair;item_names_by_glyph_cache[glyph].push_back(name);}}}ASSERT(item_names_cache.size() > 0);int o = items(0, OBJ_ARMOUR, ARM_HELMET, true, 1,MAKE_ITEM_NO_RACE);if (o == NON_ITEM){crawl_state.add_startup_error("Couldn't cache helmet names.");return;}item_def &item(mitm[o]);// Make sure item isn't an artifactitem.flags &= ~ISFLAG_ARTEFACT_MASK;item.special = 0;// Now handle the helmetsfor (int i = 0; i < THELM_NUM_TYPES; i++){set_helmet_type(item, i);item_types_pair pair = {item.base_type, item.sub_type};std::string name = item.name(DESC_DBNAME, true, true);unsigned glyph;unsigned short colour;get_item_glyph(&item, &glyph, &colour);lowercase(name);if (item_names_cache.find(name) == item_names_cache.end()){item_names_cache[name] = pair;item_names_by_glyph_cache[glyph].push_back(name);}}destroy_item(o);
item_types_pair item_types_by_name(std::string name){lowercase(name);item_names_map::iterator i = item_names_cache.find(name);if (i != item_names_cache.end())return (i->second);item_types_pair err = {OBJ_UNASSIGNED, 0};return (err);}std::vector<std::string> item_name_list_for_glyph(unsigned glyph){item_names_by_glyph_map::iterator i;i = item_names_by_glyph_cache.find(glyph);if (i != item_names_by_glyph_cache.end())return (i->second);std::vector<std::string> empty;return empty;}
else{if (verbose){switch (item.sub_type){case WPN_CLUB:description += "A heavy piece of wood. ";break;case WPN_MACE:description += "A long handle ""with a heavy lump on one end. ";break;case WPN_FLAIL:description += "Like a mace, but with a length of chain ""between the handle and the lump of metal. ";break;case WPN_DAGGER:description += "A long knife or a very short sword, ""which can be held or thrown. ";break;case WPN_KNIFE:description += "A simple survival knife. ""Designed more for utility than combat, ""it looks quite capable of butchering a corpse. ";break;case WPN_MORNINGSTAR:description += "A mace covered in spikes. ";break;case WPN_SHORT_SWORD:description += "A sword with a short, slashing blade. ";break;case WPN_LONG_SWORD:description += "A sword with a long, slashing blade. ";break;case WPN_GREAT_SWORD:description += "A sword with a very long, heavy blade ""and a long handle. ";break;
case WPN_SCIMITAR:description += "A long sword with a curved blade. ";break;case WPN_HAND_AXE:description += "A small axe designed for either hand combat ""or throwing. ";break;case WPN_BATTLEAXE:description += "A large axe with a double-headed blade. ";break;case WPN_SPEAR:description += "A long stick with a pointy blade on one end, ""to be held or thrown. ";break;case WPN_TRIDENT:description +="A hafted weapon with three points at one end. ";break;case WPN_HALBERD:description +="A long pole with a spiked axe head on one end. ";break;case WPN_SLING:description +="A piece of cloth and leather for launching stones, ""which do a small amount of damage on impact. ";break;case WPN_BOW:description += "A curved piece of wood and string, ""for shooting arrows. It does good damage in combat, ""and a skilled user can use it to great effect. ";break;case WPN_LONGBOW:description += "A long, strong bow made of yew. ""It does excellent damage in combat ""and a skilled archer can use it to great effect. ";break;case WPN_BLOWGUN:description += "A long, light tube, open at both ends. Doing ""very little damage, its main use is to fire poisoned ""needles from afar. It makes very little noise. ";break;case WPN_CROSSBOW:description += "A piece of machinery used for firing bolts, ""which takes some time to load and fire. ""It does very good damage in combat. ";break;case WPN_HAND_CROSSBOW:description += "A small crossbow, for firing darts. ";break;case WPN_GLAIVE:description +="A pole with a large, heavy blade on one end. ";break;case WPN_QUARTERSTAFF:description += "A sturdy wooden pole. ";break;case WPN_SCYTHE:description +="A farm implement, usually unsuited to combat. ";break;case WPN_GIANT_CLUB:description += "A giant lump of wood, ""shaped for an ogre's hands. ";break;case WPN_GIANT_SPIKED_CLUB:description +="A giant lump of wood with sharp spikes at one end. ";break;case WPN_EVENINGSTAR:description += "The opposite of a morningstar. ";break;case WPN_QUICK_BLADE:description += "A small and magically quick sword. ";break;case WPN_KATANA:description += "A very rare and extremely effective ""imported weapon, featuring a long ""single-edged blade. ";break;case WPN_LAJATANG:description += "A very rare and extremely effective ""imported weapon, featuring a pole with half-moon blades ""at both ends. ";break;case WPN_LOCHABER_AXE:description += "An enormous combination of a pike ""and a battle axe.";break;case WPN_EXECUTIONERS_AXE:description += "A huge axe. ";break;case WPN_DOUBLE_SWORD:description +="A magical weapon with two razor-sharp blades. ";break;case WPN_TRIPLE_SWORD:description += "A magical weapon with three ""great razor-sharp blades. ";break;case WPN_HAMMER:description += "The kind of thing you hit nails with, ""adapted for battle. ";break;case WPN_ANCUS:description += "A large and vicious toothed club. ";break;case WPN_WHIP:description += "A whip. ";break;case WPN_SABRE:description += "A sword with a medium length slashing blade. ";break;case WPN_DEMON_BLADE:description +="A terrible weapon, forged in the fires of Hell. ";break;case WPN_BLESSED_BLADE:description += "A blade blessed by the Shining One. ";break;case WPN_DEMON_WHIP:description += "A terrible weapon, woven ""in the depths of the inferno. ";break;case WPN_DEMON_TRIDENT:description +="A terrible weapon, molded by fire and brimstone. ";break;case WPN_BROAD_AXE:description += "An axe with a large blade. ";break;case WPN_WAR_AXE:description += "An axe intended for hand to hand combat. ";break;case WPN_SPIKED_FLAIL:description +="A flail with large spikes on the metal lump. ";break;case WPN_GREAT_MACE:description += "A large and heavy mace. ";break;case WPN_DIRE_FLAIL:description += "A flail with spiked lumps on both ends.";break;case WPN_FALCHION:description += "A sword with a broad slashing blade. ";break;default:DEBUGSTR("Unknown weapon");}description += "$";}}
if (is_unrandom_artefact( item )&& strlen(unrandart_descrip(1, item)) != 0){description += unrandart_descrip(1, item);description += "$";}else{if (verbose){switch (item.sub_type){case ARM_ROBE:description += "A cloth robe. ";break;case ARM_LEATHER_ARMOUR:description += "A suit made of hardened leather. ";break;case ARM_RING_MAIL:description += "A leather suit covered in little rings. ";break;case ARM_SCALE_MAIL:description +="A leather suit covered in little metal plates. ";break;case ARM_CHAIN_MAIL:description += "A suit made of interlocking metal rings. ";break;case ARM_SPLINT_MAIL:description += "A suit made of splints of metal. ";break;case ARM_BANDED_MAIL:description += "A suit made of bands of metal. ";break;case ARM_PLATE_MAIL:description += "A suit of mail and large plates of metal. ";break;case ARM_SHIELD:description +="A piece of metal, to be strapped on one's arm. ""It is cumbersome to wear, and slightly slows ""the rate at which you may attack. ";break;case ARM_CLOAK:description += "A cloth cloak. ";break;case ARM_HELMET:switch (get_helmet_type( item )){case THELM_HELMET:case THELM_HELM:description += "A piece of metal headgear. ";break;case THELM_CAP:description += "A cloth or leather cap. ";break;case THELM_WIZARD_HAT:description += "A conical cloth hat. ";break;}break;case ARM_GLOVES:description += "A pair of gloves. ";break;case ARM_CENTAUR_BARDING:description += "An armour made for centaurs, ""to wear over their equine half.";break;case ARM_NAGA_BARDING:description += "A special armour made for nagas, ""to wear over their tails.";break;case ARM_BOOTS:description += "A pair of boots.";break;case ARM_BUCKLER:description += "A small shield. ";break;case ARM_LARGE_SHIELD:description += "Like a normal shield, only larger. ";if (you.species == SP_TROLL || you.species == SP_OGRE|| you.species == SP_OGRE_MAGE|| player_genus(GENPC_DRACONIAN)){description += "It looks like it would fit you well. ";}else{description += "It is very cumbersome to wear, and ""slows the rate at which you may attack. ";}break;case ARM_DRAGON_HIDE:description += "The scaly skin of a dragon. I suppose ""you could wear it if you really wanted to. ";break;case ARM_TROLL_HIDE:description += "The stiff and knobbly hide of a troll. ""I suppose you could wear it ""if you really wanted to. ";break;case ARM_CRYSTAL_PLATE_MAIL:description += "An incredibly heavy but extremely effective ""suit of crystalline armour. ""It is somewhat resistant to corrosion. ";break;case ARM_DRAGON_ARMOUR:description += "A magical armour, made from the scales of ""a fire-breathing dragon. It provides ""great protection from the effects of fire, ""but renders its wearer more susceptible to ""the effects of cold. ";break;case ARM_TROLL_LEATHER_ARMOUR:description += "A magical armour, made from the stiff and ""knobbly skin of a common troll. It magically regenerates ""its wearer's flesh at a fairly slow rate ""(unless already a troll). ";break;case ARM_ICE_DRAGON_HIDE:description += "The scaly skin of a dragon. I suppose ""you could wear it if you really wanted to. ";break;case ARM_ICE_DRAGON_ARMOUR:description += "A magical armour, made from the scales of ""a cold-breathing dragon. It provides ""great protection from the effects of cold, ""but renders its wearer more susceptible to ""the effects of fire and heat. ";break;case ARM_STEAM_DRAGON_HIDE:description += "The soft and supple scaly skin of ""a steam dragon. I suppose you could ""wear it if you really wanted to. ";break;case ARM_STEAM_DRAGON_ARMOUR:description += "A magical armour, made from the scales of ""a steam-breathing dragon. Although unlike ""the armour made from the scales of some ""larger dragons it does not provide its wearer ""with much in the way of special magical ""protection, it is extremely light and ""as supple as cloth. ";break; /* Protects from steam */case ARM_MOTTLED_DRAGON_HIDE:description += "The weirdly-patterned scaley skin of ""a mottled dragon. I suppose you could ""wear it if you really wanted to. ";break;case ARM_MOTTLED_DRAGON_ARMOUR:description += "A magical armour made from the scales of a ""mottled dragon. Although unlike the armour ""made from the scales of some larger dragons ""it does not provide its wearer with much in ""the way of special magical protection, it is ""as light and relatively uncumbersome as ""leather armour. ";break; /* Protects from napalm */case ARM_STORM_DRAGON_HIDE:description += "The hide of a storm dragon, covered in ""extremely hard blue scales. I suppose ""you could wear it if you really wanted to. ";break;case ARM_STORM_DRAGON_ARMOUR:description += "A magical armour made from the scales of ""a lightning-breathing dragon. It is heavier ""than most dragon scale armours, but gives ""its wearer great resistance to ""electrical discharges. ";break;case ARM_GOLD_DRAGON_HIDE:description += "The extremely tough and heavy skin of a ""golden dragon, covered in shimmering golden ""scales. I suppose you could wear it if ""you really wanted to. ";break;case ARM_GOLD_DRAGON_ARMOUR:description += "A magical armour made from the golden scales ""of a golden dragon. It is extremely heavy and ""cumbersome, but confers resistances to fire, ""cold, and poison on its wearer. ";break;case ARM_ANIMAL_SKIN:description += "The skins of several animals. ";break;case ARM_SWAMP_DRAGON_HIDE:description += "The slimy";if (player_can_smell())description += ", smelly";description += " skin of a swamp-dwelling dragon. I suppose ""you could wear it if you really wanted to. ";break;case ARM_SWAMP_DRAGON_ARMOUR:description += "A magical armour made from the scales of ""a swamp dragon. It confers resistance to ""poison on its wearer. ";break;default:DEBUGSTR("Unknown armour");}
}return description;}//---------------------------------------------------------------//// describe_stick////---------------------------------------------------------------static std::string describe_stick( const item_def &item ){std::string description;description.reserve(64);if ( !item_type_known(item) )description += "A stick. Maybe it's magical. ";else{description += "A magical device which ";switch (item.sub_type){case WAND_FLAME:description += "throws little bits of flame. ";break;case WAND_FROST:description += "throws little bits of frost. ";break;case WAND_SLOWING:description += "casts enchantments to slow down the actions of ""a creature at which it is directed. ";break;case WAND_HASTING:description += "casts enchantments to speed up the actions of ""a creature at which it is directed. ";break;case WAND_MAGIC_DARTS:description += "throws small bolts of destructive energy. ";break;case WAND_HEALING:description += "can heal a creature's wounds. ";break;case WAND_PARALYSIS:description += "can render a creature immobile. ";break;case WAND_FIRE:description += "throws great bolts of fire. ";break;case WAND_COLD:description += "throws great bolts of cold. ";break;case WAND_CONFUSION:description += "induces confusion and bewilderment in ""a target creature. ";break;case WAND_INVISIBILITY:description += "hides a creature from the view of others. ";break;case WAND_DIGGING:description += "drills tunnels through unworked rock. ";break;case WAND_FIREBALL:description += "throws exploding blasts of flame. ";break;case WAND_TELEPORTATION:description += "causes a creature to be randomly translocated. ";break;case WAND_LIGHTNING:description += "throws great bolts of lightning. ";break;case WAND_POLYMORPH_OTHER:description += "causes a creature to be transmogrified into ""another form. ""It doesn't work on you, so don't even try. ";break;case WAND_ENSLAVEMENT:description += "causes slavish obedience in a creature. ";break;case WAND_DRAINING:description += "throws a bolt of negative energy which ""drains the life essences of living creatures, ""but is useless against the undead. ";break;case WAND_RANDOM_EFFECTS:description += "can produce a variety of effects. ";break;case WAND_DISINTEGRATION:description += "disrupts the physical structure of ""anything but the hardest walls -- even rigid ""statues, to say nothing of flesh. ";break;default:DEBUGSTR("Unknown stick");}if (item_ident( item, ISFLAG_KNOW_PLUSES ) && item.plus == 0)description += "Unfortunately, it has no charges left. ";
}//---------------------------------------------------------------//// describe_food////---------------------------------------------------------------static std::string describe_food( const item_def &item ){std::string description;description.reserve(100);switch (item.sub_type){// rationscase FOOD_MEAT_RATION:case FOOD_BREAD_RATION:description += "A filling ration of ";switch (item.sub_type){case FOOD_MEAT_RATION:description += "dried and preserved meats";break;case FOOD_BREAD_RATION:description += "breads";break;}description += ". ";break;// fruitscase FOOD_PEAR:case FOOD_APPLE:case FOOD_APRICOT:case FOOD_ORANGE:case FOOD_BANANA:case FOOD_STRAWBERRY:case FOOD_RAMBUTAN:case FOOD_LEMON:case FOOD_GRAPE:case FOOD_LYCHEE:case FOOD_SULTANA:description += "A";switch (item.sub_type){case FOOD_PEAR:description += " delicious juicy";break;case FOOD_APPLE:description += " delicious red or green";break;case FOOD_APRICOT:description += " delicious orange";break;case FOOD_ORANGE:description += " delicious juicy orange";break;case FOOD_BANANA:description += " delicious yellow";break;case FOOD_STRAWBERRY:description += " small but delicious red";break;case FOOD_RAMBUTAN:description += " small but delicious tropical";break;case FOOD_LEMON:description += " yellow";break;case FOOD_GRAPE:description += " small";break;case FOOD_LYCHEE:description += " tropical";break;case FOOD_SULTANA:description += " dried";break;}description += " fruit";switch (item.sub_type){case FOOD_BANANA:description += ", probably grown and imported by ""some amoral multinational as the ""result of a corrupt trade deal";break;case FOOD_RAMBUTAN:description += ". How it got into this dungeon ""is anyone's guess";break;case FOOD_SULTANA:description += " of some sort, possibly a grape";break;}description += ". ";break;// vegetablescase FOOD_CHOKO:case FOOD_SNOZZCUMBER:description += "A";switch (item.sub_type){case FOOD_CHOKO:description += "n almost tasteless green";break;case FOOD_SNOZZCUMBER:description += " repulsive cucumber-shaped";break;}description += " vegetable";switch (item.sub_type){case FOOD_CHOKO:description += ", which grows on a vine";break;}description += ". ";break;// lumps, slices, chunks, and stripscase FOOD_HONEYCOMB:case FOOD_ROYAL_JELLY:case FOOD_PIZZA:case FOOD_CHEESE:case FOOD_BEEF_JERKY:case FOOD_SAUSAGE:case FOOD_CHUNK:description += "A";switch (item.sub_type){case FOOD_SAUSAGE:description += "n elongated";break;}switch (item.sub_type){case FOOD_HONEYCOMB:case FOOD_ROYAL_JELLY:case FOOD_CHEESE:case FOOD_SAUSAGE:description += " lump";break;case FOOD_PIZZA:description += " slice";break;case FOOD_BEEF_JERKY:description += " strip";break;case FOOD_CHUNK:description += " piece";}description += " of ";switch (item.sub_type){case FOOD_SAUSAGE:description += "low-grade gristle, entrails and ""cereal products encased in an intestine";break;case FOOD_HONEYCOMB:description += "the delicious honeycomb made by giant bees";break;case FOOD_ROYAL_JELLY:description += "the magical substance produced by giant bees ""to be fed to their queens";break;case FOOD_PIZZA:description += "pizza";break;case FOOD_CHEESE:description += "cheese";break;case FOOD_BEEF_JERKY:description += "preserved dead cow or bull";break;case FOOD_CHUNK:description += "dungeon meat";break;}description += ". ";switch (item.sub_type){case FOOD_SAUSAGE:description += "Yum! ";break;case FOOD_PIZZA:description += "Don't tell me you don't know what that is! ";break;case FOOD_CHUNK:if (you.mutation[MUT_SAPROVOROUS] < 3)description += "It looks rather unpleasant. ";if (item.special < 100){if (you.mutation[MUT_SAPROVOROUS] == 3)description += "It looks nice and ripe. ";else if (you.is_undead != US_UNDEAD){description += "In fact, it is ""rotting away before your eyes. ""Eating it would probably be unwise. ";}}break;}break;default:DEBUGSTR("Unknown food");}description += "$";return (description);}//---------------------------------------------------------------//// describe_potion////---------------------------------------------------------------static const char* describe_potion( const item_def &item ){if ( !item_type_known(item) )return "A small bottle of liquid.$";switch (static_cast<potion_type>(item.sub_type)){case POT_HEALING:return "A blessed fluid which heals some wounds, clears the mind, ""and cures diseases. If one uses it when they are at or near ""full health, it can also slightly repair permanent injuries.$";case POT_HEAL_WOUNDS:return "A magical healing elixir which causes wounds to close and ""heal almost instantly. If one uses it when they are at or near ""full health, it can also repair permanent injuries.$";case POT_SPEED:return "An enchanted beverage which speeds the actions of anyone who ""drinks it.$";case POT_MIGHT:return "A magic potion which greatly increases the strength and ""physical power of one who drinks it.$";case POT_GAIN_STRENGTH:return "A potion of beneficial mutation.$";case POT_GAIN_DEXTERITY:return "A potion of beneficial mutation.$";case POT_GAIN_INTELLIGENCE:return "A potion of beneficial mutation.$";case POT_LEVITATION:return "A potion which confers great buoyancy ""on one who consumes it.$";case POT_POISON:return "A nasty poisonous liquid.$";case POT_SLOWING:return "A potion which slows your actions.$";case POT_PARALYSIS:return "A potion which eliminates your control over your own body.$";case POT_CONFUSION:return "A potion which confuses your perceptions and ""reduces your control over your own actions.$";case POT_INVISIBILITY:return "A potion which hides you from the sight of others.$";case POT_PORRIDGE:return "A filling potion of sludge, high in cereal fibre.$";case POT_DEGENERATION:return "A noxious concoction which can do terrible things ""to your body, brain and reflexes.$";case POT_DECAY:return "A vile and putrid cursed liquid which causes your ""flesh to decay before your very eyes.$";case POT_WATER:return "A unique substance, vital for the existence of most life.$";case POT_EXPERIENCE:return "A truly wonderful and very rare drink.$";case POT_MAGIC:return "A valuable potion which grants a person with an ""infusion of magical energy.$";case POT_RESTORE_ABILITIES:return "A potion which restores the abilities of one who drinks it.$";case POT_STRONG_POISON:return "A terribly venomous potion.$";case POT_BERSERK_RAGE:return "A potion which can send one into an incoherent rage.$";case POT_CURE_MUTATION:return "A potion which removes some or all of any mutations ""which may be afflicting you.$";case POT_MUTATION:return "A potion which does very strange things to you.$";case POT_BLOOD:return "A potion containing the essence of life. Vital for all living ""creatures, as well as some undead ones.$";case POT_RESISTANCE:return "A potion which grants you temporary resistance to the elements ""and poison.$";case NUM_POTIONS:return "A buggy potion.";}return "A very buggy potion.";}//---------------------------------------------------------------//// describe_scroll////---------------------------------------------------------------static std::string describe_scroll( const item_def &item ){std::string description;description.reserve(64);if ( !item_type_known(item) )description += "A scroll of paper covered in magical writing.";else{switch (item.sub_type){case SCR_IDENTIFY:description += "This useful magic scroll allows you to ""determine the properties of any object. ";break;case SCR_TELEPORTATION:description += "Reading the words on this scroll ""translocates you to a random position. ";break;case SCR_FEAR:description += "This scroll causes great fear in those ""who see the one who reads it. ";break;case SCR_NOISE:description += "This prank scroll, often slipped into a wizard's ""backpack by a devious apprentice, causes a loud noise. ""It is not otherwise noted for its usefulness. ";break;case SCR_REMOVE_CURSE:description += "Reading this scroll removes curses from ""the items you are using. ";break;case SCR_DETECT_CURSE:description += "This scroll allows you to detect the presence ""of cursed items among your possessions. ";break;case SCR_SUMMONING:description += "This scroll opens a conduit to the Abyss ""and draws a terrible beast to this world ""for a limited time. ";break;case SCR_ENCHANT_WEAPON_I:description += "This scroll places an enchantment on a weapon, ""making it more accurate in combat. It may fail ""to affect weapons already heavily enchanted. ";break;case SCR_ENCHANT_ARMOUR:description += "This scroll places an enchantment ""on a piece of armour. ";break;case SCR_TORMENT:description += "This scroll calls on the powers of Hell to ""inflict great pain on any nearby creature - ""including you! ";break;case SCR_RANDOM_USELESSNESS:description += "It is easy to be blinded to the essential ""uselessness of this scroll by the sense of achievement ""you get from getting it to work at all.";// -- The Hitchhiker's Guide to the Galaxy (paraphrase)break;case SCR_CURSE_WEAPON:description += "This scroll places a curse on a weapon. ";break;case SCR_CURSE_ARMOUR:description += "This scroll places a curse ""on a piece of armour. ";break;case SCR_IMMOLATION:description += "Small writing on the back of the scroll reads: ""\"Warning: contents under pressure. Do not use near"" flammable objects.\"";break;case SCR_BLINKING:description += "This scroll allows its reader to teleport ""a short distance, with precise control. Be wary that ""controlled teleports will cause the subject to ""become contaminated with magical energy. ";break;case SCR_PAPER:description += "Apart from a label, this scroll is blank. ";break;case SCR_MAGIC_MAPPING:description += "This scroll reveals the nearby surroundings ""of one who reads it. ";break;case SCR_FOG:description += "This scroll surrounds the reader ""with a dense cloud of fog. ";break;case SCR_ACQUIREMENT:description += "This wonderful scroll causes the ""creation of a valuable item to ""appear before the reader. ""It is especially treasured by specialist ""magicians, as they can use it to obtain ""the powerful spells of their specialty. ";break;case SCR_ENCHANT_WEAPON_II:description += "This scroll places an enchantment on a weapon, ""making it inflict greater damage in combat. ""It may fail to affect weapons already ""heavily enchanted. ";break;case SCR_VORPALISE_WEAPON:description += "This scroll enchants a weapon so as to make ""it far more effective at inflicting harm on ""its wielder's enemies. Using it on a weapon ""already affected by some kind of special ""enchantment (other than that produced by a ""normal scroll of enchant weapon) is not advised. ";break;case SCR_RECHARGING:description += "This scroll restores the charges of ""any magical wand wielded by its reader. ";break;case SCR_ENCHANT_WEAPON_III:description += "This scroll enchants a weapon to be ""far more effective in combat. Although ""it can be used in the creation of especially ""enchanted weapons, it may fail to affect those ""already heavily enchanted. ";break;default:DEBUGSTR("Unknown scroll");}}description += "$";return (description);
if (is_unrandom_artefact( item ) && strlen(unrandart_descrip(1, item)) != 0){description += unrandart_descrip(1, item);description += "$";}else if ( !item_type_known(item) ){description += "A piece of jewellery.";}else if (verbose || is_random_artefact( item )){switch (item.sub_type){case RING_REGENERATION:description += "This wonderful ring greatly increases the ""recuperative powers of its wearer, but also ""considerably speeds his or her metabolism. ";break;case RING_PROTECTION:description +="This ring either protects its wearer from harm or makes ""them more vulnerable to injury, to a degree dependent ""on its power. ";break;case RING_PROTECTION_FROM_FIRE:description +="This ring provides protection from heat and fire. ";break;case RING_POISON_RESISTANCE:description +="This ring provides protection from the effects of poisons and venom. ";break;case RING_PROTECTION_FROM_COLD:description += "This ring provides protection from cold. ";break;case RING_STRENGTH:description +="This ring increases or decreases the physical strength ""of its wearer, to a degree dependent on its power. ";break;case RING_SLAYING:description +="This ring increases the hand-to-hand and missile combat ""skills of its wearer.";break;case RING_SEE_INVISIBLE:description +="This ring allows its wearer to see those things hidden ""from view by magic. ";break;case RING_INVISIBILITY:description +="This powerful ring can be activated to hide its wearer ""from the view of others, but increases the speed of his ""or her metabolism greatly while doing so. ";break;case RING_HUNGER:description +="This accursed ring causes its wearer to hunger ""considerably more quickly. ";break;case RING_TELEPORTATION:description +="This ring occasionally exerts its power to randomly ""translocate its wearer to another place, and can be ""deliberately activated for the same effect. ";break;case RING_EVASION:description +="This ring makes its wearer either more or less capable ""of avoiding attacks, depending on its degree ""of enchantment. ";break;case RING_SUSTAIN_ABILITIES:description +="This ring protects its wearer from the loss of their ""strength, dexterity and intelligence. ";break;case RING_SUSTENANCE:description +="This ring provides energy to its wearer, so that they ""need eat less often. ";break;case RING_DEXTERITY:description +="This ring increases or decreases the dexterity of its ""wearer, depending on the degree to which it has been ""enchanted. ";break;case RING_INTELLIGENCE:description +="This ring increases or decreases the mental ability of ""its wearer, depending on the degree to which it has ""been enchanted. ";break;case RING_WIZARDRY:description +="This ring increases the ability of its wearer to use ""magical spells. ";break;case RING_MAGICAL_POWER:description +="This ring increases its wearer's reserves of magical ""power. ";break;case RING_LEVITATION:description +="This ring allows its wearer to hover above the floor. ";break;case RING_LIFE_PROTECTION:description +="This blessed ring protects the life-force of its wearer ""from negative energy, making them partially immune to ""the draining effects of undead and necromantic magic. ";break;case RING_PROTECTION_FROM_MAGIC:description +="This ring increases its wearer's resistance to ""hostile enchantments. ";break;case RING_FIRE:description +="This ring brings its wearer more in contact with ""the powers of fire. He or she gains resistance to ""heat and can use fire magic more effectively, but ""becomes more vulnerable to the effects of cold. ";break;case RING_ICE:description +="This ring brings its wearer more in contact with ""the powers of cold and ice. He or she gains resistance ""to cold and can use ice magic more effectively, but ""becomes more vulnerable to the effects of fire. ";break;case RING_TELEPORT_CONTROL:description += "This ring allows its wearer to control the ""destination of any teleportation, although without ""perfect accuracy. Trying to teleport into a solid ""object will result in a random teleportation, at ""least in the case of a normal teleportation. Also ""be wary that controlled teleports will contaminate ""the subject with residual magical energy.";break;case AMU_RAGE:description +="This amulet enables its wearer to attempt to enter ""a state of berserk rage, and increases their chance ""of successfully doing so. It also partially protects ""the user from passing out when coming out of that rage. ";break;case AMU_RESIST_SLOW:description +="This amulet protects its wearer from some magically ""induced forms of slowness, and increases the duration ""of enchantments which speed his or her actions. ";break;case AMU_CLARITY:description +="This amulet protects its wearer from some forms of ""mental confusion. ";break;case AMU_WARDING:description +="This amulet repels some of the attacks of creatures ""which have been magically summoned, and also ""makes the wearer more resistant to draining attacks. ";break;case AMU_RESIST_CORROSION:description +="This amulet protects the wearer and their equipment ""from corrosion caused by acids, although not ""infallibly so. ";break;case AMU_THE_GOURMAND:description +="This amulet protects its wearer from ""sickness from eating fresh raw meat and allows them to ""digest it when not hungry, but its effects on the wearer's ""digestion are cumulative over time, and are initially ""small.";break;case AMU_CONSERVATION:description +="This amulet protects some of the possessions of ""its wearer from outright destruction, but not ""infallibly so. ";break;case AMU_CONTROLLED_FLIGHT:description +="Should the wearer of this amulet be levitated ""by magical means, he or she will be able to exercise ""some control over the resulting motion. This allows ""the descent of staircases and the retrieval of items ""lying on the ground, for example, but does not ""deprive the wearer of the benefits of levitation. ";break;case AMU_INACCURACY:description +="This amulet makes its wearer less accurate in hand combat. ";break;case AMU_RESIST_MUTATION:description +="This amulet protects its wearer from mutations, ""although not infallibly so. ";break;default:DEBUGSTR("Unknown jewellery");}description += "$";}
//---------------------------------------------------------------//// describe_staff////---------------------------------------------------------------static std::string describe_staff( const item_def &item ){std::string description;description.reserve(200);if (item_type_known(item)){// NB: the leading space is here {dlb}description += "This " + std::string( item_is_staff( item ) ? "staff ": "rod " );switch (item.sub_type){case STAFF_WIZARDRY:description +="significantly increases the ability of its wielder to use ""magical spells. ";break;case STAFF_POWER:description +="provides a reservoir of magical power to its wielder. ";break;case STAFF_FIRE:description +="increases the power of fire spells cast by its wielder, ""and protects him or her from the effects of heat and fire. ""It can burn those struck by it. ";break;case STAFF_COLD:description +="increases the power of ice spells cast by its wielder, ""and protects him or her from the effects of cold. It can ""freeze those struck by it. ";break;case STAFF_POISON:description +="increases the power of poisoning spells cast by its ""wielder, and protects him or her from the effects of ""poison. It can poison those struck by it. ";break;case STAFF_ENERGY:description +="allows its wielder to cast magical spells without ""hungering as a result. ";break;case STAFF_DEATH:description +="increases the power of necromantic spells cast by its ""wielder. It can cause great pain in those living souls ""its wielder strikes. ";break;case STAFF_CONJURATION:description +="increases the power of conjurations cast by its wielder. ";break;case STAFF_ENCHANTMENT:description +="increases the power of enchantments cast by its wielder. ";break;case STAFF_SUMMONING:description +="increases the power of summonings cast by its wielder. ";break;case STAFF_SMITING:description +="allows its wielder to smite foes from afar. The wielder ""must be at least level four to safely use this ability, ""which drains four charges. ";break;case STAFF_VENOM:description +="contains offensive and defensive spells of poison.";break;case STAFF_STRIKING:description += "allows its wielder to strike foes from afar ""with force bolts. ";break;case STAFF_SPELL_SUMMONING:description += "contains spells of summoning. ";break;case STAFF_WARDING:description +="contains spells designed to repel one's enemies. ";break;case STAFF_DISCOVERY:description +="contains spells which reveal various aspects of ""an explorer's surroundings to them. ";break;case STAFF_AIR:description +="increases the power of air spells cast by its wielder. ""It can shock those struck by it. ";break;case STAFF_EARTH:description +="increases the power of earth spells cast by its wielder. ""It can crush those struck by it. ";break;case STAFF_CHANNELING:description +="allows its caster to channel ambient magical energy for ""his or her own purposes. ";break;default:description +="contains spells of mayhem and destruction. ";break;}if (item_is_rod( item )){description +="$$It uses its own mana reservoir for casting spells, and ""recharges automatically by channeling mana from its ""wielder.";}else{description +="$$Damage rating: 7 $Accuracy rating: +6 $Attack delay: 120%";
case MISC_BOTTLED_EFREET:description +="A mighty efreet, captured by some wizard and bound into ""a bronze flask. Breaking the flask's seal will release it ""to wreak havoc - possibly on you. ";break;case MISC_CRYSTAL_BALL_OF_SEEING:description +="A magical device which allows one to see the layout of ""their surroundings. It requires a degree of magical ""ability to be used reliably, otherwise it can produce ""unpredictable and possibly harmful results. ";break;case MISC_AIR_ELEMENTAL_FAN:description += "A magical device for summoning air ""elementals. It is rather unreliable, and usually requires ""several attempts to function correctly. Using it carries ""an element of risk, which is reduced if one is skilled in ""the appropriate elemental magic. ";break;case MISC_LAMP_OF_FIRE:description += "A magical device for summoning fire ""elementals. It is rather unreliable, and usually ""requires several attempts to function correctly. Using ""it carries an element of risk, which is reduced if one ""is skilled in the appropriate elemental magic.";break;case MISC_STONE_OF_EARTH_ELEMENTALS:description += "A magical device for summoning earth ""elementals. It is rather unreliable, and usually ""requires several attempts to function correctly. ""Using it carries an element of risk, which is reduced ""if one is skilled in the appropriate elemental magic.";break;case MISC_LANTERN_OF_SHADOWS:description +="An unholy device which calls on the powers of darkness ""to assist its user, with a small cost attached. ";break;case MISC_HORN_OF_GERYON:description +="The horn belonging to Geryon, guardian of the Vestibule ""of Hell. Legends say that a mortal who desires access ""into one of the Hells must use it in order to gain entry. ";break;case MISC_BOX_OF_BEASTS:description +="A magical box containing many wild beasts. One may ""allow them to escape by opening the box's lid. ";break;case MISC_DECK_OF_ESCAPE:description +="A deck of magical cards, mainly dealing with various ""forms of escape. Incautious use may lead to being ""dumped from the frying pan into the fire! ";break;case MISC_DECK_OF_DESTRUCTION:description +="A deck of magical cards, most of which hurl death ""and destruction at one's foes (or, if unlucky, at oneself.) ";break;case MISC_DECK_OF_DUNGEONS:description +="A deck of magical cards which deal with shaping the ""dungeon. Unlike most other decks, the cards from this deck ""tend to be ignored by Nemelex, who prefers more amusing ""pursuits. ";break;case MISC_DECK_OF_SUMMONING:description +="A deck of magical cards, depicting a range of weird and ""wondrous creatures. ";break;case MISC_DECK_OF_WONDERS:description +="A deck of highly mysterious and magical cards, which can ""permanently alter the drawer's physical and mental ""condition, for better or worse. ";break;case MISC_DECK_OF_PUNISHMENT:description +="A deck of magical cards which wreak havoc on the user. ";break;case MISC_DECK_OF_WAR:description +="A deck of magical cards which are useful before and during ""battle. ";break;case MISC_DECK_OF_CHANGES:description +="A deck of magical cards which induce changes in the user ""or his environment. ";break;case MISC_DECK_OF_DEFENSE:description +="A deck of magical cards, most of which defend the user ""from harm in various ways. ";break;case MISC_CRYSTAL_BALL_OF_ENERGY:description +="A magical device which can be used to restore one's ""reserves of magical energy, but the use of which carries ""the risk of draining all of those energies completely. ""This risk varies inversely with the proportion of their ""maximum energy which the user possesses; a user near his ""or her full potential will find this item most beneficial. ";break;case MISC_EMPTY_EBONY_CASKET:description += "A magical box after its power is spent. ";break;case MISC_CRYSTAL_BALL_OF_FIXATION:description +="A dangerous item which hypnotises anyone so unwise as ""to gaze into it, leaving them helpless for a significant ""length of time. ";break;case MISC_DISC_OF_STORMS:description +="This extremely powerful item can unleash a destructive ""storm of electricity. It is especially effective in the ""hands of one skilled in air elemental magic, but cannot ""be used by one who is not a conductor. ";break;case MISC_RUNE_OF_ZOT:description +="A talisman which allows entry into Zot's domain. ";break;case NUM_MISCELLANY:description += "A buggy miscellaneous item.";break;
if ( i != 0 )description += ", ";description += card_name(drawn_cards[i]);
else{switch (subtype){case MISC_BOTTLED_EFREET:description += "A heavy bronze flask, warm to the touch. ";break;case MISC_CRYSTAL_BALL_OF_ENERGY:case MISC_CRYSTAL_BALL_OF_FIXATION:case MISC_CRYSTAL_BALL_OF_SEEING:description += "A sphere of clear crystal. ";break;case MISC_AIR_ELEMENTAL_FAN:description += "A fan. ";break;case MISC_LAMP_OF_FIRE:description += "A lamp. ";break;case MISC_STONE_OF_EARTH_ELEMENTALS:description += "A lump of rock. ";break;case MISC_LANTERN_OF_SHADOWS:description += "A strange lantern made out of ancient bones. ";break;case MISC_HORN_OF_GERYON:description += "A great silver horn, radiating unholy energies. ";break;case MISC_BOX_OF_BEASTS:case MISC_EMPTY_EBONY_CASKET:description += "A small black box. I wonder what's inside? ";break;
case MISC_DECK_OF_ESCAPE:case MISC_DECK_OF_DESTRUCTION:case MISC_DECK_OF_DUNGEONS:case MISC_DECK_OF_SUMMONING:case MISC_DECK_OF_WONDERS:case MISC_DECK_OF_PUNISHMENT:case MISC_DECK_OF_WAR:case MISC_DECK_OF_CHANGES:case MISC_DECK_OF_DEFENSE:description += "A deck of cards. ";break;case MISC_RUNE_OF_ZOT:description += "A talisman of some sort. ";break;case MISC_DISC_OF_STORMS:description += "A grey disc. ";break;case NUM_MISCELLANY:description += "A buggy miscellaneous item. ";break;}}description += "$";if ( is_deck(item) )
const int num_cards = cards_in_deck(item);if ( top_card_is_known(item) )
const std::vector<card_type> drawn_cards = get_drawn_cards(item);if ( !drawn_cards.empty() ){description += "Drawn card(s): ";for ( unsigned int i = 0; i < drawn_cards.size(); ++i ){if ( i != 0 )description += ", ";description += card_name(drawn_cards[i]);}description += "$";}const int num_cards = cards_in_deck(item);if ( top_card_is_known(item) ){description += "Next card(s): ";for ( int i = 0; i < num_cards; ++i ){unsigned char flags;const card_type card = get_card_and_flags(item, -i-1, flags);if ( flags & CFLAG_MARKED ){if ( i != 0 )description += ", ";description += card_name(card);}elsebreak;}description += "$";}std::vector<card_type> seen_cards;
description += "Next card(s): ";
// This *might* leak a bit of information...oh well.if ( (flags & CFLAG_SEEN) && !(flags & CFLAG_MARKED) )seen_cards.push_back(card);}if ( !seen_cards.empty() ){std::sort(seen_cards.begin(), seen_cards.end(),compare_card_names);description += "Seen card(s): ";for ( unsigned int i = 0; i < seen_cards.size(); ++i )
if ( flags & CFLAG_MARKED )
description += "$";
elsebreak;}description += "$";}std::vector<card_type> seen_cards;for ( int i = 0; i < num_cards; ++i ){unsigned char flags;const card_type card = get_card_and_flags(item, -i-1, flags);// This *might* leak a bit of information...oh well.if ( (flags & CFLAG_SEEN) && !(flags & CFLAG_MARKED) )seen_cards.push_back(card);}if ( !seen_cards.empty() ){std::sort(seen_cards.begin(), seen_cards.end(),compare_card_names);description += "Seen card(s): ";for ( unsigned int i = 0; i < seen_cards.size(); ++i ){if ( i != 0 )description += ", ";description += card_name(seen_cards[i]);
if (is_unrandom_artefact( item )&& strlen(unrandart_descrip(1, item)) != 0){description << unrandart_descrip(1, item);description << "$";}else if (is_fixed_artefact(item) && item_type_known(item)){// Known fixed artifacts are handled elsewhere.}else if (verbose && is_fixed_artefact(item)){description << article_a(item.name(DESC_CAP_A, true,false, false), false);description << ".$";}else if (verbose || (item.base_type != OBJ_WEAPONS&& item.base_type != OBJ_ARMOUR)){std::string db_name = item.name(DESC_DBNAME, true, false, false);std::string db_desc = getLongDescription(db_name);if (db_desc == ""){if (item_type_known(item)){description << "[ERROR: no desc for item name '" << db_name<< "']";}else{description << article_a(item.name(DESC_CAP_A, true,false, false), false);description << ".";}}elsedescription << db_desc;if (item.base_type == OBJ_WANDS|| (item.base_type == OBJ_FOOD && item.sub_type == FOOD_CHUNK)|| (item.base_type == OBJ_ARMOUR &&item.sub_type == ARM_LARGE_SHIELD)){// Get rid of newline at end of description, so that// either the wand "no charges left", the meat chunk// "unpleasent", or the large shield "cumbersome"// description can follow on the same line.description.seekp(description.tellp() - (std::streamoff)1);description << " ";}elsedescription << "$";}
if (item.sub_type == ARM_LARGE_SHIELD){if (you.species == SP_TROLL || you.species == SP_OGRE|| you.species == SP_OGRE_MAGE|| player_genus(GENPC_DRACONIAN)){description << "It looks like it would fit you well. ";}else{description << "It is very cumbersome to wear, and ""slows the rate at which you may attack. ";}}
description << describe_food( item );break;case OBJ_SCROLLS:description << describe_scroll( item );
if (item.sub_type == FOOD_CHUNK){if (you.mutation[MUT_SAPROVOROUS] < 3)description << "It looks rather unpleasant. ";if (item.special < 100){if (you.mutation[MUT_SAPROVOROUS] == 3)description << "It looks nice and ripe. ";else if (you.is_undead != US_UNDEAD){description << "In fact, it is ""rotting away before your eyes. ""Eating it would probably be unwise. ";}}description << "$";}
case BOOK_DESTRUCTION:description << "An extremely powerful but unpredictable book ""of magic. ";break;
if (item_is_rod( item )){description <<"$It uses its own mana reservoir for casting spells, and ""recharges automatically by channeling mana from its ""wielder.$";}else{description <<"$Damage rating: 7 $Accuracy rating: +6 ""$Attack delay: 120%";
case BOOK_MANUAL:description << "A valuable book of magic which allows one to ""practise a certain skill greatly. As it is used, it ""gradually disintegrates and will eventually fall apart. ";break;default:description << "A book of magic spells. Beware, for some of the ""more powerful grimoires are not to be toyed with. ";break;
description << "$$It falls into the 'staves' category. ";}
%%%%rodA stick imbued with magical properties.%%%%staffA stick imbued with magical properties.%%%%buggy staffAn OBJ_STAVES which is neither a rod nor a staff; please file a bugreport.%%%%bookA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%potionA small bottle of liquid.%%%%wandA stick. Maybe it's magical.%%%%amuletA piece of jewellery.%%%%ringA piece of jewellery.%%%%scrollA scroll of paper covered in magical writing.%%%%deck of cardsA deck of cards.%%%%crystal ballA sphere of clear crystal.%%%%small ebony casketA small black box. I wonder what's inside?%%%%gauzy fanA fan.%%%%blazing lampA lamp.%%%%bone lanternA strange lantern made out of ancient bones.%%%%silver hornA strange lantern made out of ancient bones.%%%%grey discA grey disc.%%%%nondescript stoneA lump of rock.%%%%sealed bronze flaskA heavy bronze flask, warm to the touch.%%%%
%%%%clubA heavy piece of wood.%%%%maceA long handle with a heavy lump on one end.%%%%flailLike a mace, but with a length of chain between the handle and thelump of metal.%%%%daggerA long knife or a very short sword, which can be held or thrown.%%%%morningstarA mace covered in spikes.%%%%short swordA sword with a short, slashing blade.%%%%long swordA sword with a long, slashing blade.%%%%great swordA sword with a very long, heavy blade and a long handle.%%%%scimitarA long sword with a curved blade.%%%%hand axeA small axe designed for either hand combat or throwing.%%%%battleaxeA large axe with a double-headed blade.%%%%spearA long stick with a pointy blade on one end, to be held or thrown.%%%%halberdA long pole with a spiked axe head on one end.%%%%slingA piece of cloth and leather for launching stones, which do a smallamount of damage on impact.%%%%bowA curved piece of wood and string, for shooting arrows. It does gooddamage in combat, and a skilled user can use it to great effect.%%%%crossbowA piece of machinery used for firing bolts, which takes some time toload and fire. It does very good damage in combat.%%%%hand crossbowA small crossbow, for firing darts.%%%%glaiveA pole with a large, heavy blade on one end.%%%%quarterstaffA sturdy wooden pole.%%%%scytheA farm implement, usually unsuited to combat.%%%%giant clubA giant lump of wood, shaped for an ogre's hands.%%%%giant spiked clubA giant lump of wood with sharp spikes at one end.%%%%eveningstarThe opposite of a morningstar.%%%%quick bladeA small and magically quick sword.%%%%katanaA very rare and extremely effective imported weapon, featuring a longsingle-edged blade.%%%%executioner's axeA huge axe.%%%%double swordA magical weapon with two razor-sharp blades.%%%%triple swordA magical weapon with three great razor-sharp blades.%%%%hammerThe kind of thing you hit nails with, adapted for battle.%%%%ancusA large and vicious toothed club.%%%%whipA whip.%%%%sabreA sword with a medium length slashing blade.%%%%demon bladeA terrible weapon, forged in the fires of Hell.%%%%demon whipA terrible weapon, woven in the depths of the inferno.%%%%demon tridentA terrible weapon, molded by fire and brimstone.%%%%broad axeAn axe with a large blade.%%%%war axeAn axe intended for hand to hand combat.%%%%tridentA hafted weapon with three points at one end.%%%%spiked flailA flail with large spikes on the metal lump.%%%%great maceA large and heavy mace.%%%%dire flailA flail with spiked lumps on both ends.%%%%knifeA simple survival knife. Designed more for utility than combat, itlooks quite capable of butchering a corpse.%%%%blowgunA long, light tube, open at both ends. Doing very little damage, itsmain use is to fire poisoned needles from afar. It makes very littlenoise.%%%%falchionA sword with a broad slashing blade.%%%%blessed bladeA blade blessed by the Shining One.%%%%longbowA long, strong bow made of yew. It does excellent damage in combat anda skilled archer can use it to great effect.%%%%lajatangA very rare and extremely effective imported weapon, featuring a polewith half-moon blades at both ends.%%%%lochaber axeAn enormous combination of a pike and a battle axe.%%%%stoneA stone. It can be thrown by hand or fired with a sling.%%%%arrowAn arrow, to be shot with a bow.%%%%boltA crossbow bolt.%%%%dartA small throwing weapon. It can also be fired from a hand crossbow.%%%%needleA needle. It can be fired with a blowgun.%%%%large rockA rock, used by giants as a missile.%%%%sling bulletA small heavy projectile made of lead. It can be fired from a sling.%%%%javelinA long, light polearm that can be thrown by hand.%%%%throwing netA throwing net as used by gladiators.%%%%robeA cloth robe.%%%%leather armourA suit made of hardened leather.%%%%ring mailA leather suit covered in little rings.%%%%scale mailA leather suit covered in little metal plates.%%%%chain mailA suit made of interlocking metal rings.%%%%splint mailA suit made of splints of metal.%%%%banded mailA suit made of bands of metal.%%%%plate mailA suit of mail and large plates of metal.%%%%shieldA piece of metal, to be strapped on one's arm. It is cumbersome towear, and slightly slows the rate at which you may attack.%%%%wand of flameA magical device which throws little bits of flame.%%%%wand of frostA magical device which throws little bits of frost.%%%%wand of slowingA magical device which casts enchantments to slow down the actions ofa creature at which it is directed.%%%%wand of hastingA magical device which casts enchantments to speed up the actions of acreature at which it is directed.%%%%wand of magic dartsA magical device which throws small bolts of destructive energy.%%%%wand of healingA magical device which can heal a creature's wounds.%%%%wand of paralysisA magical device which can render a creature immobile.%%%%wand of fireA magical device which throws great bolts of fire.%%%%wand of coldA magical device which throws great bolts of cold.%%%%wand of confusionA magical device which induces confusion and bewilderment in a targetcreature.%%%%wand of invisibilityA magical device which hides a creature from the view of others.%%%%wand of diggingA magical device which drills tunnels through unworked rock.%%%%wand of fireballA magical device which throws exploding blasts of flame.%%%%wand of teleportationA magical device which causes a creature to be randomly translocated.%%%%wand of lightningA magical device which throws great bolts of lightning.%%%%wand of polymorph otherA magical device which causes a creature to be transmogrified intoanother form. It doesn't work on you, so don't even try.%%%%wand of enslavementA magical device which causes slavish obedience in a creature.%%%%wand of drainingA magical device which throws a bolt of negative energy which drainsthe life essences of living creatures, but is useless against theundead.%%%%wand of random effectsA magical device which can produce a variety of effects.%%%%wand of disintegrationA magical device which disrupts the physical structure of anything butthe hardest walls -- even rigid statues, to say nothing of flesh.%%%%meat rationA filling ration of dried and preserved meats.%%%%bread rationA filling ration of breads.%%%%pearA delicious juicy fruit.%%%%appleA delicious red or green fruit.%%%%chokoAn almost tasteless green vegetable, which grows on a vine.%%%%honeycombA lump of the delicious honeycomb made by giant bees.%%%%royal jellyA lump of the magical substance produced by giant bees to be fed totheir queens.%%%%snozzcumberA repulsive cucumber-shaped vegetable.%%%%slice of pizzaA slice of pizza. Don't tell me you don't know what that is!%%%%apricotA delicious orange fruit.%%%%orangeA delicious juicy orange fruit.%%%%bananaA delicious yellow fruit, probably grown and imported by some amoralmultinational as the result of a corrupt trade deal.%%%%strawberryA small but delicious red fruit.%%%%rambutanA small but delicious tropical fruit. How it got into this dungeon isanyone's guess.%%%%lemonA yellow fruit.%%%%grapeA small fruit.%%%%sultanaA dried fruit of some sort, possibly a grape.%%%%lycheeA tropical fruit.%%%%beef jerkyA strip of preserved dead cow or bull.%%%%cheeseA lump of cheese.%%%%sausageAn elongated lump of low-grade gristle, entrails and cereal productsencased in an intestine. Yum!%%%%chunk of fleshA piece of dungeon meat.%%%%scroll of identifyThis useful magic scroll allows you to determine the properties of anyobject.%%%%scroll of teleportationReading the words on this scroll translocates you to a randomposition.%%%%scroll of fearThis scroll causes great fear in those who see the one who reads it.%%%%scroll of noiseThis prank scroll, often slipped into a wizard's backpack by a deviousapprentice, causes a loud noise. It is not otherwise noted for itsusefulness.%%%%scroll of remove curseReading this scroll removes curses from the items you are using.%%%%scroll of detect curseThis scroll allows you to detect the presence of cursed items amongyour possessions.%%%%scroll of summoningThis scroll opens a conduit to the Abyss and draws a terrible beast tothis world for a limited time.%%%%scroll of enchant weapon iThis scroll places an enchantment on a weapon, making it more accuratein combat. It may fail to affect weapons already heavily enchanted.%%%%scroll of enchant armourThis scroll places an enchantment on a piece of armour.%%%%scroll of tormentThis scroll calls on the powers of Hell to inflict great pain on anynearby creature - including you!%%%%scroll of random uselessnessIt is easy to be blinded to the essential uselessness of this scrollby the sense of achievement you get from getting it to work at all.%%%%scroll of curse weaponThis scroll places a curse on a weapon.%%%%scroll of curse armourThis scroll places a curse on a piece of armour.%%%%scroll of immolationSmall writing on the back of the scroll reads: "Warning: contentsunder pressure. Do not use near flammable objects."%%%%scroll of blinkingThis scroll allows its reader to teleport a short distance, withprecise control. Be wary that controlled teleports will cause thesubject to become contaminated with magical energy.%%%%scroll of paperApart from a label, this scroll is blank.%%%%scroll of magic mappingThis scroll reveals the nearby surroundings of one who reads it.%%%%scroll of fogThis scroll surrounds the reader with a dense cloud of fog.%%%%scroll of acquirementThis wonderful scroll causes the creation of a valuable item to appearbefore the reader. It is especially treasured by specialist magicians,as they can use it to obtain the powerful spells of their specialty.%%%%scroll of enchant weapon iiThis scroll places an enchantment on a weapon, making it inflictgreater damage in combat. It may fail to affect weapons alreadyheavily enchanted.%%%%scroll of vorpalise weaponThis scroll enchants a weapon so as to make it far more effective atinflicting harm on its wielder's enemies. Using it on a weapon alreadyaffected by some kind of special enchantment (other than that producedby a normal scroll of enchant weapon) is not advised.%%%%scroll of rechargingThis scroll restores the charges of any magical wand wielded by itsreader.%%%%scroll of enchant weapon iiiThis scroll enchants a weapon to be far more effective incombat. Although it can be used in the creation of especiallyenchanted weapons, it may fail to affect those already heavilyenchanted.%%%%ring of regenerationThis wonderful ring greatly increases the recuperative powers of itswearer, but also considerably speeds his or her metabolism.%%%%ring of protectionThis ring either protects its wearer from harm or makes them morevulnerable to injury, to a degree dependent on its power.%%%%ring of protection from fireThis ring provides protection from heat and fire.%%%%ring of poison resistanceThis ring provides protection from the effects of poisons and venom.%%%%ring of protection from coldThis ring provides protection from cold.%%%%ring of strengthThis ring increases or decreases the physical strength of its wearer,to a degree dependent on its power.%%%%ring of slayingThis ring increases the hand-to-hand and missile combat skills of itswearer.%%%%ring of see invisibleThis ring allows its wearer to see those things hidden from view bymagic.%%%%ring of invisibilityThis powerful ring can be activated to hide its wearer from the viewof others, but increases the speed of his or her metabolism greatlywhile doing so.%%%%ring of hungerThis accursed ring causes its wearer to hunger considerably morequickly.%%%%ring of teleportationThis ring occasionally exerts its power to randomly translocate itswearer to another place, and can be deliberately activated for thesame effect.%%%%ring of evasionThis ring makes its wearer either more or less capable of avoidingattacks, depending on its degree of enchantment.%%%%ring of sustain abilitiesThis ring protects its wearer from the loss of their strength,dexterity and intelligence.%%%%ring of sustenanceThis ring provides energy to its wearer, so that they need eat lessoften.%%%%ring of dexterityThis ring increases or decreases the dexterity of its wearer,depending on the degree to which it has been enchanted.%%%%ring of intelligenceThis ring increases or decreases the mental ability of its wearer,depending on the degree to which it has been enchanted.%%%%ring of wizardryThis ring increases the ability of its wearer to use magical spells.%%%%ring of magical powerThis ring increases its wearer's reserves of magical power.%%%%ring of levitationThis ring allows its wearer to hover above the floor.%%%%ring of life protectionThis blessed ring protects the life-force of its wearer from negativeenergy, making them partially immune to the draining effects of undeadand necromantic magic.%%%%ring of protection from magicThis ring increases its wearer's resistance to hostile enchantments.%%%%ring of fireThis ring brings its wearer more in contact with the powers offire. He or she gains resistance to heat and can use fire magic moreeffectively, but becomes more vulnerable to the effects of cold.%%%%ring of iceThis ring brings its wearer more in contact with the powers of coldand ice. He or she gains resistance to cold and can use ice magic moreeffectively, but becomes more vulnerable to the effects of fire.%%%%ring of teleport controlThis ring allows its wearer to control the destination of anyteleportation, although without perfect accuracy. Trying to teleportinto a solid object will result in a random teleportation, at least inthe case of a normal teleportation. Also be wary that controlledteleports will contaminate the subject with residual magical energy.%%%%amulet of rageThis amulet enables its wearer to attempt to enter a state of berserkrage, and increases their chance of successfully doing so. It alsopartially protects the user from passing out when coming out of thatrage.%%%%amulet of resist slowingThis amulet protects its wearer from some magically induced forms ofslowness, and increases the duration of enchantments which speed hisor her actions.%%%%amulet of clarityThis amulet protects its wearer from some forms of mental confusion.%%%%amulet of wardingThis amulet repels some of the attacks of creatures which have beenmagically summoned, and also makes the wearer more resistant todraining attacks.%%%%amulet of resist corrosionThis amulet protects the wearer and their equipment from corrosioncaused by acids, although not infallibly so.%%%%amulet of the gourmandThis amulet protects its wearer from sickness from eating fresh rawmeat and allows them to digest it when not hungry, but its effects onthe wearer's digestion are cumulative over time, and are initiallysmall.%%%%amulet of conservationThis amulet protects some of the possessions of its wearer fromoutright destruction, but not infallibly so.%%%%amulet of controlled flightShould the wearer of this amulet be levitated by magical means, he orshe will be able to exercise some control over the resultingmotion. This allows the descent of staircases and the retrieval ofitems lying on the ground, for example, but does not deprive thewearer of the benefits of levitation.%%%%amulet of inaccuracyThis amulet makes its wearer less accurate in hand combat.%%%%amulet of resist mutationThis amulet protects its wearer from mutations, although notinfallibly so.%%%%potion of healingA blessed fluid which heals some wounds, clears the mind, and curesdiseases. If one uses it when they are at or near full health, it canalso slightly repair permanent injuries.%%%%potion of heal woundsA magical healing elixir which causes wounds to close and heal almostinstantly. If one uses it when they are at or near full health, it canalso repair permanent injuries.%%%%potion of speedAn enchanted beverage which speeds the actions of anyone who drinksit.%%%%potion of mightA magic potion which greatly increases the strength and physical powerof one who drinks it.%%%%potion of gain strengthA potion of beneficial mutation.%%%%potion of gain dexterityA potion of beneficial mutation.%%%%potion of gain intelligenceA potion of beneficial mutation.%%%%potion of levitationA potion which confers great buoyancy on one who consumes it.%%%%potion of poisonA nasty poisonous liquid.%%%%potion of slowingA potion which slows your actions.%%%%potion of paralysisA potion which eliminates your control over your own body.%%%%potion of confusionA potion which confuses your perceptions and reduces your control overyour own actions.%%%%potion of invisibilityA potion which hides you from the sight of others.%%%%potion of porridgeA filling potion of sludge, high in cereal fibre.%%%%potion of degenerationA noxious concoction which can do terrible things to your body, brainand reflexes.%%%%potion of decayA vile and putrid cursed liquid which causes your flesh to decaybefore your very eyes.%%%%potion of waterA unique substance, vital for the existence of most life.%%%%potion of experienceA truly wonderful and very rare drink.%%%%potion of magicA valuable potion which grants a person with an infusion of magicalenergy.%%%%potion of restore abilitiesA potion which restores the abilities of one who drinks it.%%%%potion of strong poisonA terribly venomous potion.%%%%potion of berserk rageA potion which can send one into an incoherent rage.%%%%potion of cure mutationA potion which removes some or all of any mutations which may beafflicting you.%%%%potion of mutationA potion which does very strange things to you.%%%%potion of bloodA potion containing the essence of life. Vital for all livingcreatures, as well as some undead ones.%%%%potion of resistanceA potion which grants you temporary resistance to the elements andpoison.%%%%book of minor magicA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of conjurationsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of flamesA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of frostA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of summoningsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of fireA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of iceA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of surveyancesA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of spatial translocationsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of enchantmentsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%young poisoner's handbookA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of the tempestsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of deathA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of hinderanceA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of changesA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of transfigurationsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of practical magicA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of war chantsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of cloudsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of healingA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of necromancyA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%necronomiconA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of callingsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of charmsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of demonologyA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of airA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of the skyA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of divinationsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of the warpA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of envenomationsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of annihilationsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of unlifeA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%tome of destructionAn extremely powerful but unpredictable book of magic.%%%%book of controlA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of morphologyA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of tukimaA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of geomancyA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of the earthA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%manualA valuable book of magic which allows one to practise a certain skillgreatly. As it is used, it gradually disintegrates and will eventuallyfall apart.%%%%book of wizardryA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of powerA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of cantripsA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of party tricksA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%monster manualA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%book of stalkingA book of magic spells. Beware, for some of the more powerfulgrimoires are not to be toyed with.%%%%staff of wizardryThis staff significantly increases the ability of its wielder to usemagical spells.%%%%staff of powerThis staff provides a reservoir of magical power to its wielder.%%%%staff of fireThis staff increases the power of fire spells cast by its wielder, andprotects him or her from the effects of heat and fire. It can burnthose struck by it.%%%%staff of coldThis staff increases the power of ice spells cast by its wielder, andprotects him or her from the effects of cold. It can freeze thosestruck by it.%%%%staff of poisonThis staff increases the power of poisoning spells cast by itswielder, and protects him or her from the effects of poison. It canpoison those struck by it.%%%%staff of energyThis staff allows its wielder to cast magical spells without hungeringas a result.%%%%staff of deathThis staff increases the power of necromantic spells cast by itswielder. It can cause great pain in those living souls its wielderstrikes.%%%%staff of conjurationThis staff increases the power of conjurations cast by its wielder.%%%%staff of enchantmentThis staff increases the power of enchantments cast by its wielder.%%%%staff of summoningThis staff increases the power of summonings cast by its wielder.%%%%staff of airThis staff increases the power of air spells cast by its wielder. Itcan shock those struck by it.%%%%staff of earthThis staff increases the power of earth spells cast by its wielder. Itcan crush those struck by it.%%%%staff of channelingThis staff allows its caster to channel ambient magical energy for hisor her own purposes.%%%%rod of smitingThis rod allows its wielder to smite foes from afar. The wielder mustbe at least level four to safely use this ability, which drains fourcharges.%%%%rod of summoningThis rod contains spells of summoning.%%%%rod of destructionThis rod contains spells of mayhem and destruction.%%%%rod of wardingThis rod contains spells designed to repel one's enemies.%%%%rod of discoveryThis rod contains spells which reveal various aspects of an explorer'ssurroundings to them.%%%%rod of demonologyThis rod contains spells of mayhem and destruction.%%%%rod of strikingThis rod allows its wielder to strike foes from afar with force bolts.%%%%rod of venomThis rod contains offensive and defensive spells of poison.%%%%orb of zotOnce you have escaped to the surface with this invaluable artefact,your quest is complete.%%%%bottled efreetA mighty efreet, captured by some wizard and bound into a bronzeflask. Breaking the flask's seal will release it to wreak havoc -possibly on you.%%%%crystal ball of seeingA magical device which allows one to see the layout of theirsurroundings. It requires a degree of magical ability to be usedreliably, otherwise it can produce unpredictable and possibly harmfulresults.%%%%air elemental fanA magical device for summoning air elementals. It is ratherunreliable, and usually requires several attempts to functioncorrectly. Using it carries an element of risk, which is reduced ifone is skilled in the appropriate elemental magic.%%%%lamp of fireA magical device for summoning fire elementals. It is ratherunreliable, and usually requires several attempts to functioncorrectly. Using it carries an element of risk, which is reduced ifone is skilled in the appropriate elemental magic.%%%%stone of earth elementalsA magical device for summoning earth elementals. It is ratherunreliable, and usually requires several attempts to functioncorrectly. Using it carries an element of risk, which is reduced ifone is skilled in the appropriate elemental magic.%%%%lantern of shadowsAn unholy device which calls on the powers of darkness to assist itsuser, with a small cost attached.%%%%horn of geryonThe horn belonging to Geryon, guardian of the Vestibule ofHell. Legends say that a mortal who desires access into one of theHells must use it in order to gain entry.%%%%box of beastsA magical box containing many wild beasts. One may allow them toescape by opening the box's lid.%%%%crystal ball of energyA magical device which can be used to restore one's reserves ofmagical energy, but the use of which carries the risk of draining allof those energies completely. This risk varies inversely with theproportion of their maximum energy which the user possesses; a usernear his or her full potential will find this item most beneficial.%%%%empty ebony casketA magical box after its power is spent.%%%%crystal ball of fixationA dangerous item which hypnotises anyone so unwise as to gaze into it,leaving them helpless for a significant length of time.%%%%disc of stormsThis extremely powerful item can unleash a destructive storm ofelectricity. It is especially effective in the hands of one skilled inair elemental magic, but cannot be used by one who is not a conductor.%%%%deck of escapeA deck of magical cards, mainly dealing with various forms ofescape. Incautious use may lead to being dumped from the frying paninto the fire!%%%%deck of destructionA deck of magical cards, most of which hurl death and destruction atone's foes (or, if unlucky, at oneself.)%%%%deck of dungeonsA deck of magical cards which deal with shaping the dungeon. Unlikemost other decks, the cards from this deck tend to be ignored byNemelex, who prefers more amusing pursuits.%%%%deck of summoningsA deck of magical cards, depicting a range of weird and wondrouscreatures.%%%%deck of wondersA deck of highly mysterious and magical cards, which can permanentlyalter the drawer's physical and mental condition, for better or worse.%%%%deck of punishmentA deck of magical cards which wreak havoc on the user.%%%%deck of warA deck of magical cards which are useful before and during battle.%%%%deck of changesA deck of magical cards which induce changes in the user or hisenvironment.%%%%deck of defenseA deck of magical cards, most of which defend the user from harm invarious ways.%%%%rune of zotA talisman which allows entry into Zot's domain.%%%%helmetA piece of metal headgear.%%%%helmA piece of metal headgear.%%%%capA cloth or leather cap.%%%%wizard's hatA conical cloth hat.%%%%gold pieceA pile of glittering gold coins.%%%%corpseA corpse%%%%skeletonA decaying skeleton.%%%%eggplantA rotten eggplant which you can throw at the Crawl developers. (It's abug if you ever see this message).%%%%cloakA cloth cloak.%%%%glovesA pair of gloves.%%%%centaur bardingAn armour made for centaurs, to wear over their equine half.%%%%naga bardingA special armour made for nagas, to wear over their tails.%%%%bootsA pair of boots.%%%%bucklerA small shield.%%%%large shieldLike a normal shield, only larger.%%%%dragon hideThe scaly skin of a dragon. I suppose you could wear it if you reallywanted to.%%%%troll hideThe stiff and knobbly hide of a troll. I suppose you could wear it ifyou really wanted to.%%%%crystal plate mailAn incredibly heavy but extremely effective suit of crystallinearmour. It is somewhat resistant to corrosion.%%%%dragon armourA magical armour, made from the scales of a fire-breathing dragon. Itprovides great protection from the effects of fire, but renders itswearer more susceptible to the effects of cold.%%%%troll leather armourA magical armour, made from the stiff and knobbly skin of a commontroll. It magically regenerates its wearer's flesh at a fairly slowrate (unless already a troll).%%%%ice dragon hideThe scaly skin of a dragon. I suppose you could wear it if you reallywanted to.%%%%ice dragon armourA magical armour, made from the scales of a cold-breathing dragon. Itprovides great protection from the effects of cold, but renders itswearer more susceptible to the effects of fire and heat.%%%%steam dragon hideThe soft and supple scaly skin of a steam dragon. I suppose you couldwear it if you really wanted to.%%%%steam dragon armourA magical armour, made from the scales of a steam-breathingdragon. Although unlike the armour made from the scales of some largerdragons it does not provide its wearer with much in the way of specialmagical protection, it is extremely light and as supple as cloth.%%%%mottled dragon hideThe weirdly-patterned scaley skin of a mottled dragon. I suppose youcould wear it if you really wanted to.%%%%mottled dragon armourA magical armour made from the scales of a mottled dragon. Althoughunlike the armour made from the scales of some larger dragons it doesnot provide its wearer with much in the way of special magicalprotection, it is as light and relatively uncumbersome as leatherarmour.%%%%storm dragon hideThe hide of a storm dragon, covered in extremely hard blue scales. Isuppose you could wear it if you really wanted to.%%%%storm dragon armourA magical armour made from the scales of a lightning-breathingdragon. It is heavier than most dragon scale armours, but gives itswearer great resistance to electrical discharges.%%%%gold dragon hideThe extremely tough and heavy skin of a golden dragon, covered inshimmering golden scales. I suppose you could wear it if you reallywanted to.%%%%gold dragon armourA magical armour made from the golden scales of a golden dragon. It isextremely heavy and cumbersome, but confers resistances to fire, cold,and poison on its wearer.%%%%animal skinThe skins of several animals.%%%%swamp dragon hideThe slimy skin of a swamp-dwelling dragon. I suppose you could wear itif you really wanted to.%%%%swamp dragon armourA magical armour made from the scales of a swamp dragon. It confersresistance to poison on its wearer.%%%%
return (spell_by_name(key) != SPELL_NO_SPELL|| get_monster_by_name(key.c_str(), true) != MONS_PROGRAM_BUG);
return (feat_by_desc(key) == DNGN_UNSEEN);}typedef void (*db_keys_recap)(std::vector<std::string>&);static void recap_mon_keys(std::vector<std::string> &keys){for (unsigned int i = 0, size = keys.size(); i < size; i++){monster_type type = get_monster_by_name(keys[i], true);keys[i] = mons_type_name(type, DESC_PLAIN);}