Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.21 attack and lightning masteries #5842

Merged
merged 4 commits into from
Apr 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,10 @@ function calcs.offence(env, actor, activeSkill)
end
--enemy block chance
output.enemyBlockChance = m_max(m_min((enemyDB:Sum("BASE", cfg, "BlockChance") or 0), 100) - skillModList:Sum("BASE", cfg, "reduceEnemyBlock"), 0)
if enemyDB:Flag(nil, "CannotBlockAttacks") and isAttack then
output.enemyBlockChance = 0
end

output.HitChance = output.AccuracyHitChance * (1 - output.enemyBlockChance / 100)
if output.enemyBlockChance > 0 and not isAttack then
globalOutput.enemyHasSpellBlock = true
Expand Down
1 change: 1 addition & 0 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3404,6 +3404,7 @@ function calcs.perform(env, avoidCache)
for _, mod in ipairs(modDB:Tabulate("BASE", nil, "ExtraExposure", "Extra"..element.."Exposure")) do
min = min + mod.value
end
enemyDB:NewMod("Condition:Has"..element.."Exposure", "FLAG", true, "")
enemyDB:NewMod(element.."Resist", "BASE", m_min(min, modDB:Override(nil, "ExposureMin")), source)
modDB:NewMod("Condition:AppliedExposureRecently", "FLAG", true, "")
end
Expand Down
7 changes: 7 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ local modTagList = {
["for each time you've blocked in the past 10 seconds"] = { tag = { type = "Multiplier", var = "BlockedPast10Sec" } },
["per enemy killed by you or your totems recently"] = { tag = { type = "Multiplier", varList = { "EnemyKilledRecently","EnemyKilledByTotemsRecently" } } },
["per nearby enemy, up to %+?(%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "NearbyEnemies", limit = num, limitTotal = true } } end,
["per enemy in close range"] = { tagList = { { type = "Condition", var = "AtCloseRange" }, { type = "Multiplier", var = "NearbyEnemies" } } },
["to you and allies"] = { },
["per red socket"] = { tag = { type = "Multiplier", var = "RedSocketIn{SlotName}" } },
["per green socket on main hand weapon"] = { tag = { type = "Multiplier", var = "GreenSocketInWeapon 1" } },
Expand Down Expand Up @@ -1645,6 +1646,7 @@ local modTagList = {
["against enemies affected by (%d+) spider's webs"] = function(num) return { tag = { type = "MultiplierThreshold", actor = "enemy", var = "Spider's WebStack", threshold = num } } end,
["against enemies on consecrated ground"] = { tag = { type = "ActorCondition", actor = "enemy", var = "OnConsecratedGround" } },
["if (%d+)%% of curse duration expired"] = function(num) return { tag = { type = "MultiplierThreshold", actor = "enemy", var = "CurseExpired", threshold = num } } end,
["against enemies with (%w+) exposure"] = function(element) return { tag = { type = "ActorCondition", actor = "enemy", var = "Has"..(firstToUpper(element).."Exposure") } } end,
-- Enemy multipliers
["per freeze, shock [ao][nr]d? ignite on enemy"] = { tag = { type = "Multiplier", var = "FreezeShockIgniteOnEnemy" } },
["per poison affecting enemy"] = { tag = { type = "Multiplier", actor = "enemy", var = "PoisonStack" } },
Expand Down Expand Up @@ -3372,6 +3374,7 @@ local specialModList = {
["cannot block while you have no energy shield"] = { flag("CannotBlockAttacks", { type = "Condition", var = "HaveEnergyShield", neg = true }), flag("CannotBlockSpells", { type = "Condition", var = "HaveEnergyShield", neg = true }) },
["cannot block attacks"] = { flag("CannotBlockAttacks") },
["cannot block spells"] = { flag("CannotBlockSpells") },
["monsters cannot block your attacks"] = { mod("EnemyModifier", "LIST", { mod = flag("CannotBlockAttacks") }) },
["damage from blocked hits cannot bypass energy shield"] = { flag("BlockedDamageDoesntBypassES", { type = "Condition", var = "EVBypass", neg = true }) },
["damage from unblocked hits always bypasses energy shield"] = { flag("UnblockedDamageDoesBypassES", { type = "Condition", var = "EVBypass", neg = true }) },
["recover (%d+) life when you block"] = function(num) return { mod("LifeOnBlock", "BASE", num) } end,
Expand Down Expand Up @@ -3598,6 +3601,10 @@ local specialModList = {
["intimidate enemies for (%d+) seconds on hit with attacks while at maximum endurance charges"] = {
mod("EnemyModifier", "LIST", { mod = flag("Condition:Intimidated") }, { type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" }, { type = "Condition", var = "HitRecently" })
},
["nearby enemies are intimidated while you have rage"] = {
-- MultiplierThreshold is on RageStacks because Rage is only set in CalcPerform if Condition:CanGainRage is true, Bear's Girdle does not flag CanGainRage
mod("EnemyModifier", "LIST", { mod = flag("Condition:Intimidated") }, { type = "MultiplierThreshold", var = "RageStack", threshold = 1 })
},
-- Flasks
["flasks do not apply to you"] = { flag("FlasksDoNotApplyToPlayer") },
["flasks apply to your zombies and spectres"] = { flag("FlasksApplyToMinion", { type = "SkillName", skillNameList = { "Raise Zombie", "Raise Spectre" } }) },
Expand Down