Release 1.2.20
- Added 3 uniques - Added Minion and Totem Elemental Damage - Exclude imported items from quality normalisation - Various minor fixes
This commit is contained in:
@@ -18,6 +18,7 @@ local m_max = math.max
|
||||
local s_format = string.format
|
||||
local band = bit.band
|
||||
local bor = bit.bor
|
||||
local bnot = bit.bnot
|
||||
|
||||
-- List of all damage types, ordered according to the conversion sequence
|
||||
local dmgTypeList = {"Physical", "Lightning", "Cold", "Fire", "Chaos"}
|
||||
@@ -670,25 +671,27 @@ local function mergeMainMods(env, repSlotName, repItem)
|
||||
item = nil
|
||||
elseif item and item.jewelRadiusIndex then
|
||||
-- Jewel has a radius, add it to the list
|
||||
local func = item.jewelFunc or function(nodeMods, out, data)
|
||||
local funcList = item.jewelFunc or { function(nodeMods, out, data)
|
||||
-- Default function just tallies all stats in radius
|
||||
if nodeMods then
|
||||
for _, stat in pairs({"Str","Dex","Int"}) do
|
||||
data[stat] = (data[stat] or 0) + nodeMods:Sum("BASE", nil, stat)
|
||||
end
|
||||
end
|
||||
end }
|
||||
for _, func in ipairs(funcList) do
|
||||
local radiusInfo = data.jewelRadius[item.jewelRadiusIndex]
|
||||
local node = build.spec.nodes[slot.nodeId]
|
||||
t_insert(env.radiusJewelList, {
|
||||
rSq = radiusInfo.rad * radiusInfo.rad,
|
||||
x = node.x,
|
||||
y = node.y,
|
||||
func = func,
|
||||
item = item,
|
||||
nodeId = slot.nodeId,
|
||||
data = { }
|
||||
})
|
||||
end
|
||||
local radiusInfo = data.jewelRadius[item.jewelRadiusIndex]
|
||||
local node = build.spec.nodes[slot.nodeId]
|
||||
t_insert(env.radiusJewelList, {
|
||||
rSq = radiusInfo.rad * radiusInfo.rad,
|
||||
x = node.x,
|
||||
y = node.y,
|
||||
func = func,
|
||||
item = item,
|
||||
nodeId = slot.nodeId,
|
||||
data = { }
|
||||
})
|
||||
end
|
||||
end
|
||||
env.itemList[slotName] = item
|
||||
@@ -1599,6 +1602,14 @@ local function performCalcs(env)
|
||||
end
|
||||
end
|
||||
end
|
||||
if modDB:Sum("FLAG", nil, "SpellDamageAppliesToAttacks") then
|
||||
-- Spell Damage conversion from Crown of Eyes
|
||||
for i, mod in ipairs(modDB.mods.Damage or { }) do
|
||||
if mod.type == "INC" and band(mod.flags, ModFlag.Spell) ~= 0 then
|
||||
modDB:NewMod("Damage", "INC", mod.value, mod.source, bor(band(mod.flags, bnot(ModFlag.Spell)), ModFlag.Attack), mod.keywordFlags, unpack(mod.tagList))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Calculate skill type stats
|
||||
if skillFlags.projectile then
|
||||
@@ -1801,16 +1812,16 @@ local function performCalcs(env)
|
||||
if baseCrit == 100 then
|
||||
output.CritChance = 100
|
||||
else
|
||||
output.CritChance = calcVal(modDB, "CritChance", skillCfg, baseCrit)
|
||||
local base = modDB:Sum("BASE", skillCfg, "CritChance")
|
||||
output.CritChance = (baseCrit + base) * calcMod(modDB, skillCfg, "CritChance")
|
||||
if env.mode_effective then
|
||||
output.CritChance = output.CritChance + enemyDB:Sum("BASE", nil, "SelfExtraCritChance")
|
||||
end
|
||||
output.CritChance = m_min(output.CritChance, 95)
|
||||
if baseCrit > 0 then
|
||||
if (baseCrit + base) > 0 then
|
||||
output.CritChance = m_max(output.CritChance, 5)
|
||||
end
|
||||
if breakdown and output.CritChance ~= baseCrit then
|
||||
local base = modDB:Sum("BASE", skillCfg, "CritChance")
|
||||
local inc = modDB:Sum("INC", skillCfg, "CritChance")
|
||||
local more = modDB:Sum("MORE", skillCfg, "CritChance")
|
||||
local enemyExtra = enemyDB:Sum("BASE", nil, "SelfExtraCritChance")
|
||||
@@ -2515,7 +2526,7 @@ function calcs.buildOutput(build, mode)
|
||||
output.CombatList = table.concat(combatList, ", ")
|
||||
output.CurseList = table.concat(curseList, ", ")
|
||||
|
||||
infoDump(env)
|
||||
--infoDump(env)
|
||||
end
|
||||
|
||||
return env
|
||||
|
||||
@@ -70,7 +70,9 @@ function itemLib.parseItemRaw(item)
|
||||
local rarity = item.rawLines[l]:match("^Rarity: (%a+)")
|
||||
if rarity then
|
||||
mode = "GAME"
|
||||
item.rarity = rarity:upper()
|
||||
if data.colorCodes[rarity:upper()] then
|
||||
item.rarity = rarity:upper()
|
||||
end
|
||||
l = l + 1
|
||||
end
|
||||
end
|
||||
@@ -216,7 +218,7 @@ function itemLib.parseItemRaw(item)
|
||||
elseif mode == "GAME" and not foundExplicit then
|
||||
item.implicitLines = 0
|
||||
end
|
||||
if not item.corrupted and item.base and (item.base.armour or item.base.weapon) then
|
||||
if not item.corrupted and not item.uniqueID and item.base and (item.base.armour or item.base.weapon) then
|
||||
item.quality = 20
|
||||
end
|
||||
if item.variantList then
|
||||
@@ -410,9 +412,11 @@ function itemLib.buildItemModListForSlotNum(item, baseList, slotNum)
|
||||
end
|
||||
end
|
||||
elseif item.type == "Jewel" then
|
||||
item.jewelFunc = nil
|
||||
for _, value in ipairs(modList:Sum("LIST", nil, "Misc")) do
|
||||
if value.type == "JewelFunc" then
|
||||
item.jewelFunc = value.func
|
||||
item.jewelFunc = item.jewelFunc or { }
|
||||
t_insert(item.jewelFunc, value.func)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,6 +27,7 @@ local formList = {
|
||||
["^([%d%.]+)%% of"] = "CONV",
|
||||
["^gain ([%d%.]+)%% of"] = "CONV",
|
||||
["penetrates (%d+)%%"] = "PEN",
|
||||
["penetrates (%d+)%% of"] = "PEN",
|
||||
["penetrates (%d+)%% of enemy"] = "PEN",
|
||||
["^([%d%.]+)%% of (.+) regenerated per second"] = "REGENPERCENT",
|
||||
["^([%d%.]+) (.+) regenerated per second"] = "REGENFLAT",
|
||||
@@ -339,10 +340,10 @@ local modTagList = {
|
||||
-- Player status conditions
|
||||
["when on low life"] = { tag = { type = "Condition", var = "LowLife" } },
|
||||
["while on low life"] = { tag = { type = "Condition", var = "LowLife" } },
|
||||
["when not on low life"] = { tag = { type = "Condition", var = "NotLowLife" } },
|
||||
["while not on low life"] = { tag = { type = "Condition", var = "NotLowLife" } },
|
||||
["when not on low life"] = { tag = { type = "Condition", var = "LowLife", neg = true } },
|
||||
["while not on low life"] = { tag = { type = "Condition", var = "LowLife", neg = true } },
|
||||
["when on full life"] = { tag = { type = "Condition", var = "FullLife" } },
|
||||
["when not on full life"] = { tag = { type = "Condition", var = "NotFullLife" } },
|
||||
["when not on full life"] = { tag = { type = "Condition", var = "FullLife", neg = true } },
|
||||
["while no mana is reserved"] = { tag = { type = "Condition", var = "NoManaReserved" } },
|
||||
["while at maximum power charges"] = { tag = { type = "Condition", var = "AtMaxPowerCharges" } },
|
||||
["while at maximum frenzy charges"] = { tag = { type = "Condition", var = "AtMaxFrenzyCharges" } },
|
||||
@@ -366,6 +367,7 @@ local modTagList = {
|
||||
["if you were damaged by a hit recently"] = { tag = { type = "Condition", var = "BeenHitRecently" } },
|
||||
["if you haven't been hit recently"] = { tag = { type = "Condition", var = "NotBeenHitRecently" } },
|
||||
["if you've taken no damage from hits recently"] = { tag = { type = "Condition", var = "NotBeenHitRecently" } },
|
||||
["if you've blocked a hit from a unique enemy recently"] = { tag = { type = "Condition", var = "BlockedHitFromUniqueEnemyRecently" } },
|
||||
["if you've attacked recently"] = { tag = { type = "Condition", var = "AttackedRecently" } },
|
||||
["if you've cast a spell recently"] = { tag = { type = "Condition", var = "CastSpellRecently" } },
|
||||
["if you've used a fire skill in the past 10 seconds"] = { tag = { type = "Condition", var = "UsedFireSkillInPast10Sec" } },
|
||||
@@ -418,6 +420,7 @@ local specialModList = {
|
||||
["life regeneration is applied to energy shield instead"] = { flag("ZealotsOath") },
|
||||
["life leech applies instantly%. life regeneration has no effect%."] = { flag("VaalPact"), flag("NoLifeRegen") },
|
||||
["deal no non%-fire damage"] = { flag("DealNoPhysical"), flag("DealNoLightning"), flag("DealNoCold"), flag("DealNoChaos") },
|
||||
["(%d+)%% of physical, cold and lightning damage converted to fire damage"] = function(num) return { mod("PhysicalDamageConvertToFire", "BASE", num), mod("LightningDamageConvertToFire", "BASE", num), mod("ColdDamageConvertToFire", "BASE", num) } end,
|
||||
["removes all mana%. spend life instead of mana for skills"] = { mod("Mana", "MORE", -100), flag("BloodMagic") },
|
||||
["enemies you hit with elemental damage temporarily get (%+%d+)%% resistance to those elements and (%-%d+)%% resistance to other elements"] = function(plus, _, minus)
|
||||
minus = tonumber(minus)
|
||||
@@ -432,8 +435,8 @@ local specialModList = {
|
||||
end,
|
||||
-- Ascendancy notables
|
||||
["movement skills cost no mana"] = { mod("ManaCost", "MORE", -100, nil, 0, KeywordFlag.Movement) },
|
||||
["projectiles have 100%% additional chance to pierce targets at the start of their movement, losing this chance as the projectile travels farther"] = { mod("PierceChance", "BASE", 100) },
|
||||
["projectile critical strike chance increased by arrow pierce chance"] = { mod("CritChance", "INC", 100, nil, ModFlag.Projectile) },
|
||||
["projectiles have 100%% additional chance to pierce targets at the start of their movement, losing this chance as the projectile travels farther"] = { mod("PierceChance", "BASE", 50, { type = "Condition", var = "Effective" }) },
|
||||
["projectile critical strike chance increased by arrow pierce chance"] = { mod("CritChance", "INC", 1, nil, ModFlag.Projectile, 0, { type = "PerStat", stat = "PierceChance", div = 1 }) },
|
||||
["always poison on hit while using a flask"] = { mod("PoisonChance", "BASE", 100, { type = "Condition", var = "UsingFlask" }) },
|
||||
["armour received from body armour is doubled"] = { flag("Unbreakable") },
|
||||
["gain (%d+)%% of maximum mana as extra maximum energy shield"] = function(num) return { mod("ManaGainAsEnergyShield", "BASE", num) } end,
|
||||
@@ -535,6 +538,7 @@ local specialModList = {
|
||||
["cannot block attacks"] = { flag("CannotBlockAttacks") },
|
||||
["projectiles pierce while phasing"] = { mod("PierceChance", "BASE", 100, { type = "Condition", var = "Phasing" }) },
|
||||
["increases and reductions to minion damage also affects you"] = { flag("MinionDamageAppliesToPlayer") },
|
||||
["increases and reductions to spell damage also apply to attacks"] = { flag("SpellDamageAppliesToAttacks") },
|
||||
["armour is increased by uncapped fire resistance"] = { mod("Armour", "INC", 1, { type = "PerStat", stat = "FireResistTotal", div = 1 }) },
|
||||
["critical strike chance is increased by uncapped lightning resistance"] = { mod("CritChance", "INC", 1, { type = "PerStat", stat = "LightningResistTotal", div = 1 }) },
|
||||
["critical strikes deal no damage"] = { flag("NoCritDamage") },
|
||||
@@ -622,9 +626,9 @@ local function getMatchConv(others, dst, type)
|
||||
if nodeMods then
|
||||
for _, mod in ipairs(nodeMods) do
|
||||
for _, other in pairs(others) do
|
||||
if mod.name:match(other) then
|
||||
out:NewMod(mod.name, type, -mod.value, "Tree:Jewel")
|
||||
out:NewMod(mod.name:gsub(other, dst), type, mod.value, "Tree:Jewel")
|
||||
if mod.name:match(other) and mod.type == type then
|
||||
out:NewMod(mod.name, type, -mod.value, "Tree:Jewel", mod.flags, mod.keywordFlags)
|
||||
out:NewMod(mod.name:gsub(other, dst), type, mod.value, "Tree:Jewel", mod.flags, mod.keywordFlags)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user