ae := autopickup_exceptions

### specific inclusions ###

# Autopickup runes by default.
ae = <rune of Zot

# Make it harder to miss out on zigfigs.
ae += <figurine of a ziggurat

### exclusions ###

# Exclude items useless in general or for your current character (such as
# armour you can't wear).
ae += useless_item

# Exclude items which your god disapproves of.
ae += forbidden

# ?noise is pretty useless.
ae += scroll of noise

# Autopickup elemental evokers after useless and forbidden exclusions,
# so that autopickup for these items will respect god conducts.
ae += <evoker

### good_item backstop (keep last) ###

ae += <good_item

: add_autopickup_func(function (it, name)
:   return it.stacks() or nil
: end)

# Excluding most amulets as you only need one of each. Likewise for some
# rings. Some items may already be excluded as bad_item, e.g. inaccuracy.
:add_autopickup_func(function (it, name)
:  if it.is_redundant then
:     return false
:  end
:  return nil
:end)

# Pick up any aux armour for which the player still has empty slots
:add_autopickup_func(function(it, name)
:  if it.class(true) == "armour" then
:    local good_slots = {cloak="cloak", helmet="helmet", gloves="gloves",
:                        boots="boots", barding="barding"}
:    st, _ = it.subtype()
:    if good_slots[st] ~= nil and items.slot_is_available(good_slots[st]) == true then
:       if not it.is_useless then
:           return true
:       end
:    end
:  end
:end)
