the necessary launcher, but allow upgrading of missiles for ones with higher pluses or branded ones.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4906 c06c8d41-db1a-0410-9941-cceddc491573
R3ZUGT5VJ2DG5NFPG4RBWDWTULDE7L4REYSGVPHJPDXFG6OBIXYAC SR2BWHPDP6GEOVIGSGISVPHVSR5TNBKURNYL25V6SYTOICNNZRGAC KUHOHOTLWUJHXU6U2VSD2R742ENT2VKXLAR6OZ7ERQK3GU7VBIOQC TZ2SH2SPO5TFSFL2OCV5A32P2X4CRHEKEK7ENUFCBVF3RKUWAD4AC 6TEISZD7HYSSL24EOKIBNURU66KGSQX7B7SNAHBP4DQSAOTGH2MQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC Y2NYY7HWFZ2LQDK3ACSLGS37F2J2IJ5LRGCIMZYXLEOSVPD3A4DAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC 4HATGRJJE7Q6LXHJ3ZGYTNBLG542KAUEK6ERKARIYRKRWY6VTDKQC NVSFIV2ZKP44XHCSCXG6OZVGL67OIFINC34J2EMKTA4KULCERUEAC QS3ZRS3E6KL3YJHPKYEWCWJYRBJSXD5OOYF6Y25HZVECGPJRDB5QC HCZZLSYJT66RSTFJWQIVTDBDJBSDXNHSC7V5WJZOUD52IF5MJGBQC S4W5EBZLFX3HA3JNR524LF5RJ7PAPMSMN3FVRZNLQZY4QNEILGLQC XKDPUWDOAFP4ZVWY6AOYPX3TJLTFBNZWRYSPIMEJHFX577WAJGMAC GHP3H4FU6XZTSZ7IWNOT5Z34GJL3BFRMARHPXXW5MJUQ4SOZ7ATQC 5BJPWUPLJFS34FUTFJVKA4A52YMIGV6EWDXLNSDCWBJWBGVSQFGQC DTO3EUKWHZ5RJNGNCFYXSOVTIPVXPP637F2W7WFGYKJ7JK7VNKNQC Q3DNEB5OOJ34P5ML4CMK3L6SCP7RL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and charmed monsters from picking up stuffif (!mons_neutral(monster) && !monster->has_ench(ENCH_CHARM))
// Keep neutral and charmed monsters from picking up stuff.// Same for friendlies if friendly_pickup is set to -1.if (!mons_neutral(monster) && !monster->has_ench(ENCH_CHARM)&& (!mons_friendly(monster) || Options.friendly_pickup >= 0))
// Pretty simplistic at the moment. We allow monsters to pick up// missiles without the corresponding launcher, assuming that sufficient// wandering may get them to stumble upon the launcher.
// Don't allow monsters to pick up missiles without the corresponding// launcher. The opposite is okay, and sufficient wandering will// hopefully take the monster to a stack of appropriate missiles.
return (true);
// These don't need any launcher, and always okay.if (item.sub_type == MI_STONE || item.sub_type == MI_DART)return (true);item_def *launch;for (int i = MSLOT_WEAPON; i <= MSLOT_ALT_WEAPON; ++i){launch = mslot_item(static_cast<mon_inv_type>(i));if (launch && fires_ammo_type(*launch) == item.sub_type)return (true);}// no fitting launcher in inventoryreturn (false);
if (miss){item_def *launch;for (int i = MSLOT_WEAPON; i <= MSLOT_ALT_WEAPON; ++i){launch = mslot_item(static_cast<mon_inv_type>(i));if (launch){// If this ammunition is better, drop the old ones.if (fires_ammo_type(*launch) == item.sub_type&& (fires_ammo_type(*launch) != miss->sub_type|| item.plus > miss->plus|| item.plus == miss->plus&& get_ammo_brand(*miss) == SPMSL_NORMAL&& get_ammo_brand(item) != SPMSL_NORMAL)){if (!drop_item(MSLOT_MISSILE, near))return (false);break;}}}// Darts don't absolutely need a launcher - still allow upgrading.if (item.sub_type == miss->sub_type&& item.sub_type == MI_DART&& (item.plus > miss->plus|| item.plus == miss->plus&& get_ammo_brand(*miss) == SPMSL_NORMAL&& get_ammo_brand(item) != SPMSL_NORMAL)){if (!drop_item(MSLOT_MISSILE, near))return (false);}}
return (wpn.sub_type != MI_LARGE_ROCK &&wpn.sub_type != MI_JAVELIN &&wpn.sub_type != MI_THROWING_NET);
ASSERT(ammo.base_type == OBJ_MISSILES);return (ammo.sub_type != MI_LARGE_ROCK&& ammo.sub_type != MI_JAVELIN&& ammo.sub_type != MI_THROWING_NET);
for "none", these options won't let you override these.Also, friendly jellies won't ever eat any items, regardless of thisoption.
for "none", these options won't let you override this behaviour.Also, friendly jellies won't ever eat any items, regardless ofthis option.