summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godpassive.cc
diff options
context:
space:
mode:
authorShmuale Mark <shm.mark@gmail.com>2014-03-19 18:55:38 -0400
committerShmuale Mark <shm.mark@gmail.com>2014-04-27 16:01:08 -0400
commita5c5f62ab8b6da919c58377e2c251380f65cc653 (patch)
tree6ed62dc1a6099075587d5bef360df48a26afefc3 /crawl-ref/source/godpassive.cc
parent9da1fa0942dabbe43d7ea81e1c8649ece15c5274 (diff)
downloadcrawl-ref-a5c5f62ab8b6da919c58377e2c251380f65cc653.tar.gz
crawl-ref-a5c5f62ab8b6da919c58377e2c251380f65cc653.zip
Auto-id jewellery on equip.
In the case of rings/amulets that identified themselves when they had an effect, the player would want to try to put themselves in a position where the item would identify, which was techincally optimal but quite annoying. There were a few items that never would identify, but on the whole it's not worth keeping around the behavior just for them. The ID code is pretty confusing and it's quite possible the implementation is not ideal or there are actual bugs.
Diffstat (limited to 'crawl-ref/source/godpassive.cc')
-rw-r--r--crawl-ref/source/godpassive.cc40
1 files changed, 1 insertions, 39 deletions
diff --git a/crawl-ref/source/godpassive.cc b/crawl-ref/source/godpassive.cc
index ff20d5dad6..a11447cf5f 100644
--- a/crawl-ref/source/godpassive.cc
+++ b/crawl-ref/source/godpassive.cc
@@ -362,44 +362,6 @@ static bool _is_slot_cursed(equipment_type eq)
return true;
}
-static bool _jewel_auto_id(const item_def& item)
-{
- if (item.base_type != OBJ_JEWELLERY)
- return false;
-
- // Yay, such lists tend to get out of sync very fast...
- // Fortunately, this one doesn't have to be too accurate.
- switch (item.sub_type)
- {
- case RING_REGENERATION:
- return player_mutation_level(MUT_SLOW_HEALING) < 3;
- case RING_PROTECTION:
- case RING_EVASION:
- case RING_STRENGTH:
- case RING_DEXTERITY:
- case RING_INTELLIGENCE:
- return !!item.plus;
- case AMU_FAITH:
- return !you_worship(GOD_NO_GOD);
- case AMU_THE_GOURMAND:
- return you.species != SP_MUMMY
- && player_mutation_level(MUT_HERBIVOROUS) < 3;
- case RING_INVISIBILITY:
- case RING_TELEPORTATION:
- case RING_TELEPORT_CONTROL:
- case RING_MAGICAL_POWER:
- case RING_FLIGHT:
- case RING_ICE:
- case RING_FIRE:
- case RING_WIZARDRY:
- case AMU_RAGE:
- case AMU_GUARDIAN_SPIRIT:
- return true;
- default:
- return false;
- }
-}
-
bool god_id_item(item_def& item, bool silent)
{
iflags_t old_ided = item.flags & ISFLAG_IDENT_MASK;
@@ -423,7 +385,7 @@ bool god_id_item(item_def& item, bool silent)
if (is_weapon(item) || item.base_type == OBJ_ARMOUR)
ided |= ISFLAG_KNOW_PROPERTIES | ISFLAG_KNOW_TYPE;
- if (_jewel_auto_id(item))
+ if (item.base_type == OBJ_JEWELLERY)
ided |= ISFLAG_IDENT_MASK;
if (item.base_type == OBJ_ARMOUR