diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-01 05:37:37 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-01 06:48:55 +0200 |
commit | 53bf1478ad25f03d6df584371b0653f83ead1b6d (patch) | |
tree | d87a2dbec80bf2f52b0efa3c80cac2f732df4aad /lib | |
parent | 3f78069df10241f1111e171ab9d1db40b33b5774 (diff) |
Lua: Move "Temple" and "Magic shop" hook code to C
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mods/theme/scpt/stores.lua | 27 | ||||
-rw-r--r-- | lib/scpt/stores.lua | 27 |
2 files changed, 0 insertions, 54 deletions
diff --git a/lib/mods/theme/scpt/stores.lua b/lib/mods/theme/scpt/stores.lua index 4902c4d0..61a97f5a 100644 --- a/lib/mods/theme/scpt/stores.lua +++ b/lib/mods/theme/scpt/stores.lua @@ -132,30 +132,3 @@ store_buy_list TV_INSTRUMENT, }, } - --- Take care to have Magic shop/Temple have specific spells only -add_hooks -{ - [HOOK_STORE_STOCK] = function (index, name, level) - if name == "Magic shop" then - -- Books - if magik(20) == TRUE then - object_prep(obj_forge, lookup_kind(TV_BOOK, 255)) - local spell = get_random_spell(SKILL_MAGIC, 20) - if spell > -1 then - obj_forge.pval = spell - return TRUE, obj_forge - end - end - elseif name == "Temple" then - if magik(20) == TRUE then - object_prep(obj_forge, lookup_kind(TV_BOOK, 255)) - local spell = get_random_spell(SKILL_SPIRITUALITY, 20) - if spell > -1 then - obj_forge.pval = spell - return TRUE, obj_forge - end - end - end - end, -} diff --git a/lib/scpt/stores.lua b/lib/scpt/stores.lua index 03d29e6e..d10ee5ad 100644 --- a/lib/scpt/stores.lua +++ b/lib/scpt/stores.lua @@ -103,30 +103,3 @@ store_buy_list TV_EGG, }, } - --- Take care to have Magic shop/Temple have specific spells only -add_hooks -{ - [HOOK_STORE_STOCK] = function (index, name, level) - if name == "Magic shop" then - -- Books - if magik(20) == TRUE then - object_prep(obj_forge, lookup_kind(TV_BOOK, 255)) - local spell = get_random_spell(SKILL_MAGIC, 20) - if spell > -1 then - obj_forge.pval = spell - return TRUE, obj_forge - end - end - elseif name == "Temple" then - if magik(20) == TRUE then - object_prep(obj_forge, lookup_kind(TV_BOOK, 255)) - local spell = get_random_spell(SKILL_SPIRITUALITY, 20) - if spell > -1 then - obj_forge.pval = spell - return TRUE, obj_forge - end - end - end - end, -} |