summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-30 23:12:21 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-30 23:12:21 +0000
commit54959c8ecce3dc814d03fd202f38ece80104f0db (patch)
treea67443814ae00bbe3060416f1b080eab01f7843d /crawl-ref/source/fight.cc
parenta3f51c4dbac537dfddbd90d4a8129fd82db8c9c5 (diff)
downloadcrawl-ref-54959c8ecce3dc814d03fd202f38ece80104f0db.tar.gz
crawl-ref-54959c8ecce3dc814d03fd202f38ece80104f0db.zip
Fix 2033055: only prompt for unsuitable weapons if you can see the target.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6735 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 8ae70f1a74..b5c480db48 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -4106,7 +4106,7 @@ bool you_attack(int monster_attacked, bool unarmed_attacks)
interrupt_activity(AI_HIT_MONSTER, defender);
// Check if the player is fighting with something unsuitable.
- if (!wielded_weapon_check(attk.weapon))
+ if (you.can_see(defender) && !wielded_weapon_check(attk.weapon))
{
you.turn_is_over = false;
return (false);