summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/it_use2.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-12 02:34:19 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-12 02:34:19 +0000
commita65641377f410600bc70b06ef39ce6010d631d41 (patch)
tree25eb95256901e0d9dcf37eaadd51bac4f2f74718 /crawl-ref/source/it_use2.cc
parentaf9d6c8e0e2e3f58d255449716ad7875cde5ae07 (diff)
downloadcrawl-ref-a65641377f410600bc70b06ef39ce6010d631d41.tar.gz
crawl-ref-a65641377f410600bc70b06ef39ce6010d631d41.zip
Amulet of controlled flight also IDs when being put on while levitating.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7221 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/it_use2.cc')
-rw-r--r--crawl-ref/source/it_use2.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index 84942b6f72..9ea96cb109 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -169,17 +169,19 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known )
if (!player_is_airborne())
mpr("You gently float upwards from the floor.");
- // Amulets can auto-ID.
- // FIXME: should also happen when putting on/removing amulet
- // while levitating.
+ // Amulet of Controlled Flight can auto-ID.
if (!you.duration[DUR_LEVITATION]
&& wearing_amulet(AMU_CONTROLLED_FLIGHT)
&& !extrinsic_amulet_effect(AMU_CONTROLLED_FLIGHT))
{
item_def& amu(you.inv[you.equip[EQ_AMULET]]);
- set_ident_type(amu.base_type, amu.sub_type, ID_KNOWN_TYPE);
- set_ident_flags(amu, ISFLAG_KNOW_PROPERTIES);
- mprf("You are wearing: %s", amu.name(DESC_INVENTORY_EQUIP).c_str());
+ if (!is_artefact(amu))
+ {
+ set_ident_type(amu.base_type, amu.sub_type, ID_KNOWN_TYPE);
+ set_ident_flags(amu, ISFLAG_KNOW_PROPERTIES);
+ mprf("You are wearing: %s",
+ amu.name(DESC_INVENTORY_EQUIP).c_str());
+ }
}
you.duration[DUR_LEVITATION] += 25 + random2(pow);