Fix named orcs getting no descriptions. The descriptions will have to be tweaked, probably using lua, to allow for friendly orcs. The descriptions for orc priests look particularly out of place with Beogh.
Viewing friendlies now also lists their quiver and alternate weapon. Dualwielders now never will pick up shields, and single wielders will drop their shield if they wield a two-handed weapon.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4755 c06c8d41-db1a-0410-9941-cceddc491573
NRIZKLUO26UHNKB4IERXI6ECMD2IJYZACQNIUU3SH6BPLGHAJYVAC
OWGIMHN3XYFWT7G24XCDK5VWM7I3TOOJO4HVN6UQEZ55C6T2BG7QC
R5UWCN73VGZBWSRVBEMDX5D6WH3NGKUGBTNUGVAH32QFQSKSSZDAC
CZKTZS7A3FUJTXJGAEMDCPHMHPR44EZS46I5CHUC2ENFDQD2JERAC
ACYR3YL7DTTIJP3N7ITQ5IRAWSRW23VQTGJHBDAATXW6LXMSA4AAC
PBKRKGKARGZSLVFVDTK5NWDXQD26NHNN67LDSSB75CLEWBR6TLEQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
32TNF7QPH765BC6VP4KVA4R2REGP6VI7CJ7QW2OOGP66Y7CUNQWQC
QS3ZRS3E6KL3YJHPKYEWCWJYRBJSXD5OOYF6Y25HZVECGPJRDB5QC
6VXX5ATWAPN5W5NGQK2GHGWNOOAAFTMB2D4JDKPTAYGALS27SBXAC
OFTOEJSRSA2EZOAQOJCWWQNDX7IVVAR565JK3DZCBG54TBHHCIDQC
OWERGKLVPNPGIIS23FZ7ZDOBWUIXCKYAFG3URXU75JAUDX3N5ENAC
XKDPUWDOAFP4ZVWY6AOYPX3TJLTFBNZWRYSPIMEJHFX577WAJGMAC
QYQKV4R47PTERXVFQNNWWQVICGSOMBHW6WM5TAZAKLIYOLLPUAJAC
PMCHUVWMCDXOWGXB4SWMBXFGHJYZG7KZ34SE33HFUGHPQYP3LYEAC
47NSOFQMBZCDIBHEAZSENFUGDSQCX3GJHFBUZ65ARDKCYIZ435LAC
WXZQJUZXMYS7R6ORNB7DWE5KEUXT262GXWMRPOJYYB4I3BFGYLLAC
VRFQK6S2TXOFFO5K5HRDXPR7QEKKAZAVCASSIJVPWQ4GE26UOGTQC
|| item.special == SPWPN_SCEPTRE_OF_ASMODEUS
|| item.special == SPWPN_STAFF_OF_DISPATER
|| item.special == SPWPN_SWORD_OF_CEREBOV
|| item_eff == SPWLD_CURSE
|| item_eff == SPWLD_TORMENT
|| item_eff == SPWLD_ZONGULDROK
|| item_brand == SPWPN_DRAINING
|| item_brand == SPWPN_PAIN
|| item_brand == SPWPN_VAMPIRICISM);
|| item.special == SPWPN_SCEPTRE_OF_ASMODEUS
|| item.special == SPWPN_STAFF_OF_DISPATER
|| item.special == SPWPN_SWORD_OF_CEREBOV
|| item_eff == SPWLD_CURSE
|| item_eff == SPWLD_TORMENT
|| item_eff == SPWLD_ZONGULDROK
|| item_brand == SPWPN_DRAINING
|| item_brand == SPWPN_PAIN
|| item_brand == SPWPN_VAMPIRICISM);
|| item.sub_type == BOOK_DEATH
|| item.sub_type == BOOK_UNLIFE
|| item.sub_type == BOOK_NECRONOMICON
|| item.sub_type == BOOK_DEMONOLOGY);
|| item.sub_type == BOOK_DEATH
|| item.sub_type == BOOK_UNLIFE
|| item.sub_type == BOOK_NECRONOMICON
|| item.sub_type == BOOK_DEMONOLOGY);
if (mon == MONS_RAKSHASA_FAKE ||
mon == MONS_ARMOUR_MIMIC ||
mon == MONS_SCROLL_MIMIC ||
mon == MONS_POTION_MIMIC ||
mon == MONS_ABOMINATION_LARGE)
if (mon == MONS_RAKSHASA_FAKE
|| mon == MONS_ARMOUR_MIMIC
|| mon == MONS_SCROLL_MIMIC
|| mon == MONS_POTION_MIMIC
|| mon == MONS_ABOMINATION_LARGE)
// If a monster chooses a two-handed weapon as main weapon, it will
// first have to drop any shield it might wear.
// (Monsters will always favour damage over protection.)
if (slot == MSLOT_WEAPON && inv[MSLOT_SHIELD] != NON_ITEM
&& hands_reqd(item, body_size(PSIZE_BODY)) == HANDS_TWO)
{
if (!drop_item(MSLOT_SHIELD, near))
return false;
}
// XXX: Make this check dependent on creature size.
// wimpy monsters (Kob, gob) shouldn't pick up halberds etc
// of course, this also block knives {dlb}:
if ((::mons_species(type) == MONS_KOBOLD
|| ::mons_species(type) == MONS_GOBLIN)
&& property( weap, PWPN_HIT ) <= 0)
{
// Wimpy monsters (e.g. kobold, goblin) shouldn't pick up halberds etc.
if (!check_weapon_wieldable_size( weap, body_size(PSIZE_BODY) ))
// Don't pick up a shield if you're already wielding a two-hander, or
// two weapons as a double-wielding monster.
if (mslot == MSLOT_SHIELD && mslot_item(MSLOT_WEAPON)
&& (hands_reqd(*mslot_item(MSLOT_WEAPON), body_size(PSIZE_BODY))
== HANDS_TWO
|| mslot_item(MSLOT_ALT_WEAPON) && mons_wields_two_weapons(this)))
// Monsters that are capable of dual wielding won't pick up shields.
// Neither will monsters that are already wielding a two-hander.
if (mslot == MSLOT_SHIELD
&& (mons_wields_two_weapons(this)
|| mslot_item(MSLOT_WEAPON)
&& hands_reqd(*mslot_item(MSLOT_WEAPON), body_size(PSIZE_BODY))
== HANDS_TWO))
const int mon_arm = mon->inv[MSLOT_ARMOUR];
const int mon_shd = mon->inv[MSLOT_SHIELD];
const int mon_qvr = mon->inv[MSLOT_MISSILE];
const int mon_alt = mon->inv[MSLOT_ALT_WEAPON];
const bool need_quiver = (mon_qvr != NON_ITEM && mons_friendly(mon));
const bool need_alt_wpn = (mon_alt != NON_ITEM && mons_friendly(mon)
&& !mons_wields_two_weapons(mon));
bool found_sth = !weap.empty();
if (!found_sth)
found_sth = true;
}
// For friendly monsters, also list quivered missiles
// and alternate weapon.
if (mons_friendly(mon))
{
if (mon_qvr != NON_ITEM)
{
desc += ", ";
if (found_sth && !need_alt_wpn)
desc += "and ";
desc += "quivering ";
desc += mitm[mon_qvr].name(DESC_NOCAP_A);
if (!found_sth)
found_sth = true;
}
if (need_alt_wpn)
{
desc += ", ";
if (found_sth)
desc += "and ";
desc += "carrying ";
desc += mitm[mon_alt].name(DESC_NOCAP_A);
}