summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-05-15 06:19:37 +0200
committerBardur Arantsson <bardur@scientician.net>2012-05-15 06:34:29 +0200
commit6bd3fd4881765ec278b9c3896cd4cff15fe33265 (patch)
tree30ca5443aca9bc2190c04adf40c2bed201693cb5 /lib
parentf2163c387bfb5c8746e832a1f7e72355d19b40f0 (diff)
Lua: Move "Varda" spell functions to C
Diffstat (limited to 'lib')
-rw-r--r--lib/mods/theme/scpt/s_varda.lua75
1 files changed, 9 insertions, 66 deletions
diff --git a/lib/mods/theme/scpt/s_varda.lua b/lib/mods/theme/scpt/s_varda.lua
index f4f46a83..e20ea5e9 100644
--- a/lib/mods/theme/scpt/s_varda.lua
+++ b/lib/mods/theme/scpt/s_varda.lua
@@ -14,26 +14,8 @@ VARDA_LIGHT_VALINOR = add_spell
["piety"] = TRUE,
["stat"] = A_WIS,
["random"] = SKILL_SPIRITUALITY,
- ["spell"] = function()
- local obvious
- if get_level(VARDA_LIGHT_VALINOR, 50) >= 3 then
- obvious = lite_area(10, 4)
- else
- lite_room(player.py, player.px)
- obvious = TRUE
- end
- if get_level(VARDA_LIGHT_VALINOR, 50) >= 15 then
- obvious = is_obvious(fire_ball(GF_LITE, 0, 10 + get_level(VARDA_LIGHT_VALINOR, 100), 5 + get_level(GLOBELIGHT, 6)), obvious)
- end
- return obvious
- end,
- ["info"] = function()
- if get_level(VARDA_LIGHT_VALINOR, 50) >= 15 then
- return "dam "..(10 + get_level(VARDA_LIGHT_VALINOR, 100)).." rad "..(5 + get_level(VARDA_LIGHT_VALINOR, 6))
- else
- return ""
- end
- end,
+ ["spell"] = function() return varda_light_of_valinor_spell() end,
+ ["info"] = function() return varda_light_of_valinor_info() end,
["desc"] = {
"Lights a room",
"At level 3 it starts damaging monsters",
@@ -52,18 +34,8 @@ VARDA_CALL_ALMAREN = add_spell
["piety"] = TRUE,
["stat"] = A_WIS,
["random"] = SKILL_SPIRITUALITY,
- ["spell"] = function()
- local power = 5 * player.lev
- if (get_level(VARDA_CALL_ALMAREN) >= 20) then
- dispel_evil(power)
- else
- banish_evil(power)
- end
- return FALSE
- end,
- ["info"] = function()
- return ""
- end,
+ ["spell"] = function() return varda_call_of_almaren_spell() end,
+ ["info"] = function() return varda_call_of_almaren_info() end,
["desc"] = {
"Banishes evil beings",
"At level 20 it dispels evil beings",
@@ -81,22 +53,8 @@ VARDA_EVENSTAR = add_spell
["piety"] = TRUE,
["stat"] = A_WIS,
["random"] = SKILL_SPIRITUALITY,
- ["spell"] = function()
- if (get_level(VARDA_EVENSTAR) >= 40) then
- -- Enlightenment
- wiz_lite_extra()
- -- Identify
- identify_pack()
- -- Self knowledge
- self_knowledge()
- else
- wiz_lite_extra()
- end
- return FALSE
- end,
- ["info"] = function()
- return ""
- end,
+ ["spell"] = function() return varda_evenstar_spell() end,
+ ["info"] = function() return varda_evenstar_info() end,
["desc"] = {
"Maps and lights the whole level.",
"At level 40 it maps and lights the whole level,",
@@ -116,25 +74,10 @@ VARDA_STARKINDLER = add_spell
["piety"] = TRUE,
["stat"] = A_WIS,
["random"] = SKILL_SPIRITUALITY,
- ["spell"] = function()
- local power = player.lev / 5
- local ret, dir
-
- ret, dir = get_aim_dir()
-
- if ret == FALSE then return end
- for i = 1, power do
- fire_ball(GF_LITE, dir, 20 + get_level(VARDA_STARKINDLER, 100), 10)
- end
-
- return FALSE
- end,
- ["info"] = function()
- local power = player.lev / 5
- return "dam "..(20 + get_level(VARDA_STARKINDLER, 100)).." rad 10"
- end,
+ ["spell"] = function() return varda_star_kindler_spell() end,
+ ["info"] = function() return varda_star_kindler_info() end,
["desc"] = {
"Does multiple bursts of light damage.",
"The damage increases with level.",
}
-} \ No newline at end of file
+}