Skip to content
Snippets Groups Projects
Commit 505dd3e9 authored by dg's avatar dg
Browse files

allow dual (or more) egos

git-svn-id: http://svn.net-core.org/repos/t-engine4@781 51575b47-30f0-44d4-a5cc-537603b46e54
parent 35fafb98
No related branches found
No related tags found
No related merge requests found
Showing
with 194 additions and 93 deletions
......@@ -100,12 +100,20 @@ function _M:computeRarities(type, list, level, filter)
print(("Entity(%30s) got %3d (=%3d / %3d) chance to generate. Level range(%2d-%2d), current %2d"):format(e.name, math.floor(genprob), math.floor(max), e.rarity, e.level_range[1], e.level_range[2], lev))
-- Generate and store egos list if needed
if e.egos and not level:getEntitiesList(type.."/"..e.egos) then
local egos = self:getEgosList(level, type, e.egos, e.__CLASSNAME)
if egos then
local egos_prob = self:computeRarities(type, egos, level, filter)
level:setEntitiesList(type.."/"..e.egos, egos_prob)
level:setEntitiesList(type.."/base/"..e.egos, egos)
if e.egos and e.egos_chance then
if _G.type(e.egos_chance) == "number" then e.egos_chance = {e.egos_chance} end
for ie, edata in pairs(e.egos_chance) do
local etype = ie
if _G.type(ie) == "number" then etype = "" end
if not level:getEntitiesList(type.."/"..e.egos..":"..etype) then
print("Generating specific ego list", type.."/"..e.egos..":"..etype)
local egos = self:getEgosList(level, type, e.egos, e.__CLASSNAME)
if egos then
local egos_prob = self:computeRarities(type, egos, level, etype ~= "" and function(e) return e[etype] end or nil)
level:setEntitiesList(type.."/"..e.egos..":"..etype, egos_prob)
level:setEntitiesList(type.."/base/"..e.egos..":"..etype, egos)
end
end
end
end
......@@ -221,37 +229,50 @@ function _M:finishEntity(level, type, e, ego_chance)
e:resolve()
-- Add "ego" properties, sometimes
if not e.unique and e.egos and (e.force_ego or (e.egos_chance and rng.percent(util.bound(e.egos_chance + (ego_chance or 0), 0, 100)))) then
local ego
if not e.unique and e.egos and (e.force_ego or e.egos_chance) then
local egos_list = {}
if not e.force_ego then
local egos = level:getEntitiesList(type.."/"..e.egos)
ego = self:pickEntity(egos)
if _G.type(e.egos_chance) == "number" then e.egos_chance = {e.egos_chance} end
-- Pick an ego, then an other and so until we get no more
local picked_etype = {}
local etype = rng.tableIndex(e.egos_chance, picked_etype)
local echance = etype and e.egos_chance[etype]
while etype and rng.percent(util.bound(echance + (ego_chance or 0), 100, 100)) do
picked_etype[etype] = true
if _G.type(etype) == "number" then etype = "" end
local egos = level:getEntitiesList(type.."/"..e.egos..":"..etype)
egos_list[#egos_list+1] = self:pickEntity(egos)
if egos_list[#egos_list] then print("Picked ego", type.."/"..e.egos..":"..etype, ":=>", egos_list[#egos_list].name) else print("Picked ego", type.."/"..e.egos..":"..etype, ":=>", #egos_list) end
etype = rng.tableIndex(e.egos_chance, picked_etype)
echance = e.egos_chance[etype]
end
else
local name = e.force_ego
if _G.type(name) == "table" then name = rng.table(name) end
print("Forcing ego", name)
local egos = level:getEntitiesList(type.."/base/"..e.egos)
ego = egos[name]
local egos = level:getEntitiesList(type.."/base/"..e.egos..":")
egos_list = {egos[name]}
e.force_ego = nil
end
if ego then
print("ego", ego.__CLASSNAME, ego.name, getmetatable(ego))
ego = ego:clone()
ego:resolve()
ego:resolve(nil, true)
local newname
if ego.prefix then
newname = ego.name .. e.name
else
newname = e.name .. ego.name
if #egos_list > 0 then
for ie, ego in ipairs(egos_list) do
print("ego", ego.__CLASSNAME, ego.name, getmetatable(ego))
ego = ego:clone()
ego:resolve()
ego:resolve(nil, true)
local newname
if ego.prefix then newname = ego.name .. e.name
else newname = e.name .. ego.name end
print("applying ego", ego.name, "to ", e.name, "::", newname)
ego.unided_name = nil
table.mergeAdd(e, ego, true)
e.name = newname
e.egoed = true
end
print("applying ego", ego.name, "to ", e.name, "::", newname)
ego.unided_name = nil
table.mergeAdd(e, ego, true)
e.name = newname
e.egoed = true
end
e.egos = nil e.egos_chance = nil e.force_ego = nil
end
-- Generate a stack ?
......
......@@ -64,18 +64,18 @@ function _M:addPond(x, y, spots)
if nmap[i][j] < lowest.v then lowest.v = nmap[i][j]; lowest.x = i; lowest.y = j end
end
end
print("Lowest pond point", lowest.x, lowest.y," ::", lowest.v)
-- print("Lowest pond point", lowest.x, lowest.y," ::", lowest.v)
local quadrant = function(i, j)
local highest = {v=-100, x=nil, y=nil}
local l = line.new(lowest.x, lowest.y, i, j)
local lx, ly = l()
while lx do
print(lx, ly, nmap[lx][ly])
-- print(lx, ly, nmap[lx][ly])
if nmap[lx][ly] > highest.v then highest.v = nmap[lx][ly]; highest.x = lx; highest.y = ly end
lx, ly = l()
end
print("Highest pond point", highest.x, highest.y," ::", highest.v)
-- print("Highest pond point", highest.x, highest.y," ::", highest.v)
local split = (highest.v + lowest.v)
local l = line.new(lowest.x, lowest.y, i, j)
......
......@@ -433,6 +433,13 @@ function rng.tableRemove(t)
return table.remove(t, id)
end
function rng.tableIndex(t, ignore)
local rt = {}
if not ignore then ignore = {} end
for k, e in pairs(t) do if not ignore[k] then rt[#rt+1] = k end end
return rng.table(rt)
end
function util.show_backtrace()
local level = 2
......
......@@ -29,7 +29,7 @@ newEntity{
combat = { talented = "axe", damrange = 1.5, sound = "actions/melee", sound_miss = "actions/melee_miss", },
desc = [[Massive two-handed battleaxes.]],
twohanded = true,
egos = "/data/general/objects/egos/weapon.lua", egos_chance = resolvers.mbonus(40, 5),
egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) },
}
newEntity{ base = "BASE_BATTLEAXE",
......@@ -37,6 +37,7 @@ newEntity{ base = "BASE_BATTLEAXE",
level_range = {1, 10},
require = { stat = { str=11 }, },
cost = 5,
material_level = 1,
combat = {
dam = resolvers.rngavg(6,12),
apr = 1,
......@@ -50,6 +51,7 @@ newEntity{ base = "BASE_BATTLEAXE",
level_range = {10, 20},
require = { stat = { str=16 }, },
cost = 10,
material_level = 2,
combat = {
dam = resolvers.rngavg(15,23),
apr = 2,
......@@ -63,6 +65,7 @@ newEntity{ base = "BASE_BATTLEAXE",
level_range = {20, 30},
require = { stat = { str=24 }, },
cost = 15,
material_level = 3,
combat = {
dam = resolvers.rngavg(28,35),
apr = 2,
......@@ -76,6 +79,7 @@ newEntity{ base = "BASE_BATTLEAXE",
level_range = {30, 40},
require = { stat = { str=35 }, },
cost = 25,
material_level = 4,
combat = {
dam = resolvers.rngavg(40,48),
apr = 3,
......@@ -89,6 +93,7 @@ newEntity{ base = "BASE_BATTLEAXE",
level_range = {40, 50},
require = { stat = { str=48 }, },
cost = 35,
material_level = 5,
combat = {
dam = resolvers.rngavg(54, 60),
apr = 4,
......
......@@ -29,7 +29,7 @@ newEntity{
combat = { talented = "mace", damrange = 1.5, physspeed=1.2, sound = "actions/melee", sound_miss = "actions/melee_miss", },
desc = [[Massive two-handed maul.]],
twohanded = true,
egos = "/data/general/objects/egos/weapon.lua", egos_chance = resolvers.mbonus(40, 5),
egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) },
}
newEntity{ base = "BASE_GREATMAUL",
......@@ -37,6 +37,7 @@ newEntity{ base = "BASE_GREATMAUL",
level_range = {1, 10},
require = { stat = { str=11 }, },
cost = 5,
material_level = 1,
combat = {
dam = resolvers.rngavg(10,16),
apr = 1,
......@@ -50,6 +51,7 @@ newEntity{ base = "BASE_GREATMAUL",
level_range = {10, 20},
require = { stat = { str=16 }, },
cost = 10,
material_level = 2,
combat = {
dam = resolvers.rngavg(22,30),
apr = 2,
......@@ -63,6 +65,7 @@ newEntity{ base = "BASE_GREATMAUL",
level_range = {20, 30},
require = { stat = { str=24 }, },
cost = 15,
material_level = 3,
combat = {
dam = resolvers.rngavg(38,45),
apr = 2,
......@@ -76,6 +79,7 @@ newEntity{ base = "BASE_GREATMAUL",
level_range = {30, 40},
require = { stat = { str=35 }, },
cost = 25,
material_level = 4,
combat = {
dam = resolvers.rngavg(50,59),
apr = 3,
......@@ -89,6 +93,7 @@ newEntity{ base = "BASE_GREATMAUL",
level_range = {40, 50},
require = { stat = { str=48 }, },
cost = 35,
material_level = 5,
combat = {
dam = resolvers.rngavg(62, 72),
apr = 4,
......
......@@ -29,7 +29,7 @@ newEntity{
combat = { talented = "sword", damrange = 1.6, sound = "actions/melee", sound_miss = "actions/melee_miss", },
desc = [[Massive two-handed swords.]],
twohanded = true,
egos = "/data/general/objects/egos/weapon.lua", egos_chance = resolvers.mbonus(40, 5),
egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) },
}
newEntity{ base = "BASE_GREATSWORD",
......@@ -37,6 +37,7 @@ newEntity{ base = "BASE_GREATSWORD",
level_range = {1, 10},
require = { stat = { str=11 }, },
cost = 5,
material_level = 1,
combat = {
dam = resolvers.rngavg(8,14),
apr = 1,
......@@ -50,6 +51,7 @@ newEntity{ base = "BASE_GREATSWORD",
level_range = {10, 20},
require = { stat = { str=16 }, },
cost = 10,
material_level = 2,
combat = {
dam = resolvers.rngavg(18,26),
apr = 2,
......@@ -63,6 +65,7 @@ newEntity{ base = "BASE_GREATSWORD",
level_range = {20, 30},
require = { stat = { str=24 }, },
cost = 15,
material_level = 3,
combat = {
dam = resolvers.rngavg(32,40),
apr = 2,
......@@ -76,6 +79,7 @@ newEntity{ base = "BASE_GREATSWORD",
level_range = {30, 40},
require = { stat = { str=35 }, },
cost = 25,
material_level = 4,
combat = {
dam = resolvers.rngavg(45,52),
apr = 3,
......@@ -89,6 +93,7 @@ newEntity{ base = "BASE_GREATSWORD",
level_range = {40, 50},
require = { stat = { str=48 }, },
cost = 35,
material_level = 5,
combat = {
dam = resolvers.rngavg(58, 66),
apr = 4,
......
......@@ -27,7 +27,7 @@ newEntity{
rarity = 3,
combat = { talented = "axe", damrange = 1.4, sound = "actions/melee", sound_miss = "actions/melee_miss",},
desc = [[One-handed war axes.]],
egos = "/data/general/objects/egos/weapon.lua", egos_chance = resolvers.mbonus(40, 5),
egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) },
}
newEntity{ base = "BASE_WARAXE",
......@@ -35,6 +35,7 @@ newEntity{ base = "BASE_WARAXE",
level_range = {1, 10},
require = { stat = { str=11 }, },
cost = 5,
material_level = 1,
combat = {
dam = resolvers.rngavg(5,8),
apr = 2,
......@@ -48,6 +49,7 @@ newEntity{ base = "BASE_WARAXE",
level_range = {10, 20},
require = { stat = { str=16 }, },
cost = 10,
material_level = 2,
combat = {
dam = resolvers.rngavg(8,14),
apr = 3,
......@@ -61,6 +63,7 @@ newEntity{ base = "BASE_WARAXE",
level_range = {20, 30},
require = { stat = { str=24 }, },
cost = 15,
material_level = 3,
combat = {
dam = resolvers.rngavg(17,23),
apr = 4,
......@@ -74,6 +77,7 @@ newEntity{ base = "BASE_WARAXE",
level_range = {30, 40},
require = { stat = { str=35 }, },
cost = 25,
material_level = 4,
combat = {
dam = resolvers.rngavg(28,35),
apr = 5,
......@@ -87,6 +91,7 @@ newEntity{ base = "BASE_WARAXE",
level_range = {40, 50},
require = { stat = { str=48 }, },
cost = 35,
material_level = 5,
combat = {
dam = resolvers.rngavg(38,42),
apr = 6,
......
......@@ -35,6 +35,7 @@ newEntity{ base = "BASE_LONGBOW",
level_range = {1, 10},
require = { stat = { dex=11 }, },
cost = 5,
material_level = 1,
combat = {
range = 8,
physspeed = 0.8,
......@@ -46,6 +47,7 @@ newEntity{ base = "BASE_LONGBOW",
level_range = {10, 20},
require = { stat = { dex=16 }, },
cost = 10,
material_level = 2,
combat = {
range = 10,
physspeed = 0.8,
......@@ -57,6 +59,7 @@ newEntity{ base = "BASE_LONGBOW",
level_range = {20, 30},
require = { stat = { dex=24 }, },
cost = 15,
material_level = 3,
combat = {
range = 12,
physspeed = 0.8,
......@@ -68,6 +71,7 @@ newEntity{ base = "BASE_LONGBOW",
level_range = {30, 40},
require = { stat = { dex=35 }, },
cost = 25,
material_level = 4,
combat = {
range = 15,
physspeed = 0.8,
......@@ -79,6 +83,7 @@ newEntity{ base = "BASE_LONGBOW",
level_range = {40, 50},
require = { stat = { dex=48 }, },
cost = 35,
material_level = 5,
combat = {
range = 18,
physspeed = 0.8,
......@@ -107,6 +112,7 @@ newEntity{ base = "BASE_ARROW",
level_range = {1, 10},
require = { stat = { dex=11 }, },
cost = 0.05,
material_level = 1,
combat = {
dam = resolvers.rngavg(7,12),
apr = 5,
......@@ -120,6 +126,7 @@ newEntity{ base = "BASE_ARROW",
level_range = {10, 20},
require = { stat = { dex=16 }, },
cost = 0.1,
material_level = 2,
combat = {
dam = resolvers.rngavg(15,22),
apr = 7,
......@@ -133,6 +140,7 @@ newEntity{ base = "BASE_ARROW",
level_range = {20, 30},
require = { stat = { dex=24 }, },
cost = 0.15,
material_level = 3,
combat = {
dam = resolvers.rngavg(28,37),
apr = 10,
......@@ -146,6 +154,7 @@ newEntity{ base = "BASE_ARROW",
level_range = {30, 40},
require = { stat = { dex=35 }, },
cost = 0.25,
material_level = 4,
combat = {
dam = resolvers.rngavg(40,47),
apr = 14,
......@@ -159,6 +168,7 @@ newEntity{ base = "BASE_ARROW",
level_range = {40, 50},
require = { stat = { dex=48 }, },
cost = 0.35,
material_level = 5,
combat = {
dam = resolvers.rngavg(50, 57),
apr = 18,
......
......@@ -26,11 +26,43 @@ newEntity{
encumber = 2,
rarity = 5,
desc = [[A cloth vestment. It offers no intrinsic protection but can be enchanted.]],
egos = "/data/general/objects/egos/robe.lua", egos_chance = resolvers.mbonus(30, 15),
egos = "/data/general/objects/egos/robe.lua", egos_chance = { prefix=resolvers.mbonus(30, 15), suffix=resolvers.mbonus(30, 15) },
}
newEntity{ base = "BASE_CLOTH_ARMOR",
name = "robe",
level_range = {1, 50},
name = "linen robe",
level_range = {1, 10},
cost = 0.5,
material_level = 1,
}
newEntity{ base = "BASE_CLOTH_ARMOR",
name = "woolen robe",
level_range = {10, 20},
cost = 1.5,
material_level = 2,
}
newEntity{ base = "BASE_CLOTH_ARMOR",
name = "cashmere robe",
level_range = {20, 30},
cost = 2.5,
material_level = 3,
combat_def = 2,
}
newEntity{ base = "BASE_CLOTH_ARMOR",
name = "silk robe",
level_range = {30, 40},
cost = 3.5,
material_level = 4,
combat_def = 3,
}
newEntity{ base = "BASE_CLOTH_ARMOR",
name = "elven-silk robe",
level_range = {40, 50},
cost = 5.5,
material_level = 5,
combat_def = 5,
}
......@@ -21,7 +21,7 @@ local Stats = require "engine.interface.ActorStats"
local DamageType = require "engine.DamageType"
newEntity{
name = " of cunning (#STATBONUS#)",
name = " of cunning (#STATBONUS#)", suffix=true,
level_range = {1, 50},
rarity = 6,
cost = 4,
......@@ -30,7 +30,7 @@ newEntity{
},
}
newEntity{
name = " of willpower (#STATBONUS#)",
name = " of willpower (#STATBONUS#)", suffix=true,
level_range = {1, 50},
rarity = 6,
cost = 4,
......@@ -39,7 +39,7 @@ newEntity{
},
}
newEntity{
name = " of mastery (#MASTERY#)",
name = " of mastery (#MASTERY#)", suffix=true,
level_range = {1, 50},
rarity = 3,
cost = 2,
......@@ -91,7 +91,7 @@ newEntity{
end),
}
newEntity{
name = " of greater telepathy",
name = " of greater telepathy", suffix=true,
level_range = {40, 50},
rarity = 15,
cost = 15,
......@@ -100,7 +100,7 @@ newEntity{
},
}
newEntity{
name = " of telepathic range",
name = " of telepathic range", suffix=true,
level_range = {40, 50},
rarity = 15,
cost = 15,
......@@ -109,7 +109,7 @@ newEntity{
},
}
newEntity{
name = " of the fish",
name = " of the fish", suffix=true,
level_range = {25, 50},
rarity = 10,
cost = 10,
......
......@@ -18,7 +18,7 @@
-- darkgod@te4.org
newEntity{
name = " of fire resistance",
name = " of fire resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -27,7 +27,7 @@ newEntity{
},
}
newEntity{
name = " of cold resistance",
name = " of cold resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -36,7 +36,7 @@ newEntity{
},
}
newEntity{
name = " of acid resistance",
name = " of acid resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -45,7 +45,7 @@ newEntity{
},
}
newEntity{
name = " of lightning resistance",
name = " of lightning resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -54,7 +54,7 @@ newEntity{
},
}
newEntity{
name = " of nature resistance",
name = " of nature resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -64,7 +64,7 @@ newEntity{
}
newEntity{
name = " of stability",
name = " of stability", suffix=true,
level_range = {10, 50},
rarity = 7,
cost = 6,
......
......@@ -28,7 +28,7 @@ newEntity{
}
newEntity{
name = " of clear sight",
name = " of clear sight", suffix=true,
level_range = {10, 50},
rarity = 5,
cost = 1,
......
......@@ -21,7 +21,7 @@ local Stats = require "engine.interface.ActorStats"
local DamageType = require "engine.DamageType"
newEntity{
name = " of see invisible",
name = " of see invisible", suffix=true,
level_range = {1, 20},
rarity = 4,
cost = 2,
......@@ -31,7 +31,7 @@ newEntity{
}
newEntity{
name = " of invisibility",
name = " of invisibility", suffix=true,
desc = [[Allows the wearer to become invisible to normal sight
Beware, you should take off your light, otherwise you will still be easily spotted.]],
level_range = {30, 40},
......@@ -43,7 +43,7 @@ Beware, you should take off your light, otherwise you will still be easily spott
}
newEntity{
name = " of regeneration",
name = " of regeneration", suffix=true,
level_range = {10, 20},
rarity = 10,
cost = 8,
......@@ -63,7 +63,7 @@ newEntity{
}
newEntity{
name = " of accuracy",
name = " of accuracy", suffix=true,
level_range = {1, 30},
rarity = 6,
cost = 2,
......@@ -73,7 +73,7 @@ newEntity{
}
newEntity{
name = " of defense",
name = " of defense", suffix=true,
level_range = {1, 30},
rarity = 6,
cost = 2,
......@@ -83,7 +83,7 @@ newEntity{
}
newEntity{
name = " of fire resistance",
name = " of fire resistance", suffix=true,
level_range = {10, 40},
rarity = 6,
cost = 2,
......@@ -93,7 +93,7 @@ newEntity{
}
newEntity{
name = " of cold resistance",
name = " of cold resistance", suffix=true,
level_range = {10, 40},
rarity = 6,
cost = 2,
......@@ -103,7 +103,7 @@ newEntity{
}
newEntity{
name = " of nature resistance",
name = " of nature resistance", suffix=true,
level_range = {10, 40},
rarity = 6,
cost = 2,
......@@ -113,7 +113,7 @@ newEntity{
}
newEntity{
name = " of lightning resistance",
name = " of lightning resistance", suffix=true,
level_range = {10, 40},
rarity = 6,
cost = 2,
......@@ -123,7 +123,7 @@ newEntity{
}
newEntity{
name = " of acid resistance",
name = " of acid resistance", suffix=true,
level_range = {10, 40},
rarity = 6,
cost = 2,
......@@ -133,7 +133,7 @@ newEntity{
}
newEntity{
name = " of spell resistance",
name = " of spell resistance", suffix=true,
level_range = {1, 30},
rarity = 6,
cost = 2,
......@@ -143,7 +143,7 @@ newEntity{
}
newEntity{
name = " of physical resistance",
name = " of physical resistance", suffix=true,
level_range = {1, 30},
rarity = 6,
cost = 2,
......@@ -153,7 +153,7 @@ newEntity{
}
newEntity{
name = " of strength (#STATBONUS#)",
name = " of strength (#STATBONUS#)", suffix=true,
level_range = {1, 50},
rarity = 6,
cost = 4,
......@@ -162,7 +162,7 @@ newEntity{
},
}
newEntity{
name = " of dexterity (#STATBONUS#)",
name = " of dexterity (#STATBONUS#)", suffix=true,
level_range = {1, 50},
rarity = 6,
cost = 4,
......@@ -171,7 +171,7 @@ newEntity{
},
}
newEntity{ define_as = "RING_MAGIC",
name = " of magic (#STATBONUS#)",
name = " of magic (#STATBONUS#)", suffix=true,
level_range = {1, 50},
rarity = 6,
cost = 4,
......@@ -180,7 +180,7 @@ newEntity{ define_as = "RING_MAGIC",
},
}
newEntity{
name = " of constitution (#STATBONUS#)",
name = " of constitution (#STATBONUS#)", suffix=true,
level_range = {1, 50},
rarity = 6,
cost = 4,
......@@ -191,7 +191,7 @@ newEntity{
-------------------------- Damage increase rings
newEntity{
name = " of massacre (#DAMBONUS#)",
name = " of massacre (#DAMBONUS#)", suffix=true,
level_range = {6, 50},
rarity = 4,
cost = 4,
......@@ -200,7 +200,7 @@ newEntity{
},
}
newEntity{ define_as = "RING_ARCANE_POWER",
name = " of arcane power (#DAMBONUS#)",
name = " of arcane power (#DAMBONUS#)", suffix=true,
level_range = {6, 50},
rarity = 4,
cost = 4,
......@@ -209,7 +209,7 @@ newEntity{ define_as = "RING_ARCANE_POWER",
},
}
newEntity{ define_as = "RING_BURNING",
name = " of burning (#DAMBONUS#)",
name = " of burning (#DAMBONUS#)", suffix=true,
level_range = {6, 50},
rarity = 4,
cost = 4,
......@@ -218,7 +218,7 @@ newEntity{ define_as = "RING_BURNING",
},
}
newEntity{ define_as = "RING_FREEZING",
name = " of freezing (#DAMBONUS#)",
name = " of freezing (#DAMBONUS#)", suffix=true,
level_range = {6, 50},
rarity = 4,
cost = 4,
......@@ -227,7 +227,7 @@ newEntity{ define_as = "RING_FREEZING",
},
}
newEntity{ define_as = "RING_NATURE_BLESSING",
name = " of nature's blessing (#DAMBONUS#)",
name = " of nature's blessing (#DAMBONUS#)", suffix=true,
level_range = {6, 50},
rarity = 4,
cost = 4,
......@@ -236,7 +236,7 @@ newEntity{ define_as = "RING_NATURE_BLESSING",
},
}
newEntity{ define_as = "RING_BLIGHT",
name = " of blight (#DAMBONUS#)",
name = " of blight (#DAMBONUS#)", suffix=true,
level_range = {6, 50},
rarity = 4,
cost = 4,
......@@ -245,7 +245,7 @@ newEntity{ define_as = "RING_BLIGHT",
},
}
newEntity{ define_as = "RING_SHOCK",
name = " of shock (#DAMBONUS#)",
name = " of shock (#DAMBONUS#)", suffix=true,
level_range = {6, 50},
rarity = 4,
cost = 4,
......@@ -254,7 +254,7 @@ newEntity{ define_as = "RING_SHOCK",
},
}
newEntity{ define_as = "RING_CORROSION",
name = " of corrosion (#DAMBONUS#)",
name = " of corrosion (#DAMBONUS#)", suffix=true,
level_range = {6, 50},
rarity = 4,
cost = 4,
......
......@@ -18,7 +18,7 @@
-- darkgod@te4.org
newEntity{
name = " of fire resistance",
name = " of fire resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -27,7 +27,7 @@ newEntity{
},
}
newEntity{
name = " of cold resistance",
name = " of cold resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -36,7 +36,7 @@ newEntity{
},
}
newEntity{
name = " of acid resistance",
name = " of acid resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -45,7 +45,7 @@ newEntity{
},
}
newEntity{
name = " of lightning resistance",
name = " of lightning resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -54,7 +54,7 @@ newEntity{
},
}
newEntity{
name = " of nature resistance",
name = " of nature resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 6,
......@@ -84,7 +84,7 @@ newEntity{
}
newEntity{
name = " of power",
name = " of power", suffix=true,
level_range = {20, 50},
rarity = 9,
cost = 15,
......
......@@ -18,7 +18,7 @@
-- darkgod@te4.org
newEntity{
name = " of fire resistance",
name = " of fire resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 4,
......@@ -27,7 +27,7 @@ newEntity{
},
}
newEntity{
name = " of cold resistance",
name = " of cold resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 4,
......@@ -36,7 +36,7 @@ newEntity{
},
}
newEntity{
name = " of acid resistance",
name = " of acid resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 4,
......@@ -45,7 +45,7 @@ newEntity{
},
}
newEntity{
name = " of lightning resistance",
name = " of lightning resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 4,
......@@ -54,7 +54,7 @@ newEntity{
},
}
newEntity{
name = " of nature resistance",
name = " of nature resistance", suffix=true,
level_range = {1, 50},
rarity = 5,
cost = 4,
......@@ -102,7 +102,7 @@ newEntity{
}
newEntity{
name = " of deflection",
name = " of deflection", suffix=true,
level_range = {10, 50},
rarity = 15,
cost = 20,
......@@ -112,7 +112,7 @@ newEntity{
}
newEntity{
name = " of resilience",
name = " of resilience", suffix=true,
level_range = {20, 50},
rarity = 15,
cost = 20,
......
......@@ -20,7 +20,7 @@
local Stats = require "engine.interface.ActorStats"
newEntity{
name = " of power",
name = " of power", suffix=true,
level_range = {1, 50},
rarity = 4,
cost = 8,
......@@ -40,7 +40,7 @@ newEntity{
}
newEntity{
name = " of might",
name = " of might", suffix=true,
level_range = {1, 50},
rarity = 3,
cost = 8,
......@@ -50,7 +50,7 @@ newEntity{
}
newEntity{
name = " of wizardry",
name = " of wizardry", suffix=true,
level_range = {30, 50},
rarity = 12,
cost = 45,
......
......@@ -68,7 +68,7 @@ newEntity{
}
newEntity{
name = " of accuracy",
name = " of accuracy", suffix=true,
level_range = {1, 50},
rarity = 3,
cost = 4,
......@@ -99,7 +99,7 @@ newEntity{
}
newEntity{
name = " of massacre",
name = " of massacre", suffix=true,
level_range = {1, 50},
rarity = 3,
cost = 4,
......
......@@ -29,7 +29,7 @@ newEntity{
encumber = 17,
rarity = 5,
desc = [[A suit of armour made of mail.]],
egos = "/data/general/objects/egos/armor.lua", egos_chance = resolvers.mbonus(40, 5),
egos = "/data/general/objects/egos/armor.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) },
}
newEntity{ base = "BASE_HEAVY_ARMOR",
......@@ -37,6 +37,7 @@ newEntity{ base = "BASE_HEAVY_ARMOR",
level_range = {1, 10},
require = { stat = { str=14 }, },
cost = 20,
material_level = 1,
wielder = {
combat_def = 2,
combat_armor = 4,
......@@ -49,6 +50,7 @@ newEntity{ base = "BASE_HEAVY_ARMOR",
level_range = {10, 20},
require = { stat = { str=20 }, },
cost = 25,
material_level = 2,
wielder = {
combat_def = 2,
combat_armor = 6,
......@@ -61,6 +63,7 @@ newEntity{ base = "BASE_HEAVY_ARMOR",
level_range = {20, 30},
require = { stat = { str=28 }, },
cost = 30,
material_level = 3,
wielder = {
combat_def = 3,
combat_armor = 8,
......@@ -72,6 +75,7 @@ newEntity{ base = "BASE_HEAVY_ARMOR",
name = "galvorn mail armour",
level_range = {30, 40},
cost = 40,
material_level = 4,
require = { stat = { str=38 }, },
wielder = {
combat_def = 4,
......@@ -85,6 +89,7 @@ newEntity{ base = "BASE_HEAVY_ARMOR",
level_range = {40, 50},
require = { stat = { str=48 }, },
cost = 50,
material_level = 5,
wielder = {
combat_def = 5,
combat_armor = 10,
......
......@@ -35,6 +35,7 @@ newEntity{ base = "BASE_HEAVY_BOOTS",
name = "pair of iron boots",
level_range = {1, 20},
cost = 5,
material_level = 1,
wielder = {
combat_armor = 3,
fatigue = 2,
......@@ -45,6 +46,7 @@ newEntity{ base = "BASE_HEAVY_BOOTS",
name = "pair of dwarven-steel boots",
level_range = {20, 40},
cost = 7,
material_level = 3,
wielder = {
combat_armor = 4,
fatigue = 3,
......@@ -55,6 +57,7 @@ newEntity{ base = "BASE_HEAVY_BOOTS",
name = "pair of mithril boots",
level_range = {40, 50},
cost = 10,
material_level = 5,
wielder = {
combat_armor = 5,
fatigue = 4,
......
......@@ -35,6 +35,7 @@ newEntity{ base = "BASE_HELM",
name = "iron helm",
level_range = {1, 20},
cost = 5,
material_level = 1,
wielder = {
combat_armor = 3,
fatigue = 5,
......@@ -45,6 +46,7 @@ newEntity{ base = "BASE_HELM",
name = "dwarven-steel helm",
level_range = {20, 40},
cost = 7,
material_level = 3,
wielder = {
combat_armor = 4,
fatigue = 4,
......@@ -55,6 +57,7 @@ newEntity{ base = "BASE_HELM",
name = "mithril helm",
level_range = {40, 50},
cost = 10,
material_level = 5,
wielder = {
combat_armor = 5,
fatigue = 5,
......
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