summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_spells.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-12-25 13:22:48 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-12-25 13:22:48 +1000
commite711d4b1bb15d82886af6fbf557d63e74f2b5fd0 (patch)
tree2d52b0ebf028be58db570f87e7282d0ff1fbb6f4 /crawl-ref/source/l_spells.cc
parent750012d6a9fc992d5651acd58a4eaff69dac106c (diff)
downloadcrawl-ref-e711d4b1bb15d82886af6fbf557d63e74f2b5fd0.tar.gz
crawl-ref-e711d4b1bb15d82886af6fbf557d63e74f2b5fd0.zip
A start at a dLua spells library.
Provides wrappers for non-player Toxic Radiance and Ozocubu's Refrigeration. These are basically just an adjustment of kill categories and messages to allow them to be used as background effects in WizLabs (Ozocubu's and Olgreb's). Hopefully a wrapper for monster (and possibly player)-cast bolt structures can also be included, which could then be accessed with the (planned) Lua traps functionality.
Diffstat (limited to 'crawl-ref/source/l_spells.cc')
-rw-r--r--crawl-ref/source/l_spells.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/crawl-ref/source/l_spells.cc b/crawl-ref/source/l_spells.cc
new file mode 100644
index 0000000000..8e5c2feffa
--- /dev/null
+++ b/crawl-ref/source/l_spells.cc
@@ -0,0 +1,30 @@
+/*
+ * File: l_spells.cc
+ * Summary: Boolean feat-related functions lua library "feat".
+ */
+
+#include "AppHdr.h"
+
+#include "clua.h"
+#include "cluautil.h"
+#include "l_libs.h"
+
+#include "coord.h"
+#include "dungeon.h"
+#include "env.h"
+#include "spells1.h"
+#include "spells2.h"
+#include "spells3.h"
+#include "spells4.h"
+#include "terrain.h"
+
+LUAWRAP(_refrigeration, cast_refrigeration(luaL_checkint(ls, 1), true))
+LUAWRAP(_toxic_radiance, cast_toxic_radiance(true))
+
+const struct luaL_reg spells_dlib[] =
+{
+{ "refrigeration", _refrigeration },
+{ "toxic_radiance", _toxic_radiance },
+{ NULL, NULL }
+};
+