diff options
-rw-r--r-- | crawl-ref/source/it_use2.cc | 14 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 8 |
2 files changed, 16 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); diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 40e3ba032e..3d6c9c6f24 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2821,6 +2821,14 @@ void jewellery_wear_effects(item_def &item) case AMU_THE_GOURMAND: you.duration[DUR_GOURMAND] = 0; break; + + case AMU_CONTROLLED_FLIGHT: + if (you.duration[DUR_LEVITATION] + && !extrinsic_amulet_effect(AMU_CONTROLLED_FLIGHT)) + { + ident = ID_KNOWN_TYPE; + } + break; } // Artefacts have completely different appearance than base types |