From 53bf1478ad25f03d6df584371b0653f83ead1b6d Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Fri, 1 Jun 2012 05:37:37 +0200 Subject: Lua: Move "Temple" and "Magic shop" hook code to C --- lib/mods/theme/scpt/stores.lua | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'lib/mods') 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, -} -- cgit v1.2.3