diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index 97423cf7096cbd66ac227399d25059d7fbb50b0f..f1c466feae1ca5962bef743031c809c9c8a75093 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -832,7 +832,7 @@ end function _M:entityFilterAlter(zone, level, type, filter) if type ~= "object" then return filter end - if not filter.tome and not filter.defined and not filter.special and not filter.unique and not filter.ego_chance and not filter.ego_filter and not filter.no_tome_drops then filter.tome = default_drops(zone, level, filter.tome_drops or "normal") end + if filter.force_tome_drops or (not filter.tome and not filter.defined and not filter.special and not filter.unique and not filter.ego_chance and not filter.ego_filter and not filter.no_tome_drops) then filter.tome = default_drops(zone, level, filter.tome_drops or "normal") end if filter.tome then local t = (filter.tome == true) and default_drops(zone, level, "normal") or filter.tome diff --git a/game/modules/tome/data/general/npcs/crystal.lua b/game/modules/tome/data/general/npcs/crystal.lua index 98224a658760a92c684e6dc430387fa1bb42e95a..cf9cc981ab22e7e827c6fd1d5ec4a7e9463c2136 100644 --- a/game/modules/tome/data/general/npcs/crystal.lua +++ b/game/modules/tome/data/general/npcs/crystal.lua @@ -78,10 +78,10 @@ newEntity{ base = "BASE_NPC_CRYSTAL", resists = { [DamageType.FIRE] = 100, [DamageType.ICE] = -100 }, resolvers.talents{ [Talents.T_FLAME]={base=1, every=7, max=5}, - } + }, on_die = function(self, who) local part = "RED_CRYSTAL_SHARD" - if game.player:hasQuest("brotherhood-of-alchemists") then + if game.player:hasQuest("brotherhood-of-alchemists") then game.player:hasQuest("brotherhood-of-alchemists"):need_part(who, part, self) end end, diff --git a/game/modules/tome/data/general/stores/basic.lua b/game/modules/tome/data/general/stores/basic.lua index 108f9fa43cc99e234d35b08f2d326ddb4282eaf8..da4c5c98f5b0f2cbb77b21967ac645477e457445 100644 --- a/game/modules/tome/data/general/stores/basic.lua +++ b/game/modules/tome/data/general/stores/basic.lua @@ -230,11 +230,12 @@ newEntity{ name = "rare goods", display = '7', color=colors.BLUE, store = { + nb_fill = 20, purse = 35, empty_before_restock = false, sell_percent = 240, filters = function() - return {id=true, ignore={type="money"}, add_levels=10, tome_drops="boss"} + return {id=true, ignore={type="money"}, add_levels=10, force_tome_drops=true, tome_drops="boss", tome_mod={money=0, basic=0}, special=function(o) return o.type ~= "scroll" end} end, }, } diff --git a/game/modules/tome/data/maps/towns/last-hope.lua b/game/modules/tome/data/maps/towns/last-hope.lua index 4f5cac2ff436d40a6e88a7ef52b0edbb6bc5e239..1458a0daf66b1602ce9099044ee55d163fc075cf 100644 --- a/game/modules/tome/data/maps/towns/last-hope.lua +++ b/game/modules/tome/data/maps/towns/last-hope.lua @@ -17,49 +17,12 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org ---[[ -quickEntity('<', {show_tooltip=true, name='into the wild', notice=true, display='<', color=colors.WHITE, change_level=1, change_zone="wilderness", image="terrain/stone_road1.png", add_displays = {mod.class.Grid.new{image="terrain/worldmap.png"}}}) -quickEntity('S', {name='brick roof top', display='#', color=colors.RED, block_move=true, block_sight=true, image="terrain/wood_wall1.png"}) -quickEntity('s', {name='brick roof', display='#', color=colors.RED, block_move=true, block_sight=true, image="terrain/wood_wall1.png"}) -quickEntity('t', {name='brick roof chimney', display='#', color=colors.LIGHT_RED, block_move=true, block_sight=true, image="terrain/wood_wall1.png"}) -quickEntity('C', {name='dark pit', display='#', color=colors.LIGHT_DARK, block_move=true, block_sight=true}) -quickEntity('T', {name='tree', display='#', color=colors.LIGHT_GREEN, block_move=true, block_sight=true, image="terrain/tree.png"}) -quickEntity('V', {name='river', display='~', color=colors.BLUE, block_move=true, image="terrain/river.png"}) -quickEntity('O', {name='cobblestone road', display='.', color=colors.WHITE, image="terrain/stone_road1.png"}) -quickEntity(' ', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"}) -quickEntity('-', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"}) -quickEntity('#', {name='wall', display='#', color=colors.WHITE, block_move=true, block_sight=true, image="terrain/granite_wall1.png"}) -quickEntity('*', {name="Tannen's Tower", display='#', color=colors.WHITE, block_move=true, block_sight=true, image="terrain/granite_wall1.png"}) -quickEntity('^', {name='hills', display='^', color=colors.SLATE, image="terrain/mountain.png", block_move=true, block_sight=true}) -quickEntity(',', {name='dirt', display='.', color=colors.LIGHT_UMBER, image="terrain/sand.png"}) -quickEntity('I', {name='tunneled wall', show_tooltip=true, display='#', color=colors.WHITE, image="terrain/wood_wall1.png"}) -quickEntity('M', {name='tunneled hills', show_tooltip=true, display='^', color=colors.SLATE, image="terrain/mountain.png"}) -quickEntity('1', {type="store", show_tooltip=true, name="Closed store", display='1', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) -quickEntity('2', {type="store", show_tooltip=true, name="Armour Smith", display='2', color=colors.UMBER, resolvers.store("ARMOR"), image="terrain/wood_store_armor.png"}) -quickEntity('3', {type="store", show_tooltip=true, name="Weapon Smith", display='3', color=colors.UMBER, resolvers.store("WEAPON"), resolvers.chatfeature("last-hope-weapon-store"), image="terrain/wood_store_weapon.png"}) -quickEntity('4', {type="store", show_tooltip=true, name="Alchemist", display='4', color=colors.LIGHT_BLUE, resolvers.store("POTION"), image="terrain/wood_store_potion.png"}) -quickEntity('5', {type="store", show_tooltip=true, name="Scribe", display='5', color=colors.WHITE, resolvers.store("SCROLL"), resolvers.chatfeature("magic-store"), image="terrain/wood_store_book.png"}) -quickEntity('6', {type="store", show_tooltip=true, name="Closed store", display='6', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) -quickEntity('7', {type="store", show_tooltip=true, name="Closed store", display='7', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) -quickEntity('8', {type="store", show_tooltip=true, name="Closed store", display='8', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) -quickEntity('9', {type="store", show_tooltip=true, name="Closed store", display='9', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) -quickEntity('0', {type="store", show_tooltip=true, name="Closed store", display='0', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) -quickEntity('a', {type="store", show_tooltip=true, name="Closed store", display='*', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) -quickEntity('b', {type="store", show_tooltip=true, name="Hall of the King", display='*', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) -quickEntity('c', {type="store", show_tooltip=true, name="Library", display='*', color=colors.LIGHT_RED, resolvers.store("LAST_HOPE_LIBRARY"), image="terrain/wood_store_book.png"}) -quickEntity('d', {type="store", show_tooltip=true, name="Closed store", display='*', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) -quickEntity('e', {type="store", show_tooltip=true, name="Rare goods", display='*', color=colors.AQUAMARINE, resolvers.store("LOST_MERCHANT"), resolvers.chatfeature("last-hope-lost-merchant"), image="terrain/wood_store_weapon.png"}) -quickEntity('g', {type="store", show_tooltip=true, name="Rich merchant", display='*', color=colors.AQUAMARINE, resolvers.chatfeature("last-hope-melinda-father"), image="terrain/wood_store_closed.png"}) -]] -quickEntity('E', {type="store", show_tooltip=true, name="The Elder", display='*', color=colors.VIOLET, resolvers.chatfeature("last-hope-elder"), image="terrain/wood_store_closed.png"}) -quickEntity('T', {type="store", show_tooltip=true, name="Tannen's Tower", display='*', color=colors.VIOLET, resolvers.chatfeature("tannen"), image="terrain/wood_store_closed.png"}) -quickEntity('h', {show_tooltip=true, name="Home of Ungrol the Alchemist", display='+', color=colors.LIGHT_UMBER, resolvers.chatfeature("alchemist-last-hope"), image="terrain/wood_store_closed.png"}, {no_teleport=true}) - quickEntity('@', {show_tooltip=true, name="Statue of King Tolak the Fair", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statue1.png"}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then e:learnLore("last-hope-tolak-statue") end return true end}) quickEntity('Z', {show_tooltip=true, name="Statue of King Toknor the Brave", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statue1.png"}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then e:learnLore("last-hope-toknor-statue") end return true end}) quickEntity('Y', {show_tooltip=true, name="Statue of Queen Mirvenia the Inspirer", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statue1.png"}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then e:learnLore("last-hope-mirvenia-statue") end return true end}) -- defineTile section +defineTile("<", "GRASS_UP_WILDERNESS") defineTile("#", "HARDWALL") defineTile("&", "HARDMOUNTAIN_WALL") defineTile("~", "DEEP_WATER") @@ -68,17 +31,22 @@ defineTile(".", "GRASS") defineTile("t", {"TREE","TREE2","TREE3","TREE4","TREE5","TREE6","TREE7","TREE8","TREE9","TREE10","TREE11","TREE12","TREE13","TREE14","TREE15","TREE16","TREE17","TREE18","TREE19","TREE20"}) defineTile(" ", "FLOOR") ---[[ -defineTile('1', "HARDWALL", nil, nil, "TRAINER") -defineTile('2', "HARDWALL", nil, nil, "SWORD_WEAPON_STORE") -defineTile('3', "HARDWALL", nil, nil, "AXE_WEAPON_STORE") -defineTile('4', "HARDWALL", nil, nil, "HERBALIST") -defineTile('5', "HARDWALL", nil, nil, "MACE_WEAPON_STORE") -defineTile('6', "HARDWALL", nil, nil, "KNIFE_WEAPON_STORE") -defineTile('7', "HARDWALL", nil, nil, "LIGHT_ARMOR_STORE") -defineTile('8', "HARDWALL", nil, nil, "HEAVY_ARMOR_STORE") -defineTile('9', "HARDWALL", nil, nil, "LIBRARY") -]] +defineTile('1', "HARDWALL", nil, nil, "SWORD_WEAPON_STORE") +defineTile('2', "HARDWALL", nil, nil, "AXE_WEAPON_STORE") +defineTile('3', "HARDWALL", nil, nil, "KNIFE_WEAPON_STORE") +defineTile('4', "HARDWALL", nil, nil, "MAUL_WEAPON_STORE") +defineTile('5', "HARDWALL", nil, nil, "HEAVY_ARMOR_STORE") +defineTile('6', "HARDWALL", nil, nil, "LIGHT_ARMOR_STORE") +defineTile('7', "HARDWALL", nil, nil, "CLOTH_ARMOR_STORE") +defineTile('8', "HARDWALL", nil, nil, "HERBALIST") +defineTile('9', "HARDWALL", nil, nil, "RUNES") + +defineTile('E', "HARDWALL", nil, nil, "ELDER") +defineTile('T', "HARDWALL", nil, nil, "TANNEN") +defineTile('H', "HARDWALL", nil, nil, "ALCHEMIST") +defineTile('M', "HARDWALL", nil, nil, "RARE_GOODS") +defineTile('F', "HARDWALL", nil, nil, "MELINDA_FATHER") + startx = 25 starty = 0 @@ -107,7 +75,7 @@ tttttttt~~~~~## _ ### _ ##~~~~~ttttttt ttttttt~~~~### ___ ### ___ ###~~~~tttttt tttttt~~~~## __ ### __ ##~~~~ttttt tttttt~~~## # __ ####### __ ##~~~ttttt -ttttt~~~~# ### _ ##34 56## _ # #~~~~tttt +ttttt~~~~# ### _ ##56 7### _ # #~~~~tttt tttt~~~~## ### _ ### ### _ ### ##~~~~ttt tttt~~~## ### _ # # _ ### ##~~~ttt ttt~~~~# # _ _________ _ M## #~~~~tt @@ -119,10 +87,10 @@ tt~~~# ## _~~##tt_____tt##~~_ ## #~~~t t~~~## ## __~##t___&_&___t##~__ ## ##~~~ t~~~# ### _~~#tt_&&&_&&&_tt#~~_ ### #~~~ t~~~# ## _~##t__&&&_&&&__t##~_ ## #~~~ -t~~~# #####1 _~#tt_&&_____&&_tt#~_ 7##### #~~~ +t~~~# #####1 _~#tt_&&_____&&_tt#~_ 3##### #~~~ t~~~# ##### _~#tt_&&_###_&&_tt#~_ ##### #~~~ -t~~~# #####2 _~#tt_&&_#E#_&&_tt#~_ 8##### #~~~ -t~~~# ## _~##t__&&___&&__t##~_ ## #~~~ +t~~~# #8###2 _~#tt_&&_#E#_&&_tt#~_ 4###9# #~~~ +t~~~# ## _~##t__&_____&__t##~_ ## #~~~ t~~~# ### _~~#tt_&&&&&&&_tt#~~_ ### #~~~ t~~~## ## __~##t___&&&___t##~__ ## ##~~~ tt~~~# ## _~~##tt_____tt##~~_ ## #~~~t @@ -131,17 +99,17 @@ tt~~~## __~~###ttt###~~__ ##~~~t tt~~~~# __~~~#####~~~__ #~~~~t ttt~~~## ___~~~~~~~___ # ##~~~tt ttt~~~~# # _________ ### #~~~~tt -tttt~~~## ### # # ##h ##~~~ttt -tttt~~~~## ### ### ### ### ##~~~~ttt -ttttt~~~~# ### #### #### # #~~~~tttt +tttt~~~## ### # # ### ##~~~ttt +tttt~~~~## ### ### ### ##H ##~~~~ttt +ttttt~~~~# ### ###9 #### # #~~~~tttt tttttt~~~## # ####### ##~~~ttttt tttttt~~~~## ### ##~~~~ttttt ttttttt~~~~### ### ###~~~~tttttt tttttttt~~~~~## ### ##~~~~~ttttttt -ttttttttt~~~~~### ### ###~~~~~tttttttt +ttttttttt~~~~~### #F# ###~~~~~tttttttt tttttttttt~~~~~~### ###~~~~~~ttttttttt tttttttttttt~~~~~~#### ####~~~~~~ttttttttttt ttttttttttttt~~~~~~~~#########~~~~~~~~tttttttttttt ttttttttttttttt~~~~~~~~~~~~~~~~~~~~~tttttttttttttt ttttttttttttttttt~~~~~~~~~~~~~~~~~tttttttttttttttt -ttttttttttttttttttttt~~~~~~~~~tttttttttttttttttttt]] \ No newline at end of file +ttttttttttttttttttttt~~~~~~~~~tttttttttttttttttttt]] diff --git a/game/modules/tome/data/zones/town-last-hope/traps.lua b/game/modules/tome/data/zones/town-last-hope/traps.lua new file mode 100644 index 0000000000000000000000000000000000000000..a92dfbfeae43aa980f0fc7e9971a76aa64fb4d71 --- /dev/null +++ b/game/modules/tome/data/zones/town-last-hope/traps.lua @@ -0,0 +1,104 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +load("/data/general/traps/store.lua") + +newEntity{ base = "BASE_STORE", define_as = "HEAVY_ARMOR_STORE", + name="Hormond & Son Plates", + display='2', color=colors.UMBER, + resolvers.store("HEAVY_ARMOR", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "LIGHT_ARMOR_STORE", + name="Rila's Leather", + display='2', color=colors.UMBER, + resolvers.store("LIGHT_ARMOR", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "CLOTH_ARMOR_STORE", + name="Toxar Alchemical Tailor", + display='2', color=colors.UMBER, + resolvers.store("CLOTH_ARMOR", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "SWORD_WEAPON_STORE", + name="Herk's Cutting Edge", + display='3', color=colors.UMBER, + resolvers.store("SWORD_WEAPON", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "KNIFE_WEAPON_STORE", + name="Yulek's Tools of the Night", + display='3', color=colors.UMBER, + resolvers.store("KNIFE_WEAPON", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "AXE_WEAPON_STORE", + name="Vortal's Trees Choppers", + display='3', color=colors.UMBER, + resolvers.store("AXE_WEAPON", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "MAUL_WEAPON_STORE", + name="Raber's Blunt Paradise", + display='3', color=colors.UMBER, + resolvers.store("MAUL_WEAPON", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "HERBALIST", + name="Sarah's Herbal Infusions", + display='4', color=colors.LIGHT_GREEN, + resolvers.store("POTION", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "RUNES", + name="Sook's Runes and other Harmless Contraptions", + display='5', color=colors.LIGHT_RED, + resolvers.store("SCROLL", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "ELDER", + name="The Elder", + display='*', color=colors.UMBER, + resolvers.chatfeature("last-hope-elder", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "TANNEN", + name="Tannen's Door", + display='*', color=colors.UMBER, + resolvers.chatfeature("tannen", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "ALCHEMIST", + name="Home of Ungrol the Alchemist", + display='*', color=colors.UMBER, + resolvers.chatfeature("alchemist-last-hope", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "MELINDA_FATHER", + name="Rich merchant", + display='*', color=colors.UMBER, + resolvers.chatfeature("last-hope-melinda-father", "allied-kingdoms"), +} + +newEntity{ base = "BASE_STORE", define_as = "RARE_GOODS", + name="Urthol's Wondrous Emporium", + display='7', color=colors.BLUE, + resolvers.store("LOST_MERCHANT", "allied-kingdoms"), resolvers.chatfeature("last-hope-lost-merchant", "allied-kingdoms"), +}