git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1378 c06c8d41-db1a-0410-9941-cceddc491573
6GDKXNFXPKQ6AVNOSMJECN7CLELM2KCMVRM2A7BARLK2NNILN6SAC VXZ6D6A6MM24HA5AVN5C55FY4OBUH7AOXSHJBAENGSRI4BQXNXLAC VNHFP63ZLLZU3A3PLXP4BITX57DUIYDHFOHQYK3BOBHV3S64G26QC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC ASCTVJSN3NXYQHRVXAORA43CV6H5V2572IMK4UGRHKBAGJOWHC4AC 2KTJHQUX2LTU2BCLS5YXVRRKMOYKKIZAPF2LBKORFGSHEN5IO3IAC CIPVRZGLOZHCERK6YPOBV3P2E4IAB4H6D5EHLRQE2O5E4P4VCBUAC QVVC7AYGVA6U64PTNA7L27422NLMO327P22BQKXEVIMPZHIHO7MQC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC // Returns the mask of interesting identify bits for this item// (e.g., scrolls don't have know-cursedness.)unsigned long full_ident_mask( const item_def& item ){unsigned long flagset = ISFLAG_IDENT_MASK;switch ( item.base_type ){case OBJ_FOOD:flagset = 0;break;case OBJ_BOOKS:case OBJ_MISCELLANY:case OBJ_ORBS:case OBJ_SCROLLS:case OBJ_POTIONS:case OBJ_STAVES:flagset = ISFLAG_KNOW_TYPE;break;case OBJ_WANDS:flagset = (ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PLUSES);break;case OBJ_JEWELLERY:flagset = (ISFLAG_KNOW_CURSE | ISFLAG_KNOW_TYPE);if ( ring_has_pluses(item) )flagset |= ISFLAG_KNOW_PLUSES;break;case OBJ_MISSILES:flagset = ISFLAG_KNOW_PLUSES | ISFLAG_KNOW_TYPE;if (get_ammo_brand(item) == SPMSL_NORMAL)flagset &= ~ISFLAG_KNOW_TYPE;break;case OBJ_WEAPONS:case OBJ_ARMOUR:default:break;}if ( is_random_artefact(item) ||is_fixed_artefact(item) ){flagset |= ISFLAG_KNOW_PROPERTIES;}return flagset;}bool fully_identified( const item_def& item ){return item_ident(item, full_ident_mask(item));}
/* ************************************************************************ bit operations called from a large number of files* *********************************************************************** */bool fully_identified( const item_def &item );unsigned long full_ident_mask( const item_def& item );
}}}static const char* weapon_brand_name(const item_def& item, bool terse){switch (get_weapon_brand(item)){case SPWPN_NORMAL: return "";case SPWPN_FLAMING: return ((terse) ? " (flame)" : " of flaming");case SPWPN_FREEZING: return ((terse) ? " (freeze)" : " of freezing");case SPWPN_HOLY_WRATH: return ((terse) ? " (holy)" : " of holy wrath");case SPWPN_ELECTROCUTION: return ((terse) ? " (elec)":" of electrocution");case SPWPN_ORC_SLAYING: return ((terse) ? " (slay orc)":" of orc slaying");case SPWPN_VENOM: return ((terse) ? " (venom)" : " of venom");case SPWPN_PROTECTION: return ((terse) ? " (protect)" : " of protection");case SPWPN_DRAINING: return ((terse) ? " (drain)" : " of draining");case SPWPN_SPEED: return ((terse) ? " (speed)" : " of speed");case SPWPN_DISRUPTION: return ((terse) ? " (disrupt)" : " of disruption");case SPWPN_PAIN: return ((terse) ? " (pain)" : " of pain");case SPWPN_DISTORTION: return ((terse) ? " (distort)" : " of distortion");case SPWPN_REACHING: return ((terse) ? " (reach)" : " of reaching");case SPWPN_VAMPIRICISM:return ((terse) ? " (vamp)" : ""); // non-terse already handledcase SPWPN_VORPAL:if (is_range_weapon(item))return ((terse) ? " (velocity)" : " of velocity");else{switch (get_vorpal_type(item)){case DVORP_CRUSHING: return ((terse) ? " (crush)" :" of crushing");case DVORP_SLICING: return ((terse) ? " (slice)" : " of slicing");case DVORP_PIERCING: return ((terse) ? " (pierce)":" of piercing");case DVORP_CHOPPING: return ((terse) ? " (chop)" : " of chopping");case DVORP_SLASHING: return ((terse) ? " (slash)" :" of slashing");case DVORP_STABBING: return ((terse) ? " (stab)" : " of stabbing");default: return "";}
if (know_type && !terse){if (brand == SPWPN_VAMPIRICISM)buff << "vampiric ";} // end if
if (know_type){switch (brand){case SPWPN_NORMAL:break;case SPWPN_FLAMING:buff << ((terse) ? " (flame)" : " of flaming");break;case SPWPN_FREEZING:buff << ((terse) ? " (freeze)" : " of freezing");break;case SPWPN_HOLY_WRATH:buff << ((terse) ? " (holy)" : " of holy wrath");break;case SPWPN_ELECTROCUTION:buff << ((terse) ? " (elec)" : " of electrocution");break;case SPWPN_ORC_SLAYING:buff << ((terse) ? " (slay orc)" : " of orc slaying");break;case SPWPN_VENOM:buff << ((terse) ? " (venom)" : " of venom");break;case SPWPN_PROTECTION:buff << ((terse) ? " (protect)" : " of protection");break;case SPWPN_DRAINING:buff << ((terse) ? " (drain)" : " of draining");break;case SPWPN_SPEED:buff << ((terse) ? " (speed)" : " of speed");break;case SPWPN_VORPAL:if (is_range_weapon( *this )){buff << ((terse) ? " (velocity)" : " of velocity");break;}switch (get_vorpal_type(*this)){case DVORP_CRUSHING:buff << ((terse) ? " (crush)" : " of crushing");break;case DVORP_SLICING:buff << ((terse) ? " (slice)" : " of slicing");break;case DVORP_PIERCING:buff << ((terse) ? " (pierce)" : " of piercing");break;case DVORP_CHOPPING:buff << ((terse) ? " (chop)" : " of chopping");break;case DVORP_SLASHING:buff << ((terse) ? " (slash)" : " of slashing");break;case DVORP_STABBING:buff << ((terse) ? " (stab)" : " of stabbing");break;}break;case SPWPN_FLAME:buff << ((terse) ? " (flame)" : " of flame");break; // bows/xbowscase SPWPN_FROST:buff << ((terse) ? " (frost)" : " of frost");break; // bows/xbowscase SPWPN_VAMPIRICISM:if (terse) // non-terse already handled abovebuff << " (vamp)";break;case SPWPN_DISRUPTION:buff << ((terse) ? " (disrupt)" : " of disruption");break;case SPWPN_PAIN:buff << ((terse) ? " (pain)" : " of pain");break;case SPWPN_DISTORTION:buff << ((terse) ? " (distort)" : " of distortion");break;case SPWPN_REACHING:buff << ((terse) ? " (reach)" : " of reaching");break;/* 25 - 29 are randarts */default:break;}}
case FOOD_MEAT_RATION:buff << "meat ration";break;case FOOD_BREAD_RATION:buff << "bread ration";break;case FOOD_PEAR:buff << "pear";break;case FOOD_APPLE: // make this less commonbuff << "apple";break;case FOOD_CHOKO:buff << "choko";break;case FOOD_HONEYCOMB:buff << "honeycomb";break;case FOOD_ROYAL_JELLY:buff << "royal jell";break;case FOOD_SNOZZCUMBER:buff << "snozzcumber";break;case FOOD_PIZZA:buff << "slice of pizza";break;case FOOD_APRICOT:buff << "apricot";break;case FOOD_ORANGE:buff << "orange";break;case FOOD_BANANA:buff << "banana";break;case FOOD_STRAWBERRY:buff << "strawberr";break;case FOOD_RAMBUTAN:buff << "rambutan";break;case FOOD_LEMON:buff << "lemon";break;case FOOD_GRAPE:buff << "grape";break;case FOOD_SULTANA:buff << "sultana";break;case FOOD_LYCHEE:buff << "lychee";break;case FOOD_BEEF_JERKY:buff << "beef jerk";break;case FOOD_CHEESE:buff << "cheese";break;case FOOD_SAUSAGE:buff << "sausage";break;
case FOOD_MEAT_RATION: buff << "meat ration"; break;case FOOD_BREAD_RATION: buff << "bread ration"; break;case FOOD_PEAR: buff << "pear"; break;case FOOD_APPLE: buff << "apple"; break;case FOOD_CHOKO: buff << "choko"; break;case FOOD_HONEYCOMB: buff << "honeycomb"; break;case FOOD_ROYAL_JELLY: buff << "royal jell"; break;case FOOD_SNOZZCUMBER: buff << "snozzcumber"; break;case FOOD_PIZZA: buff << "slice of pizza"; break;case FOOD_APRICOT: buff << "apricot"; break;case FOOD_ORANGE: buff << "orange"; break;case FOOD_BANANA: buff << "banana"; break;case FOOD_STRAWBERRY: buff << "strawberr"; break;case FOOD_RAMBUTAN: buff << "rambutan"; break;case FOOD_LEMON: buff << "lemon"; break;case FOOD_GRAPE: buff << "grape"; break;case FOOD_SULTANA: buff << "sultana"; break;case FOOD_LYCHEE: buff << "lychee"; break;case FOOD_BEEF_JERKY: buff << "beef jerk"; break;case FOOD_CHEESE: buff << "cheese"; break;case FOOD_SAUSAGE: buff << "sausage"; break;
// hackish {dlb}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 (need_plural && this->quantity > 1)
// Returns the mask of interesting identify bits for this item// (e.g., scrolls don't have know-cursedness.)unsigned long full_ident_mask( const item_def& item ){unsigned long flagset = ISFLAG_IDENT_MASK;switch ( item.base_type ){case OBJ_FOOD:flagset = 0;break;case OBJ_BOOKS:case OBJ_MISCELLANY:case OBJ_ORBS:case OBJ_SCROLLS:case OBJ_POTIONS:case OBJ_STAVES:flagset = ISFLAG_KNOW_TYPE;break;case OBJ_WANDS:flagset = (ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PLUSES);break;case OBJ_JEWELLERY:flagset = (ISFLAG_KNOW_CURSE | ISFLAG_KNOW_TYPE);if ( ring_has_pluses(item) )flagset |= ISFLAG_KNOW_PLUSES;break;case OBJ_MISSILES:flagset = ISFLAG_KNOW_PLUSES | ISFLAG_KNOW_TYPE;if (get_ammo_brand(item) == SPMSL_NORMAL)flagset &= ~ISFLAG_KNOW_TYPE;break;case OBJ_WEAPONS:case OBJ_ARMOUR:default:break;}if ( is_random_artefact(item) ||is_fixed_artefact(item) ){flagset |= ISFLAG_KNOW_PROPERTIES;}return flagset;}bool fully_identified( const item_def& item ){return item_ident(item, full_ident_mask(item));}