diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-05-18 13:52:06 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-05-18 19:48:30 +0200 |
commit | c1f2b8f2d299d22be4ad3f2f176b6e106eeff6dc (patch) | |
tree | f43acfe2b42b0f00a21ceb083857424bbb63d5ef /lib/mods/theme/scpt/s_udun.lua | |
parent | 4dd2ffb52df44aa78719a49492db9e79b6b01215 (diff) |
Lua: Move school_book[] to C
Diffstat (limited to 'lib/mods/theme/scpt/s_udun.lua')
-rw-r--r-- | lib/mods/theme/scpt/s_udun.lua | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/mods/theme/scpt/s_udun.lua b/lib/mods/theme/scpt/s_udun.lua index 3ddfeb14..bb12ac7f 100644 --- a/lib/mods/theme/scpt/s_udun.lua +++ b/lib/mods/theme/scpt/s_udun.lua @@ -72,42 +72,3 @@ FLAMEOFUDUN = add_spell "Turns you into a powerful Balrog", } } - - --- Return the number of Udun/Melkor spells in a given book -function udun_in_book(sval, pval) - local i, y, index, sch, s - - i = 0 - - -- Hack if the book is 255 it is a random book - if sval == 255 then - school_book[sval] = {pval} - end - -- Parse all spells - for index, s in school_book[sval] do - for index, sch in __spell_school[s] do - if sch == SCHOOL_UDUN then i = i + 1 end - if sch == SCHOOL_MELKOR then i = i + 1 end - end - end - return i -end - --- Return the total level of spells -function levels_in_book(sval, pval) - local i, y, index, sch, s - - i = 0 - - -- Hack if the book is 255 it is a random book - if sval == 255 then - school_book[sval] = {pval} - end - - -- Parse all spells - for index, s in school_book[sval] do - i = i + __tmp_spells[s].level - end - return i -end |