Release 1.4.5

- Added demigod/legacy quiver bases
- Fixed enchant UI only finding the first skill in each socket group
- Fixed life/mana leech boot enchantment not working
This commit is contained in:
Openarl
2017-04-19 22:54:50 +10:00
parent 82d42a0605
commit 5ccb416e3c
42 changed files with 670 additions and 496 deletions

View File

@@ -383,15 +383,11 @@ function calcs.buildActiveSkillModList(env, actor, activeSkill)
end
-- Extract skill data
for _, value in ipairs(env.modDB:Sum("LIST", activeSkill.skillCfg, "Misc")) do
if value.type == "SkillData" then
activeSkill.skillData[value.key] = value.value
end
for _, value in ipairs(env.modDB:Sum("LIST", activeSkill.skillCfg, "SkillData")) do
activeSkill.skillData[value.key] = value.value
end
for _, value in ipairs(skillModList:Sum("LIST", activeSkill.skillCfg, "Misc")) do
if value.type == "SkillData" then
activeSkill.skillData[value.key] = value.value
end
for _, value in ipairs(skillModList:Sum("LIST", activeSkill.skillCfg, "SkillData")) do
activeSkill.skillData[value.key] = value.value
end
-- Create minion

View File

@@ -151,13 +151,11 @@ function calcs.offence(env, actor)
modDB:AddList(mainSkill.skillModList)
-- Update skill data
for _, value in ipairs(modDB:Sum("LIST", skillCfg, "Misc")) do
if value.type == "SkillData" then
if value.merge == "MAX" then
skillData[value.key] = m_max(value.value, skillData[value.key] or 0)
else
skillData[value.key] = value.value
end
for _, value in ipairs(modDB:Sum("LIST", skillCfg, "SkillData")) do
if value.merge == "MAX" then
skillData[value.key] = m_max(value.value, skillData[value.key] or 0)
else
skillData[value.key] = value.value
end
end
@@ -173,8 +171,8 @@ function calcs.offence(env, actor)
if modDB:Sum("FLAG", nil, "MinionDamageAppliesToPlayer") then
-- Minion Damage conversion from The Scourge
for _, value in ipairs(modDB:Sum("LIST", env.player.mainSkill.skillCfg, "Misc")) do
if value.type == "MinionModifier" and value.mod.name == "Damage" then
for _, value in ipairs(modDB:Sum("LIST", env.player.mainSkill.skillCfg, "MinionModifier")) do
if value.mod.name == "Damage" then
modDB:AddMod(value.mod)
end
end
@@ -726,13 +724,13 @@ function calcs.offence(env, actor)
end
else
if not modDB:Sum("FLAG", cfg, "CannotLeechLife") then
local lifeLeech = modDB:Sum("BASE", cfg, "DamageLifeLeech", damageType.."DamageLifeLeech", isElemental[damageType] and "ElementalDamageLifeLeech" or nil) + enemyDB:Sum("BASE", nil, "SelfDamageLifeLeech") / 100
local lifeLeech = modDB:Sum("BASE", cfg, "DamageLeech", "DamageLifeLeech", damageType.."DamageLifeLeech", isElemental[damageType] and "ElementalDamageLifeLeech" or nil) + enemyDB:Sum("BASE", nil, "SelfDamageLifeLeech") / 100
if lifeLeech > 0 then
lifeLeechTotal = lifeLeechTotal + (min + max) / 2 * lifeLeech / 100
end
end
if not modDB:Sum("FLAG", cfg, "CannotLeechMana") then
local manaLeech = modDB:Sum("BASE", cfg, "DamageManaLeech", damageType.."DamageManaLeech", isElemental[damageType] and "ElementalDamageManaLeech" or nil) + enemyDB:Sum("BASE", nil, "SelfDamageManaLeech") / 100
local manaLeech = modDB:Sum("BASE", cfg, "DamageLeech", "DamageManaLeech", damageType.."DamageManaLeech", isElemental[damageType] and "ElementalDamageManaLeech" or nil) + enemyDB:Sum("BASE", nil, "SelfDamageManaLeech") / 100
if manaLeech > 0 then
manaLeechTotal = manaLeechTotal + (min + max) / 2 * manaLeech / 100
end

View File

@@ -157,11 +157,7 @@ local function doActorAttribsPoolsConditions(env, actor)
else
condList["NotUsingCorruptedItem"] = true
end
if env.mode_buffs then
condList["Buffed"] = true
end
if env.mode_combat then
condList["Combat"] = true
if env.mode_combat then
if not modDB:Sum("FLAG", nil, "NeverCrit") then
condList["CritInPast8Sec"] = true
end
@@ -186,17 +182,9 @@ local function doActorAttribsPoolsConditions(env, actor)
condList["DetonatedMinesRecently"] = true
end
end
if env.mode_effective then
condList["Effective"] = true
end
for _, value in ipairs(modDB:Sum("LIST", nil, "Misc")) do
if value.type == "Condition" then
condList[value.var] = true
end
end
end
-- Process charges, misc modifiers, and other buffs
-- Process charges, enemy modifiers, and other buffs
local function doActorMisc(env, actor)
local modDB = actor.modDB
local enemyDB = actor.enemy.modDB
@@ -244,24 +232,9 @@ local function doActorMisc(env, actor)
condList["AtMaxEnduranceCharges"] = true
end
-- Process misc modifiers
for _, value in ipairs(modDB:Sum("LIST", nil, "Misc")) do
if value.type == "Condition" then
condList[value.var] = true
elseif value.type == "EnemyCondition" then
enemyDB.conditions[value.var] = true
end
end
-- Process enemy modifiers last in case they depend on conditions that were set by misc modifiers
for _, value in ipairs(modDB:Sum("LIST", nil, "Misc")) do
if value.type == "EnemyModifier" then
enemyDB:AddMod(value.mod)
end
end
-- Process conditions that can depend on other conditions
if condList["Ignited"] then
condList["Burning"] = true
-- Process enemy modifiers
for _, value in ipairs(modDB:Sum("LIST", nil, "EnemyModifier")) do
enemyDB:AddMod(value.mod)
end
-- Add misc buffs
@@ -314,7 +287,7 @@ function calcs.perform(env)
env.minion.modDB = common.New("ModDB")
env.minion.modDB.actor = env.minion
env.minion.modDB.multipliers["Level"] = env.minion.level
calcs.initModDB(env.minion.modDB)
calcs.initModDB(env, env.minion.modDB)
env.minion.modDB:NewMod("Life", "BASE", m_floor(data.monsterLifeTable[env.minion.level] * env.minion.minionData.life), "Base")
if env.minion.minionData.energyShield then
env.minion.modDB:NewMod("EnergyShield", "BASE", m_floor(data.monsterLifeTable[env.minion.level] * env.minion.minionData.life * env.minion.minionData.energyShield), "Base")
@@ -363,13 +336,6 @@ function calcs.perform(env)
end
end
-- Set multipliers
for _, value in ipairs(modDB:Sum("LIST", nil, "Misc")) do
if value.type == "Multiplier" then
modDB.multipliers[value.var] = (modDB.multipliers[value.var] or 0) + value.value
end
end
-- Merge flask modifiers
if env.mode_combat then
local effectInc = modDB:Sum("INC", nil, "FlaskEffect")
@@ -457,10 +423,8 @@ function calcs.perform(env)
doActorAttribsPoolsConditions(env, env.player)
if env.minion then
for _, source in ipairs({modDB, env.player.mainSkill.skillModList}) do
for _, value in ipairs(source:Sum("LIST", env.player.mainSkill.skillCfg, "Misc")) do
if value.type == "MinionModifier" then
env.minion.modDB:AddMod(value.mod)
end
for _, value in ipairs(source:Sum("LIST", env.player.mainSkill.skillCfg, "MinionModifier")) do
env.minion.modDB:AddMod(value.mod)
end
end
doActorAttribsPoolsConditions(env, env.minion)
@@ -483,7 +447,7 @@ function calcs.perform(env)
local minionCurses = {
limit = 1,
}
local affectedByAuras = { }
local affectedByAura = { }
for _, activeSkill in ipairs(env.activeSkillList) do
local skillModList = activeSkill.skillModList
local skillCfg = activeSkill.skillCfg
@@ -511,7 +475,7 @@ function calcs.perform(env)
if activeSkill.auraModList then
if not activeSkill.skillData.auraCannotAffectSelf then
activeSkill.buffSkill = true
affectedByAuras[env.player] = true
affectedByAura[env.player] = true
local srcList = common.New("ModList")
local inc = modDB:Sum("INC", skillCfg, "AuraEffect", "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
local more = modDB:Sum("MORE", skillCfg, "AuraEffect", "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
@@ -521,7 +485,7 @@ function calcs.perform(env)
end
if env.minion and not modDB:Sum("FLAG", nil, "YourAurasCannotAffectAllies") then
activeSkill.minionBuffSkill = true
affectedByAuras[env.minion] = true
affectedByAura[env.minion] = true
local srcList = common.New("ModList")
local inc = modDB:Sum("INC", skillCfg, "AuraEffect") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
local more = modDB:Sum("MORE", skillCfg, "AuraEffect") * env.minion.modDB:Sum("MORE", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
@@ -563,6 +527,7 @@ function calcs.perform(env)
if activeSkill.curseModList or (activeSkill.skillFlags.curse and activeSkill.buffModList) then
local curse = {
name = activeSkill.activeGem.name,
fromPlayer = true,
priority = activeSkill.skillTypes[SkillType.Aura] and 3 or 1,
}
local inc = modDB:Sum("INC", skillCfg, "CurseEffect") + enemyDB:Sum("INC", nil, "CurseEffectOnSelf") + skillModList:Sum("INC", skillCfg, "CurseEffect")
@@ -612,8 +577,8 @@ function calcs.perform(env)
for _, value in ipairs(modDB:Sum("LIST", nil, "ExtraCurse")) do
local curse = {
name = value.name,
fromPlayer = true,
priority = 2,
modList = common.New("ModList")
}
local gemModList = common.New("ModList")
calcs.mergeGemMods(gemModList, {
@@ -630,6 +595,7 @@ function calcs.perform(env)
end
end
end
curse.modList = common.New("ModList")
curse.modList:ScaleAddList(curseModList, (1 + enemyDB:Sum("INC", nil, "CurseEffectOnSelf") / 100) * enemyDB:Sum("MORE", nil, "CurseEffectOnSelf"))
t_insert(curses, curse)
end
@@ -674,9 +640,12 @@ function calcs.perform(env)
enemyDB:AddList(modList)
end
modDB.multipliers["CurseOnEnemy"] = #curseSlots
local affectedByCurse = { }
for _, slot in ipairs(curseSlots) do
modDB.conditions["EnemyCursed"] = true
enemyDB.conditions["Cursed"] = true
if slot.fromPlayer then
affectedByCurse[env.enemy] = true
end
if slot.modList then
enemyDB:AddList(slot.modList)
end
@@ -703,9 +672,14 @@ function calcs.perform(env)
end
end
-- Check for modifiers to apply to actors affected by player auras
-- Check for modifiers to apply to actors affected by player auras or curses
for _, value in ipairs(modDB:Sum("LIST", nil, "AffectedByAuraMod")) do
for actor in pairs(affectedByAuras) do
for actor in pairs(affectedByAura) do
actor.modDB:AddMod(value.mod)
end
end
for _, value in ipairs(modDB:Sum("LIST", nil, "AffectedByCurseMod")) do
for actor in pairs(affectedByCurse) do
actor.modDB:AddMod(value.mod)
end
end

View File

@@ -515,17 +515,17 @@ return {
}, },
{ label = "Life Leech Rate", flag = "leechLife", notFlag = "showAverage", { format = "{1:output:LifeLeechRate}",
{ breakdown = "LifeLeech" },
{ label = "Player modifiers", notFlagList = { "totem", "attack" }, modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", notFlag = "totem", flag = "weapon1Attack", modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", notFlag = "totem", flag = "weapon2Attack", modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Player modifiers", notFlagList = { "totem", "attack" }, modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", notFlag = "totem", flag = "weapon1Attack", modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", notFlag = "totem", flag = "weapon2Attack", modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Totem modifiers", flag = "totem", modName = { "DamageLifeLeechToPlayer" }, modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = { "SelfDamageLifeLeech" }, modType = "BASE", enemy = true },
}, },
{ label = "Life Leech per Hit", flagList = { "leechLife", "showAverage" }, { format = "{1:output:LifeLeechPerHit}",
{ breakdown = "LifeLeech" },
{ label = "Player modifiers", notFlagList = { "totem", "attack" }, modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", notFlag = "totem", flag = "weapon1Attack", modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", notFlag = "totem", flag = "weapon2Attack", modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Player modifiers", notFlagList = { "totem", "attack" }, modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", notFlag = "totem", flag = "weapon1Attack", modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", notFlag = "totem", flag = "weapon2Attack", modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Totem modifiers", flag = "totem", modName = { "DamageLifeLeechToPlayer" }, modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = { "SelfDamageLifeLeech" }, modType = "BASE", enemy = true },
}, },
@@ -547,17 +547,17 @@ return {
}, },
{ label = "ES Leech Rate", flag = "leechES", notFlag = "showAverage", { format = "{1:output:EnergyShieldLeechRate}",
{ breakdown = "EnergyShieldLeech" },
{ label = "Player modifiers", notFlagList = { "totem", "attack" }, modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", notFlag = "totem", flag = "weapon1Attack", modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", notFlag = "totem", flag = "weapon2Attack", modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Player modifiers", notFlagList = { "totem", "attack" }, modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", notFlag = "totem", flag = "weapon1Attack", modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", notFlag = "totem", flag = "weapon2Attack", modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Totem modifiers", flag = "totem", modName = { "DamageLifeLeechToPlayer" }, modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = { "SelfDamageLifeLeech" }, modType = "BASE", enemy = true },
}, },
{ label = "ES Leech per Hit", flagList = { "leechES", "showAverage" }, { format = "{1:output:EnergyShieldLeechPerHit}",
{ breakdown = "EnergyShieldLeech" },
{ label = "Player modifiers", notFlagList = { "totem", "attack" }, modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", notFlag = "totem", flag = "weapon1Attack", modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", notFlag = "totem", flag = "weapon2Attack", modName = { "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Player modifiers", notFlagList = { "totem", "attack" }, modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", notFlag = "totem", flag = "weapon1Attack", modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", notFlag = "totem", flag = "weapon2Attack", modName = { "DamageLeech", "DamageLifeLeech", "PhysicalDamageLifeLeech", "LightningDamageLifeLeech", "ColdDamageLifeLeech", "FireDamageLifeLeech", "ChaosDamageLifeLeech", "ElementalDamageLifeLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Totem modifiers", flag = "totem", modName = { "DamageLifeLeechToPlayer" }, modType = "BASE", cfg = "skill" },
{ label = "Enemy modifiers", modName = { "SelfDamageLifeLeech" }, modType = "BASE", enemy = true },
}, },
@@ -579,16 +579,16 @@ return {
}, },
{ label = "Mana Leech Rate", flag = "leechMana", notFlag = "showAverage", { format = "{1:output:ManaLeechRate}",
{ breakdown = "ManaLeech" },
{ label = "Player modifiers", notFlag = "attack", modName = { "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", flag = "weapon1Attack", modName = { "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", flag = "weapon2Attack", modName = { "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Player modifiers", notFlag = "attack", modName = { "DamageLeech", "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", flag = "weapon1Attack", modName = { "DamageLeech", "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", flag = "weapon2Attack", modName = { "DamageLeech", "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Enemy modifiers", modName = { "SelfDamageManaLeech" }, modType = "BASE", cfg = "skill", enemy = true },
}, },
{ label = "Mana Leech per Hit", flagList = { "leechMana", "showAverage" }, { format = "{1:output:ManaLeechPerHit}",
{ breakdown = "ManaLeech" },
{ label = "Player modifiers", notFlag = "attack", modName = { "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", flag = "weapon1Attack", modName = { "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", flag = "weapon2Attack", modName = { "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Player modifiers", notFlag = "attack", modName = { "DamageLeech", "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "skill" },
{ label = "Main Hand", flag = "weapon1Attack", modName = { "DamageLeech", "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "weapon1" },
{ label = "Off Hand", flag = "weapon2Attack", modName = { "DamageLeech", "DamageManaLeech", "PhysicalDamageManaLeech", "LightningDamageManaLeech", "ColdDamageManaLeech", "FireDamageManaLeech", "ChaosDamageManaLeech", "ElementalDamageManaLeech" }, modType = "BASE", cfg = "weapon2" },
{ label = "Enemy modifiers", modName = { "SelfDamageManaLeech" }, modType = "BASE", enemy = true },
}, },
{ label = "Mana Gain Rate", notFlag = "showAverage", haveOutput = "ManaOnHitRate", { format = "{1:output:ManaOnHitRate}",

View File

@@ -14,8 +14,8 @@ local m_max = math.max
local tempTable1 = { }
-- Initialise modifier database with stats common to all actors
function calcs.initModDB(modDB)
-- Initialise modifier database with stats and conditions common to all actors
function calcs.initModDB(env, modDB)
modDB:NewMod("FireResistMax", "BASE", 75, "Base")
modDB:NewMod("ColdResistMax", "BASE", 75, "Base")
modDB:NewMod("LightningResistMax", "BASE", 75, "Base")
@@ -30,6 +30,10 @@ function calcs.initModDB(modDB)
modDB:NewMod("DamageTaken", "INC", 50, "Base", { type = "Condition", var = "Shocked" })
modDB:NewMod("HitChance", "MORE", -50, "Base", { type = "Condition", var = "Blinded" })
modDB:NewMod("MovementSpeed", "INC", -30, "Base", { type = "Condition", var = "Maimed" })
modDB:NewMod("Condition:Burning", "FLAG", true, "Base", { type = "Condition", var = "Ignited" })
modDB.conditions["Buffed"] = env.mode_buffs
modDB.conditions["Combat"] = env.mode_combat
modDB.conditions["Effective"] = env.mode_effective
end
-- Build list of modifiers from the listed tree nodes
@@ -124,7 +128,7 @@ function calcs.initEnv(build, mode, override)
modDB:NewMod(stat, "BASE", classStats["base_"..stat:lower()], "Base")
end
modDB.multipliers["Level"] = m_max(1, m_min(100, build.characterLevel))
calcs.initModDB(modDB)
calcs.initModDB(env, modDB)
modDB:NewMod("Life", "BASE", 12, "Base", { type = "Multiplier", var = "Level", base = 38 })
modDB:NewMod("Mana", "BASE", 6, "Base", { type = "Multiplier", var = "Level", base = 34 })
modDB:NewMod("ManaRegen", "BASE", 0.0175, "Base", { type = "PerStat", stat = "Mana", div = 1 })
@@ -181,7 +185,7 @@ function calcs.initEnv(build, mode, override)
local enemyDB = common.New("ModDB")
env.enemyDB = enemyDB
env.enemyLevel = m_max(1, m_min(100, env.configInput.enemyLevel and env.configInput.enemyLevel or m_min(env.build.characterLevel, 84)))
calcs.initModDB(enemyDB)
calcs.initModDB(env, enemyDB)
enemyDB:NewMod("Accuracy", "BASE", data.monsterAccuracyTable[env.enemyLevel], "Base")
enemyDB:NewMod("Evasion", "BASE", data.monsterEvasionTable[env.enemyLevel], "Base")

View File

@@ -149,11 +149,11 @@ local function makeSkillMod(modName, modType, modVal, flags, keywordFlags, ...)
tagList = { ... }
}
end
local function makeFlagMod(modName)
return makeSkillMod(modName, "FLAG", true)
local function makeFlagMod(modName, ...)
return makeSkillMod(modName, "FLAG", true, 0, 0, ...)
end
local function makeSkillDataMod(dataKey, dataValue, ...)
return makeSkillMod("Misc", "LIST", { type = "SkillData", key = dataKey, value = dataValue }, 0, 0, ...)
return makeSkillMod("SkillData", "LIST", { key = dataKey, value = dataValue }, 0, 0, ...)
end
local skillTypes = {
"act_str",

View File

@@ -522,10 +522,8 @@ function itemLib.buildItemModListForSlotNum(item, baseList, slotNum)
end
end
weaponData.critChance = round(item.base.weapon.critChanceBase * (1 + sumLocal(modList, "CritChance", "INC", 0) / 100), 2)
for _, value in ipairs(modList:Sum("LIST", nil, "Misc")) do
if value.type == "WeaponData" then
weaponData[value.key] = value.value
end
for _, value in ipairs(modList:Sum("LIST", nil, "WeaponData")) do
weaponData[value.key] = value.value
end
weaponData.AccuracyInc = sumLocal(modList, "Accuracy", "INC", 0)
if weaponData.AccuracyInc > 0 then
@@ -566,10 +564,8 @@ function itemLib.buildItemModListForSlotNum(item, baseList, slotNum)
if item.base.armour.movementPenalty then
modList:NewMod("MovementSpeed", "INC", -item.base.armour.movementPenalty, item.modSource, { type = "Condition", var = "IgnoreMovementPenalties", neg = true })
end
for _, value in ipairs(modList:Sum("LIST", nil, "Misc")) do
if value.type == "ArmourData" then
armourData[value.key] = value.value
end
for _, value in ipairs(modList:Sum("LIST", nil, "ArmourData")) do
armourData[value.key] = value.value
end
elseif item.base.flask then
local flaskData = item.flaskData
@@ -600,20 +596,17 @@ function itemLib.buildItemModListForSlotNum(item, baseList, slotNum)
flaskData.chargesUsed = m_floor(item.base.flask.chargesUsed * (1 + sumLocal(modList, "FlaskChargesUsed", "INC", 0) / 100))
flaskData.gainMod = 1 + sumLocal(modList, "FlaskChargeRecovery", "INC", 0) / 100
flaskData.effectInc = sumLocal(modList, "FlaskEffect", "INC", 0)
for _, value in ipairs(modList:Sum("LIST", nil, "Misc")) do
if value.type == "FlaskData" then
flaskData[value.key] = value.value
end
for _, value in ipairs(modList:Sum("LIST", nil, "FlaskData")) do
flaskData[value.key] = value.value
end
elseif item.type == "Jewel" then
local jewelData = item.jewelData
for _, value in ipairs(modList:Sum("LIST", nil, "Misc")) do
if value.type == "JewelFunc" then
jewelData.funcList = jewelData.funcList or { }
t_insert(jewelData.funcList, value.func)
elseif value.type == "JewelData" then
jewelData[value.key] = value.value
end
for _, func in ipairs(modList:Sum("LIST", nil, "JewelFunc")) do
jewelData.funcList = jewelData.funcList or { }
t_insert(jewelData.funcList, func)
end
for _, value in ipairs(modList:Sum("LIST", nil, "JewelData")) do
jewelData[value.key] = value.value
end
end
return { unpack(modList) }
@@ -663,7 +656,7 @@ function itemLib.buildItemModList(item)
end
if item.name == "Tabula Rasa, Simple Robe" or item.name == "Skin of the Loyal, Simple Robe" or item.name == "Skin of the Lords, Simple Robe" then
-- Hack to remove the energy shield
t_insert(baseList, { name = "Misc", type = "LIST", value = { type = "ArmourData", key = "EnergyShield" }, flags = 0, keywordFlags = 0, tagList = { } })
t_insert(baseList, { name = "ArmourData", type = "LIST", value = { key = "EnergyShield" }, flags = 0, keywordFlags = 0, tagList = { } })
end
if item.base.weapon or item.type == "Ring" then
item.slotModList = { }

View File

@@ -34,6 +34,7 @@ local formList = {
["^regenerate ([%d%.]+) (.+) per second"] = "REGENFLAT",
["^regenerate ([%d%.]+)%% (.+) per second"] = "REGENPERCENT",
["^regenerate ([%d%.]+)%% of (.+) per second"] = "REGENPERCENT",
["^regenerate ([%d%.]+)%% of your (.+) per second"] = "REGENPERCENT",
["(%d+) to (%d+) additional (%a+) damage"] = "DMG",
["adds (%d+)%-(%d+) (%a+) damage"] = "DMG",
["adds (%d+) to (%d+) (%a+) damage"] = "DMG",
@@ -583,12 +584,12 @@ local specialModList = {
minus = tonumber(minus)
return {
flag("ElementalEquilibrium"),
mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("FireResist", "BASE", plus, { type = "Condition", var = "HitByFireDamage" }) }),
mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("FireResist", "BASE", minus, { type = "Condition", var = "HitByFireDamage", neg = true }, { type = "Condition", varList={"HitByColdDamage","HitByLightningDamage"} }) }),
mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("ColdResist", "BASE", plus, { type = "Condition", var = "HitByColdDamage" }) }),
mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("ColdResist", "BASE", minus, { type = "Condition", var = "HitByColdDamage", neg = true }, { type = "Condition", varList={"HitByFireDamage","HitByLightningDamage"} }) }),
mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("LightningResist", "BASE", plus, { type = "Condition", var = "HitByLightningDamage" }) }),
mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("LightningResist", "BASE", minus, { type = "Condition", var = "HitByLightningDamage", neg = true }, { type = "Condition", varList={"HitByFireDamage","HitByColdDamage"} }) }),
mod("EnemyModifier", "LIST", { mod = mod("FireResist", "BASE", plus, { type = "Condition", var = "HitByFireDamage" }) }),
mod("EnemyModifier", "LIST", { mod = mod("FireResist", "BASE", minus, { type = "Condition", var = "HitByFireDamage", neg = true }, { type = "Condition", varList={"HitByColdDamage","HitByLightningDamage"} }) }),
mod("EnemyModifier", "LIST", { mod = mod("ColdResist", "BASE", plus, { type = "Condition", var = "HitByColdDamage" }) }),
mod("EnemyModifier", "LIST", { mod = mod("ColdResist", "BASE", minus, { type = "Condition", var = "HitByColdDamage", neg = true }, { type = "Condition", varList={"HitByFireDamage","HitByLightningDamage"} }) }),
mod("EnemyModifier", "LIST", { mod = mod("LightningResist", "BASE", plus, { type = "Condition", var = "HitByLightningDamage" }) }),
mod("EnemyModifier", "LIST", { mod = mod("LightningResist", "BASE", minus, { type = "Condition", var = "HitByLightningDamage", neg = true }, { type = "Condition", varList={"HitByFireDamage","HitByColdDamage"} }) }),
}
end,
["projectile attacks deal up to 50%% more damage to targets at the start of their movement, dealing less damage to targets as the projectile travels farther"] = { flag("PointBlank") },
@@ -602,7 +603,7 @@ local specialModList = {
["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,
["you have fortify"] = { mod("Misc", "LIST", { type = "Condition", var = "Fortify"}) },
["you have fortify"] = { flag("Condition:Fortify") },
["(%d+)%% increased damage of each damage type for which you have a matching golem"] = function(num) return {
mod("PhysicalDamage", "INC", num, { type = "Condition", var = "HavePhysicalGolem"}),
mod("LightningDamage", "INC", num, { type = "Condition", var = "HaveLightningGolem"}),
@@ -617,13 +618,13 @@ local specialModList = {
} end,
["every 10 seconds, gain (%d+)%% increased elemental damage for 4 seconds"] = function(num) return { mod("ElementalDamage", "INC", num, { type = "Condition", var = "PendulumOfDestruction" }) } end,
["every 10 seconds, gain (%d+)%% increased area of effect of area skills for 4 seconds"] = function(num) return { mod("AreaOfEffect", "INC", num, { type = "Condition", var = "PendulumOfDestruction" }) } end,
["enemies you curse take (%d+)%% increased damage"] = function(num) return { mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("DamageTaken", "INC", num) }, { type = "Condition", var = "EnemyCursed" }) } end,
["enemies you curse have (%-%d+)%% to chaos resistance"] = function(num) return { mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("ChaosResist", "BASE", num) }, { type = "Condition", var = "EnemyCursed" }) } end,
["nearby enemies have (%-%d+)%% to chaos resistance"] = function(num) return { mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("ChaosResist", "BASE", num) }) } end,
["nearby enemies take (%d+)%% increased elemental damage"] = function(num) return { mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("ElementalDamageTaken", "INC", num) }) } end,
["enemies you curse take (%d+)%% increased damage"] = function(num) return { mod("AffectedByCurseMod", "LIST", { mod = mod("DamageTaken", "INC", num) }) } end,
["enemies you curse have (%-%d+)%% to chaos resistance"] = function(num) return { mod("AffectedByCurseMod", "LIST", { mod = mod("ChaosResist", "BASE", num) }) } end,
["nearby enemies have (%-%d+)%% to chaos resistance"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("ChaosResist", "BASE", num) }) } end,
["nearby enemies take (%d+)%% increased elemental damage"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("ElementalDamageTaken", "INC", num) }) } end,
["enemies near your totems take (%d+)%% increased physical and fire damage"] = function(num) return {
mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("PhysicalDamageTaken", "INC", num) }),
mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("FireDamageTaken", "INC", num) })
mod("EnemyModifier", "LIST", { mod = mod("PhysicalDamageTaken", "INC", num) }),
mod("EnemyModifier", "LIST", { mod = mod("FireDamageTaken", "INC", num) })
} end,
["grants armour equal to (%d+)%% of your reserved life to you and nearby allies"] = function(num) return { mod("GrantReservedLifeAsAura", "LIST", { mod = mod("Armour", "BASE", num / 100) }) } end,
["grants maximum energy shield equal to (%d+)%% of your reserved mana to you and nearby allies"] = function(num) return { mod("GrantReservedManaAsAura", "LIST", { mod = mod("EnergyShield", "BASE", num / 100) }) } end,
@@ -653,17 +654,18 @@ local specialModList = {
mod("ElementalDamageGainAsChaos", "BASE", num, { type = "Condition", var = "KilledRecently" }, { type = "Multiplier", var = "CurseOnEnemy" }),
} end,
["warcries cost no mana"] = { mod("ManaCost", "MORE", -100, nil, 0, KeywordFlag.Warcry) },
["enemies you taunt take (%d+)%% increased damage"] = function(num) return { mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("DamageTaken", "INC", num, { type = "Condition", var = "Taunted" }) }) } end,
["you have phasing while at maximum frenzy charges"] = { mod("Misc", "LIST", { type = "Condition", var = "Phasing" }, { type = "Condition", var = "AtMaxFrenzyCharges" }) },
["enemies you taunt take (%d+)%% increased damage"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("DamageTaken", "INC", num, { type = "Condition", var = "Taunted" }) }) } end,
["you have phasing while at maximum frenzy charges"] = { flag("Condition:Phasing", { type = "Condition", var = "AtMaxFrenzyCharges" }) },
["you have phasing while you have onslaught"] = { flag("Condition:Phasing", { type = "Condition", var = "Onlaught" }) },
["your minions spread caustic cloud on death, dealing 10%% of their maximum life as chaos damage per second"] = { flag("MinionCausticCloudOnDeath") },
-- Item local modifiers
["has no sockets"] = { },
["has 1 socket"] = { },
["no physical damage"] = { mod("Misc", "LIST", { type = "WeaponData", key = "PhysicalMin" }), mod("Misc", "LIST", { type = "WeaponData", key = "PhysicalMax" }), mod("Misc", "LIST", { type = "WeaponData", key = "PhysicalDPS" }) },
["all attacks with this weapon are critical strikes"] = { mod("Misc", "LIST", { type = "WeaponData", key = "critChance", value = 100 }) },
["counts as dual wielding"] = { mod("Misc", "LIST", { type = "WeaponData", key = "countsAsDualWielding", value = true}) },
["counts as all one handed melee weapon types"] = { mod("Misc", "LIST", { type = "WeaponData", key = "countsAsAll1H", value = true }) },
["no block chance"] = { mod("Misc", "LIST", { type = "ArmourData", key = "BlockChance", value = 0 }) },
["no physical damage"] = { mod("WeaponData", "LIST", { key = "PhysicalMin" }), mod("WeaponData", "LIST", { key = "PhysicalMax" }), mod("WeaponData", "LIST", { key = "PhysicalDPS" }) },
["all attacks with this weapon are critical strikes"] = { mod("WeaponData", "LIST", { key = "critChance", value = 100 }) },
["counts as dual wielding"] = { mod("WeaponData", "LIST", { key = "countsAsDualWielding", value = true}) },
["counts as all one handed melee weapon types"] = { mod("WeaponData", "LIST", { key = "countsAsAll1H", value = true }) },
["no block chance"] = { mod("ArmourData", "LIST", { key = "BlockChance", value = 0 }) },
["hits can't be evaded"] = { flag("CannotBeEvaded", { type = "Condition", var = "XHandAttack" }) },
["causes bleeding on hit"] = { mod("BleedChance", "BASE", 100, { type = "Condition", var = "XHandAttack" }) },
["poisonous hit"] = { mod("PoisonChance", "BASE", 100, { type = "Condition", var = "XHandAttack" }) },
@@ -718,7 +720,7 @@ local specialModList = {
["your physical damage can shock"] = { flag("PhysicalCanShock") },
["critical strikes do not always freeze"] = { flag("CritsDontAlwaysFreeze") },
["you can inflict up to (%d+) ignites on an enemy"] = { flag("IgniteCanStack") },
["enemies chilled by you take (%d+)%% increased burning damage"] = function(num) return { mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("BurningDamageTaken", "INC", num) }, { type = "EnemyCondition", var = "Chilled" }) } end,
["enemies chilled by you take (%d+)%% increased burning damage"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("BurningDamageTaken", "INC", num) }, { type = "EnemyCondition", var = "Chilled" }) } end,
["ignited enemies burn (%d+)%% faster"] = function(num) return { mod("IgniteBurnRate", "INC", num) } end,
["enemies ignited by an attack burn (%d+)%% faster"] = function(num) return { mod("IgniteBurnRate", "INC", num, nil, ModFlag.Attack) } end,
-- Bleed
@@ -736,13 +738,13 @@ local specialModList = {
["wh[ie][ln]e? at maximum frenzy charges, attacks poison enemies"] = { mod("PoisonChance", "BASE", 100, nil, ModFlag.Attack, { type = "Condition", var = "AtMaxFrenzyCharges" }) },
["traps and mines have a (%d+)%% chance to poison on hit"] = function(num) return { mod("PoisonChance", "BASE", num, nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)) } end,
-- Buffs/debuffs
["phasing"] = { mod("Misc", "LIST", { type = "Condition", var = "Phasing" }) },
["onslaught"] = { mod("Misc", "LIST", { type = "Condition", var = "Onslaught" }) },
["phasing"] = { flag("Condition:Phasing") },
["onslaught"] = { flag("Condition:Onslaught") },
["your aura buffs do not affect allies"] = { flag("SelfAurasCannotAffectAllies") },
["allies' aura buffs do not affect you"] = { flag("AlliesAurasCannotAffectSelf") },
["enemies can have 1 additional curse"] = { mod("EnemyCurseLimit", "BASE", 1) },
["nearby enemies have (%d+)%% increased effect of curses on them"] = function(num) return { mod("Misc", "LIST", { type = "EnemyModifier", mod = mod("CurseEffectOnSelf", "INC", num) }) } end,
["your hits inflict decay, dealing (%d+) chaos damage per second for 10 seconds"] = function(num) return { mod("Misc", "LIST", { type = "SkillData", key = "decay", value = num, merge = "MAX" }) } end,
["nearby enemies have (%d+)%% increased effect of curses on them"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("CurseEffectOnSelf", "INC", num) }) } end,
["your hits inflict decay, dealing (%d+) chaos damage per second for 10 seconds"] = function(num) return { mod("SkillData", "LIST", { key = "decay", value = num, merge = "MAX" }) } end,
-- Traps, Mines and Totems
["traps and mines deal (%d+)%-(%d+) additional physical damage"] = function(_, min, max) return { mod("PhysicalMin", "BASE", tonumber(min), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)), mod("PhysicalMax", "BASE", tonumber(max), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)) } end,
["traps and mines deal (%d+) to (%d+) additional physical damage"] = function(_, min, max) return { mod("PhysicalMin", "BASE", tonumber(min), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)), mod("PhysicalMax", "BASE", tonumber(max), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)) } end,
@@ -754,18 +756,18 @@ local specialModList = {
["([%d%.]+)%% of damage dealt by y?o?u?r? ?totems is leeched to you as life"] = function(num) return { mod("DamageLifeLeechToPlayer", "BASE", num, nil, 0, KeywordFlag.Totem) } end,
-- Minions
["your strength is added to your minions"] = { flag("StrengthAddedToMinions") },
["minions poison enemies on hit"] = { mod("Misc", "LIST", { type = "MinionModifier", mod = mod("PoisonChance", "BASE", 100) }) },
["(%d+)%% increased minion damage if you have hit recently"] = function(num) return { mod("Misc", "LIST", { type = "MinionModifier", mod = mod("Damage", "INC", num) }, { type = "Condition", var = "HitRecently" }) } end,
["minions poison enemies on hit"] = { mod("MinionModifier", "LIST", { mod = mod("PoisonChance", "BASE", 100) }) },
["(%d+)%% increased minion damage if you have hit recently"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num) }, { type = "Condition", var = "HitRecently" }) } end,
["(%d+)%% increased golem damage for each type of golem you have summoned"] = function(num) return {
mod("Misc", "LIST", { type = "MinionModifier", mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HavePhysicalGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
mod("Misc", "LIST", { type = "MinionModifier", mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HaveLightningGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
mod("Misc", "LIST", { type = "MinionModifier", mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HaveColdGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
mod("Misc", "LIST", { type = "MinionModifier", mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HaveFireGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
mod("Misc", "LIST", { type = "MinionModifier", mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HaveChaosGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HavePhysicalGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HaveLightningGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HaveColdGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HaveFireGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num, { type = "ParentCondition", var = "HaveChaosGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),
} end,
["can summon up to (%d) additional golems? at a time"] = function(num) return { mod("ActiveGolemLimit", "BASE", num) } end,
["if you have 3 primordial jewels, can summon up to (%d) additional golems? at a time"] = function(num) return { mod("ActiveGolemLimit", "BASE", num, { type = "MultiplierThreshold", var = "PrimordialJewel", threshold = 3 }) } end,
["golems regenerate (%d)%% of their maximum life per second"] = function(num) return { mod("Misc", "LIST", { type = "MinionModifier", mod = mod("LifeRegenPercent", "BASE", num) }, { type = "SkillType", skillType = SkillType.Golem }) } end,
["golems regenerate (%d)%% of their maximum life per second"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("LifeRegenPercent", "BASE", num) }, { type = "SkillType", skillType = SkillType.Golem }) } end,
-- Projectiles
["skills chain %+(%d) times"] = function(num) return { mod("ChainCount", "BASE", num) } end,
["skills chain an additional time while at maximum frenzy charges"] = { mod("ChainCount", "BASE", 1, { type = "Condition", var = "AtMaxFrenzyCharges" }) },
@@ -793,7 +795,7 @@ local specialModList = {
["armour is increased by uncapped fire resistance"] = { mod("Armour", "INC", 1, { type = "PerStat", stat = "FireResistTotal", div = 1 }) },
["evasion rating is increased by uncapped cold resistance"] = { mod("Evasion", "INC", 1, { type = "PerStat", stat = "ColdResistTotal", div = 1 }) },
["reflects (%d+) physical damage to melee attackers"] = { },
["ignore all movement penalties from armour"] = { mod("Misc", "LIST", { type = "Condition", var = "IgnoreMovementPenalties" }) },
["ignore all movement penalties from armour"] = { flag("Condition:IgnoreMovementPenalties") },
["cannot be stunned"] = { mod("AvoidStun", "BASE", 100) },
["cannot be shocked"] = { mod("AvoidShock", "BASE", 100) },
["cannot be frozen"] = { mod("AvoidFreeze", "BASE", 100) },
@@ -812,7 +814,7 @@ local specialModList = {
["creates a smoke cloud on use"] = { },
["creates chilled ground on use"] = { },
["creates consecrated ground on use"] = { },
["gain unholy might during flask effect"] = { mod("Misc", "LIST", { type = "Condition", var = "UnholyMight" }, { type = "Condition", var = "UsingFlask" }) },
["gain unholy might during flask effect"] = { flag("Condition:UnholyMight", { type = "Condition", var = "UsingFlask" }) },
["zealot's oath during flask effect"] = { mod("ZealotsOath", "FLAG", true, { type = "Condition", var = "UsingFlask" }) },
["grants level (%d+) (.+) curse aura during flask effect"] = function(num, _, skill) return { mod("ExtraCurse", "LIST", { name = gemNameLookup[skill:gsub(" skill","")] or "Unknown", level = num }, { type = "Condition", var = "UsingFlask" }) } end,
["during flask effect, (%d+)%% reduced damage taken of each element for which your uncapped elemental resistance is lowest"] = function(num) return {
@@ -826,11 +828,11 @@ local specialModList = {
mod("FirePenetration", "BASE", num, { type = "Condition", var = "UncappedFireResistIsHighest" }),
} end,
-- Jewels
["passives in radius can be allocated without being connected to your tree"] = { mod("Misc", "LIST", { type = "JewelData", key = "intuitiveLeap", value = true }) },
["(%d+)%% increased elemental damage per grand spectrum"] = function(num) return { mod("ElementalDamage", "INC", num, { type = "Multiplier", var = "GrandSpectrum" }), mod("Misc", "LIST", { type = "Multiplier", var = "GrandSpectrum", value = 1}) } end,
["gain (%d+) armour per grand spectrum"] = function(num) return { mod("Armour", "BASE", num, { type = "Multiplier", var = "GrandSpectrum" }), mod("Misc", "LIST", { type = "Multiplier", var = "GrandSpectrum", value = 1}) } end,
["gain (%d+) mana per grand spectrum"] = function(num) return { mod("Mana", "BASE", num, { type = "Multiplier", var = "GrandSpectrum" }), mod("Misc", "LIST", { type = "Multiplier", var = "GrandSpectrum", value = 1}) } end,
["primordial"] = { mod("Misc", "LIST", { type = "Multiplier", var = "PrimordialJewel", value = 1 }) },
["passives in radius can be allocated without being connected to your tree"] = { mod("JewelData", "LIST", { key = "intuitiveLeap", value = true }) },
["(%d+)%% increased elemental damage per grand spectrum"] = function(num) return { mod("ElementalDamage", "INC", num, { type = "Multiplier", var = "GrandSpectrum" }), mod("Multiplier:GrandSpectrum", "BASE", 1) } end,
["gain (%d+) armour per grand spectrum"] = function(num) return { mod("Armour", "BASE", num, { type = "Multiplier", var = "GrandSpectrum" }), mod("Multiplier:GrandSpectrum", "BASE", 1) } end,
["gain (%d+) mana per grand spectrum"] = function(num) return { mod("Mana", "BASE", num, { type = "Multiplier", var = "GrandSpectrum" }), mod("Multiplier:GrandSpectrum", "BASE", 1) } end,
["primordial"] = { mod("Multiplier:PrimordialJewel", "BASE", 1) },
-- Misc
["iron will"] = { flag("IronWill") },
["deal no physical damage"] = { flag("DealNoPhysical") },
@@ -1049,8 +1051,8 @@ local jewelFuncs = {
["With at least 40 Strength in Radius, Molten Strike fires 2 additional Projectiles"] = getThreshold("Str", "ProjectileCount", "BASE", 2, { type = "SkillName", skillName = "Molten Strike" }),
["With at least 40 Strength in Radius, Molten Strike has 25% increased Area of Effect"] = getThreshold("Str", "AreaOfEffect", "INC", 25, { type = "SkillName", skillName = "Molten Strike" }),
["With at least 40 Strength in Radius, 25% of Glacial Hammer Physical Damage converted to Cold Damage"] = getThreshold("Str", "PhysicalDamageConvertToCold", "BASE", 25, { type = "SkillName", skillName = "Glacial Hammer" }),
["With at least 40 Intelligence in Radius, Raised Zombies' Slam Attack has 100% increased Cooldown Recovery Speed"] = getThreshold("Int", "Misc", "LIST", { type = "MinionModifier", mod = mod("CooldownRecovery", "INC", 100, { type = "SkillId", skillId = "ZombieSlam" }) }),
["With at least 40 Intelligence in Radius, Raised Zombies' Slam Attack deals 30% increased Damage"] = getThreshold("Int", "Misc", "LIST", { type = "MinionModifier", mod = mod("Damage", "INC", 30, { type = "SkillId", skillId = "ZombieSlam" }) }),
["With at least 40 Intelligence in Radius, Raised Zombies' Slam Attack has 100% increased Cooldown Recovery Speed"] = getThreshold("Int", "MinionModifier", "LIST", { mod = mod("CooldownRecovery", "INC", 100, { type = "SkillId", skillId = "ZombieSlam" }) }),
["With at least 40 Intelligence in Radius, Raised Zombies' Slam Attack deals 30% increased Damage"] = getThreshold("Int", "MinionModifier", "LIST", { mod = mod("Damage", "INC", 30, { type = "SkillId", skillId = "ZombieSlam" }) }),
--[""] = getThreshold("", "", "", , { type = "SkillName", skillName = "" }),
}
@@ -1084,7 +1086,7 @@ local function parseMod(line, order)
end
for desc, func in pairs(jewelFuncs) do
if desc:lower() == line:lower() then
return { mod("Misc", "LIST", { type = "JewelFunc", func = func }) }
return { mod("JewelFunc", "LIST", func) }
end
end
@@ -1258,7 +1260,7 @@ local function parseMod(line, order)
elseif misc.addToMinion then
-- Minion modifiers
for i, effectMod in ipairs(modList) do
modList[i] = mod("Misc", "LIST", { type = "MinionModifier", mod = effectMod }, misc.addToMinionTag)
modList[i] = mod("MinionModifier", "LIST", { mod = effectMod }, misc.addToMinionTag)
end
elseif misc.addToSkill then
-- Skill enchants that add additional effects