summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-01 12:39:38 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-01 12:39:38 +0000
commitae5abcdab69c7caa0570e98378f864aaf07096d0 (patch)
tree60c4390c208eb9d2d13584760bd5391c79f3d009 /crawl-ref/source/fight.cc
parentf6ec4c4fbdcfbc223d6490c783142311e9d5021c (diff)
downloadcrawl-ref-ae5abcdab69c7caa0570e98378f864aaf07096d0.tar.gz
crawl-ref-ae5abcdab69c7caa0570e98378f864aaf07096d0.zip
[1612448] Allow polearm users to attack monster submerged in shallow water.
Need to update the AI so the monster either flees or unsubmerges and fights. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1501 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 8eca25a856..1d50aecdcd 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -336,6 +336,9 @@ void melee_attack::init_attack()
attacker_visible = attacker->visible();
defender_visible = defender && defender->visible();
needs_message = attacker_visible || defender_visible;
+
+ if (defender && defender->submerged())
+ unarmed_ok = false;
}
std::string melee_attack::actor_name(const actor *a,