From e711d4b1bb15d82886af6fbf557d63e74f2b5fd0 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 25 Dec 2009 13:22:48 +1000 Subject: 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. --- crawl-ref/source/l_spells.cc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 crawl-ref/source/l_spells.cc (limited to 'crawl-ref/source/l_spells.cc') 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 } +}; + -- cgit v1.2.3-54-g00ecf