From 524c0714a8d8f48ec3f693f39fac1bc1b5b316ad Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sat, 19 May 2012 12:03:08 +0200 Subject: Lua: Move Geomancy spell dependency functions to C --- lib/mods/theme/scpt/s_geom.lua | 16 ++++------------ lib/scpt/s_geom.lua | 16 ++++------------ 2 files changed, 8 insertions(+), 24 deletions(-) (limited to 'lib') diff --git a/lib/mods/theme/scpt/s_geom.lua b/lib/mods/theme/scpt/s_geom.lua index d4ce4437..d250f38d 100644 --- a/lib/mods/theme/scpt/s_geom.lua +++ b/lib/mods/theme/scpt/s_geom.lua @@ -83,9 +83,7 @@ VAPORIZE = add_spell ["blind"] = FALSE, -- Must have at least 4 Air ["random"] = 0, - ["depend"] = function() - if get_skill(SKILL_AIR) >= 4 then return TRUE end - end, + ["depend"] = function() return geomancy_vaporize_depends() end, ["spell"] = function() return geomancy_vaporize() end, ["info"] = function() return geomancy_vaporize_info() end, ["desc"] = { @@ -105,9 +103,7 @@ GEOLYSIS = add_spell ["blind"] = FALSE, ["random"] = 0, -- Must have at least 7 Earth - ["depend"] = function() - if get_skill(SKILL_EARTH) >= 7 then return TRUE end - end, + ["depend"] = function() return geomancy_geolysis_depends() end, ["spell"] = function() return geomancy_geolysis() end, ["info"] = function() return geomancy_geolysis_info() end, ["desc"] = { @@ -128,9 +124,7 @@ DRIPPING_TREAD = add_spell ["blind"] = FALSE, ["random"] = 0, -- Must have at least 10 Water - ["depend"] = function() - if get_skill(SKILL_WATER) >= 10 then return TRUE end - end, + ["depend"] = function() return geomancy_dripping_tread_depends() end, ["spell"] = function() return geomancy_dripping_tread() end, ["info"] = function() return geomancy_dripping_tread_info() end, ["desc"] = { @@ -150,9 +144,7 @@ GROW_BARRIER = add_spell ["blind"] = FALSE, ["random"] = 0, -- Must have at least 12 Earth - ["depend"] = function() - if get_skill(SKILL_EARTH) >= 12 then return TRUE end - end, + ["depend"] = function() return geomancy_grow_barrier_depends() end, ["spell"] = function() return geomancy_grow_barrier() end, ["info"] = function() return geomancy_grow_barrier_info() end, ["desc"] = { diff --git a/lib/scpt/s_geom.lua b/lib/scpt/s_geom.lua index d4ce4437..d250f38d 100644 --- a/lib/scpt/s_geom.lua +++ b/lib/scpt/s_geom.lua @@ -83,9 +83,7 @@ VAPORIZE = add_spell ["blind"] = FALSE, -- Must have at least 4 Air ["random"] = 0, - ["depend"] = function() - if get_skill(SKILL_AIR) >= 4 then return TRUE end - end, + ["depend"] = function() return geomancy_vaporize_depends() end, ["spell"] = function() return geomancy_vaporize() end, ["info"] = function() return geomancy_vaporize_info() end, ["desc"] = { @@ -105,9 +103,7 @@ GEOLYSIS = add_spell ["blind"] = FALSE, ["random"] = 0, -- Must have at least 7 Earth - ["depend"] = function() - if get_skill(SKILL_EARTH) >= 7 then return TRUE end - end, + ["depend"] = function() return geomancy_geolysis_depends() end, ["spell"] = function() return geomancy_geolysis() end, ["info"] = function() return geomancy_geolysis_info() end, ["desc"] = { @@ -128,9 +124,7 @@ DRIPPING_TREAD = add_spell ["blind"] = FALSE, ["random"] = 0, -- Must have at least 10 Water - ["depend"] = function() - if get_skill(SKILL_WATER) >= 10 then return TRUE end - end, + ["depend"] = function() return geomancy_dripping_tread_depends() end, ["spell"] = function() return geomancy_dripping_tread() end, ["info"] = function() return geomancy_dripping_tread_info() end, ["desc"] = { @@ -150,9 +144,7 @@ GROW_BARRIER = add_spell ["blind"] = FALSE, ["random"] = 0, -- Must have at least 12 Earth - ["depend"] = function() - if get_skill(SKILL_EARTH) >= 12 then return TRUE end - end, + ["depend"] = function() return geomancy_grow_barrier_depends() end, ["spell"] = function() return geomancy_grow_barrier() end, ["info"] = function() return geomancy_grow_barrier_info() end, ["desc"] = { -- cgit v1.2.3