diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index a39bdc65956a98dfdf81cced79fdf785d6547757..fb97a2a4fafa7d2332887cead9451447565c76f4 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -52,7 +52,6 @@ newBirthDescriptor{ money = 10, resolvers.equip{ id=true, {type="lite", subtype="lite", name="brass lantern"}, - {type="tool", subtype="digger", name="iron pickaxe"}, }, resolvers.inventory{ id=true, {type="potion", subtype="potion", name="potion of lesser healing", ego_chance=-1000}, @@ -100,7 +99,7 @@ newBirthDescriptor{ "Easy game setting", "All damage done to the player decreased by 30%", "All healing for the player increased by 10%", - "Each five levels get one more 'life' that allows to resurrect at the start of the level.", + "At level 1,2,3,5,7,10,14,18,24,30,40 get one more 'life' that allows to resurrect at the start of the level.", "Achievements are not granted.", }, descriptor_choices = diff --git a/game/modules/tome/data/general/objects/digger.lua b/game/modules/tome/data/general/objects/digger.lua new file mode 100644 index 0000000000000000000000000000000000000000..6c00870ea61acb3e46d623d8f53e01acd08b0a98 --- /dev/null +++ b/game/modules/tome/data/general/objects/digger.lua @@ -0,0 +1,80 @@ +-- 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_DIGGER", + slot = "TOOL", + type = "tool", subtype="digger", + display = "\\", color=colors.LIGHT_BLUE, image = resolvers.image_material("pickaxe", "metal"), + encumber = 3, + rarity = 14, + desc = [[Allows you to dig a wall, remove a tree, create ways.]], + add_name = " (#DIGSPEED#)", + + max_power = 1, power_regen = 1, + use_power = { name = "dig a wall, cut a tree, ...", power = 1, use = function(self, who) + local tg = {type="bolt", range=1, nolock=true} + local x, y = who:getTarget(tg) + if not x or not y then return nil end + + local wait = function() + local co = coroutine.running() + local ok = false + who:restInit(self.digspeed, "digging", "digged", function(cnt, max) + if cnt > max then ok = true end + coroutine.resume(co) + end) + coroutine.yield() + if not ok then + game.logPlayer(who, "You have been interrupted!") + return false + end + return true + end + if wait() then + who:project(tg, x, y, DamageType.DIG, 1) + end + end} + + egos = "/data/general/objects/egos/digger.lua", egos_chance = resolvers.mbonus(10, 5), +} + +newEntity{ base = "BASE_DIGGER", + name = "iron pickaxe", + level_range = {1, 20}, + cost = 3, + material_level = 1, + digspeed = resolvers.rngavg(35,40), +} + +newEntity{ base = "BASE_DIGGER", + name = "dwarven-steel pickaxe", + level_range = {20, 40}, + cost = 3, + material_level = 3, + digspeed = resolvers.rngavg(27,33), +} + +newEntity{ base = "BASE_DIGGER", + name = "mithril pickaxe", + level_range = {40, 50}, + cost = 3, + material_level = 5, + digspeed = resolvers.rngavg(20,25), +} diff --git a/game/modules/tome/data/general/objects/egos/digger.lua b/game/modules/tome/data/general/objects/egos/digger.lua new file mode 100644 index 0000000000000000000000000000000000000000..6e659421834acd0507caa239327497195d96ae66 --- /dev/null +++ b/game/modules/tome/data/general/objects/egos/digger.lua @@ -0,0 +1,47 @@ +-- 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{ + name = " of the badger", suffix=true, + level_range = {1, 50}, + rarity = 7, + cost = 20, + resolvers.generic(function(e) e.digspeed = math.ceil(e.digspeed / 2) end), +} + +newEntity{ + name = " of strength", suffix=true, + level_range = {10, 50}, + rarity = 6, + cost = 10, + wielder = { + inc_stats = { [Stats.STAT_STR] = resolvers.mbonus_material(4, 1, function(e, v) return v * 3 end) }, + }, +} + +newEntity{ + name = " of delving", suffix=true, + level_range = {30, 50}, + rarity = 20, + cost = 20, + wielder = { + lite = 1, + inc_stats = { [Stats.STAT_STR] = resolvers.mbonus_material(3, 1, function(e, v) return v * 3 end), [Stats.STAT_CON] = resolvers.mbonus_material(3, 1, function(e, v) return v * 3 end) }, + }, +}