diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-20 10:07:45 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-20 10:07:45 +0000 |
commit | 82abef2e72f839e3d3b75ec771cdfe8219761b20 (patch) | |
tree | 242d406f409e94f250fc2f3af1d60e9599dd7268 /crawl-ref/source/spl-cast.cc | |
parent | d7f1dd21aacab1548caf9315b035a5cedab29c5f (diff) | |
download | crawl-ref-82abef2e72f839e3d3b75ec771cdfe8219761b20.tar.gz crawl-ref-82abef2e72f839e3d3b75ec771cdfe8219761b20.zip |
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
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 12 |
1 files changed, 6 insertions, 6 deletions
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."); |