Skip to content
Snippets Groups Projects
Commit 19925ea7 authored by dg's avatar dg
Browse files

Added diggers and related egos!

git-svn-id: http://svn.net-core.org/repos/t-engine4@1283 51575b47-30f0-44d4-a5cc-537603b46e54
parent f453ea9f
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,6 @@ newBirthDescriptor{ ...@@ -52,7 +52,6 @@ newBirthDescriptor{
money = 10, money = 10,
resolvers.equip{ id=true, resolvers.equip{ id=true,
{type="lite", subtype="lite", name="brass lantern"}, {type="lite", subtype="lite", name="brass lantern"},
{type="tool", subtype="digger", name="iron pickaxe"},
}, },
resolvers.inventory{ id=true, resolvers.inventory{ id=true,
{type="potion", subtype="potion", name="potion of lesser healing", ego_chance=-1000}, {type="potion", subtype="potion", name="potion of lesser healing", ego_chance=-1000},
...@@ -100,7 +99,7 @@ newBirthDescriptor{ ...@@ -100,7 +99,7 @@ newBirthDescriptor{
"Easy game setting", "Easy game setting",
"All damage done to the player decreased by 30%", "All damage done to the player decreased by 30%",
"All healing for the player increased by 10%", "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.", "Achievements are not granted.",
}, },
descriptor_choices = descriptor_choices =
......
-- 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),
}
-- 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) },
},
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment