diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-06 15:11:18 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 15:28:26 +0200 |
commit | e620b7e9e0b6a70f4c350c84a7c18ea2b523eab4 (patch) | |
tree | 3a2cd292bbc33923219289a23e75eebf69536ce6 /lib/mods/theme/scpt | |
parent | 8a0cd497bc0848adaefa56321321df7d0b19dd22 (diff) |
Lua: Refactor HOOK_PROCESS_WORLD code from corrupt.lua to C
Diffstat (limited to 'lib/mods/theme/scpt')
-rw-r--r-- | lib/mods/theme/scpt/corrupt.lua | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/mods/theme/scpt/corrupt.lua b/lib/mods/theme/scpt/corrupt.lua index dc750f0f..2f3d30ce 100644 --- a/lib/mods/theme/scpt/corrupt.lua +++ b/lib/mods/theme/scpt/corrupt.lua @@ -137,22 +137,6 @@ CORRUPT_RANDOM_TELEPORT = add_corruption " Randomly teleports you around", }, -- No oppose field, it will be automatically set when we declare the anti-telep corruption to oppose us - ["hooks"] = - { - [HOOK_PROCESS_WORLD] = function() - if rand_int(300) == 1 then - if magik(70) == TRUE then - if get_check("Teleport?") == TRUE then - teleport_player(50) - end - else - disturb(0, 0) - msg_print("Your corruption takes over you, you teleport!") - teleport_player(50) - end - end - end, - }, } -- Anti-teleportation corruption, can be stopped with this power @@ -170,22 +154,6 @@ CORRUPT_ANTI_TELEPORT = add_corruption { [CORRUPT_RANDOM_TELEPORT] = TRUE }, - ["hooks"] = - { - [HOOK_PROCESS_WORLD] = function() - if player.corrupt_anti_teleport_stopped == TRUE then - local amt = player.msp + player.csp - amt = amt / 100 - if (amt < 1) then amt = 1 end - increase_mana(-amt) - if player.csp == 0 then - player.corrupt_anti_teleport_stopped = FALSE - msg_print("You stop controlling your corruption.") - player.update = bor(player.update, PU_BONUS) - end - end - end, - }, } |