summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_spells.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2013-01-20 18:35:59 -0700
committerSteve Melenchuk <smelenchuk@gmail.com>2013-01-20 18:35:59 -0700
commitb4b189bfd0645a11f2c25c6fb702732516f5bb33 (patch)
treec236089b3c9baad8dc48ac186a606665b8b2e148 /crawl-ref/source/l_spells.cc
parent02f53164f5cb80a7a646302f439313af001ffe82 (diff)
downloadcrawl-ref-b4b189bfd0645a11f2c25c6fb702732516f5bb33.tar.gz
crawl-ref-b4b189bfd0645a11f2c25c6fb702732516f5bb33.zip
Prune duplicate code for LOS attack spells.
This commit merges the handling for Drain Life, Ozocubu's Refrigeration, and Olgreb's Toxic Radiance, which shared a lot of duplicate code, into one code path. This includes the player and monster implementations of these spells. Yes, this means monsters can now cast OTR (watch out for rods of venom!); the tweaks to allow ghosts to do this are in place as well. This changes the signature of the dlua function spells.toxic_radiance; as far as I am aware this function is not currently used anywhere. (Now, who wants to start work on Olgreb's Toxic Radiator?)
Diffstat (limited to 'crawl-ref/source/l_spells.cc')
-rw-r--r--crawl-ref/source/l_spells.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/l_spells.cc b/crawl-ref/source/l_spells.cc
index 31336fd8f8..2e522ae1c1 100644
--- a/crawl-ref/source/l_spells.cc
+++ b/crawl-ref/source/l_spells.cc
@@ -12,8 +12,12 @@
#include "env.h"
#include "spl-damage.h"
-LUAWRAP(_refrigeration, cast_refrigeration(luaL_checkint(ls, 1), true))
-LUAWRAP(_toxic_radiance, cast_toxic_radiance(true))
+LUAWRAP(_refrigeration,
+ cast_los_attack_spell(SPELL_OZOCUBUS_REFRIGERATION,
+ luaL_checkint(ls, 1), NULL, true))
+LUAWRAP(_toxic_radiance,
+ cast_los_attack_spell(SPELL_OLGREBS_TOXIC_RADIANCE,
+ luaL_checkint(ls, 1), NULL, true))
const struct luaL_reg spells_dlib[] =
{