dev merge

This commit is contained in:
Nostrademous
2021-03-31 08:19:09 -04:00
7 changed files with 77 additions and 40 deletions

View File

@@ -1736,8 +1736,12 @@ function ItemsTabClass:EnchantDisplayItem(enchantSlot)
if haveSkills then
for _, socketGroup in ipairs(self.build.skillsTab.socketGroupList) do
for _, gemInstance in ipairs(socketGroup.gemList) do
if gemInstance.gemData and not gemInstance.gemData.grantedEffect.support and enchantments[gemInstance.nameSpec] then
skillsUsed[gemInstance.nameSpec] = true
if gemInstance.gemData then
for _, grantedEffect in ipairs(gemInstance.gemData.grantedEffectList) do
if not grantedEffect.support and enchantments[grantedEffect.name] then
skillsUsed[grantedEffect.name] = true
end
end
end
end
end

View File

@@ -40,9 +40,9 @@ function ModStoreClass:ScaleAddMod(mod, scale)
scale = m_max(scale, 0)
local scaledMod = copyTable(mod)
if type(scaledMod.value) == "number" then
scaledMod.value = (m_floor(scaledMod.value) == scaledMod.value) and m_modf(scaledMod.value * scale) or scaledMod.value * scale
scaledMod.value = (m_floor(scaledMod.value) == scaledMod.value) and m_modf(round(scaledMod.value * scale, 2)) or scaledMod.value * scale
elseif type(scaledMod.value) == "table" and scaledMod.value.mod then
scaledMod.value.mod.value = (m_floor(scaledMod.value.mod.value) == scaledMod.value.mod.value) and m_modf(scaledMod.value.mod.value * scale) or scaledMod.value.mod.value * scale
scaledMod.value.mod.value = (m_floor(scaledMod.value.mod.value) == scaledMod.value.mod.value) and m_modf(round(scaledMod.value.mod.value * scale, 2)) or scaledMod.value.mod.value * scale
end
self:AddMod(scaledMod)
end
@@ -62,9 +62,9 @@ function ModStoreClass:ScaleAddList(modList, scale)
for i = 1, #modList do
local scaledMod = copyTable(modList[i])
if type(scaledMod.value) == "number" then
scaledMod.value = (m_floor(scaledMod.value) == scaledMod.value) and m_modf(scaledMod.value * scale) or scaledMod.value * scale
scaledMod.value = (m_floor(scaledMod.value) == scaledMod.value) and m_modf(round(scaledMod.value * scale, 2)) or scaledMod.value * scale
elseif type(scaledMod.value) == "table" and scaledMod.value.mod then
scaledMod.value.mod.value = (m_floor(scaledMod.value.mod.value) == scaledMod.value.mod.value) and m_modf(scaledMod.value.mod.value * scale) or scaledMod.value.mod.value * scale
scaledMod.value.mod.value = (m_floor(scaledMod.value.mod.value) == scaledMod.value.mod.value) and m_modf(round(scaledMod.value.mod.value * scale, 2)) or scaledMod.value.mod.value * scale
end
self:AddMod(scaledMod)
end

View File

@@ -490,7 +490,7 @@ return {
mod("CritMultiplier", "BASE", nil, 0, 0, { type = "Condition", var = "Elusive" }, { type = "Condition", varList = { "UsingClaw", "UsingDagger" } }, { type = "Condition", varList = { "UsingSword", "UsingAxe", "UsingMace" }, neg = true} ),
},
["critical_strike_chance_against_enemies_on_full_life_+%"] = {
mod("CritChance", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "FullLife" })
mod("CritChance", "INC", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "FullLife" })
},
["critical_strike_chance_+%_vs_blinded_enemies"] = {
mod("CritChance", "INC", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "Blinded"})

View File

@@ -3067,6 +3067,6 @@ minions["Metadata/Monsters/Maligaro/SecretDesecrateMonster"] = {
},
modList = {
-- MonsterOneThirdDamageTaken [base_damage_taken_+% = -67]
-- MonsterConvertToChaos1 [base_physical_damage_%_to_convert_to_chaos = 50]
mod("PhysicalDamageConvertToChaos", "BASE", 50), -- MonsterConvertToChaos1 [base_physical_damage_%_to_convert_to_chaos = 50]
},
}

View File

@@ -5,6 +5,8 @@ mod("ProjectileCount", "BASE", 2)
mod("PhysicalDamageConvertToFire", "BASE", 50)
[MonsterConvertToColdDamage2]
mod("PhysicalDamageConvertToCold", "BASE", 50)
[MonsterConvertToChaos1]
mod("PhysicalDamageConvertToChaos", "BASE", 50)
[MonsterPhysicalAddedAsColdSkeletonMaps]
mod("PhysicalDamageGainAsCold", "BASE", 100)
[MonsterCurseCastSpeedPenalty]

View File

@@ -766,8 +766,8 @@ local function doActorMisc(env, actor)
if modDB:Flag(nil, "Fanaticism") and actor.mainSkill and actor.mainSkill.skillFlags.selfCast then
local effect = m_floor(75 * (1 + modDB:Sum("INC", nil, "BuffEffectOnSelf") / 100))
modDB:NewMod("Speed", "MORE", effect, "Fanaticism", ModFlag.Cast)
modDB:NewMod("ManaCost", "INC", -effect, "Fanaticism")
modDB:NewMod("AreaOfEffect", "INC", effect, "Fanaticism")
modDB:NewMod("ManaCost", "INC", -effect, "Fanaticism", ModFlag.Cast)
modDB:NewMod("AreaOfEffect", "INC", effect, "Fanaticism", ModFlag.Cast)
end
if modDB:Flag(nil, "UnholyMight") then
local effect = m_floor(30 * (1 + modDB:Sum("INC", nil, "BuffEffectOnSelf") / 100))
@@ -1593,6 +1593,7 @@ function calcs.perform(env)
fromPlayer = true,
priority = activeSkill.skillTypes[SkillType.Aura] and 3 or 1,
isMark = mark,
ignoreHexLimit = modDB:Flag(activeSkill.skillCfg, "CursesIgnoreHexLimit") and not mark or false
}
local inc = skillModList:Sum("INC", skillCfg, "CurseEffect") + enemyDB:Sum("INC", nil, "CurseEffectOnSelf")
local more = skillModList:More(skillCfg, "CurseEffect")
@@ -1757,36 +1758,60 @@ function calcs.perform(env)
local markSlotted = false
for _, source in ipairs({curses, minionCurses}) do
for _, curse in ipairs(source) do
local slot
for i = 1, source.limit do
--Prevent multiple marks from being considered
if curse.isMark then
if markSlotted then
slot = nil
-- calculate curses that ignore hex limit after
if not curse.ignoreHexLimit then
local slot
for i = 1, source.limit do
--Prevent multiple marks from being considered
if curse.isMark then
if markSlotted then
slot = nil
break
end
end
if not curseSlots[i] then
slot = i
break
elseif curseSlots[i].name == curse.name then
if curseSlots[i].priority < curse.priority then
slot = i
else
slot = nil
end
break
elseif curseSlots[i].priority < curse.priority then
slot = i
end
end
if slot then
if curseSlots[slot] and curseSlots[slot].isMark then
markSlotted = false
end
curseSlots[slot] = curse
if curse.isMark then
markSlotted = true
end
end
end
end
end
for _, source in ipairs({curses, minionCurses}) do
for _, curse in ipairs(source) do
if curse.ignoreHexLimit then
local skipAddingCurse = false
for i = 1, #curseSlots do
if curseSlots[i].name == curse.name then
-- if curse is higher priority, replace current curse with it, otherwise if same or lower priority skip it entirely
if curseSlots[i].priority < curse.priority then
curseSlots[i] = curse
end
skipAddingCurse = true
break
end
end
if not curseSlots[i] then
slot = i
break
elseif curseSlots[i].name == curse.name then
if curseSlots[i].priority < curse.priority then
slot = i
else
slot = nil
end
break
elseif curseSlots[i].priority < curse.priority then
slot = i
end
end
if slot then
if curseSlots[slot] and curseSlots[slot].isMark then
markSlotted = false
end
curseSlots[slot] = curse
if curse.isMark then
markSlotted = true
if not skipAddingCurse then
curseSlots[#curseSlots + 1] = curse
end
end
end

View File

@@ -1850,11 +1850,11 @@ local specialModList = {
["curse enemies with (%D+) on %a+"] = function(_, skill) return triggerExtraSkill(skill, 1, true) end,
["curse enemies with (%D+) on %a+, with (%d+)%% increased effect"] = function(_, skill, num) return {
mod("ExtraSkill", "LIST", { skillId = gemIdLookup[skill], level = 1, noSupports = true, triggered = true }),
mod("CurseEffect", "INC", tonumber(num), { type = "SkillName", skillName = gemIdLookup[skill] }),
mod("CurseEffect", "INC", tonumber(num), { type = "SkillName", skillName = string.gsub(" "..skill, "%W%l", string.upper):sub(2) }),
} end,
["%d+%% chance to curse n?o?n?%-?c?u?r?s?e?d? ?enemies with (%D+) on %a+, with (%d+)%% increased effect"] = function(_, skill, num) return {
mod("ExtraSkill", "LIST", { skillId = gemIdLookup[skill], level = 1, noSupports = true, triggered = true }),
mod("CurseEffect", "INC", tonumber(num), { type = "SkillName", skillName = gemIdLookup[skill] }),
mod("CurseEffect", "INC", tonumber(num), { type = "SkillName", skillName = string.gsub(" "..skill, "%W%l", string.upper):sub(2) }),
} end,
["curse enemies with level (%d+) (%D+) on %a+, which can apply to hexproof enemies"] = function(num, _, skill) return triggerExtraSkill(skill, num, true) end,
["curse enemies with level (%d+) (.+) on %a+"] = function(num, _, skill) return triggerExtraSkill(skill, num, true) end,
@@ -2081,7 +2081,7 @@ local specialModList = {
["you are cursed with level (%d+) (%D+)"] = function(num, _, name) return { mod("ExtraCurse", "LIST", { skillId = gemIdLookup[name], level = num, applyToPlayer = true }) } end,
["you are cursed with (%D+), with (%d+)%% increased effect"] = function(_, skill, num) return {
mod("ExtraCurse", "LIST", { skillId = gemIdLookup[skill], level = 1, applyToPlayer = true }),
mod("CurseEffectOnSelf", "INC", tonumber(num), { type = "SkillName", skillName = gemIdLookup[skill] }),
mod("CurseEffectOnSelf", "INC", tonumber(num), { type = "SkillName", skillName = string.gsub(" "..skill, "%W%l", string.upper):sub(2) }),
} end,
["you count as on low life while you are cursed with vulnerability"] = { flag("Condition:LowLife", { type = "Condition", var = "AffectedByVulnerability" }) },
["if you consumed a corpse recently, you and nearby allies regenerate (%d+)%% of life per second"] = function (num) return { mod("ExtraAura", "LIST", { mod = mod("LifeRegenPercent", "BASE", num) }, { type = "Condition", var = "ConsumedCorpseRecently" }) } end,
@@ -2540,6 +2540,7 @@ local specialModList = {
["[ct][ar][si][tg]g?e?r? a socketed cold s[pk][ei]ll on melee critical strike"] = { mod("ExtraSupport", "LIST", { skillId = "SupportUniqueCosprisMaliceColdSpellsCastOnMeleeCriticalStrike", level = 1 }, { type = "SocketedIn", slotName = "{SlotName}" }) },
["your curses can apply to hexproof enemies"] = { flag("CursesIgnoreHexproof") },
["your hexes can affect hexproof enemies"] = { flag("CursesIgnoreHexproof") },
["hexes from socketed skills ignore curse limit"] = { flag("CursesIgnoreHexLimit", { type = "SocketedIn", slotName = "{SlotName}" } )},
["reserves (%d+)%% of life"] = function(num) return { mod("ExtraLifeReserved", "BASE", num) } end,
["(%d+)%% of cold damage taken as lightning"] = function(num) return { mod("ColdDamageTakenAsLightning", "BASE", num) } end,
["(%d+)%% of fire damage taken as lightning"] = function(num) return { mod("FireDamageTakenAsLightning", "BASE", num) } end,
@@ -2694,11 +2695,16 @@ local specialModList = {
["wintertide brand has %+(%d+) to maximum stages"] = function(num) return { mod("Multiplier:WintertideBrandMaxStages", "BASE", num, { type = "SkillName", skillName = "Wintertide Brand" }) } end,
["wave of conviction's exposure applies (%-%d+)%% elemental resistance"] = function(num) return { mod("ExtraSkillStat", "LIST", { key = "purge_expose_resist_%_matching_highest_element_damage", value = num }, { type = "SkillName", skillName = "Wave of Conviction" }) } end,
["arcane cloak spends an additional (%d+)%% of current mana"] = function(num) return { mod("ExtraSkillStat", "LIST", { key = "arcane_cloak_consume_%_of_mana", value = num }, { type = "SkillName", skillName = "Arcane Cloak" }) } end,
["arcane cloak grants life regeneration equal to (%d+)%% of mana spent per second"] = function(num) return { mod("ExtraSkillMod", "LIST", { mod = mod("LifeRegen", "BASE", num / 100, 0, 0, { type = "Multiplier", var = "ArcaneCloakConsumedMana" }, { type = "GlobalEffect", effectType = "Buff" }) }, { type = "SkillName", skillName = "Arcane Cloak" }) } end,
["caustic arrow has (%d+)%% chance to inflict withered on hit for (%d+) seconds base duration"] = { mod("ExtraSkillMod", "LIST", { mod = mod("Condition:CanWither", "FLAG", true) }, { type = "SkillName", skillName = "Caustic Arrow" } ) },
["venom gyre has a (%d+)%% chance to inflict withered for (%d+) seconds on hit"] = { mod("ExtraSkillMod", "LIST", { mod = mod("Condition:CanWither", "FLAG", true) }, { type = "SkillName", skillName = "Venom Gyre" } ) },
["sigil of power's buff also grants (%d+)%% increased critical strike chance per stage"] = function(num) return { mod("CritChance", "INC", num, 0, 0, { type = "Multiplier", var = "SigilOfPowerStage", limit = 4 }, { type = "GlobalEffect", effectType = "Buff", effectName = "Sigil of Power" } ) } end,
["cobra lash chains (%d+) additional times"] = function(num) return { mod("ExtraSkillMod", "LIST", { mod = mod("ChainCountMax", "BASE", num) }, { type = "SkillName", skillName = "Cobra Lash" }) } end,
<<<<<<< HEAD
["general's cry has ([%+%-]%d) to maximum number of mirage warriors"] = function(num) return { mod("GeneralsCryDoubleMaxCount", "BASE", num) } end,
=======
["steelskin buff can take (%d+)%% increased amount of damage"] = function(num) return { mod("ExtraSkillStat", "LIST", { key = "steelskin_damage_limit_+%", value = num }, { type = "SkillName", skillName = "Steelskin" }) } end,
>>>>>>> dev
-- Alternate Quality
["quality does not increase physical damage"] = { mod("AlternateQualityWeapon", "BASE", 1) },
["(%d+)%% increased critical strike chance per 4%% quality"] = function(num) return { mod("AlternateQualityLocalCritChancePer4Quality", "INC", num) } end,