diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-11 13:21:31 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-11 13:21:31 +0000 |
commit | c6faa051c8f0f48d5922f9134e611d9ee675162d (patch) | |
tree | 9cf7e520bcbac621f7143952450253f1fbeb4d39 /crawl-ref/source/directn.cc | |
parent | 8af56c9f2d1a3e2ef9dbeae0b47263b47f00be42 (diff) | |
download | crawl-ref-c6faa051c8f0f48d5922f9134e611d9ee675162d.tar.gz crawl-ref-c6faa051c8f0f48d5922f9134e611d9ee675162d.zip |
Add lm_props.lua and appry recent commits.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6494 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 54150223eb..ba9bf9fe5c 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -472,7 +472,7 @@ 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, - targeting_behaviour *beh) + targeting_behaviour *beh, bool cancel_at_self) { static targeting_behaviour stock_behaviour; if (!beh) @@ -1049,12 +1049,16 @@ void direction(dist& moves, targeting_type restricts, if (moves.isTarget && moves.tx == you.x_pos && moves.ty == you.y_pos && mode == TARG_ENEMY - && (Options.allow_self_target == CONFIRM_CANCEL - || (Options.allow_self_target == CONFIRM_PROMPT - && !yesno("Really target yourself?", false, 'n')))) + && (cancel_at_self + || Options.allow_self_target == CONFIRM_CANCEL + || Options.allow_self_target == CONFIRM_PROMPT + && !yesno("Really target yourself?", false, 'n'))) { - if (Options.allow_self_target == CONFIRM_CANCEL ) + if (cancel_at_self) + mpr("Sorry, you can't target yourself."); + else if (Options.allow_self_target == CONFIRM_CANCEL) mpr("That would be overly suicidal.", MSGCH_EXAMINE_FILTER); + show_prompt = true; } else if (moves.isTarget && !see_grid(moves.tx, moves.ty)) |