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 I
NUM_SCROLLS,
NUM_JEWELLERY,
NUM_POTIONS,
0, // Unknown II
NUM_BOOKS,
NUM_STAVES,
1, // Orbs
NUM_MISCELLANY,
0, // Corpses
1, // 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 artifact
item.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 artifact
item.flags &= ~ISFLAG_ARTEFACT_MASK;
item.special = 0;
// Now handle the helmets
for (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)
{
// rations
case 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;
// fruits
case 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;
// vegetables
case 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 strips
case 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);
}
else
break;
}
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 += "$";
else
break;
}
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 << ".";
}
}
else
description << 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 << " ";
}
else
description << "$";
}
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. ";
}
%%%%
rod
A stick imbued with magical properties.
%%%%
staff
A stick imbued with magical properties.
%%%%
buggy staff
An OBJ_STAVES which is neither a rod nor a staff; please file a bug
report.
%%%%
book
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
potion
A small bottle of liquid.
%%%%
wand
A stick. Maybe it's magical.
%%%%
amulet
A piece of jewellery.
%%%%
ring
A piece of jewellery.
%%%%
scroll
A scroll of paper covered in magical writing.
%%%%
deck of cards
A deck of cards.
%%%%
crystal ball
A sphere of clear crystal.
%%%%
small ebony casket
A small black box. I wonder what's inside?
%%%%
gauzy fan
A fan.
%%%%
blazing lamp
A lamp.
%%%%
bone lantern
A strange lantern made out of ancient bones.
%%%%
silver horn
A strange lantern made out of ancient bones.
%%%%
grey disc
A grey disc.
%%%%
nondescript stone
A lump of rock.
%%%%
sealed bronze flask
A heavy bronze flask, warm to the touch.
%%%%
%%%%
club
A heavy piece of wood.
%%%%
mace
A long handle with a heavy lump on one end.
%%%%
flail
Like a mace, but with a length of chain between the handle and the
lump of metal.
%%%%
dagger
A long knife or a very short sword, which can be held or thrown.
%%%%
morningstar
A mace covered in spikes.
%%%%
short sword
A sword with a short, slashing blade.
%%%%
long sword
A sword with a long, slashing blade.
%%%%
great sword
A sword with a very long, heavy blade and a long handle.
%%%%
scimitar
A long sword with a curved blade.
%%%%
hand axe
A small axe designed for either hand combat or throwing.
%%%%
battleaxe
A large axe with a double-headed blade.
%%%%
spear
A long stick with a pointy blade on one end, to be held or thrown.
%%%%
halberd
A long pole with a spiked axe head on one end.
%%%%
sling
A piece of cloth and leather for launching stones, which do a small
amount of damage on impact.
%%%%
bow
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.
%%%%
crossbow
A piece of machinery used for firing bolts, which takes some time to
load and fire. It does very good damage in combat.
%%%%
hand crossbow
A small crossbow, for firing darts.
%%%%
glaive
A pole with a large, heavy blade on one end.
%%%%
quarterstaff
A sturdy wooden pole.
%%%%
scythe
A farm implement, usually unsuited to combat.
%%%%
giant club
A giant lump of wood, shaped for an ogre's hands.
%%%%
giant spiked club
A giant lump of wood with sharp spikes at one end.
%%%%
eveningstar
The opposite of a morningstar.
%%%%
quick blade
A small and magically quick sword.
%%%%
katana
A very rare and extremely effective imported weapon, featuring a long
single-edged blade.
%%%%
executioner's axe
A huge axe.
%%%%
double sword
A magical weapon with two razor-sharp blades.
%%%%
triple sword
A magical weapon with three great razor-sharp blades.
%%%%
hammer
The kind of thing you hit nails with, adapted for battle.
%%%%
ancus
A large and vicious toothed club.
%%%%
whip
A whip.
%%%%
sabre
A sword with a medium length slashing blade.
%%%%
demon blade
A terrible weapon, forged in the fires of Hell.
%%%%
demon whip
A terrible weapon, woven in the depths of the inferno.
%%%%
demon trident
A terrible weapon, molded by fire and brimstone.
%%%%
broad axe
An axe with a large blade.
%%%%
war axe
An axe intended for hand to hand combat.
%%%%
trident
A hafted weapon with three points at one end.
%%%%
spiked flail
A flail with large spikes on the metal lump.
%%%%
great mace
A large and heavy mace.
%%%%
dire flail
A flail with spiked lumps on both ends.
%%%%
knife
A simple survival knife. Designed more for utility than combat, it
looks quite capable of butchering a corpse.
%%%%
blowgun
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.
%%%%
falchion
A sword with a broad slashing blade.
%%%%
blessed blade
A blade blessed by the Shining One.
%%%%
longbow
A long, strong bow made of yew. It does excellent damage in combat and
a skilled archer can use it to great effect.
%%%%
lajatang
A very rare and extremely effective imported weapon, featuring a pole
with half-moon blades at both ends.
%%%%
lochaber axe
An enormous combination of a pike and a battle axe.
%%%%
stone
A stone. It can be thrown by hand or fired with a sling.
%%%%
arrow
An arrow, to be shot with a bow.
%%%%
bolt
A crossbow bolt.
%%%%
dart
A small throwing weapon. It can also be fired from a hand crossbow.
%%%%
needle
A needle. It can be fired with a blowgun.
%%%%
large rock
A rock, used by giants as a missile.
%%%%
sling bullet
A small heavy projectile made of lead. It can be fired from a sling.
%%%%
javelin
A long, light polearm that can be thrown by hand.
%%%%
throwing net
A throwing net as used by gladiators.
%%%%
robe
A cloth robe.
%%%%
leather armour
A suit made of hardened leather.
%%%%
ring mail
A leather suit covered in little rings.
%%%%
scale mail
A leather suit covered in little metal plates.
%%%%
chain mail
A suit made of interlocking metal rings.
%%%%
splint mail
A suit made of splints of metal.
%%%%
banded mail
A suit made of bands of metal.
%%%%
plate mail
A suit of mail and large plates of metal.
%%%%
shield
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.
%%%%
wand of flame
A magical device which throws little bits of flame.
%%%%
wand of frost
A magical device which throws little bits of frost.
%%%%
wand of slowing
A magical device which casts enchantments to slow down the actions of
a creature at which it is directed.
%%%%
wand of hasting
A magical device which casts enchantments to speed up the actions of a
creature at which it is directed.
%%%%
wand of magic darts
A magical device which throws small bolts of destructive energy.
%%%%
wand of healing
A magical device which can heal a creature's wounds.
%%%%
wand of paralysis
A magical device which can render a creature immobile.
%%%%
wand of fire
A magical device which throws great bolts of fire.
%%%%
wand of cold
A magical device which throws great bolts of cold.
%%%%
wand of confusion
A magical device which induces confusion and bewilderment in a target
creature.
%%%%
wand of invisibility
A magical device which hides a creature from the view of others.
%%%%
wand of digging
A magical device which drills tunnels through unworked rock.
%%%%
wand of fireball
A magical device which throws exploding blasts of flame.
%%%%
wand of teleportation
A magical device which causes a creature to be randomly translocated.
%%%%
wand of lightning
A magical device which throws great bolts of lightning.
%%%%
wand of polymorph other
A magical device which causes a creature to be transmogrified into
another form. It doesn't work on you, so don't even try.
%%%%
wand of enslavement
A magical device which causes slavish obedience in a creature.
%%%%
wand of draining
A magical device which throws a bolt of negative energy which drains
the life essences of living creatures, but is useless against the
undead.
%%%%
wand of random effects
A magical device which can produce a variety of effects.
%%%%
wand of disintegration
A magical device which disrupts the physical structure of anything but
the hardest walls -- even rigid statues, to say nothing of flesh.
%%%%
meat ration
A filling ration of dried and preserved meats.
%%%%
bread ration
A filling ration of breads.
%%%%
pear
A delicious juicy fruit.
%%%%
apple
A delicious red or green fruit.
%%%%
choko
An almost tasteless green vegetable, which grows on a vine.
%%%%
honeycomb
A lump of the delicious honeycomb made by giant bees.
%%%%
royal jelly
A lump of the magical substance produced by giant bees to be fed to
their queens.
%%%%
snozzcumber
A repulsive cucumber-shaped vegetable.
%%%%
slice of pizza
A slice of pizza. Don't tell me you don't know what that is!
%%%%
apricot
A delicious orange fruit.
%%%%
orange
A delicious juicy orange fruit.
%%%%
banana
A delicious yellow fruit, probably grown and imported by some amoral
multinational as the result of a corrupt trade deal.
%%%%
strawberry
A small but delicious red fruit.
%%%%
rambutan
A small but delicious tropical fruit. How it got into this dungeon is
anyone's guess.
%%%%
lemon
A yellow fruit.
%%%%
grape
A small fruit.
%%%%
sultana
A dried fruit of some sort, possibly a grape.
%%%%
lychee
A tropical fruit.
%%%%
beef jerky
A strip of preserved dead cow or bull.
%%%%
cheese
A lump of cheese.
%%%%
sausage
An elongated lump of low-grade gristle, entrails and cereal products
encased in an intestine. Yum!
%%%%
chunk of flesh
A piece of dungeon meat.
%%%%
scroll of identify
This useful magic scroll allows you to determine the properties of any
object.
%%%%
scroll of teleportation
Reading the words on this scroll translocates you to a random
position.
%%%%
scroll of fear
This scroll causes great fear in those who see the one who reads it.
%%%%
scroll of noise
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.
%%%%
scroll of remove curse
Reading this scroll removes curses from the items you are using.
%%%%
scroll of detect curse
This scroll allows you to detect the presence of cursed items among
your possessions.
%%%%
scroll of summoning
This scroll opens a conduit to the Abyss and draws a terrible beast to
this world for a limited time.
%%%%
scroll of enchant weapon i
This scroll places an enchantment on a weapon, making it more accurate
in combat. It may fail to affect weapons already heavily enchanted.
%%%%
scroll of enchant armour
This scroll places an enchantment on a piece of armour.
%%%%
scroll of torment
This scroll calls on the powers of Hell to inflict great pain on any
nearby creature - including you!
%%%%
scroll of random uselessness
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.
%%%%
scroll of curse weapon
This scroll places a curse on a weapon.
%%%%
scroll of curse armour
This scroll places a curse on a piece of armour.
%%%%
scroll of immolation
Small writing on the back of the scroll reads: "Warning: contents
under pressure. Do not use near flammable objects."
%%%%
scroll of blinking
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.
%%%%
scroll of paper
Apart from a label, this scroll is blank.
%%%%
scroll of magic mapping
This scroll reveals the nearby surroundings of one who reads it.
%%%%
scroll of fog
This scroll surrounds the reader with a dense cloud of fog.
%%%%
scroll of acquirement
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.
%%%%
scroll of enchant weapon ii
This scroll places an enchantment on a weapon, making it inflict
greater damage in combat. It may fail to affect weapons already
heavily enchanted.
%%%%
scroll of vorpalise weapon
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.
%%%%
scroll of recharging
This scroll restores the charges of any magical wand wielded by its
reader.
%%%%
scroll of enchant weapon iii
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.
%%%%
ring of regeneration
This wonderful ring greatly increases the recuperative powers of its
wearer, but also considerably speeds his or her metabolism.
%%%%
ring of protection
This ring either protects its wearer from harm or makes them more
vulnerable to injury, to a degree dependent on its power.
%%%%
ring of protection from fire
This ring provides protection from heat and fire.
%%%%
ring of poison resistance
This ring provides protection from the effects of poisons and venom.
%%%%
ring of protection from cold
This ring provides protection from cold.
%%%%
ring of strength
This ring increases or decreases the physical strength of its wearer,
to a degree dependent on its power.
%%%%
ring of slaying
This ring increases the hand-to-hand and missile combat skills of its
wearer.
%%%%
ring of see invisible
This ring allows its wearer to see those things hidden from view by
magic.
%%%%
ring of invisibility
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.
%%%%
ring of hunger
This accursed ring causes its wearer to hunger considerably more
quickly.
%%%%
ring of teleportation
This ring occasionally exerts its power to randomly translocate its
wearer to another place, and can be deliberately activated for the
same effect.
%%%%
ring of evasion
This ring makes its wearer either more or less capable of avoiding
attacks, depending on its degree of enchantment.
%%%%
ring of sustain abilities
This ring protects its wearer from the loss of their strength,
dexterity and intelligence.
%%%%
ring of sustenance
This ring provides energy to its wearer, so that they need eat less
often.
%%%%
ring of dexterity
This ring increases or decreases the dexterity of its wearer,
depending on the degree to which it has been enchanted.
%%%%
ring of intelligence
This ring increases or decreases the mental ability of its wearer,
depending on the degree to which it has been enchanted.
%%%%
ring of wizardry
This ring increases the ability of its wearer to use magical spells.
%%%%
ring of magical power
This ring increases its wearer's reserves of magical power.
%%%%
ring of levitation
This ring allows its wearer to hover above the floor.
%%%%
ring of life protection
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.
%%%%
ring of protection from magic
This ring increases its wearer's resistance to hostile enchantments.
%%%%
ring of fire
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.
%%%%
ring of ice
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.
%%%%
ring of teleport control
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.
%%%%
amulet of rage
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.
%%%%
amulet of resist slowing
This amulet protects its wearer from some magically induced forms of
slowness, and increases the duration of enchantments which speed his
or her actions.
%%%%
amulet of clarity
This amulet protects its wearer from some forms of mental confusion.
%%%%
amulet of warding
This amulet repels some of the attacks of creatures which have been
magically summoned, and also makes the wearer more resistant to
draining attacks.
%%%%
amulet of resist corrosion
This amulet protects the wearer and their equipment from corrosion
caused by acids, although not infallibly so.
%%%%
amulet of the gourmand
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.
%%%%
amulet of conservation
This amulet protects some of the possessions of its wearer from
outright destruction, but not infallibly so.
%%%%
amulet of controlled flight
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.
%%%%
amulet of inaccuracy
This amulet makes its wearer less accurate in hand combat.
%%%%
amulet of resist mutation
This amulet protects its wearer from mutations, although not
infallibly so.
%%%%
potion of healing
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.
%%%%
potion of heal wounds
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.
%%%%
potion of speed
An enchanted beverage which speeds the actions of anyone who drinks
it.
%%%%
potion of might
A magic potion which greatly increases the strength and physical power
of one who drinks it.
%%%%
potion of gain strength
A potion of beneficial mutation.
%%%%
potion of gain dexterity
A potion of beneficial mutation.
%%%%
potion of gain intelligence
A potion of beneficial mutation.
%%%%
potion of levitation
A potion which confers great buoyancy on one who consumes it.
%%%%
potion of poison
A nasty poisonous liquid.
%%%%
potion of slowing
A potion which slows your actions.
%%%%
potion of paralysis
A potion which eliminates your control over your own body.
%%%%
potion of confusion
A potion which confuses your perceptions and reduces your control over
your own actions.
%%%%
potion of invisibility
A potion which hides you from the sight of others.
%%%%
potion of porridge
A filling potion of sludge, high in cereal fibre.
%%%%
potion of degeneration
A noxious concoction which can do terrible things to your body, brain
and reflexes.
%%%%
potion of decay
A vile and putrid cursed liquid which causes your flesh to decay
before your very eyes.
%%%%
potion of water
A unique substance, vital for the existence of most life.
%%%%
potion of experience
A truly wonderful and very rare drink.
%%%%
potion of magic
A valuable potion which grants a person with an infusion of magical
energy.
%%%%
potion of restore abilities
A potion which restores the abilities of one who drinks it.
%%%%
potion of strong poison
A terribly venomous potion.
%%%%
potion of berserk rage
A potion which can send one into an incoherent rage.
%%%%
potion of cure mutation
A potion which removes some or all of any mutations which may be
afflicting you.
%%%%
potion of mutation
A potion which does very strange things to you.
%%%%
potion of blood
A potion containing the essence of life. Vital for all living
creatures, as well as some undead ones.
%%%%
potion of resistance
A potion which grants you temporary resistance to the elements and
poison.
%%%%
book of minor magic
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of conjurations
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of flames
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of frost
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of summonings
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of fire
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of ice
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of surveyances
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of spatial translocations
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of enchantments
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
young poisoner's handbook
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of the tempests
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of death
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of hinderance
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of changes
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of transfigurations
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of practical magic
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of war chants
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of clouds
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of healing
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of necromancy
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
necronomicon
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of callings
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of charms
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of demonology
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of air
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of the sky
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of divinations
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of the warp
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of envenomations
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of annihilations
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of unlife
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
tome of destruction
An extremely powerful but unpredictable book of magic.
%%%%
book of control
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of morphology
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of tukima
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of geomancy
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of the earth
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
manual
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.
%%%%
book of wizardry
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of power
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of cantrips
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of party tricks
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
monster manual
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
book of stalking
A book of magic spells. Beware, for some of the more powerful
grimoires are not to be toyed with.
%%%%
staff of wizardry
This staff significantly increases the ability of its wielder to use
magical spells.
%%%%
staff of power
This staff provides a reservoir of magical power to its wielder.
%%%%
staff of fire
This staff 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.
%%%%
staff of cold
This staff 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.
%%%%
staff of poison
This staff 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.
%%%%
staff of energy
This staff allows its wielder to cast magical spells without hungering
as a result.
%%%%
staff of death
This staff increases the power of necromantic spells cast by its
wielder. It can cause great pain in those living souls its wielder
strikes.
%%%%
staff of conjuration
This staff increases the power of conjurations cast by its wielder.
%%%%
staff of enchantment
This staff increases the power of enchantments cast by its wielder.
%%%%
staff of summoning
This staff increases the power of summonings cast by its wielder.
%%%%
staff of air
This staff increases the power of air spells cast by its wielder. It
can shock those struck by it.
%%%%
staff of earth
This staff increases the power of earth spells cast by its wielder. It
can crush those struck by it.
%%%%
staff of channeling
This staff allows its caster to channel ambient magical energy for his
or her own purposes.
%%%%
rod of smiting
This rod 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.
%%%%
rod of summoning
This rod contains spells of summoning.
%%%%
rod of destruction
This rod contains spells of mayhem and destruction.
%%%%
rod of warding
This rod contains spells designed to repel one's enemies.
%%%%
rod of discovery
This rod contains spells which reveal various aspects of an explorer's
surroundings to them.
%%%%
rod of demonology
This rod contains spells of mayhem and destruction.
%%%%
rod of striking
This rod allows its wielder to strike foes from afar with force bolts.
%%%%
rod of venom
This rod contains offensive and defensive spells of poison.
%%%%
orb of zot
Once you have escaped to the surface with this invaluable artefact,
your quest is complete.
%%%%
bottled efreet
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.
%%%%
crystal ball of seeing
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.
%%%%
air elemental fan
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.
%%%%
lamp of fire
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.
%%%%
stone of earth elementals
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.
%%%%
lantern of shadows
An unholy device which calls on the powers of darkness to assist its
user, with a small cost attached.
%%%%
horn of geryon
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.
%%%%
box of beasts
A magical box containing many wild beasts. One may allow them to
escape by opening the box's lid.
%%%%
crystal ball of energy
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.
%%%%
empty ebony casket
A magical box after its power is spent.
%%%%
crystal ball of fixation
A dangerous item which hypnotises anyone so unwise as to gaze into it,
leaving them helpless for a significant length of time.
%%%%
disc of storms
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.
%%%%
deck of escape
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!
%%%%
deck of destruction
A deck of magical cards, most of which hurl death and destruction at
one's foes (or, if unlucky, at oneself.)
%%%%
deck of dungeons
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.
%%%%
deck of summonings
A deck of magical cards, depicting a range of weird and wondrous
creatures.
%%%%
deck of wonders
A deck of highly mysterious and magical cards, which can permanently
alter the drawer's physical and mental condition, for better or worse.
%%%%
deck of punishment
A deck of magical cards which wreak havoc on the user.
%%%%
deck of war
A deck of magical cards which are useful before and during battle.
%%%%
deck of changes
A deck of magical cards which induce changes in the user or his
environment.
%%%%
deck of defense
A deck of magical cards, most of which defend the user from harm in
various ways.
%%%%
rune of zot
A talisman which allows entry into Zot's domain.
%%%%
helmet
A piece of metal headgear.
%%%%
helm
A piece of metal headgear.
%%%%
cap
A cloth or leather cap.
%%%%
wizard's hat
A conical cloth hat.
%%%%
gold piece
A pile of glittering gold coins.
%%%%
corpse
A corpse
%%%%
skeleton
A decaying skeleton.
%%%%
eggplant
A rotten eggplant which you can throw at the Crawl developers. (It's a
bug if you ever see this message).
%%%%
cloak
A cloth cloak.
%%%%
gloves
A pair of gloves.
%%%%
centaur barding
An armour made for centaurs, to wear over their equine half.
%%%%
naga barding
A special armour made for nagas, to wear over their tails.
%%%%
boots
A pair of boots.
%%%%
buckler
A small shield.
%%%%
large shield
Like a normal shield, only larger.
%%%%
dragon hide
The scaly skin of a dragon. I suppose you could wear it if you really
wanted to.
%%%%
troll hide
The stiff and knobbly hide of a troll. I suppose you could wear it if
you really wanted to.
%%%%
crystal plate mail
An incredibly heavy but extremely effective suit of crystalline
armour. It is somewhat resistant to corrosion.
%%%%
dragon armour
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.
%%%%
troll leather armour
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).
%%%%
ice dragon hide
The scaly skin of a dragon. I suppose you could wear it if you really
wanted to.
%%%%
ice dragon armour
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.
%%%%
steam dragon hide
The soft and supple scaly skin of a steam dragon. I suppose you could
wear it if you really wanted to.
%%%%
steam dragon armour
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.
%%%%
mottled dragon hide
The weirdly-patterned scaley skin of a mottled dragon. I suppose you
could wear it if you really wanted to.
%%%%
mottled dragon armour
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.
%%%%
storm dragon hide
The hide of a storm dragon, covered in extremely hard blue scales. I
suppose you could wear it if you really wanted to.
%%%%
storm dragon armour
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.
%%%%
gold dragon hide
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.
%%%%
gold dragon armour
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.
%%%%
animal skin
The skins of several animals.
%%%%
swamp dragon hide
The slimy skin of a swamp-dwelling dragon. I suppose you could wear it
if you really wanted to.
%%%%
swamp dragon armour
A magical armour made from the scales of a swamp dragon. It confers
resistance 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);
}