diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-04 01:55:36 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-04 01:56:10 +0530 |
commit | cf82459f23b7c1ab62ad91bdb242a9d56081bbf4 (patch) | |
tree | 08049da318b189b4059de36c8d80e2e9d9cccaad /crawl-ref/source/mon-stuff.cc | |
parent | 25100ac4c4d4bfe7b28cee4c96a398b2ca400bef (diff) | |
download | crawl-ref-cf82459f23b7c1ab62ad91bdb242a9d56081bbf4.tar.gz crawl-ref-cf82459f23b7c1ab62ad91bdb242a9d56081bbf4.zip |
Fix two-weaponing monsters throwing their offhand weapon in combat.
Diffstat (limited to 'crawl-ref/source/mon-stuff.cc')
-rw-r--r-- | crawl-ref/source/mon-stuff.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index 1395161b51..43db612472 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -3337,10 +3337,12 @@ int mons_pick_best_missile(monsters *mons, item_def **launcher, if (launch && missiles && !missiles->launched_by(*launch)) launch = NULL; + const int n_usable_melee_weapons(mons_wields_two_weapons(mons) ? 2 : 1); const int tdam = mons_thrown_weapon_damage( melee, - melee_weapon_count == 1 && melee->quantity == 1); + melee_weapon_count == n_usable_melee_weapons + && melee->quantity == 1); const int fdam = mons_missile_damage(mons, launch, missiles); if (!tdam && !fdam) |