diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-05 20:12:21 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 15:28:25 +0200 |
commit | 2bd0f18da7dbccd650d8a83aa457d5190f4ce1bc (patch) | |
tree | cb248715a89b2af50a5ee27cfb9a862322df331a /lib | |
parent | 6548c6fb76232f4502d0856e04f169394deb6093 (diff) |
Lua: Move HOOK_CALC_BONUS code for gods to C
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mods/theme/scpt/gods_new.lua | 56 | ||||
-rw-r--r-- | lib/mods/theme/scpt/s_mandos.lua | 9 |
2 files changed, 0 insertions, 65 deletions
diff --git a/lib/mods/theme/scpt/gods_new.lua b/lib/mods/theme/scpt/gods_new.lua index 9a020915..0a3b7283 100644 --- a/lib/mods/theme/scpt/gods_new.lua +++ b/lib/mods/theme/scpt/gods_new.lua @@ -22,24 +22,6 @@ GOD_AULE = add_god }, ["hooks"] = { - [HOOK_CALC_BONUS] = function() - if (player.pgod == GOD_AULE) and (player.grace > 0) then - -- Resist fire, not shown on the character screen (?) - if (player.grace > 5000) then - player.resist_fire = TRUE - end - - local bonus = player.grace / 5000 - if bonus > 5 then - bonus = 5 - end - player.to_h = player.to_h + bonus - player.dis_to_h = player.dis_to_h + bonus - player.to_d = player.to_d + bonus - player.dis_to_d = player.dis_to_d + bonus - - end - end, [HOOK_PROCESS_WORLD] = function() if (player.pgod == GOD_AULE) then GRACE_DELAY = GRACE_DELAY + 1 @@ -204,25 +186,6 @@ GOD_ULMO = add_god }, ["hooks"] = { - [HOOK_CALC_BONUS] = function() - if (player.pgod == GOD_ULMO) then - player.water_breath = TRUE - end - if (player.pgod == GOD_ULMO) and (player.grace > 0) then - local bonus = player.grace / 5000 - if bonus > 5 then - bonus = 5 - end - - if ((player.grace > 1000) and (player.praying == TRUE)) then - player.resist_pois = TRUE - end - if ((player.grace > 15000) and (player.praying == TRUE)) then - player.magic_breath = TRUE - end - end - end, - [HOOK_MONSTER_DEATH] = function(m_idx) if (player.pgod == GOD_ULMO) then m_ptr = monster(m_idx) @@ -319,25 +282,6 @@ GOD_MANDOS = add_god }, ["hooks"] = { - [HOOK_CALC_BONUS] = function() - if (player.pgod == GOD_MANDOS) then - player.resist_neth = TRUE - end - if (player.pgod == GOD_MANDOS) and (player.grace > 0) then - local bonus = player.grace / 5000 - if bonus > 5 then - bonus = 5 - end - - if ((player.grace > 10000) and (player.praying == TRUE)) then - player.resist_continuum = TRUE - end - - if ((player.grace > 20000) and (player.praying == TRUE)) then - player.immune_neth = TRUE - end - end - end, [HOOK_PROCESS_WORLD] = function() if (player.pgod == GOD_MANDOS) then GRACE_DELAY = GRACE_DELAY + 1 diff --git a/lib/mods/theme/scpt/s_mandos.lua b/lib/mods/theme/scpt/s_mandos.lua index cc7e346a..90876930 100644 --- a/lib/mods/theme/scpt/s_mandos.lua +++ b/lib/mods/theme/scpt/s_mandos.lua @@ -4,8 +4,6 @@ BOOK_MANDOS = 66 -- precognition timer for high-level spell [from T-Plus by Ingeborg S. Norden] -add_loadsave("tim_precognition",0) - function set_precognition(v) local notice = FALSE if (v < 0) then v = 0 end @@ -33,13 +31,6 @@ end -- related hooks add_hooks{ - [HOOK_CALC_BONUS] = function() - if (tim_precognition > 0) then - --player.precognition = TRUE - apply_flags(0, 0, 0, TR4_PRECOGNITION, 0, 0, 0, 0, 0, 0, 0) - end - end, - [HOOK_PROCESS_WORLD] = function() if (tim_precognition > 0) then set_precognition(tim_precognition - 1) |