diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index c1a67a1d08a4b600fc78ae6fa1fd74cdeec60e54..efe391e22bc3b5263c85b6054f1daf4507aa2fea 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -525,11 +525,12 @@ function _M:generateRandart(data) local picked_egos = {} local legos = {} local been_greater = 0 + game.zone:getEntities(game.level, "object") -- make sure ego definitions are loaded -- merge all egos into one list to correctly calculate rarities table.append(legos, game.level:getEntitiesList("object/"..o.egos..":prefix") or {}) table.append(legos, game.level:getEntitiesList("object/"..o.egos..":suffix") or {}) table.append(legos, game.level:getEntitiesList("object/"..o.egos..":") or {}) ---print(" * loaded ", #legos, "ego definitions") +-- print(" * loaded ", #legos, "ego definitions from ", o.egos) for i = 1, nb_egos or 3 do local list = {} local gr_ego, ignore_filter = false, false @@ -593,7 +594,7 @@ function _M:generateRandart(data) points = points + xpoints end end - o.egos = nil o.egos_chance = nil o.force_ego = nil +-- o.egos = nil o.egos_chance = nil o.force_ego = nil end -- Re-resolve with the (possibly) new resolvers o:resolve() @@ -635,7 +636,7 @@ function _M:generateRandart(data) local p = powers[i] if p and p.points <= hpoints*2 then -- Intentionally allow the budget to be exceeded slightly to guarantee powers at low levels local state = {scaleup = math.max(1,(lev/(p.level_range[2] or 50))^0.5)} --Adjust scaleup factor for each power based on lev and level_range max --- print(" * adding power: "..p.name.."("..p.points.." points)") + print(" * adding power: "..p.name.."("..p.points.." points)") selected_powers[p.name] = selected_powers[p.name] or {} table.ruleMergeAppendAdd(selected_powers[p.name], p, {merger}, state) hpoints = hpoints - p.points