diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-06 11:21:22 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-06 11:21:22 +0000 |
commit | 3d14b002a1cf073450422eead92a4da28a53358f (patch) | |
tree | e87b47aca4243213d599408b23e65f1288bef55a /crawl-ref/source/beam.cc | |
parent | 42a060526313b539a8bcbc05aec8f2c7cd4e6457 (diff) | |
download | crawl-ref-3d14b002a1cf073450422eead92a4da28a53358f.tar.gz crawl-ref-3d14b002a1cf073450422eead92a4da28a53358f.zip |
Allow enchantments to affect wall monsters.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9346 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 810ff042a9..9dc223b63e 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1332,17 +1332,20 @@ static void _zappy(zap_type z_type, int power, bolt &pbolt) // electricity. bool bolt::can_affect_wall_monster(const monsters* mon) const { + if (is_enchantment()) + return (true); + const bool superconductor = (grd(mon->pos()) == DNGN_METAL_WALL && flavour == BEAM_ELECTRICITY); if (mons_wall_shielded(mon) && !superconductor) return (false); + if (!is_explosion && !is_big_cloud) + return (true); + if (is_bouncy(grd(mon->pos()))) return (false); - if (is_enchantment() || (!is_explosion && !is_big_cloud)) - return (true); - return (false); } |