now item_def::name(). Cleaned up a lot of code in the process.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1341 c06c8d41-db1a-0410-9941-cceddc491573
CIPVRZGLOZHCERK6YPOBV3P2E4IAB4H6D5EHLRQE2O5E4P4VCBUAC
JUNF2JNFSVAITA6XQU3CEOMP5PG4PVSHKIGFTSUCYCN4ICPEXEKAC
NS62TYCMR2U6B3DTJRAJ2OSYTZQY7OZSEQGPPPZOBLNTS3TANPHQC
NCSALY7HYRVCKTPS5TWZBRE2C3OCANYU3LBPIZ4RRVEI6GOZL2EQC
QGIFCQMDBOD3QDWNSZOZFU7AHG2J53OWR5IE3VFCBNVO4SFBF2NQC
RM2B7BNFXLDWHFHHMGCYIPQYJQ5KTMX3OCDL7PMT7B2ZA6B3NJGAC
GSS3OCYMI4MYKACCGNLFA267VDH2U7G4QVVDLMOVAUHZTYQ3QJDAC
7NDXS36TE7QVXTXJWMYSVG5UHCCLPIO4VL6NXFGTDK3ZNKE3A2IAC
6NBAJU44SKV2GYCFZ3NWGC5L73CIZIKINHSL4J7VKASV6R5WMIZAC
KAL42YT6OQXFPMKKKHE2NQM47W5KMLSRI6KWFRTJFAO4WKP4MMLAC
ZVRH264FGAMRHW3YAHKAZVMZ66TAZNOQQOOTPXPQXUULLM32Q4WQC
ZCPJIAG7SEY2TUBAGOFWCEJYXSBT36CZU5VO7BWEGSLJ4K24B4TAC
DTO3EUKWHZ5RJNGNCFYXSOVTIPVXPP637F2W7WFGYKJ7JK7VNKNQC
GDHH6O4KVTDWSENR573WKVFCRM2L4AVOBRSVPI6F5A2UR7U7SPXAC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
74LQ7JXVLAFSHLI7LCBKFX47CNTYSKGUQSXNX5FCIUIGCC2JTR3QC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
44BRJ7DD6BJ4RBUNE2PZDODHNGYRLNFPGF7OZWTRNDFW5PKAVSPQC
X5WLJCJVW55SXZVP7IKP7ADCJIGNKN4PKAXFECVR6TNK7XSMZR7QC
XKAJWK6MPHS3ZCZIPPLTIMOPF6AROGLRDDCS6EFE3IGE4AHT7MYQC
LIBWXPN6HLJAIGEFJYLOL4HLIUD236U3WM5QPHIZ3DSB4CCUJERAC
43ZTEB57FU7KE5EVMYWZONNVJBZCGF3JEAJZIY25LC4LGE65PG5QC
7AMQN7MITMXBNVDAK5VOXTQ4TZIAOD6ZLOFJG7GQMBTY23Y2BKSAC
AY7Z23L4WPEFEL2HMF3KX3IM6OYMLB2QWY3AIHHQ37CMRVCXRCMAC
33ZMPQC6OXTESW7SRW765GRNJUEJRSYONRVZVIEUDAUEJ2PPMB4AC
VUCSN63AVSEOMC6O4BFGDHTO6I2GOLUXODTSGVZ37NTJ72Z3HIOQC
QDTVLBRGHDTRUVT7I3O72K6TMOYAUSAJBZUHGOEFU2RKJNUPWZSQC
TV3ZC6WOZKSQQJQN26JIVKCHK6UK7WMDBYZDUYRWEAZ4JB4YVNAAC
RREJL4WZKWFEMA62AC5G5UDTOXMW4UULIQXVA5RPFASPODMHQZ7AC
34C4U6EQWERY75GZJKUCM5KVGU2OUICETS5LGZF6RMKMZT4R5SQAC
HDLNRHAMFVDM4QCZMY6COBYZ35ODPR5PONT4UE77UAZ7GEE2FLHQC
QVVC7AYGVA6U64PTNA7L27422NLMO327P22BQKXEVIMPZHIHO7MQC
3A3OAIFRFU3IHF6SDNDPCN3XYOFYIBYCEYJAXAFASCFDY76SMFXQC
SE6T5ILU7BD6ICIOP7BTIQIBNBDEJX3J5OBO7Z2DZA336ETTHYJAC
6GQU5BMORHTHJGGVYPGJZSEIHPOVXDAS23BE7OHU4X6WVDYRC2MAC
VJMZ3UWE4TY2RPKX32HI2K6OAZJKULKWJISAOTU2W5UHKUJ463NQC
RISMOCQM6BKK4XSIRKYLOBB2UPDYJNDAL6OGIIR5GGNZQAK5YSZAC
MBBPLL4SZUB3JUUYQYLZW7S5OXRCEGJX3WWADOQXGHWQ7BIKCY5QC
R22TTMI6WXWULC7ODKFF3QCB7MOTETQQ6IR4BUCUPOCQKQNCTT5AC
GNJGG33CNP6IWUW4V2JKIFAC5N43TP5MX4PZOTXROBYZVXQEAJLAC
RYT42Z6CED4KV5CCJ45CHZ3DQGLFMDCVH6CSQZNXOILULDG4MXVQC
45QV77UI6QFW4234P365LD3FGJYRVWTT5455DPB324NG2NFQMKTQC
TR4NPGNO5QNNRJNVMNSUEO5QLT37HCXXDOBKXCB5XWXRQNAJ5SHAC
set_ident_flags( you.inv[you.equip[EQ_WEAPON]], ISFLAG_IDENT_MASK);
strcpy(info, "You are wielding ");
in_name(you.equip[EQ_WEAPON], DESC_NOCAP_A, str_pass);
strcat(info, str_pass);
strcat(info, ".");
mpr(info);
set_ident_flags( wpn, ISFLAG_IDENT_MASK);
mprf("You are wielding %s.", wpn.name(DESC_NOCAP_A).c_str());
in_name(ammo, DESC_CAP_YOUR, str_pass);
strcpy(info, str_pass);
strcat(info, (you.inv[ammo].quantity == 1) ? " is" : " are");
strcat(info, " covered in a thin film of poison.");
mpr(info);
mprf("%s %s covered in a thin film of poison.",
you.inv[ammo].name(DESC_CAP_YOUR).c_str(),
(you.inv[ammo].quantity == 1) ? " is" : " are");
char buf[ITEMNAME_SIZE];
char buf2[ITEMNAME_SIZE];
item_name( mitm[item_got], DESC_NOCAP_A, buf );
strcpy(buf2, origin_desc(mitm[item_got]).c_str());
take_note(Note(NOTE_ID_ITEM, 0, 0, buf, buf2));
take_note(Note(NOTE_ID_ITEM, 0, 0,
item.name(DESC_NOCAP_A).c_str(),
origin_desc(item).c_str()));
int num = move_item_to_player( item_got, mitm[item_got].quantity, true );
const int quant = item.quantity;
// note that item will be invalidated if num == item.quantity
const int num = move_item_to_player( item_got, item.quantity, true );
char str_pass[ ITEMNAME_SIZE ];
in_name( you.equip[EQ_WEAPON], DESC_INVENTORY, str_pass, false );
int prefcol = menu_colour(str_pass);
const item_def& wpn = you.inv[you.equip[EQ_WEAPON]];
textcolor(wpn.colour);
const int prefcol = menu_colour(wpn.name(DESC_INVENTORY));
const int inum = you.equip[e_order[i]];
in_name( inum, DESC_PLAIN, str_pass, true );
str_pass[38] = 0; // truncate
const char* colname = colour_to_str(you.inv[inum].colour);
const item_def& item = you.inv[you.equip[e_order[i]]];
const char* colname = colour_to_str(item.colour);
const int inum = you.equip[e_order[i]];
in_name( inum, DESC_PLAIN, str_pass, true );
str_pass[38] = 0; // truncate
const char* colname = colour_to_str(you.inv[inum].colour);
const item_def& item = you.inv[you.equip[e_order[i]]];
const char* colname = colour_to_str(item.colour);
else if ((you.inv[itco].sub_type == ARM_CRYSTAL_PLATE_MAIL
|| get_equip_race(you.inv[itco]) == ISFLAG_DWARVEN)
else if ((item.sub_type == ARM_CRYSTAL_PLATE_MAIL
|| get_equip_race(item) == ISFLAG_DWARVEN)
char str_pass[ ITEMNAME_SIZE ];
in_name(itco, DESC_CAP_YOUR, str_pass);
strcpy(info, str_pass);
strcat(info, (it_resists) ? " resists." : " is eaten away!");
mpr(info);
mprf("%s %s", item.name(DESC_CAP_YOUR).c_str(),
(it_resists) ? " resists." : " is eaten away!");
strcpy(info, ptr_monam(monster, DESC_CAP_THE));
strcat(info, " picks up ");
it_name(monster->inv[MSLOT_WEAPON], DESC_NOCAP_A, str_pass);
strcat(info, str_pass);
strcat(info, ".");
mpr(info);
mprf("%s picks up %s.", ptr_monam(monster, DESC_CAP_THE),
mitm[monster->inv[MSLOT_WEAPON]].name(DESC_NOCAP_A).c_str());
strcpy(info, ptr_monam(monster, DESC_CAP_THE));
strcat(info, " picks up ");
it_name(item, DESC_NOCAP_A, str_pass);
strcat(info, str_pass);
strcat(info, ".");
mpr(info);
mprf("%s picks up %s.", ptr_monam(monster, DESC_CAP_THE),
mitm[item].name(DESC_NOCAP_A).c_str());
strcpy(info, ptr_monam(monster, DESC_CAP_THE));
strcat(info, " picks up ");
it_name(monster->inv[MSLOT_MISSILE], DESC_NOCAP_A, str_pass);
strcat(info, str_pass);
strcat(info, ".");
mpr(info);
mprf("%s picks up %s.", ptr_monam(monster, DESC_CAP_THE),
mitm[item].name(DESC_NOCAP_A).c_str());
strcpy(info, ptr_monam(monster, DESC_CAP_THE));
strcat(info, " picks up ");
it_name(monster->inv[MSLOT_WAND], DESC_NOCAP_A, str_pass);
strcat(info, str_pass);
strcat(info, ".");
mpr(info);
mprf("%s picks up %s.", ptr_monam(monster, DESC_CAP_THE),
mitm[item].name(DESC_NOCAP_A).c_str());
strcpy(info, ptr_monam(monster, DESC_CAP_THE));
strcat(info, " picks up ");
it_name(monster->inv[MSLOT_SCROLL], DESC_NOCAP_A, str_pass);
strcat(info, str_pass);
strcat(info, ".");
mpr(info);
mprf("%s picks up %s.", ptr_monam(monster, DESC_CAP_THE),
mitm[item].name(DESC_NOCAP_A).c_str());
strcpy(info, ptr_monam(monster, DESC_CAP_THE));
strcat(info, " picks up ");
it_name(monster->inv[MSLOT_POTION], DESC_NOCAP_A, str_pass);
strcat(info, str_pass);
strcat(info, ".");
mpr(info);
mprf("%s picks up %s.", ptr_monam(monster, DESC_CAP_THE),
mitm[item].name(DESC_NOCAP_A).c_str());
strcpy(info, ptr_monam(monster, DESC_CAP_THE));
strcat(info, " eats ");
it_name(item, DESC_NOCAP_THE, str_pass);
strcat(info, str_pass);
strcat(info, ".");
mpr(info);
mprf("%s eats %s.", ptr_monam(monster, DESC_CAP_THE),
mitm[item].name(DESC_NOCAP_THE).c_str());
you.inv[m].base_type = OBJ_MISCELLANY;
you.inv[m].sub_type = MISC_PORTABLE_ALTAR_OF_NEMELEX;
you.inv[m].plus = 0;
you.inv[m].plus2 = 0;
you.inv[m].special = 0;
you.inv[m].colour = LIGHTMAGENTA;
you.inv[m].quantity = 1;
you.inv[m].inscription = you.last_altar_inscription;
set_ident_flags( you.inv[m], ISFLAG_IDENT_MASK );
item_def& item = you.inv[m];
item.base_type = OBJ_MISCELLANY;
item.sub_type = MISC_PORTABLE_ALTAR_OF_NEMELEX;
item.plus = 0;
item.plus2 = 0;
item.special = 0;
item.colour = LIGHTMAGENTA;
item.quantity = 1;
item.inscription = you.last_altar_inscription;
set_ident_flags( item, ISFLAG_IDENT_MASK );
char str_pass[ ITEMNAME_SIZE ];
quant_name( you.inv[item_dropped], quant_drop, DESC_NOCAP_A, str_pass );
mprf( "You drop %s.", str_pass );
mprf("You drop %s.",
quant_name(you.inv[item_dropped], quant_drop, DESC_NOCAP_A).c_str());
// quant_name(you.inv[item], you.inv[item].quantity, DESC_NOCAP_A, str_pass );
item_name( you.inv[item], DESC_NOCAP_THE, str_pass );
snprintf( info, INFO_SIZE, "Destroy %s? ", str_pass );
snprintf( info, INFO_SIZE, "Destroy %s? ",
you.inv[item].name(DESC_NOCAP_THE).c_str() );
if ( is_interesting_item(item) ) {
char buf[ITEMNAME_SIZE];
char buf2[ITEMNAME_SIZE];
item_name( item, DESC_NOCAP_A, buf );
strcpy(buf2, origin_desc(item).c_str());
take_note(Note(NOTE_ID_ITEM, 0, 0, buf, buf2));
}
take_note(Note(NOTE_ID_ITEM, 0, 0, item.name(DESC_NOCAP_A).c_str(),
origin_desc(item).c_str()));
* called from: acr - chardump - direct - effects - fight - invent -
* it_use2 - item_use - items - monstuff - mstuff2 - ouch -
* shopping - spells1 - spells2 - spells3
* *********************************************************************** */
const char *item_name( const item_def &item, char descrip,
char *buff = NULL,
bool terse = false );
/* ***********************************************************************
/* ***********************************************************************
* called from: direct - fight - food - items - monstuff - religion -
* shopping
* *********************************************************************** */
const char *it_name(int itn, char des, char *buff = NULL, bool terse = false);
/* ***********************************************************************
* called from: acr - chardump - command - effects - fight - invent -
* it_use2 - it_use3 - item_use - items - ouch - output -
* spell - spells1 - spells2 - spells3 - spells4 - transfor
* *********************************************************************** */
const char *in_name(int inn, char des, char *buff = NULL, bool terse = false);
/* ***********************************************************************
* called from: itemname.cc items.cc item_use.cc mstuff2.cc
* *********************************************************************** */
const char *quant_name( const item_def &item, int quant, char des,
char buff[ITEMNAME_SIZE], bool terse = false );
std::string quant_name( const item_def &item, int quant,
description_level_type des, bool terse = false );
// it_name() and in_name() are now somewhat obsolete now that itemname
// takes item_def, so consider them deprecated.
const char *it_name( int itn, char des, char *buff, bool terse )
{
return item_name( mitm[itn], des, buff, terse );
} // end it_name()
const char *in_name( int inn, char des, char *buff, bool terse )
{
return item_name( you.inv[inn], des, buff, terse );
} // end in_name()
const char *quant_name( const item_def &item, int quant, char des,
char buff[ ITEMNAME_SIZE ], bool terse )
std::string quant_name( const item_def &item, int quant,
description_level_type des, bool terse )
char itm_name[ ITEMNAME_SIZE ] = "";
if (!buff)
buff = default_itembuf;
item_name_2( item, itm_name, terse );
char itm_name[ITEMNAME_SIZE] = "";
char buff[ITEMNAME_SIZE] = "";
if (item_clas == OBJ_ORBS
|| (item_type_known( item )
&& ((item_clas == OBJ_MISCELLANY
&& item_typ == MISC_HORN_OF_GERYON)
|| (is_fixed_artefact( item )
|| (is_random_artefact( item ))))))
if (this->base_type == OBJ_ORBS
|| (item_type_known( *this )
&& ((this->base_type == OBJ_MISCELLANY
&& this->sub_type == MISC_HORN_OF_GERYON)
|| (is_fixed_artefact( *this )
|| (is_random_artefact( *this ))))))
else if (item.link == you.equip[EQ_CLOAK]
|| item.link == you.equip[EQ_HELMET]
|| item.link == you.equip[EQ_GLOVES]
|| item.link == you.equip[EQ_BOOTS]
|| item.link == you.equip[EQ_SHIELD]
|| item.link == you.equip[EQ_BODY_ARMOUR])
else if (this->link == you.equip[EQ_CLOAK]
|| this->link == you.equip[EQ_HELMET]
|| this->link == you.equip[EQ_GLOVES]
|| this->link == you.equip[EQ_BOOTS]
|| this->link == you.equip[EQ_SHIELD]
|| this->link == you.equip[EQ_BODY_ARMOUR])
const int item_clas = item.base_type;
const int item_typ = item.sub_type;
const int it_plus = item.plus;
const int item_plus2 = item.plus2;
const int it_quant = item.quantity;
const int item_typ = this->sub_type;
const int it_plus = this->plus;
const int item_plus2 = this->plus2;
(item.special == SPWPN_SINGING_SWORD) ? "Singing Sword" :
(item.special == SPWPN_WRATH_OF_TROG) ? "Wrath of Trog" :
(item.special == SPWPN_SCYTHE_OF_CURSES) ? "Scythe of Curses" :
(item.special == SPWPN_MACE_OF_VARIABILITY) ? "Mace of Variability" :
(item.special == SPWPN_GLAIVE_OF_PRUNE) ? "Glaive of Prune" :
(item.special == SPWPN_SCEPTRE_OF_TORMENT) ? "Sceptre of Torment" :
(item.special == SPWPN_SWORD_OF_ZONGULDROK) ? "Sword of Zonguldrok" :
(item.special == SPWPN_SWORD_OF_CEREBOV) ? "Sword of Cerebov" :
(item.special == SPWPN_STAFF_OF_DISPATER) ? "Staff of Dispater" :
(item.special == SPWPN_SCEPTRE_OF_ASMODEUS) ? "Sceptre of Asmodeus" :
(item.special == SPWPN_SWORD_OF_POWER) ? "Sword of Power" :
(item.special == SPWPN_KNIFE_OF_ACCURACY) ? "Knife of Accuracy" :
(item.special == SPWPN_STAFF_OF_OLGREB) ? "Staff of Olgreb" :
(item.special == SPWPN_VAMPIRES_TOOTH) ? "Vampire's Tooth" :
(item.special == SPWPN_STAFF_OF_WUCAD_MU) ? "Staff of Wucad Mu"
(this->special == SPWPN_SINGING_SWORD) ? "Singing Sword" :
(this->special == SPWPN_WRATH_OF_TROG) ? "Wrath of Trog" :
(this->special == SPWPN_SCYTHE_OF_CURSES) ? "Scythe of Curses" :
(this->special == SPWPN_MACE_OF_VARIABILITY) ? "Mace of Variability" :
(this->special == SPWPN_GLAIVE_OF_PRUNE) ? "Glaive of Prune" :
(this->special == SPWPN_SCEPTRE_OF_TORMENT) ? "Sceptre of Torment" :
(this->special == SPWPN_SWORD_OF_ZONGULDROK) ? "Sword of Zonguldrok" :
(this->special == SPWPN_SWORD_OF_CEREBOV) ? "Sword of Cerebov" :
(this->special == SPWPN_STAFF_OF_DISPATER) ? "Staff of Dispater" :
(this->special == SPWPN_SCEPTRE_OF_ASMODEUS) ? "Sceptre of Asmodeus" :
(this->special == SPWPN_SWORD_OF_POWER) ? "Sword of Power" :
(this->special == SPWPN_KNIFE_OF_ACCURACY) ? "Knife of Accuracy" :
(this->special == SPWPN_STAFF_OF_OLGREB) ? "Staff of Olgreb" :
(this->special == SPWPN_VAMPIRES_TOOTH) ? "Vampire's Tooth" :
(this->special == SPWPN_STAFF_OF_WUCAD_MU) ? "Staff of Wucad Mu"
(item.special == SPWPN_SINGING_SWORD) ? "golden long sword" :
(item.special == SPWPN_WRATH_OF_TROG) ? "bloodstained battleaxe" :
(item.special == SPWPN_SCYTHE_OF_CURSES) ? "warped scythe" :
(item.special == SPWPN_MACE_OF_VARIABILITY) ? "shimmering mace" :
(item.special == SPWPN_GLAIVE_OF_PRUNE) ? "purple glaive" :
(item.special == SPWPN_SCEPTRE_OF_TORMENT) ? "jeweled golden mace" :
(item.special == SPWPN_SWORD_OF_ZONGULDROK) ? "bone long sword" :
(item.special == SPWPN_SWORD_OF_CEREBOV) ? "great serpentine sword" :
(item.special == SPWPN_STAFF_OF_DISPATER) ? "golden staff" :
(item.special == SPWPN_SCEPTRE_OF_ASMODEUS) ? "ruby sceptre" :
(item.special == SPWPN_SWORD_OF_POWER) ? "chunky great sword" :
(item.special == SPWPN_KNIFE_OF_ACCURACY) ? "thin dagger" :
(item.special == SPWPN_STAFF_OF_OLGREB) ? "green glowing staff" :
(item.special == SPWPN_VAMPIRES_TOOTH) ? "ivory dagger" :
(item.special == SPWPN_STAFF_OF_WUCAD_MU) ? "ephemeral quarterstaff"
(this->special == SPWPN_SINGING_SWORD) ? "golden long sword" :
(this->special == SPWPN_WRATH_OF_TROG) ? "bloodstained battleaxe" :
(this->special == SPWPN_SCYTHE_OF_CURSES) ? "warped scythe" :
(this->special == SPWPN_MACE_OF_VARIABILITY) ? "shimmering mace" :
(this->special == SPWPN_GLAIVE_OF_PRUNE) ? "purple glaive" :
(this->special == SPWPN_SCEPTRE_OF_TORMENT) ? "jeweled golden mace" :
(this->special == SPWPN_SWORD_OF_ZONGULDROK) ? "bone long sword" :
(this->special == SPWPN_SWORD_OF_CEREBOV) ? "great serpentine sword" :
(this->special == SPWPN_STAFF_OF_DISPATER) ? "golden staff" :
(this->special == SPWPN_SCEPTRE_OF_ASMODEUS) ? "ruby sceptre" :
(this->special == SPWPN_SWORD_OF_POWER) ? "chunky great sword" :
(this->special == SPWPN_KNIFE_OF_ACCURACY) ? "thin dagger" :
(this->special == SPWPN_STAFF_OF_OLGREB) ? "green glowing staff" :
(this->special == SPWPN_VAMPIRES_TOOTH) ? "ivory dagger" :
(this->special == SPWPN_STAFF_OF_WUCAD_MU) ? "ephemeral quarterstaff"
strncat(buff, (item.special == 0) ? "curved" :
(item.special == 1) ? "glowing" :
(item.special == 2) ? "thick" :
(item.special == 3) ? "thin" :
(item.special == 4) ? "long" :
(item.special == 5) ? "twisted" :
(item.special == 6) ? "jeweled" :
(item.special == 7) ? "runed" :
(item.special == 8) ? "smoking" :
(item.special == 9) ? "gnarled" : // was "" {dlb}
(item.special == 10) ? "" :
(item.special == 11) ? "" :
(item.special == 12) ? "" :
(item.special == 13) ? "" :
(item.special == 14) ? "" :
(item.special == 15) ? "" :
(item.special == 16) ? "" :
(item.special == 17) ? "" :
(item.special == 18) ? "" :
(item.special == 19) ? "" :
(item.special == 20) ? "" :
(item.special == 21) ? "" :
(item.special == 22) ? "" :
(item.special == 23) ? "" :
(item.special == 24) ? "" :
(item.special == 25) ? "" :
(item.special == 26) ? "" :
(item.special == 27) ? "" :
(item.special == 28) ? "" :
(item.special == 29) ? "" : "buggy", ITEMNAME_SIZE);
strncat(buff, (this->special == 0) ? "curved" :
(this->special == 1) ? "glowing" :
(this->special == 2) ? "thick" :
(this->special == 3) ? "thin" :
(this->special == 4) ? "long" :
(this->special == 5) ? "twisted" :
(this->special == 6) ? "jeweled" :
(this->special == 7) ? "runed" :
(this->special == 8) ? "smoking" :
(this->special == 9) ? "gnarled" : // was "" {dlb}
(this->special == 10) ? "" :
(this->special == 11) ? "" :
(this->special == 12) ? "" :
(this->special == 13) ? "" :
(this->special == 14) ? "" :
(this->special == 15) ? "" :
(this->special == 16) ? "" :
(this->special == 17) ? "" :
(this->special == 18) ? "" :
(this->special == 19) ? "" :
(this->special == 20) ? "" :
(this->special == 21) ? "" :
(this->special == 22) ? "" :
(this->special == 23) ? "" :
(this->special == 24) ? "" :
(this->special == 25) ? "" :
(this->special == 26) ? "" :
(this->special == 27) ? "" :
(this->special == 28) ? "" :
(this->special == 29) ? "" : "buggy", ITEMNAME_SIZE);
strncpy( buff, "Orb of ", ITEMNAME_SIZE );
strncat( buff, (item_typ == ORB_ZOT) ? "Zot" :
/* ******************************************************************
(item_typ == 1) ? "Zug" :
(item_typ == 2) ? "Xob" :
(item_typ == 3) ? "Ix" :
(item_typ == 4) ? "Xug" :
(item_typ == 5) ? "Zob" :
(item_typ == 6) ? "Ik" :
(item_typ == 7) ? "Grolp" :
(item_typ == 8) ? "fo brO ehT" :
(item_typ == 9) ? "Plob" :
(item_typ == 10) ? "Zuggle-Glob" :
(item_typ == 11) ? "Zin" :
(item_typ == 12) ? "Qexigok" :
(item_typ == 13) ? "Bujuk" :
(item_typ == 14) ? "Uhen Tiquritu" :
(item_typ == 15) ? "Idohoxom Sovuf" :
(item_typ == 16) ? "Voc Vocilicoso" :
(item_typ == 17) ? "Chanuaxydiviha" :
(item_typ == 18) ? "Ihexodox" :
(item_typ == 19) ? "Rynok Pol" :
(item_typ == 20) ? "Nemelex" :
(item_typ == 21) ? "Sif Muna" :
(item_typ == 22) ? "Okawaru" :
(item_typ == 23) ? "Kikubaaqudgha" :
****************************************************************** */
"Bugginess", ITEMNAME_SIZE ); // change back to "Zot" if source of problems cannot be found {dlb}
strncpy(buff, "Orb of Zot", ITEMNAME_SIZE);
if (it_quant > 1
&& item_clas != OBJ_MISSILES
&& item_clas != OBJ_SCROLLS
&& item_clas != OBJ_POTIONS
&& item_clas != OBJ_MISCELLANY
&& (item_clas != OBJ_FOOD || item_typ != FOOD_CHUNK))
if (this->quantity > 1
&& this->base_type != OBJ_MISSILES
&& this->base_type != OBJ_SCROLLS
&& this->base_type != OBJ_POTIONS
&& this->base_type != OBJ_MISCELLANY
&& (this->base_type != OBJ_FOOD || item_typ != FOOD_CHUNK))
if (launched)
strcpy(info, "You shoot ");
else
strcpy(info, "You throw ");
item_name( item, DESC_NOCAP_A, str_pass );
strcat(info, str_pass);
strcat(info, ".");
mpr(info);
mprf( "You %s %s.", launched ? "shoot" : "throw",
item.name(DESC_NOCAP_A).c_str() );
// vVvVv This is *here* (as opposed to lower down) for a reason!
in_name( wpn, DESC_CAP_YOUR, str_pass );
strcpy( info, str_pass );
// Get the item name now before the enchantment changes it.
std::string iname = item.name(DESC_CAP_YOUR);
in_name( you.equip[EQ_BODY_ARMOUR], DESC_CAP_YOUR, str_pass );
strcpy(info, str_pass);
strcat(info, " glows purple and changes!");
mpr(info);
mprf("%s glows purple and changes!",
you.inv[you.equip[EQ_BODY_ARMOUR]].name(DESC_CAP_YOUR).c_str());
item_name(item, DESC_CAP_YOUR, str_pass);
strcpy(info, str_pass);
strcat(info, " glows silver for a moment.");
mpr(info);
mprf("%s glows silver for a moment.",
item.name(DESC_CAP_YOUR).c_str());
// make the name _before_ we curse it
in_name( you.equip[affected], DESC_CAP_YOUR, str_pass );
do_curse_item( you.inv[you.equip[affected]] );
strcpy(info, str_pass);
strcat(info, " glows black for a moment.");
mpr(info);
else
{
// make the name before we curse it
item_def& item = you.inv[you.equip[affected]];
mprf("%s glows black for a moment.",
item.name(DESC_CAP_YOUR).c_str());
do_curse_item( item );
}
in_name(wpn, DESC_CAP_YOUR, str_pass);
strcpy(info, str_pass);
strcat(info, " chimes like a gong.");
mpr(info, MSGCH_SOUND);
mprf(MSGCH_SOUND, "%s chimes like a gong.",
you.inv[wpn].name(DESC_CAP_YOUR).c_str());
char buff[80];
in_name( targ, DESC_NOCAP_A, buff );
char let = index_to_letter( targ );
snprintf( info, INFO_SIZE, "Switching back to %c - %s.", let, buff );
mpr( info );
// XXX XXX FIXME Why not just use DESC_INVENTORY?
mprf("Switching back to %c - %s.",
index_to_letter(targ),
you.inv[targ].name(DESC_NOCAP_A).c_str());
snprintf( info, INFO_SIZE, "%s is wielding ",
mons_pronoun( menv[i].type, PRONOUN_CAP ));
it_name(mon_wep, DESC_NOCAP_A, str_pass);
strcat(info, str_pass);
snprintf( info, INFO_SIZE, "%s is wielding %s",
mons_pronoun( menv[i].type, PRONOUN_CAP ),
mitm[mon_wep].name(DESC_NOCAP_A).c_str());
in_name( delay.parm1, DESC_NOCAP_YOUR, str_pass );
snprintf( info, INFO_SIZE,
"You continue putting on %s.", str_pass );
mpr(info, MSGCH_MULTITURN_ACTION);
mprf(MSGCH_MULTITURN_ACTION, "You continue putting on %s.",
you.inv[delay.parm1].name(DESC_NOCAP_YOUR).c_str());
in_name( delay.parm1, DESC_NOCAP_YOUR, str_pass );
snprintf( info, INFO_SIZE,
"You continue taking off %s.", str_pass );
mpr(info, MSGCH_MULTITURN_ACTION);
mprf(MSGCH_MULTITURN_ACTION, "You continue taking off %s.",
you.inv[delay.parm1].name(DESC_NOCAP_YOUR).c_str());
quant_name( you.inv[ delay.parm1 ], delay.parm2,
DESC_NOCAP_A, str_pass );
snprintf( info, INFO_SIZE, "You drop %s.", str_pass );
snprintf( info, INFO_SIZE, "You drop %s.",
quant_name(you.inv[delay.parm1], delay.parm2,
DESC_NOCAP_A).c_str());
snprintf( info, INFO_SIZE, "Linked invalid item at (%d,%d)!", x, y);
mpr( info, MSGCH_WARN );
item_name( mitm[obj], DESC_PLAIN, name );
dump_item( name, obj, mitm[obj] );
mprf(MSGCH_WARN, "Linked invalid item at (%d,%d)!", x, y);
dump_item( mitm[obj].name(DESC_PLAIN).c_str(),
obj, mitm[obj] );