diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-09 20:28:33 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-09 20:28:33 +0000 |
commit | 61bdb2932105d91f430a0e067a5022732f33355a (patch) | |
tree | 6a591291ddb2e6fb4c95932fd073a3e240814385 /crawl-ref/source/direct.cc | |
parent | 7aad8aac57d72150fcdfc133f18462675467b729 (diff) | |
download | crawl-ref-61bdb2932105d91f430a0e067a5022732f33355a.tar.gz crawl-ref-61bdb2932105d91f430a0e067a5022732f33355a.zip |
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
Diffstat (limited to 'crawl-ref/source/direct.cc')
-rw-r--r-- | crawl-ref/source/direct.cc | 20 |
1 files changed, 17 insertions, 3 deletions
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]; |