diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-17 08:11:52 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-17 08:11:52 +0000 |
commit | 0ffe1315339223ae3b68b79ff2a68fbb3665a865 (patch) | |
tree | 8c8be438e0787879fdb07c622b09399236e5c822 /crawl-ref/source/mon-util.cc | |
parent | 0a69a524938f8c559947685b901abdb22043925b (diff) | |
download | crawl-ref-0ffe1315339223ae3b68b79ff2a68fbb3665a865.tar.gz crawl-ref-0ffe1315339223ae3b68b79ff2a68fbb3665a865.zip |
Apply Haran's fixes (r6577) to 0.4.1.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6582 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 0a80500e7e..a664852bcd 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3190,7 +3190,12 @@ item_def *monsters::launcher() item_def *monsters::weapon(int which_attack) { - if (which_attack > 1) + const mon_attack_def attk = mons_attack_spec(this, which_attack); + if ( attk.type != AT_HIT ) + return NULL; + + // Even/odd attacks use main/offhand weapon + if ( which_attack > 1 ) which_attack &= 1; // This randomly picks one of the wielded weapons for monsters that can use |