diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-28 23:00:12 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-28 23:00:12 +0000 |
commit | ca1e897a646bb9c098a1fc651a3b4aa6c976ddc7 (patch) | |
tree | dbf6313bff2e2906a4f9ee61fdefff8594849522 /crawl-ref/source/directn.cc | |
parent | 0f8c8527e5a685509462e0990a7b6ec6595e445a (diff) | |
download | crawl-ref-ca1e897a646bb9c098a1fc651a3b4aa6c976ddc7.tar.gz crawl-ref-ca1e897a646bb9c098a1fc651a3b4aa6c976ddc7.zip |
Apply r6640, r6694 (both by Darshan), r6670 (Haran), r6679 and r6703
(me) to branch.
Includes TSO no longer granting permanent allies and resultant friendly
pickup change, and a number of smaller changes.
Also update change log.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6709 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 9652a978ea..77ee90a963 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -471,7 +471,8 @@ static void _fill_monster_list(bool full_info) void direction(dist& moves, targeting_type restricts, targ_mode_type mode, int range, bool just_looking, - bool needs_path, bool may_target_monster, const char *prompt, + bool needs_path, bool may_target_monster, + bool may_target_self, const char *prompt, targeting_behaviour *beh, bool cancel_at_self) { if (!beh) @@ -1064,13 +1065,19 @@ void direction(dist& moves, targeting_type restricts, && mode == TARG_ENEMY && (cancel_at_self || Options.allow_self_target == CONFIRM_CANCEL - || Options.allow_self_target == CONFIRM_PROMPT - && !yesno("Really target yourself?", false, 'n'))) + && !may_target_self + || (Options.allow_self_target == CONFIRM_PROMPT + || Options.allow_self_target == CONFIRM_CANCEL + && may_target_self) + && !yesno("Really target yourself?", false, 'n'))) { if (cancel_at_self) mpr("Sorry, you can't target yourself."); - else if (Options.allow_self_target == CONFIRM_CANCEL) + else if (Options.allow_self_target == CONFIRM_CANCEL + && !may_target_self) + { mpr("That would be overly suicidal.", MSGCH_EXAMINE_FILTER); + } show_prompt = true; } |