summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-10 20:58:10 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-10 20:58:10 +0200
commit2a7627098fd014fc7b835e67cf37a3b615dbf5c4 (patch)
treefe24c76483484d81d039c5b73e5c57ce4b0e0f3d /lib
parentb34352dcd834057993a5e4c146b5b61cca41da15 (diff)
Lua: Gods: Move Aule's HOOK_SACRIFICE_GOD to C
Diffstat (limited to 'lib')
-rw-r--r--lib/mods/theme/scpt/gods_new.lua33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/mods/theme/scpt/gods_new.lua b/lib/mods/theme/scpt/gods_new.lua
index b6ff3b04..61aba56b 100644
--- a/lib/mods/theme/scpt/gods_new.lua
+++ b/lib/mods/theme/scpt/gods_new.lua
@@ -9,39 +9,6 @@ GOD_AULE = add_god
},
["hooks"] =
{
- [HOOK_SACRIFICE_GOD] = function()
- if (player.pgod == GOD_AULE) then
- local ret, item, obj, value
- ret, item = get_item(
- "Sacrifice which item? ",
- "You have nothing to sacrifice.",
- USE_INVEN,
- function(obj)
- -- perhaps restrict this only to metal armour and weapons
- if (obj.found == OBJ_FOUND_SELFMADE) then
- return TRUE
- end
- return FALSE
- end
- )
-
- -- Item selected
- if ret == TRUE then
- -- Increase piety by the value of the item / 10
- -- object_value is not available in Lua, therefore I used the
- -- cost of the base item, without magical boni
- obj = get_object(item)
- -- value = object_value(obj)/10
- value = k_info[obj.k_idx + 1].cost/10
-
- set_grace(player.grace + value)
-
- -- remove the object
- inven_item_increase(item, -1)
- inven_item_optimize(item)
- end
- end
- end,
[HOOK_MONSTER_DEATH] = function(m_idx)
if (player.pgod == GOD_AULE) then
m_ptr = monster(m_idx)