missiles. [1847482]
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3037 c06c8d41-db1a-0410-9941-cceddc491573
YL3SLEMOESF2QDGYWH5ATHN46PODT57GQUKYHWDAV4HFC5AR6OHQC if (you.equip[EQ_WEAPON] == 0) // ie. weapon is currently 'a'item_slot = 1;elseitem_slot = 0;if (slot != -1) item_slot = slot;
if ( item_slot == you.equip[EQ_WEAPON] )item_slot = 1; // backup is 'b'if (slot != -1) // allow external overrideitem_slot = slot;
bool force_unwield =you.inv[item_slot].base_type != OBJ_WEAPONS&& you.inv[item_slot].base_type != OBJ_MISSILES&& you.inv[item_slot].base_type != OBJ_STAVES;
// If the swap slot has a bad (but valid) item in it,// the swap will be to bare hands.const bool good_swap =you.inv[item_slot].base_type == OBJ_WEAPONS|| you.inv[item_slot].base_type == OBJ_STAVES|| (you.inv[item_slot].base_type == OBJ_MISCELLANY&& you.inv[item_slot].sub_type != MISC_RUNE_OF_ZOT);