diff options
author | Charles Otto <ottochar@gmail.com> | 2009-11-01 11:48:17 -0500 |
---|---|---|
committer | Charles Otto <ottochar@gmail.com> | 2009-11-01 11:51:33 -0500 |
commit | 44d5908a94d4297ad52c3c7d55651c1ad1bce3b3 (patch) | |
tree | e4bdd0e8628851f249535cc3e7d609568e084ce3 /crawl-ref/source/it_use3.cc | |
parent | bd9981c0122c1161ba481469751f2bb852856f41 (diff) | |
download | crawl-ref-44d5908a94d4297ad52c3c7d55651c1ad1bce3b3.tar.gz crawl-ref-44d5908a94d4297ad52c3c7d55651c1ad1bce3b3.zip |
Lantern of shadows conduct issues (eronarn)
ID the lantern of shadows when it first creatures a shadow, consider
that first shadow an unintentional act for conduct purposes.
Diffstat (limited to 'crawl-ref/source/it_use3.cc')
-rw-r--r-- | crawl-ref/source/it_use3.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc index f059f78805..d05cab0499 100644 --- a/crawl-ref/source/it_use3.cc +++ b/crawl-ref/source/it_use3.cc @@ -147,7 +147,26 @@ void shadow_lantern_effect() { create_monster(mgen_data(MONS_SHADOW, BEH_FRIENDLY, 2, 0, you.pos(), MHITYOU)); - did_god_conduct(DID_NECROMANCY, 1); + + item_def * lantern = you.weapon(); + + // This should only get called when we are wielding a lantern + // of shadows. + ASSERT(lantern && lantern->base_type ==OBJ_MISCELLANY + && lantern->sub_type == MISC_LANTERN_OF_SHADOWS); + + bool known = fully_identified(*lantern); + did_god_conduct(DID_NECROMANCY, 1, known); + + // ID the lantern and refresh the weapon display + if(!known) + { + set_ident_type(*lantern, ID_KNOWN_TYPE); + set_ident_flags(*lantern, ISFLAG_IDENT_MASK); + + you.wield_change = true; + } + } } |