summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 10:38:05 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 10:38:05 +0000
commit111787503763e9d3eeb4eef2248926bf4a4eeb98 (patch)
tree8af6fcd44ef05ff7cb092dfe3084c13f58e3ba74 /crawl-ref/source/effects.cc
parenta7ba97bc95fa25180bd402a52943f223da2bf04a (diff)
downloadcrawl-ref-111787503763e9d3eeb4eef2248926bf4a4eeb98.tar.gz
crawl-ref-111787503763e9d3eeb4eef2248926bf4a4eeb98.zip
More cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6669 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 3534df0588..baaecf2767 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -105,7 +105,7 @@ int holy_word_player(int pow, int caster)
return 1;
}
-int holy_word_monsters(int x, int y, int pow, int caster)
+int holy_word_monsters(coord_def where, int pow, int caster)
{
int retval = 0;
@@ -113,11 +113,11 @@ int holy_word_monsters(int x, int y, int pow, int caster)
pow = std::min(300, pow);
// Is the player in this cell?
- if (x == you.x_pos && y == you.y_pos)
+ if (where == you.pos())
retval = holy_word_player(pow, caster);
// Is a monster in this cell?
- int mon = mgrd[x][y];
+ int mon = mgrd(where);
if (mon == NON_MONSTER)
return retval;
@@ -162,12 +162,12 @@ int holy_word_monsters(int x, int y, int pow, int caster)
return retval;
}
-int holy_word(int pow, int caster, int x, int y, bool silent)
+int holy_word(int pow, int caster, const coord_def& where, bool silent)
{
if (!silent)
mpr("You speak a Word of immense power!");
- return apply_area_within_radius(holy_word_monsters, x, y, pow, 8, caster);
+ return apply_area_within_radius(holy_word_monsters, where, pow, 8, caster);
}
int torment_player(int pow, int caster)
@@ -234,18 +234,18 @@ int torment_player(int pow, int caster)
// maximum power of 1000, high level monsters and characters would save
// too often. (GDL)
-int torment_monsters(int x, int y, int pow, int caster)
+int torment_monsters(coord_def where, int pow, int caster)
{
UNUSED(pow);
int retval = 0;
// Is the player in this cell?
- if (x == you.x_pos && y == you.y_pos)
+ if (where == you.pos())
retval = torment_player(0, caster);
// Is a monster in this cell?
- int mon = mgrd[x][y];
+ int mon = mgrd(where);
if (mon == NON_MONSTER)
return retval;
@@ -276,9 +276,9 @@ int torment_monsters(int x, int y, int pow, int caster)
return retval;
}
-int torment(int caster, int x, int y)
+int torment(int caster, const coord_def& where)
{
- return apply_area_within_radius(torment_monsters, x, y, 0, 8, caster);
+ return apply_area_within_radius(torment_monsters, where, 0, 8, caster);
}
static std::string _who_banished(const std::string &who)