summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-04 21:18:28 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-04 21:18:28 +0000
commitadf10d7dd27e29e7cfd6ce3d7d0a16fb29e6ce5c (patch)
tree3bea1eb6e474e58d0aa2ac78334259048bcae904 /crawl-ref/source/item_use.cc
parenta51373bd73dcf4a99fa895ad24508ce5af2d426a (diff)
downloadcrawl-ref-adf10d7dd27e29e7cfd6ce3d7d0a16fb29e6ce5c.tar.gz
crawl-ref-adf10d7dd27e29e7cfd6ce3d7d0a16fb29e6ce5c.zip
Fix 2815574: Venom card not waking monsters.
Fix 2815185: Not updating wield display for rotting chunks. Fix 2812496: Wrong message when attempting to chop with unwieldable weapons. (Small patch by rafalmaj.) Fix 2811476: Turn autopickup back on when gaining see invisible (mutation, ring, artefact, spell). Fix 2806314: Remove coinflip() for Sandblast range. Wielding rocks now guarantees range of 2. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10096 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 1e5addc822..49c6496b15 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3026,7 +3026,7 @@ bool thrown_object_destroyed(item_def *item, const coord_def& where,
void jewellery_wear_effects(item_def &item)
{
item_type_id_state_type ident = ID_TRIED_TYPE;
- artefact_prop_type fake_rap = ARTP_NUM_PROPERTIES;
+ artefact_prop_type fake_rap = ARTP_NUM_PROPERTIES;
bool learn_pluses = false;
// Randart jewellery shouldn't auto-ID just because the base type
@@ -3051,12 +3051,20 @@ void jewellery_wear_effects(item_def &item)
case RING_SUSTAIN_ABILITIES:
case RING_SUSTENANCE:
case RING_SLAYING:
- case RING_SEE_INVISIBLE:
case RING_WIZARDRY:
case RING_REGENERATION:
case RING_TELEPORT_CONTROL:
break;
+ case RING_SEE_INVISIBLE:
+ // We might have to turn autopickup back on again.
+ // TODO: Check all monsters in LOS. If any of them are invisible
+ // (and thus become visible once the ring is worn), the ring
+ // should be autoidentified.
+ if (item_type_known(item))
+ autotoggle_autopickup(false);
+ break;
+
case RING_PROTECTION:
you.redraw_armour_class = true;
if (item.plus != 0)
@@ -3328,6 +3336,14 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove,
prop_str += artefact_known_wpn_property(item, ARTP_STRENGTH);
prop_int += artefact_known_wpn_property(item, ARTP_INTELLIGENCE);
prop_dex += artefact_known_wpn_property(item, ARTP_DEXTERITY);
+
+ if (!remove && artefact_known_wpn_property(item, ARTP_EYESIGHT))
+ {
+ // We might have to turn autopickup back on again.
+ // This is not optimal, in that it could also happen if we do
+ // not know the property (in which case it should become known).
+ autotoggle_autopickup(false);
+ }
}
if (remove)