diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-12 16:08:49 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-12 16:08:49 +0000 |
commit | b7fbb8da9606f9a8e1ad11ffd734827cb9baf911 (patch) | |
tree | 62865a51f96e1aee19da0a8088c36323debcf607 /crawl-ref/source/fight.cc | |
parent | db1637840912b714a5c3c636728e4d0f59e662b1 (diff) | |
download | crawl-ref-b7fbb8da9606f9a8e1ad11ffd734827cb9baf911.tar.gz crawl-ref-b7fbb8da9606f9a8e1ad11ffd734827cb9baf911.zip |
AutoID the curse status of a monster wielded cursed ranged weapon if said
monster is trying to hit you with it.
Don't give away what weapon a monster is carrying if it is not actually
wielding it, especially not in the form of "A goblin, wielding a sling."
that is shortly followed by "The goblin wields a sling." :p
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5763 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index be37c09cfb..d26d1ee36b 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -3911,6 +3911,13 @@ void melee_attack::mons_perform_attack_rounds() if (special_damage > 0) defender->hurt(attacker, special_damage); } + + item_def *weap = atk->mslot_item(MSLOT_WEAPON); + if (weap && weap->cursed() && is_range_weapon(*weap) + && !(weap->flags & ISFLAG_KNOW_CURSE)) + { + set_ident_flags( *weap, ISFLAG_KNOW_CURSE ); + } } } |