diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/init.lua | 3 | ||||
-rw-r--r-- | lib/core/stores.lua | 32 | ||||
-rw-r--r-- | lib/mods/theme/core/init.lua | 3 | ||||
-rw-r--r-- | lib/mods/theme/core/stores.lua | 32 | ||||
-rw-r--r-- | lib/mods/theme/scpt/init.lua | 3 | ||||
-rw-r--r-- | lib/mods/theme/scpt/stores.lua | 134 | ||||
-rw-r--r-- | lib/scpt/init.lua | 3 | ||||
-rw-r--r-- | lib/scpt/stores.lua | 105 |
8 files changed, 0 insertions, 315 deletions
diff --git a/lib/core/init.lua b/lib/core/init.lua index 23c76461..c87f9a20 100644 --- a/lib/core/init.lua +++ b/lib/core/init.lua @@ -20,9 +20,6 @@ tome_dofile_anywhere(ANGBAND_DIR_CORE, "dungeon.lua") -- Load the ingame contextual help tome_dofile_anywhere(ANGBAND_DIR_CORE, "help.lua") --- let the store specific stuff happen! -tome_dofile_anywhere(ANGBAND_DIR_CORE, "stores.lua") - -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- diff --git a/lib/core/stores.lua b/lib/core/stores.lua deleted file mode 100644 index d4a63168..00000000 --- a/lib/core/stores.lua +++ /dev/null @@ -1,32 +0,0 @@ --- Take care of all concerning stores -function store_buy_list(t) - assert(type(t) == "table", "store_buy_list got no table") - add_hooks - { - [HOOK_STORE_BUY] = function (index, name, obj) - local tbl = %t - local elt = tbl[index] - if not elt then - elt = tbl[name] - end - if elt then - if elt then - if type(elt) == "function" then - return TRUE, elt(obj) - elseif type(elt) == "table" then - local k, e - for k, e in elt do - if type(e) == "number" then - if obj.tval == e then return TRUE, TRUE end - else - if (obj.tval == e[1]) and (obj.sval >= e[2]) and (obj.sval <= e[3]) then return TRUE, TRUE end - end - end - elseif elt == -1 then - return TRUE, FALSE - end - end - end - end, - } -end diff --git a/lib/mods/theme/core/init.lua b/lib/mods/theme/core/init.lua index 23c76461..c87f9a20 100644 --- a/lib/mods/theme/core/init.lua +++ b/lib/mods/theme/core/init.lua @@ -20,9 +20,6 @@ tome_dofile_anywhere(ANGBAND_DIR_CORE, "dungeon.lua") -- Load the ingame contextual help tome_dofile_anywhere(ANGBAND_DIR_CORE, "help.lua") --- let the store specific stuff happen! -tome_dofile_anywhere(ANGBAND_DIR_CORE, "stores.lua") - -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- diff --git a/lib/mods/theme/core/stores.lua b/lib/mods/theme/core/stores.lua deleted file mode 100644 index d4a63168..00000000 --- a/lib/mods/theme/core/stores.lua +++ /dev/null @@ -1,32 +0,0 @@ --- Take care of all concerning stores -function store_buy_list(t) - assert(type(t) == "table", "store_buy_list got no table") - add_hooks - { - [HOOK_STORE_BUY] = function (index, name, obj) - local tbl = %t - local elt = tbl[index] - if not elt then - elt = tbl[name] - end - if elt then - if elt then - if type(elt) == "function" then - return TRUE, elt(obj) - elseif type(elt) == "table" then - local k, e - for k, e in elt do - if type(e) == "number" then - if obj.tval == e then return TRUE, TRUE end - else - if (obj.tval == e[1]) and (obj.sval >= e[2]) and (obj.sval <= e[3]) then return TRUE, TRUE end - end - end - elseif elt == -1 then - return TRUE, FALSE - end - end - end - end, - } -end diff --git a/lib/mods/theme/scpt/init.lua b/lib/mods/theme/scpt/init.lua index af4ba3d9..64b1c6a5 100644 --- a/lib/mods/theme/scpt/init.lua +++ b/lib/mods/theme/scpt/init.lua @@ -8,9 +8,6 @@ tome_dofile("player.lua") -- Load the ingame contextual help tome_dofile("help.lua") --- let the store specific stuff happen! -tome_dofile("stores.lua") - -- Add the mkey activations tome_dofile("mkeys.lua") diff --git a/lib/mods/theme/scpt/stores.lua b/lib/mods/theme/scpt/stores.lua deleted file mode 100644 index 61a97f5a..00000000 --- a/lib/mods/theme/scpt/stores.lua +++ /dev/null @@ -1,134 +0,0 @@ --- Whats shops can buy what -store_buy_list -{ - ["General Store"] = - { - TV_CORPSE, - TV_FOOD, - TV_LITE, - TV_FLASK, - TV_SPIKE, - TV_SHOT, - TV_ARROW, - TV_BOLT, - TV_DIGGING, - TV_CLOAK, - TV_BOTTLE, - }, - ["Armoury"] = - { - TV_BOOTS, - TV_GLOVES, - TV_CROWN, - TV_HELM, - TV_SHIELD, - TV_CLOAK, - TV_SOFT_ARMOR, - TV_HARD_ARMOR, - TV_DRAG_ARMOR, - }, - ["Weaponsmith"] = - { - TV_SHOT, - TV_BOLT, - TV_ARROW, - TV_BOOMERANG, - TV_BOW, - TV_DIGGING, - TV_HAFTED, - TV_POLEARM, - TV_SWORD, - TV_AXE, - TV_MSTAFF, - }, - -- We use a function because we want to restrict to blessed weapons and god spells - ["Temple"] = function (obj) - if obj.tval == TV_DRUID_BOOK then return TRUE - elseif obj.tval == TV_BOOK and obj.sval == 255 and (can_spell_random(obj.pval) == SKILL_SPIRITUALITY) then return TRUE - elseif obj.tval == TV_SCROLL then return TRUE - elseif obj.tval == TV_POTION2 then return TRUE - elseif obj.tval == TV_POTION then return TRUE - elseif obj.tval == TV_HAFTED then return TRUE - elseif obj.tval == TV_POLEARM and is_blessed(obj) == TRUE then return TRUE - elseif obj.tval == TV_SWORD and is_blessed(obj) == TRUE then return TRUE - elseif obj.tval == TV_AXE and is_blessed(obj) == TRUE then return TRUE - elseif obj.tval == TV_BOOMERANG and is_blessed(obj) == TRUE then return TRUE - end - end, - ["Alchemy shop"] = - { - TV_SCROLL, - TV_POTION2, - TV_POTION, - TV_BATERIE, - TV_BOTTLE, - }, - -- We use a function because we dont want god spells - ["Magic shop"] = function (obj) - local buy = - { - [TV_SYMBIOTIC_BOOK] = TRUE, - [TV_AMULET] = TRUE, - [TV_RING] = TRUE, - [TV_STAFF] = TRUE, - [TV_WAND] = TRUE, - [TV_ROD] = TRUE, - [TV_ROD_MAIN] = TRUE, - [TV_SCROLL] = TRUE, - [TV_POTION2] = TRUE, - [TV_POTION] = TRUE, - [TV_MSTAFF] = TRUE, - [TV_RANDART] = TRUE, - } - - if obj.tval == TV_BOOK and obj.sval == 255 and (can_spell_random(obj.pval) == SKILL_MAGIC) then return TRUE - elseif obj.tval == TV_BOOK and obj.sval ~= 255 then return TRUE - elseif buy[obj.tval] == TRUE then return TRUE - end - end, - -- Black markets wants ALL! - ["Black Market"] = function (obj) - return TRUE - end, - ["Book Store"] = - { - TV_BOOK, - TV_SYMBIOTIC_BOOK, - TV_MUSIC_BOOK, - TV_DAEMON_BOOK, - TV_DRUID_BOOK, - }, - ["Pet Shop"] = - { - TV_EGG, - }, --- Theme stores - - ["Hunting Supply Store"] = - { - TV_TRAPKIT, - TV_BOOMERANG, - TV_SHOT, - TV_BOLT, - TV_ARROW, - TV_BOW, - TV_POTION2, - }, - - ["Runic Magic Shop"] = - { - TV_RUNE1, - TV_RUNE2, - }, - - ["Construction Supply Store"] = - { - TV_LITE, - TV_DIGGING, - }, - - ["Music Store"] = - { - TV_INSTRUMENT, - }, -} diff --git a/lib/scpt/init.lua b/lib/scpt/init.lua index 69fca70d..079d064d 100644 --- a/lib/scpt/init.lua +++ b/lib/scpt/init.lua @@ -8,9 +8,6 @@ tome_dofile("player.lua") -- Load the ingame contextual help tome_dofile("help.lua") --- let the store specific stuff happen! -tome_dofile("stores.lua") - -- Add the mkey activations tome_dofile("mkeys.lua") diff --git a/lib/scpt/stores.lua b/lib/scpt/stores.lua deleted file mode 100644 index d10ee5ad..00000000 --- a/lib/scpt/stores.lua +++ /dev/null @@ -1,105 +0,0 @@ --- Whats shops can buy what -store_buy_list -{ - ["General Store"] = - { - TV_CORPSE, - TV_FOOD, - TV_LITE, - TV_FLASK, - TV_SPIKE, - TV_SHOT, - TV_ARROW, - TV_BOLT, - TV_DIGGING, - TV_CLOAK, - TV_BOTTLE, - }, - ["Armoury"] = - { - TV_BOOTS, - TV_GLOVES, - TV_CROWN, - TV_HELM, - TV_SHIELD, - TV_CLOAK, - TV_SOFT_ARMOR, - TV_HARD_ARMOR, - TV_DRAG_ARMOR, - }, - ["Weaponsmith"] = - { - TV_SHOT, - TV_BOLT, - TV_ARROW, - TV_BOOMERANG, - TV_BOW, - TV_DIGGING, - TV_HAFTED, - TV_POLEARM, - TV_SWORD, - TV_AXE, - TV_MSTAFF, - }, - -- We use a function because we want to restrict to blessed weapons and god spells - ["Temple"] = function (obj) - if obj.tval == TV_DRUID_BOOK then return TRUE - elseif obj.tval == TV_BOOK and obj.sval == 255 and (can_spell_random(obj.pval) == SKILL_SPIRITUALITY) then return TRUE - elseif obj.tval == TV_SCROLL then return TRUE - elseif obj.tval == TV_POTION2 then return TRUE - elseif obj.tval == TV_POTION then return TRUE - elseif obj.tval == TV_HAFTED then return TRUE - elseif obj.tval == TV_POLEARM and is_blessed(obj) == TRUE then return TRUE - elseif obj.tval == TV_SWORD and is_blessed(obj) == TRUE then return TRUE - elseif obj.tval == TV_AXE and is_blessed(obj) == TRUE then return TRUE - elseif obj.tval == TV_BOOMERANG and is_blessed(obj) == TRUE then return TRUE - end - end, - ["Alchemy shop"] = - { - TV_SCROLL, - TV_POTION2, - TV_POTION, - TV_BATERIE, - TV_BOTTLE, - }, - -- We use a function because we dont want god spells - ["Magic shop"] = function (obj) - local buy = - { - [TV_SYMBIOTIC_BOOK] = TRUE, - [TV_AMULET] = TRUE, - [TV_RING] = TRUE, - [TV_STAFF] = TRUE, - [TV_WAND] = TRUE, - [TV_ROD] = TRUE, - [TV_ROD_MAIN] = TRUE, - [TV_SCROLL] = TRUE, - [TV_POTION2] = TRUE, - [TV_POTION] = TRUE, - [TV_MSTAFF] = TRUE, - [TV_RANDART] = TRUE, - } - - if obj.tval == TV_BOOK and obj.sval == 255 and (can_spell_random(obj.pval) == SKILL_MAGIC) then return TRUE - elseif obj.tval == TV_BOOK and obj.sval ~= 255 then return TRUE - elseif buy[obj.tval] == TRUE then return TRUE - end - end, - -- Black markets wants ALL! - ["Black Market"] = function (obj) - return TRUE - end, - ["Book Store"] = - { - TV_BOOK, - TV_SYMBIOTIC_BOOK, - TV_MUSIC_BOOK, - TV_DAEMON_BOOK, - TV_DRUID_BOOK, - }, - ["Pet Shop"] = - { - TV_EGG, - }, -} |