diff options
-rw-r--r-- | crawl-ref/source/beam.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/directn.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/spells1.cc | 32 | ||||
-rw-r--r-- | crawl-ref/source/spl-util.cc | 1 |
4 files changed, 21 insertions, 15 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index d63d6d8cfd..bc8f19d7f9 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3617,7 +3617,7 @@ static int _affect_player( bolt &beam, item_def *item ) if (beam.is_tracer) { // Check whether thrower can see player, unless thrower == player. - if (beam.thrower != KILL_YOU_MISSILE + if (beam.thrower != KILL_YOU_MISSILE && beam.thrower != KILL_YOU && (beam.can_see_invis || !you.invisible() || _fuzz_invis_tracer(beam))) { diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 6e395a802a..f9800d3a21 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -960,6 +960,7 @@ void direction(dist& moves, targeting_type restricts, && mode == TARG_ENEMY && !yesno("Really target yourself?", false, 'n')) { + mpr("not self-targetting"); mesclr(); show_prompt = true; } diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index a030b98b68..b90f3533cc 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -561,21 +561,25 @@ bool stinking_cloud( int pow, bolt &beem ) beem.is_beam = false; beem.aux_source.clear(); - // Fire tracer. - beem.source_x = you.x_pos; - beem.source_y = you.y_pos; - beem.can_see_invis = player_see_invis(); - beem.smart_monster = true; - beem.attitude = ATT_FRIENDLY; - beem.fr_count = 0; - beem.is_tracer = true; - fire_beam(beem); - - if (beem.fr_count > 0) + // Don't bother tracing if you're targetting yourself. + if (beem.target_x != you.x_pos || beem.target_y != you.y_pos) { - // We don't want to fire through friendlies. - canned_msg(MSG_OK); - return (false); + // Fire tracer. + beem.source_x = you.x_pos; + beem.source_y = you.y_pos; + beem.can_see_invis = player_see_invis(); + beem.smart_monster = true; + beem.attitude = ATT_FRIENDLY; + beem.fr_count = 0; + beem.is_tracer = true; + fire_beam(beem); + + if (beem.fr_count > 0) + { + // We don't want to fire through friendlies. + canned_msg(MSG_OK); + return (false); + } } // Really fire. diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index f308ca2f55..416a13b28f 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -770,6 +770,7 @@ bool spell_direction( dist &spelld, bolt &pbolt, if (!spelld.isValid) { // Check for user cancel. + mpr("user canceled"); canned_msg(MSG_OK); return (false); } |