summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-06 14:12:01 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-06 14:12:01 +0000
commit527145300902fc9a74574b6188814abb05473acb (patch)
treed6ea3ca27ba8ed11846fecf176ac094c69a702d4 /crawl-ref/source/spells2.cc
parent75ac5233e92cd1ab525553cb736a92356a136574 (diff)
downloadcrawl-ref-527145300902fc9a74574b6188814abb05473acb.tar.gz
crawl-ref-527145300902fc9a74574b6188814abb05473acb.zip
Fix [2011576]: The "Which direction?" prompt is no longer given twice
for spells that are wrappers around burn_freeze() (e.g. Freeze). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6425 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc49
1 files changed, 20 insertions, 29 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 0c9d2244f9..34e7be81f5 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -888,39 +888,30 @@ char burn_freeze(int pow, beam_type flavour)
pow = std::min(25, pow);
- while (mgr == NON_MONSTER)
- {
- mpr("Which direction?", MSGCH_PROMPT);
- direction(spd, DIR_DIR, TARG_ENEMY);
-
- if (!spd.isValid)
- {
- canned_msg(MSG_OK);
- return (-1);
- }
+ mpr("Which direction?", MSGCH_PROMPT);
+ direction(spd, DIR_DIR, TARG_ENEMY);
- if (spd.isMe)
- {
- canned_msg(MSG_UNTHINKING_ACT);
- return (-1);
- }
+ if (!spd.isValid)
+ {
+ canned_msg(MSG_OK);
+ return (-1);
+ }
- mgr = mgrd[you.x_pos + spd.dx][you.y_pos + spd.dy];
+ if (spd.isMe)
+ {
+ canned_msg(MSG_UNTHINKING_ACT);
+ return (-1);
+ }
- // Yes, this is strange, but it does maintain the original
- // behaviour. Possibly to avoid giving information about
- // invisible monsters?
- if (mgr == NON_MONSTER)
- {
- mpr("There isn't anything close enough!");
- return (0);
- }
+ mgr = mgrd[you.x_pos + spd.dx][you.y_pos + spd.dy];
- if (trans_wall_blocking(spd.tx, spd.ty))
- {
- mpr("A translucent wall is in the way.");
- return (0);
- }
+ // Yes, this is strange, but it does maintain the original
+ // behaviour. Possibly to avoid giving information about invisible
+ // monsters?
+ if (mgr == NON_MONSTER)
+ {
+ mpr("There isn't anything close enough!");
+ return (0);
}
monsters *monster = &menv[mgr];