Skip to content
Snippets Groups Projects
Commit 5ff45400 authored by dg's avatar dg
Browse files

Fix the Paths of the Deads distribution of NPCs

git-svn-id: http://svn.net-core.org/repos/t-engine4@1285 51575b47-30f0-44d4-a5cc-537603b46e54
parent e41bb834
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,12 @@ function _M:computeRarities(type, list, level, filter, add_level, rarity_field)
for i, e in ipairs(list) do
if e[rarity_field] and e.level_range and (not filter or filter(e)) then
-- print("computing rarity of", e.name)
local lev = self.base_level + (level.level - 1) + (add_level or 0)
local lev
if self.level_adjust_level then
lev = self:level_adjust_level(level)
else
lev = self.base_level + (level.level - 1) + (add_level or 0)
end
local max = 10000
if lev < e.level_range[1] then max = 10000 / (3 * (e.level_range[1] - lev))
......
......@@ -87,7 +87,8 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Rushes toward your target with incredible speed. If the target is reached you get a free attack doing 120% weapon damage.]])
return ([[Rushes toward your target with incredible speed. If the target is reached you get a free attack doing 120% weapon damage.
You must rush from at least 2 tiles away.]])
end,
}
......
......@@ -24,6 +24,7 @@ return {
max_level = 8,
decay = {300, 800},
actor_adjust_level = function(zone, level, e) return 1 + zone.max_level - (zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2)) end,
level_adjust_level = function(zone, level) print("=============", zone.base_level + (zone.max_level - level.level)) return zone.base_level + (zone.max_level - level.level) end,
width = 50, height = 50,
-- all_remembered = true,
-- all_lited = true,
......
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