diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-06 21:21:30 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-06 21:21:30 +0000 |
commit | 7d423aef8123a887cb2d3188206aeea9b628bd84 (patch) | |
tree | 9c856fc3d14000851951b7920c20011f72c6e5d2 /crawl-ref/source/directn.cc | |
parent | 44d7fbb36c55859117824fe25a298afbe437221b (diff) | |
download | crawl-ref-7d423aef8123a887cb2d3188206aeea9b628bd84.tar.gz crawl-ref-7d423aef8123a887cb2d3188206aeea9b628bd84.zip |
Fix 2011722: Reallow targetting beams such that you may be hit. (There's
a new prompt now, but don't prompt a second time if you already
confirmed another one before.)
Fix some issues when creating items in the Abyss during GDT_GAME_START.
This may or may not have played a role in 2008976.
Lower spawning rate in the Abyss during GDT_GAME_START (10% spawning
chance instead of guaranteed spawning per 5 turns).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6434 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 164d59c673..0729331445 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1057,15 +1057,17 @@ void direction(dist& moves, targeting_type restricts, mpr("That would be overly suicidal.", MSGCH_EXAMINE_FILTER); show_prompt = true; } - else if ( moves.isTarget && !see_grid(moves.tx, moves.ty) ) + else if (moves.isTarget && !see_grid(moves.tx, moves.ty)) { mpr("Sorry, you can't target what you can't see.", MSGCH_EXAMINE_FILTER); } // Ask for confirmation if we're quitting for some odd reason. - else if ( moves.isValid || moves.isCancel - || yesno("Are you sure you want to fizzle?", false, 'n') ) + else if (moves.isValid || moves.isCancel + || yesno("Are you sure you want to fizzle?", false, 'n')) { + mpr("We're done.", MSGCH_DIAGNOSTICS); + // Finalize whatever is inside the loop // (moves-internal finalizations can be done later). moves.choseRay = show_beam; @@ -1098,11 +1100,11 @@ void direction(dist& moves, targeting_type restricts, if (have_moved) { // If the target x,y has changed, the beam must have changed. - if ( show_beam ) + if (show_beam) need_beam_redraw = true; - if ( !skip_iter ) // don't clear before we get a chance to see - mesclr(true); // maybe not completely necessary + if (!skip_iter) // Don't clear before we get a chance to see. + mesclr(true); // Maybe not completely necessary. terse_describe_square(moves.target()); } @@ -1125,13 +1127,14 @@ void direction(dist& moves, targeting_type restricts, // Draw the new ray with magenta '*'s, not including // your square or the target square. ray_def raycopy = ray; // temporary copy to work with - while ( raycopy.pos() != moves.target() ) + while (raycopy.pos() != moves.target()) { - if ( raycopy.pos() != you.pos() ) + if (raycopy.pos() != you.pos()) { // Sanity: don't loop forever if the ray is problematic - if ( !in_los(raycopy.x(), raycopy.y()) ) + if (!in_los(raycopy.x(), raycopy.y())) break; + draw_ray_glyph(raycopy.pos(), MAGENTA, '*', MAGENTA | COLFLAG_REVERSE); } |