From 82abef2e72f839e3d3b75ec771cdfe8219761b20 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 20 May 2008 10:07:45 +0000 Subject: Fix monsters capable of LOS attack behind glass walls being ignored. Fix monsters behind glass walls being autotargetted for spells that need a path. Fix spacing in spl-data.h, and add some comments about commenting to coding_conventions.txt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5148 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-cast.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/spl-cast.cc') diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 718efc2675..6f69da5c9e 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -976,16 +976,16 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) else if (dir == DIR_DIR) mpr(prompt? prompt : "Which direction? ", MSGCH_PROMPT); - const bool needs_path = - !(testbits(flags, SPFLAG_GRID) || testbits(flags, SPFLAG_TARGET)); + const bool needs_path = (!testbits(flags, SPFLAG_GRID) + && !testbits(flags, SPFLAG_TARGET)); - if ( !spell_direction( spd, beam, dir, targ, needs_path, prompt ) ) + if (!spell_direction( spd, beam, dir, targ, needs_path, prompt )) return (SPRET_ABORT); if (testbits( flags, SPFLAG_NOT_SELF ) && spd.isMe) { if (spell == SPELL_TELEPORT_OTHER || spell == SPELL_HEAL_OTHER - || spell == SPELL_POLYMORPH_OTHER) + || spell == SPELL_POLYMORPH_OTHER) { mpr( "Sorry, this spell works on others only." ); } @@ -2188,7 +2188,7 @@ static void _miscast_conjuration(int severity, const char* cause) beam.aux_source.clear(); if (cause) beam.aux_source = cause; - beam.ex_size = coinflip()?1:2; + beam.ex_size = coinflip() ? 1 : 2; beam.is_explosion = true; explosion(beam); @@ -2689,7 +2689,7 @@ static void _miscast_divination(int severity, const char* cause) { case 0: mpr( forget_spell() ? "You have forgotten a spell!" - : "You get a splitting headache." ); + : "You get a splitting headache." ); break; case 1: mpr("You feel completely lost."); -- cgit v1.2.3-54-g00ecf