Commit b3851f42c93437db73d49b6fbccf43a192796cd7

Authored by Lisa Greene
1 parent 31a13dc2

Reduce the rate at which rares and randbosses learn new talent trees

@@ -2166,24 +2166,22 @@ function _M:applyRandomClass(b, data, instant) @@ -2166,24 +2166,22 @@ function _M:applyRandomClass(b, data, instant)
2166 local t = b:getTalentFromId(tid) 2166 local t = b:getTalentFromId(tid)
2167 if not t.no_npc_use and not t.no_npc_autolevel and (not t.random_boss_rarity or rng.chance(t.random_boss_rarity)) and not (t.rnd_boss_restrict and util.getval(t.rnd_boss_restrict, b, t, data) ) then 2167 if not t.no_npc_use and not t.no_npc_autolevel and (not t.random_boss_rarity or rng.chance(t.random_boss_rarity)) and not (t.rnd_boss_restrict and util.getval(t.rnd_boss_restrict, b, t, data) ) then
2168 local max = (t.points == 1) and 1 or math.ceil(t.points * 1.2) 2168 local max = (t.points == 1) and 1 or math.ceil(t.points * 1.2)
2169 - local step = max / 70 2169 + local step = max / 65
2170 tres[1][tid] = v + math.ceil(step * data.level) 2170 tres[1][tid] = v + math.ceil(step * data.level)
2171 end 2171 end
2172 end 2172 end
2173 2173
2174 - -- learn talents based on trees: focus trees we take 3-4 talents from with a decent amount of point investment, shallow trees we only take 1 or 2 with not many points  
2175 - -- ideally rares should feel different even within the same class based on what focus trees they get  
2176 local nb_focus, nb_shallow = 0, 0 2174 local nb_focus, nb_shallow = 0, 0
2177 local rank = b.rank 2175 local rank = b.rank
2178 if rank <= 3.2 then --rare 2176 if rank <= 3.2 then --rare
2179 - nb_focus = math.floor(0.2 + rng.float(0.22, 0.35)*(math.max(0,data.level-3))^0.5)  
2180 - nb_shallow = 2 + math.floor(0.25 + rng.float(0.08, 0.2)*(math.max(0,data.level-6))^0.5) 2177 + nb_focus = 1 + math.floor(rng.float(0.15, 0.33)*(math.max(0,data.level-4))^0.5)
  2178 + nb_shallow = 1 + math.floor(0.25 + rng.float(0.08, 0.17)*(math.max(0,data.level-6))^0.5)
2181 elseif rank >= 4 then --boss/elite boss 2179 elseif rank >= 4 then --boss/elite boss
2182 - nb_focus = 1 + math.floor(0.25 + rng.float(0.15, 0.35)*(math.max(0,data.level-6))^0.5)  
2183 - nb_shallow = 1 + math.floor(0.3 + rng.float(0.1, 0.2)*(math.max(0,data.level-4))^0.5) 2180 + nb_focus = 1 + math.floor(0.2 + rng.float(0.085, 0.3)*(math.max(0,data.level-6))^0.5)
  2181 + nb_shallow = 1 + math.floor(0.3 + rng.float(0.07, 0.18)*(math.max(0,data.level-5))^0.5)
2184 else --unique 2182 else --unique
2185 - nb_focus = 1 + math.floor(0.2 + rng.float(0.15, 0.3)*(math.max(0,data.level-10))^0.5)  
2186 - nb_shallow = 1 + math.floor(0.55 + rng.float(0.1, 0.2)*(math.max(0,data.level-8))^0.5) 2183 + nb_focus = 1 + math.floor(0.2 + rng.float(0.085, 0.25)*(math.max(0,data.level-10))^0.5)
  2184 + nb_shallow = 1 + math.floor(0.5 + rng.float(0.07, 0.18)*(math.max(0,data.level-8))^0.5)
2187 end 2185 end
2188 print("Adding "..nb_focus.." primary trees to boss") 2186 print("Adding "..nb_focus.." primary trees to boss")
2189 print("Adding "..nb_shallow.." secondary trees to boss") 2187 print("Adding "..nb_shallow.." secondary trees to boss")
@@ -2255,13 +2253,13 @@ function _M:applyRandomClass(b, data, instant) @@ -2255,13 +2253,13 @@ function _M:applyRandomClass(b, data, instant)
2255 if #t_choices <= 2 or #focus_trees >= nb_focus then 2253 if #t_choices <= 2 or #focus_trees >= nb_focus then
2256 if #t_choices > 0 and #shallow_trees < nb_shallow then 2254 if #t_choices > 0 and #shallow_trees < nb_shallow then
2257 table.insert(shallow_trees, tt) -- record that we added the tree as a minor tree 2255 table.insert(shallow_trees, tt) -- record that we added the tree as a minor tree
2258 - max_talents_from_tree = rng.percent(65) and 2 or 1 2256 + max_talents_from_tree = rng.percent(60) and 2 or 1
2259 print("Adding secondary tree "..tt.." to boss with "..max_talents_from_tree.." talents") 2257 print("Adding secondary tree "..tt.." to boss with "..max_talents_from_tree.." talents")
2260 for i = max_talents_from_tree,1,-1 do 2258 for i = max_talents_from_tree,1,-1 do
2261 local t = table.remove(t_choices, 1) 2259 local t = table.remove(t_choices, 1)
2262 if not t then break end 2260 if not t then break end
2263 local max = (t.points == 1) and 1 or math.ceil(t.points * 1.2) 2261 local max = (t.points == 1) and 1 or math.ceil(t.points * 1.2)
2264 - local step = max / 60 2262 + local step = max / 65
2265 local lev = math.max(1, math.round(rng.float(0.75,1.15)*math.ceil(step * data.level))) 2263 local lev = math.max(1, math.round(rng.float(0.75,1.15)*math.ceil(step * data.level)))
2266 print(#shallow_trees, " * talent:", t.id, lev) 2264 print(#shallow_trees, " * talent:", t.id, lev)
2267 if instant then -- affected by game difficulty settings 2265 if instant then -- affected by game difficulty settings
@@ -2276,14 +2274,14 @@ function _M:applyRandomClass(b, data, instant) @@ -2276,14 +2274,14 @@ function _M:applyRandomClass(b, data, instant)
2276 end 2274 end
2277 else 2275 else
2278 table.insert(focus_trees, tt) --record that we added the tree as a major tree 2276 table.insert(focus_trees, tt) --record that we added the tree as a major tree
2279 - local max_talents_from_tree = rng.percent(75) and 4 or 3 2277 + local max_talents_from_tree = rng.percent(67) and 4 or 3
2280 print("Adding primary tree "..tt.." to boss with "..max_talents_from_tree.." talents") 2278 print("Adding primary tree "..tt.." to boss with "..max_talents_from_tree.." talents")
2281 for i = max_talents_from_tree,1,-1 do 2279 for i = max_talents_from_tree,1,-1 do
2282 local t = table.remove(t_choices, 1) 2280 local t = table.remove(t_choices, 1)
2283 if not t then break end 2281 if not t then break end
2284 local max = (t.points == 1) and 1 or math.ceil(t.points * 1.2) 2282 local max = (t.points == 1) and 1 or math.ceil(t.points * 1.2)
2285 local step = max / 50 2283 local step = max / 50
2286 - local lev = math.max(1, math.round(rng.float(0.75,1.25)*math.ceil(step * data.level))) 2284 + local lev = math.max(1, math.round(rng.float(0.8,1.2)*math.ceil(step * data.level)))
2287 print(#focus_trees, " * talent:", t.id, lev) 2285 print(#focus_trees, " * talent:", t.id, lev)
2288 if instant then -- affected by game difficulty settings 2286 if instant then -- affected by game difficulty settings
2289 if b:getTalentLevelRaw(t) < lev then b:learnTalent(t.id, true, lev - b:getTalentLevelRaw(t.id)) end 2287 if b:getTalentLevelRaw(t) < lev then b:learnTalent(t.id, true, lev - b:getTalentLevelRaw(t.id)) end