diff --git a/game/modules/tome/data/general/objects/gem.lua b/game/modules/tome/data/general/objects/gem.lua new file mode 100644 index 0000000000000000000000000000000000000000..8fdf11ee7362ad371a0b55d5685fb578843db300 --- /dev/null +++ b/game/modules/tome/data/general/objects/gem.lua @@ -0,0 +1,62 @@ +-- ToME - Tales of Middle-Earth +-- 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 + +newEntity{ + define_as = "BASE_GEM", + type = "gem", subtype="white", + display = "*", color=colors.YELLOW, + encumber = 0, + identified = true, + stacking = true, + desc = [[Gems can be sold for money or used in arcane rituals.]], +} + +local function newGem(name, cost, rarity, color, min_level, max_level) + newEntity{ base = "BASE_GEM", + name = name:lower(), subtype = color, + color = colors[color:upper()], + level_range = {min_level, max_level}, + rarity = rarity, cost = cost, + } +end + +newGem("Diamond",5,18,"white",40,50) +newGem("Pearl",5,18,"white",40,50) +newGem("Moonstone",5,18,"white",40,50) +newGem("Fire Opal",5,18,"red",40,50) +newGem("Bloodstone",5,18,"red",40,50) +newGem("Ruby",4,16,"red",30,40) +newGem("Amber",4,16,"yellow",30,40) +newGem("Turquoise",4,16,"green",30,40) +newGem("Jade",4,16,"green",30,40) +newGem("Sapphire",4,16,"blue",30,40) +newGem("Quartz",3,12,"white",20,30) +newGem("Emerald",3,12,"green",20,30) +newGem("Lapis Lazuli",3,12,"blue",20,30) +newGem("Garnets",3,12,"red",20,30) +newGem("Onyx",3,12,"black",20,30) +newGem("Amethyst",2,10,"violet",10,20) +newGem("Opal",2,10,"blue",10,20) +newGem("Topaz",2,10,"blue",10,20) +newGem("Aquamarine",2,10,"blue",10,20) +newGem("Ametrine",1,8,"yellow",1,10) +newGem("Zircon",1,8,"yellow",1,10) +newGem("Spinel",1,8,"green",1,10) +newGem("Citrine",1,8,"yellow",1,10) +newGem("Agate",1,8,"black",1,10) diff --git a/game/modules/tome/data/general/objects/objects.lua b/game/modules/tome/data/general/objects/objects.lua index e0dd39e6f8a5ba8f1663979ac11c6789b48c2fad..95580f31e02ac5b359fc4bb94c65906c50759f4e 100644 --- a/game/modules/tome/data/general/objects/objects.lua +++ b/game/modules/tome/data/general/objects/objects.lua @@ -19,6 +19,7 @@ -- Misc load("/data/general/objects/money.lua") +load("/data/general/objects/gem.lua") load("/data/general/objects/lites.lua") -- Usable stuff diff --git a/game/modules/tome/data/general/stores/basic.lua b/game/modules/tome/data/general/stores/basic.lua index 6a060bdc69625e47bfeeee4695dbddcc3aacad9b..b57d633d5bdd7aed5e3b45792e84b9452b31d6fd 100644 --- a/game/modules/tome/data/general/stores/basic.lua +++ b/game/modules/tome/data/general/stores/basic.lua @@ -101,6 +101,23 @@ newEntity{ }, } + +newEntity{ + define_as = "GEMSTORE", + name = "gem store", + display = '9', color=colors.BLUE, + store = { + restock_after = 1000, + empty_before_restock = true, + buy_percent = 10, + min_fill = 40, + max_fill = 60, + filters = { + {type="gem", id=true}, + }, + }, +} + newEntity{ define_as = "ANGOLWEN_STAFF_WAND", name = "staves and wands store", diff --git a/game/modules/tome/data/gfx/terrain/wood_store_gem.png b/game/modules/tome/data/gfx/terrain/wood_store_gem.png new file mode 100644 index 0000000000000000000000000000000000000000..288bd16d5fbbd598eeb0c9fd6c409944e94fa4d2 Binary files /dev/null and b/game/modules/tome/data/gfx/terrain/wood_store_gem.png differ diff --git a/game/modules/tome/data/maps/towns/angolwen.lua b/game/modules/tome/data/maps/towns/angolwen.lua index 3d04d1690486d163196c6da18be9c1de1320d8ed..5f88ba8b0b9d158e4b1271a86c003ab017c039fc 100644 --- a/game/modules/tome/data/maps/towns/angolwen.lua +++ b/game/modules/tome/data/maps/towns/angolwen.lua @@ -23,7 +23,7 @@ quickEntity('T', {name='tree', display='#', color=colors.LIGHT_GREEN, block_move quickEntity('o', {name='fountain', display='~', color=colors.BLUE, block_move=true, image="terrain/river.png"}) quickEntity(' ', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"}) -quickEntity('2', {show_tooltip=true, name="Jewelry", display='2', color=colors.BLUE, resolvers.store("ANGOLWEN_JEWELRY"), image="terrain/wood_store_closed.png"}) +quickEntity('2', {show_tooltip=true, name="Jewelry", display='2', color=colors.BLUE, resolvers.store("ANGOLWEN_JEWELRY"), image="terrain/terrain/wood_store_gem.png"}) quickEntity('4', {show_tooltip=true, name="Alchemist", display='4', color=colors.LIGHT_BLUE, resolvers.store("POTION"), image="terrain/wood_store_potion.png"}) quickEntity('5', {show_tooltip=true, name="Scribe", display='5', color=colors.WHITE, resolvers.store("SCROLL"), image="terrain/wood_store_book.png"}) quickEntity('6', {show_tooltip=true, name="Staves & Wands", display='6', color=colors.RED, resolvers.store("ANGOLWEN_STAFF_WAND"), image="terrain/wood_store_closed.png"}) diff --git a/game/modules/tome/data/maps/towns/bree.lua b/game/modules/tome/data/maps/towns/bree.lua index fedcfa78bcf4c064577907f4e310bf028529abfa..5d606d21caaa19df9421b350246bcb55331b0cb6 100644 --- a/game/modules/tome/data/maps/towns/bree.lua +++ b/game/modules/tome/data/maps/towns/bree.lua @@ -40,7 +40,7 @@ quickEntity('5', {show_tooltip=true, name="Scribe", display='5', color=colors.WH quickEntity('6', {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', {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', {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', {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('9', {show_tooltip=true, name="Gem Store", display='9', color=colors.BLUE, resolvers.store("GEMSTORE"), image="terrain/wood_store_gem.png"}) quickEntity('0', {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', {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', {show_tooltip=true, name="Closed store", display='*', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}) diff --git a/ideas/crafting.ods b/ideas/crafting.ods index 153dc75eb7df237e56ea97381e4a9d5854483692..e82504753575be838223f15f4c82d284c62cb86f 100644 Binary files a/ideas/crafting.ods and b/ideas/crafting.ods differ