1) Version 1.7

2) Fixed a bug that prevented equipment sets from exploring what happens if overmaxed
   stats are reduced.  This could result in non-optimal sets.
3) Temporarily added debugging code for using portals in equipment sets
master
Durel 7 years ago
parent 3de28ad37c
commit aaf7c5e731

@ -12114,7 +12114,7 @@ function inv.set.createCR()
dbot.debug("delta[" .. k .. "] = " .. statDelta[k] .. ", statValue = " .. v)
end -- if
if (statDelta[k] ~= nil) and ((v - statDelta[k]) > 0) then
if (statDelta[k] ~= nil) and ((v - statDelta[k]) >= 0) then
handicap[k] = handicap[k] - handicapDelta
dbot.debug("Set handicap for \"" .. k .. "\" to " .. handicap[k])
handicapExistsThisIter = true
@ -12206,6 +12206,11 @@ function inv.set.createWithHandicap(priorityName, level, handicap)
local objWearable = inv.items.getStatField(objId, invStatFieldWearable) or ""
local objWeight = tonumber(inv.items.getStatField(objId, invStatFieldWeight) or 0)
if (objWearable == "portal") then --FIXME DEBUG
dbot.note("@YFIXME@W: Evaluating portal \"" .. (inv.items.getField(objId, invFieldColorName) or "nil") ..
"@W\": portal level=" .. objLevel .. ", target level=" .. level)
end -- if
if ((objIdentified == invIdLevelPartial) or (objIdentified == invIdLevelFull)) and
(objLevel ~= nil) and (objLevel <= level) then
@ -12219,6 +12224,11 @@ function inv.set.createWithHandicap(priorityName, level, handicap)
table.insert(weaponArray, { id = objId, score = score, offhand = offhandScore, weight = objWeight })
end -- if
if (objWearable == "portal") then -- FIXME DEBUG
dbot.note("@CFIXME@W: \"" .. (inv.items.getField(objId, invFieldColorName) or "nil") ..
"@W\": score=" .. (score or "nil"))
end -- if
for _,w in ipairs(inv.wearables[objWearable]) do
-- Set a default (low) score if we haven't used this slot yet
if (newSet[w] == nil) then
@ -12234,6 +12244,11 @@ function inv.set.createWithHandicap(priorityName, level, handicap)
dbot.debug("Upgrading \"" .. w .. "\" to \"" .. nextBestName .. "\"")
end -- if
if (objWearable == "portal") then -- FIXME DEBUG
dbot.note("@MFIXME@W: Upgrading portal \"" .. w .. "\" to \"" .. (nextBestName or "nil") ..
"\"")
end -- if
nextBest = tmp
end -- if
end -- for

Loading…
Cancel
Save