it actually works. Note that the first of these is no longer in good_god_hates_item_handling(), as weapons of chaos are only potentially evil. Also, add wands of random effects to the list of potentially evil items, as they might as well be wands of chaos.
FBCMCSB4CABB4UNHO2DRM37E3EM7HXKJF33GUGGLIC5WG6SWB4WQC bool is_potentially_evil_item(const item_def& item){switch (item.base_type){case OBJ_WEAPONS:{const int item_brand = get_weapon_brand(item);if (item_brand == SPWPN_CHAOS)return (true);}break;case OBJ_MISSILES:{const int item_brand = get_ammo_brand(item);if (item_brand == SPMSL_CHAOS)return (true);}break;case OBJ_WANDS:if (item.sub_type == WAND_RANDOM_EFFECTS)return (true);break;default:break;}return (false);}