diff options
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 02fd4582fc..6b7e417277 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1044,14 +1044,17 @@ void direction(dist& moves, targeting_type restricts, // A bunch of confirmation tests; if we survive them all, // then break out. - // Confirm self-targeting on TARG_ENEMY. + // Confirm self-targeting on TARG_ENEMY (option-controlled.) // Conceivably we might want to confirm on TARG_ANY too. if (moves.isTarget && moves.tx == you.x_pos && moves.ty == you.y_pos && mode == TARG_ENEMY - && !yesno("Really target yourself?", false, 'n')) + && (Options.allow_self_target == CONFIRM_CANCEL + || (Options.allow_self_target == CONFIRM_PROMPT + && !yesno("Really target yourself?", false, 'n')))) { - mesclr(); + 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) ) |