diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2009-12-25 11:10:30 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-12-25 11:10:30 +1000 |
commit | 701f0d3bae53d22d476eeec3d85ee02a26623a66 (patch) | |
tree | 9a63eccee1387fda14b480353d20156f8588dc75 /crawl-ref/source/travel.cc | |
parent | fe8e010a8490d8ae9ec26f997a78e869039d382f (diff) | |
download | crawl-ref-701f0d3bae53d22d476eeec3d85ee02a26623a66.tar.gz crawl-ref-701f0d3bae53d22d476eeec3d85ee02a26623a66.zip |
Make auto-travel killing toadstools saner.
Use wielded_weapon_check, though in this instance do not print a prompt.
This means that if you have previously been asked about your weapon and
say yes, it will kill toadstools while autoexploring.
This means no more "Really attack while wielding your bow?" prompts, and
it also should obey no-attack/etc inscriptions.
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r-- | crawl-ref/source/travel.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 6da7bc6ee0..28b593d97a 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -24,6 +24,7 @@ #include "directn.h" #include "map_knowledge.h" #include "exclude.h" +#include "fight.h" #include "godabil.h" #include "itemname.h" #include "itemprop.h" @@ -2208,6 +2209,9 @@ static travel_target _prompt_travel_depth(const level_id &id, bool travel_kill_monster(const monsters * monster) { + if (!wielded_weapon_check(you.weapon(), true)) + return (false); + return (monster->type == MONS_TOADSTOOL); } |