summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-26 04:43:58 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-26 04:43:58 +0000
commit7124f889e3c585947d594aa38be346bc87c08069 (patch)
tree40f1109c243083f31c69f4cd4f545a638833c194 /crawl-ref/source/spells2.cc
parent8921c5b2703c3aa590026bbc8052ba129b6fc02c (diff)
downloadcrawl-ref-7124f889e3c585947d594aa38be346bc87c08069.tar.gz
crawl-ref-7124f889e3c585947d594aa38be346bc87c08069.zip
Simplify checks for grids containing water.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8763 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 57f399338f..2b4f7c7641 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1400,9 +1400,7 @@ bool cast_summon_elemental(int pow, god_type god,
{
mon = MONS_FIRE_ELEMENTAL;
}
- else if ((grd(targ) == DNGN_DEEP_WATER
- || grd(targ) == DNGN_SHALLOW_WATER
- || grd(targ) == DNGN_FOUNTAIN_BLUE)
+ else if (grid_is_watery(grd(targ))
&& (any_elemental || restricted_type == MONS_WATER_ELEMENTAL))
{
mon = MONS_WATER_ELEMENTAL;