summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-05 20:55:25 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-07 15:28:25 +0200
commitc92f7bf932d6e36c1aecd704a2a69d742ef7748d (patch)
treefbcc218187413a4e734d54de12194e53a9f00224 /lib
parentbfa8fa32382c89259dbf4f9301b316b7e0239344 (diff)
Lua: Remove HOOK_GF_EXEC and HOOK_GF_COLOR
Diffstat (limited to 'lib')
-rw-r--r--lib/core/s_aux.lua29
-rw-r--r--lib/mods/theme/core/s_aux.lua29
-rw-r--r--lib/mods/theme/scpt/gods_new.lua16
-rw-r--r--lib/mods/theme/scpt/mkeys.lua16
-rw-r--r--lib/mods/theme/scpt/s_geom.lua20
-rw-r--r--lib/scpt/mkeys.lua16
-rw-r--r--lib/scpt/s_geom.lua20
7 files changed, 0 insertions, 146 deletions
diff --git a/lib/core/s_aux.lua b/lib/core/s_aux.lua
index 29b22fd7..97643626 100644
--- a/lib/core/s_aux.lua
+++ b/lib/core/s_aux.lua
@@ -621,32 +621,3 @@ end
function activate_activation(spl, item)
__spell_spell[spl](item)
end
-
-
-------- Add new GF type ----------
-max_gf = MAX_GF
-function add_spell_type(t)
- t.index = max_gf
- max_gf = max_gf + 1
- assert(t.color, "No GF color")
- if not t.monster then t.monster = function() end end
- if not t.angry then t.angry = function() end end
- if not t.object then t.object = function() end end
- if not t.player then t.player = function() end end
- if not t.grid then t.grid = function() end end
-
- add_hooks
- {
- [HOOK_GF_COLOR] = function (gf, new_gfx)
- local t = %t
- if gf == t.index then return TRUE, t.color[new_gfx + 1] end
- end,
- [HOOK_GF_EXEC] = function (action, who, gf, dam, rad, y, x, extra)
- local t = %t
- if t.index == gf then
- return t[action](who, dam, rad, y, x, extra)
- end
- end,
- }
- return t.index
-end
diff --git a/lib/mods/theme/core/s_aux.lua b/lib/mods/theme/core/s_aux.lua
index 29b22fd7..97643626 100644
--- a/lib/mods/theme/core/s_aux.lua
+++ b/lib/mods/theme/core/s_aux.lua
@@ -621,32 +621,3 @@ end
function activate_activation(spl, item)
__spell_spell[spl](item)
end
-
-
-------- Add new GF type ----------
-max_gf = MAX_GF
-function add_spell_type(t)
- t.index = max_gf
- max_gf = max_gf + 1
- assert(t.color, "No GF color")
- if not t.monster then t.monster = function() end end
- if not t.angry then t.angry = function() end end
- if not t.object then t.object = function() end end
- if not t.player then t.player = function() end end
- if not t.grid then t.grid = function() end end
-
- add_hooks
- {
- [HOOK_GF_COLOR] = function (gf, new_gfx)
- local t = %t
- if gf == t.index then return TRUE, t.color[new_gfx + 1] end
- end,
- [HOOK_GF_EXEC] = function (action, who, gf, dam, rad, y, x, extra)
- local t = %t
- if t.index == gf then
- return t[action](who, dam, rad, y, x, extra)
- end
- end,
- }
- return t.index
-end
diff --git a/lib/mods/theme/scpt/gods_new.lua b/lib/mods/theme/scpt/gods_new.lua
index 8153d453..9a020915 100644
--- a/lib/mods/theme/scpt/gods_new.lua
+++ b/lib/mods/theme/scpt/gods_new.lua
@@ -192,14 +192,6 @@ GOD_VARDA = add_god
player.cur_lite = player.cur_lite + 1
end
end,
- [HOOK_GF_EXEC] = function (target, who, type, dam, r, y, x, m_ptr)
- if (player.pgod == GOD_VARDA) then
- if ((type == GF_LITE) or (type == GF_LITE_WEAK)) then
- -- Raise piety for using lite
- set_grace(player.grace + 1)
- end
- end
- end,
},
}
@@ -276,14 +268,6 @@ GOD_ULMO = add_god
end
end
end,
- [HOOK_GF_EXEC] = function (target, who, type, dam, r, y, x, m_ptr)
- if (player.pgod == GOD_ULMO) then
- if ((type == GF_FIRE) or (type == GF_HELL_FIRE) or (type == GF_HOLY_FIRE) or (type == GF_LAVA_FLOW) or (type == GF_METEOR) or (type == GF_NUKE) or (type == GF_PLASMA)) then
- -- Reduce piety for using any kind of fire magic
- set_grace(player.grace - 5)
- end
- end
- end,
[HOOK_PROCESS_WORLD] = function()
if (player.pgod == GOD_ULMO) then
GRACE_DELAY = GRACE_DELAY + 1
diff --git a/lib/mods/theme/scpt/mkeys.lua b/lib/mods/theme/scpt/mkeys.lua
index 07105c64..96fc2934 100644
--- a/lib/mods/theme/scpt/mkeys.lua
+++ b/lib/mods/theme/scpt/mkeys.lua
@@ -1,21 +1,5 @@
-- Mkeys for skills & abilities
-GF_INSTA_DEATH = add_spell_type
-{
- ["color"] = { TERM_DARK, 0 },
- ["angry"] = function() return TRUE, TRUE end,
- ["monster"] = function(who, dam, rad, y, x, monst)
- local race = race_info_idx(monst.r_idx, monst.ego)
- if magik(5) == FALSE or band(race.flags1, RF1_UNIQUE) ~= FALSE or band(race.flags3, RF3_UNDEAD) ~= FALSE or band(race.flags3, RF3_NONLIVING) ~= FALSE then
- return TRUE, FALSE
- else
- -- Reduce the exp gained this way
- monst.level = monst.level / 3
- return TRUE, FALSE, 32535, 0, 0, 0, 0, 0, 0, 0, " faints.", " is sucked out of life."
- end
- end,
-}
-
-- Death touch ability
add_mkey
{
diff --git a/lib/mods/theme/scpt/s_geom.lua b/lib/mods/theme/scpt/s_geom.lua
index b9730318..52ebd49a 100644
--- a/lib/mods/theme/scpt/s_geom.lua
+++ b/lib/mods/theme/scpt/s_geom.lua
@@ -31,17 +31,6 @@ function geomancy_random_wall(y, x)
end
-GF_ELEMENTAL_WALL = add_spell_type
-{
- ["color"] = { TERM_GREEN, 0 },
- ["angry"] = function() return TRUE, FALSE end,
- ["grid"] = function(who, dam, rad, y, x)
- if player.py ~= y or player.px ~= x then
- geomancy_random_wall(y, x)
- end
- end,
-}
-
function geomancy_random_floor(y, x, kill_wall)
local c_ptr = cave(y, x)
@@ -81,15 +70,6 @@ function geomancy_random_floor(y, x, kill_wall)
end
-GF_ELEMENTAL_GROWTH = add_spell_type
-{
- ["color"] = { TERM_GREEN, 0 },
- ["angry"] = function() return TRUE, FALSE end,
- ["grid"] = function(who, dam, rad, y, x)
- geomancy_random_floor(y, x)
- end,
-}
-
CALL_THE_ELEMENTS = add_spell
{
["name"] = "Call the Elements",
diff --git a/lib/scpt/mkeys.lua b/lib/scpt/mkeys.lua
index 07105c64..96fc2934 100644
--- a/lib/scpt/mkeys.lua
+++ b/lib/scpt/mkeys.lua
@@ -1,21 +1,5 @@
-- Mkeys for skills & abilities
-GF_INSTA_DEATH = add_spell_type
-{
- ["color"] = { TERM_DARK, 0 },
- ["angry"] = function() return TRUE, TRUE end,
- ["monster"] = function(who, dam, rad, y, x, monst)
- local race = race_info_idx(monst.r_idx, monst.ego)
- if magik(5) == FALSE or band(race.flags1, RF1_UNIQUE) ~= FALSE or band(race.flags3, RF3_UNDEAD) ~= FALSE or band(race.flags3, RF3_NONLIVING) ~= FALSE then
- return TRUE, FALSE
- else
- -- Reduce the exp gained this way
- monst.level = monst.level / 3
- return TRUE, FALSE, 32535, 0, 0, 0, 0, 0, 0, 0, " faints.", " is sucked out of life."
- end
- end,
-}
-
-- Death touch ability
add_mkey
{
diff --git a/lib/scpt/s_geom.lua b/lib/scpt/s_geom.lua
index b9730318..52ebd49a 100644
--- a/lib/scpt/s_geom.lua
+++ b/lib/scpt/s_geom.lua
@@ -31,17 +31,6 @@ function geomancy_random_wall(y, x)
end
-GF_ELEMENTAL_WALL = add_spell_type
-{
- ["color"] = { TERM_GREEN, 0 },
- ["angry"] = function() return TRUE, FALSE end,
- ["grid"] = function(who, dam, rad, y, x)
- if player.py ~= y or player.px ~= x then
- geomancy_random_wall(y, x)
- end
- end,
-}
-
function geomancy_random_floor(y, x, kill_wall)
local c_ptr = cave(y, x)
@@ -81,15 +70,6 @@ function geomancy_random_floor(y, x, kill_wall)
end
-GF_ELEMENTAL_GROWTH = add_spell_type
-{
- ["color"] = { TERM_GREEN, 0 },
- ["angry"] = function() return TRUE, FALSE end,
- ["grid"] = function(who, dam, rad, y, x)
- geomancy_random_floor(y, x)
- end,
-}
-
CALL_THE_ELEMENTS = add_spell
{
["name"] = "Call the Elements",