From 61bdb2932105d91f430a0e067a5022732f33355a Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 9 Aug 2007 20:28:33 +0000 Subject: Targetting changes: 1. when the current target is you, this is now shown 2. wraparound includes you for TARG_ANY and TARG_FRIEND (Unfortunately I can't get this to work for '-', so it only works in one direction.) 3. "... looks unstable" message moved to mstuff2 for consistency with the reversal message 4. teleportation is now of type TARG_ANY git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1986 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/direct.cc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/direct.cc') diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc index 3287e99d20..47b310f1f1 100644 --- a/crawl-ref/source/direct.cc +++ b/crawl-ref/source/direct.cc @@ -310,6 +310,11 @@ void direction(dist& moves, targeting_type restricts, { mprf(MSGCH_PROMPT, "%s (%s)", prompt? prompt : "Aim", target_mode_help_text(restricts)); + + if ((mode == TARG_ANY || mode == TARG_FRIEND) + && moves.tx == you.x_pos && moves.ty == you.y_pos) + terse_describe_square(moves.target()); + show_prompt = false; } @@ -972,12 +977,18 @@ static char find_square( int xps, int yps, { if (direction == 1 && temp_xps == minx && temp_yps == maxy) { - return find_square(ctrx, ctry, mfp, direction, find_targ, mode, + if (mode == TARG_ANY || mode == TARG_FRIEND) + { + mfp[0] = vyou.x; + mfp[1] = vyou.y; + return (1); + } + return find_square(ctrx, ctry, mfp, direction, find_targ, mode, false, next_los(direction, los, wrap)); } if (direction == -1 && temp_xps == ctrx && temp_yps == ctry) { - return find_square(minx, maxy, mfp, direction, find_targ, mode, + return find_square(minx, maxy, mfp, direction, find_targ, mode, false, next_los(direction, los, wrap)); } @@ -1610,7 +1621,10 @@ static std::string stair_destination_description(const coord_def &pos) static void describe_cell(int mx, int my) { bool mimic_item = false; - + + if (mx == you.x_pos && my == you.y_pos) + mpr("You."); + if (mgrd[mx][my] != NON_MONSTER) { int i = mgrd[mx][my]; -- cgit v1.2.3-54-g00ecf