Release 1.4.119
- Added All Projctiles skill parts to Ice Spear - Added support for Brand/Banner passives - Fixed node power calculation bugs - Fixed incorrect removable charge counts
This commit is contained in:
@@ -436,7 +436,7 @@ function buildMode:Init(dbFileName, buildName, buildXML, targetVersion)
|
||||
self.modFlag = true
|
||||
self.buildFlag = true
|
||||
end)
|
||||
self.controls.mainSkillPart = new("DropDownControl", {"TOPLEFT",self.controls.mainSkill,"BOTTOMLEFT",true}, 0, 2, 150, 18, nil, function(index, value)
|
||||
self.controls.mainSkillPart = new("DropDownControl", {"TOPLEFT",self.controls.mainSkill,"BOTTOMLEFT",true}, 0, 2, 200, 18, nil, function(index, value)
|
||||
local mainSocketGroup = self.skillsTab.socketGroupList[self.mainSocketGroup]
|
||||
local srcInstance = mainSocketGroup.displaySkillList[mainSocketGroup.mainActiveSkill].activeEffect.srcInstance
|
||||
srcInstance.skillPart = index
|
||||
|
||||
@@ -400,6 +400,7 @@ function calcs.buildActiveSkillModList(env, actor, activeSkill)
|
||||
-- Initialise skill modifier list
|
||||
local skillModList = new("ModList", actor.modDB)
|
||||
activeSkill.skillModList = skillModList
|
||||
activeSkill.baseSkillModList = skillModList
|
||||
|
||||
if skillModList:Flag(activeSkill.skillCfg, "DisableSkill") then
|
||||
skillFlags.disable = true
|
||||
|
||||
@@ -678,7 +678,7 @@ function calcs.offence(env, actor, activeSkill)
|
||||
end
|
||||
|
||||
-- Calculate attack/cast speed
|
||||
if activeSkill.skillTypes[SkillType.Instant] then
|
||||
if activeSkill.skillTypes[SkillType.Instant] or skillFlags.forceInstant then
|
||||
output.Time = 0
|
||||
output.Speed = 0
|
||||
elseif skillData.timeOverride then
|
||||
|
||||
@@ -241,8 +241,11 @@ local function doActorMisc(env, actor)
|
||||
local condList = modDB.conditions
|
||||
|
||||
-- Calculate current and maximum charges
|
||||
output.PowerChargesMin = modDB:Sum("BASE", nil, "PowerChargesMin")
|
||||
output.PowerChargesMax = modDB:Sum("BASE", nil, "PowerChargesMax")
|
||||
output.FrenzyChargesMin = modDB:Sum("BASE", nil, "FrenzyChargesMin")
|
||||
output.FrenzyChargesMax = modDB:Sum("BASE", nil, "FrenzyChargesMax")
|
||||
output.EnduranceChargesMin = modDB:Sum("BASE", nil, "EnduranceChargesMin")
|
||||
output.EnduranceChargesMax = modDB:Sum("BASE", nil, "EnduranceChargesMax")
|
||||
output.SiphoningChargesMax = modDB:Sum("BASE", nil, "SiphoningChargesMax")
|
||||
output.CrabBarriersMax = modDB:Sum("BASE", nil, "CrabBarriersMax")
|
||||
@@ -251,22 +254,22 @@ local function doActorMisc(env, actor)
|
||||
else
|
||||
output.PowerCharges = 0
|
||||
end
|
||||
output.PowerCharges = m_max(output.PowerCharges, modDB:Sum("BASE", nil, "PowerChargesMin"))
|
||||
output.RemovablePowerCharges = output.PowerChargesMax - output.PowerCharges
|
||||
output.PowerCharges = m_max(output.PowerCharges, output.PowerChargesMin)
|
||||
output.RemovablePowerCharges = output.PowerCharges - output.PowerChargesMin
|
||||
if modDB:Flag(nil, "UseFrenzyCharges") then
|
||||
output.FrenzyCharges = modDB:Override(nil, "FrenzyCharges") or output.FrenzyChargesMax
|
||||
else
|
||||
output.FrenzyCharges = 0
|
||||
end
|
||||
output.FrenzyCharges = m_max(output.FrenzyCharges, modDB:Sum("BASE", nil, "FrenzyChargesMin"))
|
||||
output.RemovableFrenzyCharges = output.FrenzyChargesMax - output.FrenzyCharges
|
||||
output.FrenzyCharges = m_max(output.FrenzyCharges, output.FrenzyChargesMin)
|
||||
output.RemovableFrenzyCharges = output.FrenzyCharges - output.FrenzyChargesMin
|
||||
if modDB:Flag(nil, "UseEnduranceCharges") then
|
||||
output.EnduranceCharges = modDB:Override(nil, "EnduranceCharges") or output.EnduranceChargesMax
|
||||
else
|
||||
output.EnduranceCharges = 0
|
||||
end
|
||||
output.EnduranceCharges = m_max(output.EnduranceCharges, modDB:Sum("BASE", nil, "EnduranceChargesMin"))
|
||||
output.RemovableEnduranceCharges = output.EnduranceChargesMax - output.EnduranceCharges
|
||||
output.EnduranceCharges = m_max(output.EnduranceCharges, output.FrenzyChargesMin)
|
||||
output.RemovableEnduranceCharges = output.EnduranceCharges - output.EnduranceChargesMin
|
||||
if modDB:Flag(nil, "UseSiphoningCharges") then
|
||||
output.SiphoningCharges = modDB:Override(nil, "SiphoningCharges") or output.SiphoningChargesMax
|
||||
else
|
||||
@@ -355,6 +358,7 @@ function calcs.perform(env)
|
||||
|
||||
-- Build minion skills
|
||||
for _, activeSkill in ipairs(env.activeSkillList) do
|
||||
activeSkill.skillModList = new("ModList", activeSkill.baseSkillModList)
|
||||
if activeSkill.minion then
|
||||
calcs.createMinionSkills(env, activeSkill)
|
||||
end
|
||||
|
||||
@@ -21,7 +21,10 @@ LoadModule("Modules/CalcDefence-"..targetVersion, calcs)
|
||||
LoadModule("Modules/CalcOffence-"..targetVersion, calcs)
|
||||
|
||||
-- Print various tables to the console
|
||||
local function infoDump(env, output)
|
||||
local function infoDump(env)
|
||||
if env.modDB.parent then
|
||||
env.modDB.parent:Print()
|
||||
end
|
||||
env.modDB:Print()
|
||||
if env.minion then
|
||||
ConPrintf("=== Minion Mod DB ===")
|
||||
@@ -58,10 +61,12 @@ local function getCalculator(build, fullInit, modFunc)
|
||||
-- Save a copy of the initial mod database
|
||||
local initModDB = new("ModDB")
|
||||
initModDB:AddDB(env.modDB)
|
||||
initModDB.actor = env.player
|
||||
initModDB.conditions = copyTable(env.modDB.conditions)
|
||||
initModDB.multipliers = copyTable(env.modDB.multipliers)
|
||||
local initEnemyDB = new("ModDB")
|
||||
initEnemyDB:AddDB(env.enemyDB)
|
||||
initEnemyDB.actor = env.enemy
|
||||
initEnemyDB.conditions = copyTable(env.enemyDB.conditions)
|
||||
initEnemyDB.multipliers = copyTable(env.enemyDB.multipliers)
|
||||
|
||||
@@ -69,17 +74,18 @@ local function getCalculator(build, fullInit, modFunc)
|
||||
calcs.perform(env)
|
||||
local baseOutput = env.player.output
|
||||
|
||||
env.modDB.parent = initModDB
|
||||
env.enemyDB.parent = initEnemyDB
|
||||
|
||||
return function(...)
|
||||
-- Restore initial mod database
|
||||
env.modDB.mods = wipeTable(env.modDB.mods)
|
||||
env.modDB:AddDB(initModDB)
|
||||
env.modDB.conditions = copyTable(initModDB.conditions)
|
||||
env.modDB.multipliers = copyTable(initModDB.multipliers)
|
||||
env.enemyDB.mods = wipeTable(env.enemyDB.mods)
|
||||
env.enemyDB:AddDB(initEnemyDB)
|
||||
env.enemyDB.conditions = copyTable(initEnemyDB.conditions)
|
||||
env.enemyDB.multipliers = copyTable(initEnemyDB.multipliers)
|
||||
|
||||
-- Remove mods added during the last pass
|
||||
wipeTable(env.modDB.mods)
|
||||
wipeTable(env.modDB.conditions)
|
||||
wipeTable(env.modDB.multipliers)
|
||||
wipeTable(env.enemyDB.mods)
|
||||
wipeTable(env.enemyDB.conditions)
|
||||
wipeTable(env.enemyDB.multipliers)
|
||||
|
||||
-- Call function to make modifications to the enviroment
|
||||
modFunc(env, ...)
|
||||
|
||||
@@ -265,7 +271,7 @@ function calcs.buildOutput(build, mode)
|
||||
env.player.breakdown.SkillBuffs = { modList = { } }
|
||||
for _, name in ipairs(buffList) do
|
||||
for _, mod in ipairs(env.buffs[name]) do
|
||||
local value = env.modDB:EvalMod(mod)
|
||||
local value = env.modDB:EvalMod(env.modDB, mod)
|
||||
if value and value ~= 0 then
|
||||
t_insert(env.player.breakdown.SkillBuffs.modList, {
|
||||
mod = mod,
|
||||
@@ -281,7 +287,7 @@ function calcs.buildOutput(build, mode)
|
||||
table.sort(curseList)
|
||||
for index, name in ipairs(curseList) do
|
||||
for _, mod in ipairs(env.debuffs[name]) do
|
||||
local value = env.enemy.modDB:EvalMod(mod)
|
||||
local value = env.enemy.modDB:EvalMod(env.enemy.modDB, mod)
|
||||
if value and value ~= 0 then
|
||||
t_insert(env.player.breakdown.SkillDebuffs.modList, {
|
||||
mod = mod,
|
||||
@@ -298,7 +304,7 @@ function calcs.buildOutput(build, mode)
|
||||
t_insert(curseList, slot.name)
|
||||
if slot.modList then
|
||||
for _, mod in ipairs(slot.modList) do
|
||||
local value = env.enemy.modDB:EvalMod(mod)
|
||||
local value = env.enemy.modDB:EvalMod(env.enemy.modDB, mod)
|
||||
if value and value ~= 0 then
|
||||
t_insert(env.player.breakdown.SkillDebuffs.modList, {
|
||||
mod = mod,
|
||||
@@ -342,7 +348,7 @@ function calcs.buildOutput(build, mode)
|
||||
env.minion.breakdown.SkillBuffs = { modList = { } }
|
||||
for _, name in ipairs(buffList) do
|
||||
for _, mod in ipairs(env.minionBuffs[name]) do
|
||||
local value = env.minion.modDB:EvalMod(mod)
|
||||
local value = env.minion.modDB:EvalMod(env.minion.modDB, mod)
|
||||
if value and value ~= 0 then
|
||||
t_insert(env.minion.breakdown.SkillBuffs.modList, {
|
||||
mod = mod,
|
||||
|
||||
@@ -317,6 +317,7 @@ local modNameList = {
|
||||
["melee weapon and unarmed attack range"] = { "MeleeWeaponRange", "UnarmedRange" },
|
||||
["to deal double damage"] = "DoubleDamageChance",
|
||||
["activation frequency"] = "BrandActivationFrequency",
|
||||
["brand activation frequency"] = "BrandActivationFrequency",
|
||||
-- Buffs
|
||||
["onslaught effect"] = "OnslaughtEffect",
|
||||
["fortify duration"] = "FortifyDuration",
|
||||
@@ -506,6 +507,7 @@ local modFlagList = {
|
||||
["with elemental skills"] = { keywordFlags = bor(KeywordFlag.Lightning, KeywordFlag.Cold, KeywordFlag.Fire) },
|
||||
["with chaos skills"] = { keywordFlags = KeywordFlag.Chaos },
|
||||
["with channelling skills"] = { tag = { type = "SkillType", skillType = SkillType.Channelled } },
|
||||
["with brand skills"] = { tag = { type = "SkillType", skillType = SkillType.Brand } },
|
||||
["zombie"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie" } },
|
||||
["raised zombie"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie" } },
|
||||
["skeleton"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Skeleton" } },
|
||||
@@ -572,6 +574,7 @@ local preFlagList = {
|
||||
["^fire skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Fire },
|
||||
["^chaos skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Chaos },
|
||||
["^vaal skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Vaal },
|
||||
["^brand skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Brand },
|
||||
["^skills [hdfg][aei][vari][eln] "] = { },
|
||||
["^left ring slot: "] = { tag = { type = "SlotNumber", num = 1 } },
|
||||
["^right ring slot: "] = { tag = { type = "SlotNumber", num = 2 } },
|
||||
@@ -823,6 +826,7 @@ local modTagList = {
|
||||
["if energy shield recharge has started recently"] = { tag = { type = "Condition", var = "EnergyShieldRechargeRecently" } },
|
||||
["when cast on frostbolt"] = { tag = { type = "Condition", var = "CastOnFrostbolt" } },
|
||||
["branded enemy's"] = { tag = { type = "Condition", var = "BrandAttachedToEnemy" } },
|
||||
["to enemies they're attached to"] = { tag = { type = "Condition", var = "BrandAttachedToEnemy" } },
|
||||
-- Enemy status conditions
|
||||
["at close range"] = { tag = { type = "Condition", var = "AtCloseRange" }, flags = ModFlag.Hit },
|
||||
["against rare and unique enemies"] = { tag = { type = "Condition", var = "EnemyRareOrUnique" }, keywordFlags = KeywordFlag.Hit },
|
||||
@@ -1430,6 +1434,7 @@ local specialModList = {
|
||||
["items and gems have (%d+)%% increased attribute requirements"] = function(num) return { mod("GlobalAttributeRequirements", "INC", num) } end,
|
||||
["mana reservation of herald skills is always (%d+)%%"] = function(num) return { mod("SkillData", "LIST", { key = "manaCostForced", value = num }, { type = "SkillType", skillType = SkillType.Herald }) } end,
|
||||
["([%a%s]+) reserves no mana"] = function(_, name) return { mod("SkillData", "LIST", { key = "manaCostForced", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }) } end,
|
||||
["banner skills reserve no mana"] = { mod("SkillData", "LIST", { key = "manaCostForced", value = 0 }, { type = "SkillName", skillNameList = { "Dread Banner", "War Banner" } }) },
|
||||
["your spells are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Spell }) },
|
||||
["strength's damage bonus instead grants (%d+)%% increased melee physical damage per (%d+) strength"] = function(num, _, perStr) return { mod("StrDmgBonusRatioOverride", "BASE", num / tonumber(perStr)) } end,
|
||||
["while in her embrace, take ([%d%.]+)%% of your total maximum life and energy shield as fire damage per second per level"] = function(num) return {
|
||||
|
||||
Reference in New Issue
Block a user