diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-12-11 11:32:52 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-12-11 11:32:52 +0100 |
commit | ec0ce305e87b8a69378fa58cc1dbec652bcc0d1a (patch) | |
tree | 3010a3805fa717184ccbf365aafcc74c6ec27723 /crawl-ref/source/dungeon.cc | |
parent | 54c2ea1ac1ceb7926f2d489e1cbcc7e9a28f990a (diff) | |
download | crawl-ref-ec0ce305e87b8a69378fa58cc1dbec652bcc0d1a.tar.gz crawl-ref-ec0ce305e87b8a69378fa58cc1dbec652bcc0d1a.zip |
If we explicitely give mon a ranged weapon, pre-wield it.
This already is the case for weapons generated by default.
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index aab2d4e0e4..0926c5f9ce 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -4875,6 +4875,10 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec, destroy_item(item_made, true); } } + + // Pre-wield ranged weapons. + if (mon.inv[MSLOT_WEAPON] == NON_ITEM && mon.inv[MSLOT_ALT_WEAPON] != NON_ITEM) + mon.swap_weapons(false); } |