functions for menu colouring and pickup…
Added: emergency_item, good_item, dangerous_item, bad_item, and useless_item, all taking into account player species and mutations, so e.g. =see invisible is useless for Naga, and !poison is always bad but only useless if you don't know Evaporate.
Never autopickup useless, dangerous (e.g. ?immolation) or inedible items, and simplify the item colour/pickup options accordingly. I'll have to see if pickup.lua is still even needed after this.
Removed the menu_colour_prefix_id option as I can't see any reason to turn it off.
Oh, and fixed a bug where Kenku were unable to stop levitating if they gained level 15 while levitating.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5658 c06c8d41-db1a-0410-9941-cceddc491573
4GYZYBY7FFORRNPIEFTV4ZM2C7Z6D2KTQOM537ZCC2YBXT2TNSHAC
F4F7W4Z2DEJBKPEEOKBV5364WE6N6N6OMA4N7D5ESVEGCCUCWZLAC
LSYZZD7OMBQQQYK2VR2IKNRD2FAEAHQ7ZDKW54AMM5GRTPH4RD3AC
TK2BJDNDUF2XVLLLSGFXTK3ESZOQ6GGJC3UXENOCMEQXC4AE6T6AC
PNIGZ2ABVEGC6DN6PMKO6Z4M2SQ5EB7VZQT33YMEAUPEZVVEDJZQC
DVYVLQ4ZAASVC2YB5GLGMBXFV4UGZWIBHBWRJDHQZMPRRXPU5OLAC
UBUOMGDTBC5WVGCZWLPC7JXZRPKNODQODFEPWB5ECSJT5J445JLQC
S26C7QFN3OBMIHF5XRB5PKRCQVBY22OLUIJKTD4CEMHKWCWE457AC
B2SZRG5A6MDMUJBGGHIRC6YWTDIUQLMI3G6MXSMP22UV3K4MYMPQC
DMG73XDQHY2X2PHKWIY56XKD3O4NPGZKKIO6GX3IV2LLRVXPGKYQC
RDZUMV3A5TREQHLPPJWDWVXBNIOWC3CQJJ35TYFBQQVQNTU7SPXQC
F2YWDQUXULLS2WKLVMNEJKEGSGG2MPEREVI2RKH7ROS2YYKKMXHAC
2WRXQTGYDBLV46WRNVIUKGNA5QS563XZNNW3N2L6PVOCHIP2YGHQC
P5TRGRH7XMQSPCZKM5IEEO34TY6W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XG6OZVGL67OIFINC34J2EMKTA4KULCERUEAC
TDAVD56MGLFSMJLPLSYLEVW7MBRMT7V5BNII4TRWVDIHH47CD2OAC
FOS5P6SXF22NWQYFDHQIEY33IML7XUCFRNW3WJNJPDBEQWQP7BLAC
GPEQXXKYWFSEHRNHZENL23KWT2WWVJJG5DVFUP3LLIRGCWR7X4UAC
UWA77ZXA34J6UHPHAMFCCMP2OIPRIMGXYTEPXUU53FIRK3GZBL4QC
RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC
VIHJ3Z75JN7BXWNOPWV3CWQZEA7K5DK36EKHCYMZC7SOSJYH2XHQC
// Helper for _get_fire_order
// types may actually contain more than one fire_type
static bool _item_matches(const item_def &item, fire_type types, const item_def* launcher)
// Helper for _get_fire_order.
// Types may actually contain more than one fire_type.
static bool _item_matches(const item_def &item, fire_type types,
const item_def* launcher)
// these can be used by all
if (eq == EQ_LEFT_RING || eq == EQ_RIGHT_RING || eq == EQ_AMULET
|| eq == EQ_WEAPON || eq == EQ_CLOAK)
{
return true;
}
// These can be used by all.
if (eq == EQ_LEFT_RING || eq == EQ_RIGHT_RING || eq == EQ_AMULET
|| eq == EQ_WEAPON || eq == EQ_CLOAK)
{
return (true);
}
// anyone can wear caps/hats and robes and at least one of buckler/shield
if (special_armour
&& (eq == EQ_HELMET || eq == EQ_BODY_ARMOUR || eq == EQ_SHIELD))
{
return true;
}
// Anyone can wear caps/hats and robes and at least one of buckler/shield.
if (special_armour
&& (eq == EQ_HELMET || eq == EQ_BODY_ARMOUR || eq == EQ_SHIELD))
{
return (true);
}
// of the remaining items, these races can't wear anything
if (you.species == SP_TROLL || you.species == SP_SPRIGGAN
|| player_genus(GENPC_OGRE) || player_genus(GENPC_DRACONIAN))
{
return false;
}
// Of the remaining items, these races can't wear anything.
if (you.species == SP_TROLL || you.species == SP_SPRIGGAN
|| player_genus(GENPC_OGRE) || player_genus(GENPC_DRACONIAN))
{
return (false);
}
}
// Returns true if an item is a potential life saver in an emergency situation.
bool is_emergency_item(const item_def &item)
{
if (!item_type_known(item))
return (false);
switch (item.base_type)
{
case OBJ_WANDS:
switch (item.sub_type)
{
case WAND_HASTING:
case WAND_HEALING:
case WAND_TELEPORTATION:
return (true);
default:
return (false);
}
case OBJ_SCROLLS:
switch (item.sub_type)
{
case SCR_TELEPORTATION:
case SCR_BLINKING:
case SCR_FEAR:
return (true);
default:
return (false);
}
case OBJ_POTIONS:
if (you.species == SP_MUMMY)
return (false);
switch (item.sub_type)
{
case POT_SPEED:
case POT_HEALING:
case POT_HEAL_WOUNDS:
case POT_RESISTANCE:
return (true);
default:
return (false);
}
default:
return (false);
}
const std::string menu_colour_item_prefix(const item_def &item)
if (is_emergency_item(item))
return (true);
if (is_useless_item(item) || is_dangerous_item(item))
return (false);
switch (item.base_type)
{
case OBJ_SCROLLS:
return (item.sub_type == SCR_ACQUIREMENT);
case OBJ_POTIONS:
switch (item.sub_type)
{
case POT_CURE_MUTATION:
case POT_GAIN_STRENGTH:
case POT_GAIN_INTELLIGENCE:
case POT_GAIN_DEXTERITY:
case POT_EXPERIENCE:
case POT_MAGIC:
case POT_BERSERK_RAGE:
case POT_MIGHT:
case POT_RESTORE_ABILITIES:
return (true);
default:
return (false);
}
default:
return (false);
}
}
// Returns true if using an item only has harmful effects.
bool is_bad_item(const item_def &item)
{
if (!item_type_known(item))
return (false);
switch (item.base_type)
{
case OBJ_SCROLLS:
switch (item.sub_type)
{
case SCR_CURSE_ARMOUR:
case SCR_CURSE_WEAPON:
return (true);
default:
return (false);
}
case OBJ_POTIONS:
switch (item.sub_type)
{
case POT_CONFUSION:
case POT_SLOWING:
case POT_DEGENERATION:
case POT_DECAY:
case POT_POISON:
case POT_STRONG_POISON:
case POT_PARALYSIS:
return (true);
case POT_MUTATION:
return (you.is_undead
&& (you.species != SP_VAMPIRE
|| you.hunger_state < HS_SATIATED));
default:
return (false);
}
case OBJ_JEWELLERY:
switch (item.sub_type)
{
case AMU_INACCURACY:
return (true);
case RING_HUNGER:
// Even Vampires can use this ring.
return (!you.is_undead);
default:
return (false);
}
case OBJ_MISCELLANY:
return (item.sub_type == MISC_CRYSTAL_BALL_OF_FIXATION);
default:
return (false);
}
}
// Returns true if using an item is risky but may occasionally be worthwhile.
bool is_dangerous_item(const item_def &item)
{
if (!item_type_known(item))
{
// Use-IDing these is extremely dangerous!
if (item.base_type == OBJ_MISCELLANY
&& (item.sub_type == MISC_CRYSTAL_BALL_OF_SEEING
|| item.sub_type == MISC_CRYSTAL_BALL_OF_ENERGY
|| item.sub_type == MISC_CRYSTAL_BALL_OF_FIXATION))
{
return (true);
}
return (false);
}
switch (item.base_type)
{
case OBJ_SCROLLS:
switch (item.sub_type)
{
case SCR_IMMOLATION:
case SCR_TORMENT:
return (true);
default:
return (false);
}
case OBJ_POTIONS:
switch (item.sub_type)
{
case POT_MUTATION:
// Only living characters can mutate.
return (!you.is_undead
|| you.species == SP_VAMPIRE
&& you.hunger_state >= HS_SATIATED);
default:
return (false);
}
default:
return (false);
}
}
bool is_useless_item(const item_def &item)
else
case OBJ_WANDS:
return (item.plus2 == ZAPCOUNT_EMPTY);
case OBJ_POTIONS:
{
// Certainly not useless if it can be used for attacking.
if (is_bad_item(item))
return (!player_knows_spell(SPELL_EVAPORATE));
if (you.species == SP_MUMMY)
return (true);
if (you.species == SP_GHOUL
|| you.species == SP_VAMPIRE && you.hunger_state >= HS_SATIATED)
// Wands are only fully identified if we know the
// number of charges.
if (item.base_type == OBJ_WANDS)
prefixes.push_back("known");
case POT_BERSERK_RAGE:
case POT_CURE_MUTATION:
case POT_GAIN_STRENGTH:
case POT_GAIN_INTELLIGENCE:
case POT_GAIN_DEXTERITY:
return (true);
}
}
switch (item.sub_type)
{
case POT_LEVITATION:
return (you.permanent_levitation() || you.permanent_flight());
case POT_PORRIDGE:
case POT_BLOOD:
case POT_BLOOD_COAGULATED:
return (!can_ingest(item.base_type, item.sub_type, true, true,
false));
}
// Rings are fully identified simply by knowing their
// type, unless the ring has plusses, like a ring of
// dexterity.
else if (item.base_type == OBJ_JEWELLERY
&& !jewellery_is_amulet(item))
{
if (item.plus == 0 && item.plus2 == 0)
prefixes.push_back("identified");
else
prefixes.push_back("known");
}
// All other types of magical items are fully identified
// simply by knowing the type
else
return (false);
}
case OBJ_JEWELLERY:
if (is_bad_item(item))
return (true);
if (you.species == SP_MUMMY || you.species == SP_GHOUL)
{
switch (item.sub_type)
{
case AMU_RAGE:
case RING_REGENERATION:
case RING_SUSTENANCE:
case RING_HUNGER:
case RING_LIFE_PROTECTION:
return (true);
}
}
if (item.sub_type == RING_SEE_INVISIBLE)
return (player_mutation_level(MUT_ACUTE_VISION));
if (item.sub_type == RING_POISON_RESISTANCE)
{
return (you.species != SP_VAMPIRE
&& player_mutation_level(MUT_POISON_RESISTANCE));
}
if (item.sub_type == AMU_CONTROLLED_FLIGHT)
return (player_genus(GENPC_DRACONIAN) || you.permanent_flight());
if (you.religion == GOD_TROG)
{
return (item.sub_type == RING_WIZARDRY
|| item.sub_type == AMU_RAGE);
}
default:
return (false);
}
}
const std::string menu_colour_item_prefix(const item_def &item)
{
std::vector<std::string> prefixes;
if (item_ident(item, ISFLAG_KNOW_TYPE))
prefixes.push_back("identified");
else
{
if (get_ident_type(item.base_type, item.sub_type) == ID_KNOWN_TYPE)
{
// Wands are only fully identified if we know the
// number of charges.
if (item.base_type == OBJ_WANDS)
prefixes.push_back("known");
// Rings are fully identified simply by knowing their
// type, unless the ring has plusses, like a ring of
// dexterity.
else if (item.base_type == OBJ_JEWELLERY
&& !jewellery_is_amulet(item))
{
if (item.plus == 0 && item.plus2 == 0)
}
if (is_emergency_item(item))
prefixes.push_back("emergency_item");
if (is_good_item(item))
prefixes.push_back("good_item");
if (is_dangerous_item(item))
prefixes.push_back("dangerous_item");
if (is_bad_item(item))
prefixes.push_back("bad_item");
if (is_useless_item(item))
prefixes.push_back("useless_item");
if (item.base_type != OBJ_CORPSES
&& !can_ingest(item.base_type, item.sub_type, true, true, false)
|| you.species == SP_VAMPIRE && !mons_has_blood(item.plus)
|| food_is_rotten(item)
&& !player_mutation_level(MUT_SAPROVOROUS))
{
if (is_inedible(item))
if (item.base_type == OBJ_FOOD
&& !can_ingest(item.base_type, item.sub_type, true, true, false))
{
return (true);
}
if (item.base_type == OBJ_CORPSES
&& (item.sub_type == CORPSE_SKELETON
|| you.species == SP_VAMPIRE && !mons_has_blood(item.plus)))
{
return (true);
}
return (false);
}
boom.thrower = KILL_MISC;
boom.aux_source = "a magical explosion";
boom.beam_source = NON_MONSTER;
boom.is_beam = false;
boom.is_tracer = false;
boom.thrower = KILL_MISC;
boom.aux_source = "a magical explosion";
boom.beam_source = NON_MONSTER;
boom.is_beam = false;
boom.is_tracer = false;
# Good items
#
menu = magenta:.*scroll.*(acquirement)
menu = magenta:.*potion.*(gain (strength|dexterity|intelligence))
menu = magenta:.*potion.*(experience|magic)
: if not you_real_undead() then
menu = magenta:.*potion.*(of mutation)
: else
menu = lightred:.*potion.*(of mutation)
: end
# Bad items
menu = lightred:.*bad_item.*
# Dangerous items
#
menu = lightred:.*scroll.*(forgetfulness|torment|curse armour)
menu = lightred:.*scroll.*(immolation|curse weapon)
menu = lightred:.*potion.*(slowing|degeneration|poison|confusion)
menu = lightred:.*potion.*(paralysis|decay)
menu = lightred:.*jewellery.*(inaccuracy|hunger)
# Dangerous (but still useful) items
menu = magenta:.*dangerous_item.*
#
menu = darkgrey:.*scroll.*(random uselessness|paper|noise)
menu = darkgrey:.*potion.*water
: if you.race() == "Mummy" then
menu = darkgrey:.*jewellery.*(sustenance)
: end
: if you_real_undead() then
menu = darkgrey:.*jewellery.*(regeneration|rage)
: end
: if string.find(you.race(), "Draconian", 0, true) then
menu = darkgrey:.*jewellery.*(controlled flight)
ae = >amulet.*(controlled flight)
: end
: if you.race() == "Green Draconian" or you.race() == "Naga" then
menu = darkgrey:.*jewellery.*(poison resistance)
ae = >ring.*(poison resistance)
: end
menu = darkgrey:.*useless_item.*
# universally bad options and scrolls
ae = potions? of (confusion|degeneration|poison|strong poison)
ae = potions? of (slowing|paralysis|decay|water)
ae = scrolls? of (paper|torment|immolation|curse weapon)
ae = scrolls? of (curse armour|random uselessness|noise)
: if you.race() == "Centaur" then
ae = boots
: else
ae = centaur barding
: end
: if you.race() == "Naga" then
ae = boots
: else
ae = naga barding
: end
: if you.race() == "Ogre" or you.race() == "Ogre-Mage"
: or you.race() == "Troll" or you.race() == "Spriggan"
: or you.race() == "Draconian"
: then
ae = boots
ae = gloves
ae = helmet
ae = armour .* (mail|leather)
: end
: if you.race() == "Spriggan" then
ae = shield
: end
: if you.race() == "Ghoul" then
ae = gloves
: end
: if you.race() == "Kenku" then
ae = boots
ae = helmet
: end
easier. These are:
inedible (you cannot eat this or get no nutrition from it)
poisonous (chunks/corpses that are poisonous)
mutagenic (chunks/corpses that are mutagenic)
contaminated (chunks/corpses that may cause sickness, but
ignored for Kobolds, Ogres, Trolls, and Ghouls)
rot-inducing (chunks/corpses that cause rotting)
equipped (equipped items)
artefact (item is an artefact, whether identified or not)
evil_item (item is hated by the good gods)
evil_eating (eating this item is punished by the good gods)
easier. These are, in order of definition:
identified (The item is fully identified.)
known (You recognize the item's subtype.)
unidentified (You don't recognize the item's subtype.)
The following only apply to items whose subtype is known.
evil_item (Your god would hate it if you used this item.)
emergency_item (This item is invaluable in emergencies.)
good_item (This item is generally a good item.)
dangerous_item (Using this item can be dangerous.)
bad_item (This item is generally a bad item.)
useless_item (This item is of no use to you.)
evil_eating (Eating this item is punished by the good gods.)
inedible (You cannot eat this or get no nutrition from it.)
poisonous (Chunks/corpses that are poisonous)
mutagenic (Chunks/corpses that are mutagenic)
contaminated (Chunks/corpses that may cause sickness, but
ignored for Kobolds, Ogres, Trolls, and Ghouls.)
rot-inducing (Chunks/corpses that cause rotting.)
equipped (Equipped items.)
artefact (For artefacts, whether identified or not.)
When looking for menu_colour matches, these prefixes are prepended to
the actual item name, e.g. in the form of
identified, evil_item wand of draining (4)
unidentified, equipped, artefact sparkling ring
If you want to colour all items that contain a certain prefix, use
menu_colour = lightgreen:.*poisonous.*