diff --git a/game/modules/tome/data/general/objects/jewelry.lua b/game/modules/tome/data/general/objects/jewelry.lua index 9468383226f0f0540d0c40ea2d6f7cf2758f7464..4c908539f3b76705c30f0a8cf39f1bee3b8ed23f 100644 --- a/game/modules/tome/data/general/objects/jewelry.lua +++ b/game/modules/tome/data/general/objects/jewelry.lua @@ -24,7 +24,7 @@ newEntity{ display = "=", encumber = 0.1, rarity = 6, - desc = _t[[Rings can have magical properties.]], + desc = _t[[Rings make your fingers look great!]], randart_able = "/data/general/objects/random-artifacts/generic.lua", -- Most rings are ego items egos = "/data/general/objects/egos/rings.lua", egos_chance = { prefix=resolvers.mbonus(50, 40), suffix=resolvers.mbonus(50, 40) }, egos_chance_decay = 0.5, @@ -36,7 +36,7 @@ newEntity{ display = '"', encumber = 0.1, rarity = 8, - desc = _t[[Amulets can have magical properties.]], + desc = _t[[Amulets make your neck look great!]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/amulets.lua", egos_chance = { prefix=resolvers.mbonus(50, 40), suffix=resolvers.mbonus(50, 40) }, egos_chance_decay = 0.5, } diff --git a/game/modules/tome/resolvers.lua b/game/modules/tome/resolvers.lua index d7ebf76a72c60e9452e0f1f8154e1fc73ac6dcef..cfba8886b96609624553b7970de30c3b896a5fd3 100644 --- a/game/modules/tome/resolvers.lua +++ b/game/modules/tome/resolvers.lua @@ -1450,3 +1450,18 @@ function resolvers.calc.easy_combat_table(t, e) end return def end + +--- Levelup resolver +function resolvers.levelup_range(min1, max50, stop_at) + return {__resolver="levelup_range", min1, max50, stop_at} +end +function resolvers.calc.levelup_range(t, e, _, _, k, kchain) + if not e._levelup_info then e._levelup_info = {} end + + local base_level = 1 + if e.level_range and e.level_range[1] then base_level = e.level_range[1] end + + local per_level = (t[2] - t[1]) / 50 + e._levelup_info[#e._levelup_info+1] = {every=1, inc=per_level, max=t[3], kchain=table.clone(kchain), k=k} + return base_level * per_level + t[1] +end