Skip to content
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
60 changes: 24 additions & 36 deletions src/Data/ModCache.lua

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ function calcs.offence(env, actor, activeSkill)
output.PierceCount = 100
output.PierceCountString = "All targets"
else
output.PierceCount = skillModList:Sum("BASE", skillCfg, "PierceCount")
output.PierceCount = skillModList:Sum("BASE", skillCfg, "PierceCount") + skillModList:Sum("BASE", skillCfg, "PierceChance") / 100
output.PierceCountString = output.PierceCount
end
if output.PierceCount > 0 then
Expand Down
3 changes: 2 additions & 1 deletion src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,8 @@ local function doActorMisc(env, actor)
modDB:NewMod("ChaosDamageTaken", "INC", effect, "Withered", { type = "Multiplier", var = "WitheredStack", limit = 10 } )
end
if enemyDB:Flag(nil, "Condition:ArmourFullyBroken") then
enemyDB:NewMod("PhysicalDamageTaken", "INC", 20, "Fully Broken Armour", ModFlag.Hit)
local effect = 20 * (1 + modDB:Sum("INC", nil, "FullyBrokenArmourEffect") / 100)
enemyDB:NewMod("PhysicalDamageTaken", "INC", effect, "Fully Broken Armour", ModFlag.Hit)
end
if modDB:Flag(nil, "Blind") and not modDB:Flag(nil, "CannotBeBlinded") then
if not modDB:Flag(nil, "IgnoreBlindHitChance") then
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/CalcSections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ return {
{ label = "Repeat Count", haveOutput = "RepeatCount", { format = "{output:Repeats}", { modName = { "RepeatCount" }, cfg = "skill" }, }, },
{ label = "Projectile Count", flag = "projectile", { format = "{output:ProjectileCount}", { modName = { "NoAdditionalProjectiles" , "ProjectileCount" }, cfg = "skill" }, }, },
{ label = "2 Add. Proj. Chance", haveOutput = "TwoAdditionalProjectiles", { format = "{output:TwoAdditionalProjectiles}%", { modName = { "TwoAdditionalProjectilesChance", "NoAdditionalProjectiles" }, cfg = "skill" }, }, },
{ label = "Pierce Count", haveOutput = "PierceCount", { format = "{output:PierceCountString}", { modName = { "CannotPierce", "PierceCount", "PierceAllTargets" }, cfg = "skill" }, }, },
{ label = "Pierce Count", haveOutput = "PierceCount", { format = "{output:PierceCountString}", { modName = { "CannotPierce", "PierceCount", "PierceChance", "PierceAllTargets" }, cfg = "skill" }, }, },
{ label = "Fork Count", haveOutput = "ForkCountMax", { format = "{output:ForkCountString}", { modName = { "CannotFork", "ForkCountMax" }, cfg = "skill" }, }, },
{ label = "Max Chain Count", haveOutput = "ChainMax", { format = "{output:ChainMaxString}", { modName = { "CannotChain", "ChainCountMax", "NoAdditionalChains" }, cfg = "skill" }, }, },
{ label = "Terrain Chain", haveOutput = "TerrainChain", { format = "{output:TerrainChain}%", { modName = { "TerrainChainChance", "NoAdditionalChains" }, cfg = "skill" }, }, },
Expand Down
3 changes: 3 additions & 0 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,9 @@ Huge sets the radius to 11.
{ var = "conditionUsingFlask", type = "check", label = "Do you have a Flask active?", ifCond = "UsingFlask", tooltip = "This is automatically enabled if you have a flask active,\nbut you can use this option to force it if necessary.", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:UsingFlask", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "conditionNoLifeFlaskUsesLeft", type = "check", label = "Are you out of Life Flask uses?", ifCond = "NoLifeFlaskUsesLeft", tooltip = "This is automatically enabled if you have a flask active,\nbut you can use this option to force it if necessary.", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:NoLifeFlaskUsesLeft", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "conditionUsingCharm", type = "check", label = "Do you have a Charm active?", ifCond = "UsingCharm", tooltip = "This is automatically enabled if you have a charm active,\nbut you can use this option to force it if necessary.", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:UsingCharm", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
Expand Down
16 changes: 16 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ local formList = {
["^(%d+)%% reduced"] = "RED",
["^(%d+)%% slower"] = "RED",
["^(%d+)%% more"] = "MORE",
["^you have (%d+)%% more"] = "MORE",
["^(%d+)%% less"] = "LESS",
["^you have (%d+)%% less"] = "LESS",
["^([%+%-][%d%.]+)%%?"] = "BASE",
["^([%+%-][%d%.]+)%%? to"] = "BASE",
["^([%+%-]?[%d%.]+)%%? of"] = "BASE",
Expand Down Expand Up @@ -425,6 +427,7 @@ local modNameList = {
["block and stun recovery"] = "StunRecovery",
["stun duration on you"] = "StunDuration",
["stun threshold"] = "StunThreshold",
["ailment and stun threshold"] = { "StunThreshold", "AilmentThreshold" },
["block recovery"] = "BlockRecovery",
["enemy stun threshold"] = "EnemyStunThreshold",
["stun duration"] = "EnemyStunDuration",
Expand Down Expand Up @@ -470,6 +473,7 @@ local modNameList = {
["effect of buffs your ancestor totems grant "] = { "BuffEffect", tag = { type = "SkillName", skillNameList = { "Ancestral Warchief", "Ancestral Protector", "Earthbreaker" } } },
["effect of shrine buffs on you"] = "ShrineBuffEffect",
["effect of withered"] = "WitherEffect",
["effect of fully broken armour"] = "FullyBrokenArmourEffect",
["warcry effect"] = { "BuffEffect", keywordFlags = KeywordFlag.Warcry },
["aspect of the avian buff effect"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Aspect of the Avian" } },
["maximum rage"] = "MaximumRage",
Expand Down Expand Up @@ -841,6 +845,7 @@ local modNameList = {
["weapon swap speed"] = "WeaponSwapSpeed",
["to chain an additional time from terrain"] = "TerrainChainChance",
["to apply lightning exposure on hit"] = "LightningExposureChance",
["to pierce an enemy"] = "PierceChance",
-- Flask and Charm modifiers
["effect"] = "LocalEffect",
["effect of flasks"] = "FlaskEffect",
Expand Down Expand Up @@ -1065,6 +1070,7 @@ local modFlagList = {
["of mark skills"] = { tag = { type = "SkillType", skillType = SkillType.Mark } },
["of your mark skills"] = { tag = { type = "SkillType", skillType = SkillType.Mark } },
["with skills that cost life"] = { tag = { type = "StatThreshold", stat = "LifeCost", threshold = 1 } },
["for command skills"] = { tag = { type = "Condition", var = "CommandableSkill" } },
["minion"] = { addToMinion = true },
["zombie"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie", includeTransfigured = true } },
["raised zombie"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie", includeTransfigured = true } },
Expand Down Expand Up @@ -1218,6 +1224,7 @@ local preFlagList = {
["^hex skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Hex } },
["^mark skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Mark } },
["^melee skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Melee } },
["^melee attack skills [hd][ae][va][el] "] = { tagList = { { type = "SkillType", skillType = SkillType.Melee }, { type = "SkillType", skillType = SkillType.Attack } } },
["^guard skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Guard } },
["^banner skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Banner } },
["^nova spells [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Nova } },
Expand Down Expand Up @@ -1433,6 +1440,7 @@ local modTagList = {
["per enemy killed recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "EnemyKilledRecently", limit = tonumber(num), limitTotal = true } } end,
["per (%d+) rampage kills"] = function(num) return { tag = { type = "Multiplier", var = "Rampage", div = num, limit = 1000 / num, limitTotal = true } } end,
["per minion, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "SummonedMinion", limit = tonumber(num), limitTotal = true } } end,
["for each different type of persistent minion in your presence"] = { tag = { type = "Multiplier", var = "PersistentMinionTypes" } },
["for each enemy you or your minions have killed recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", varList = { "EnemyKilledRecently","EnemyKilledByMinionsRecently" }, limit = tonumber(num), limitTotal = true } } end,
["for each enemy you or your minions have killed recently, up to (%d+)%% per second"] = function(num) return { tag = { type = "Multiplier", varList = { "EnemyKilledRecently","EnemyKilledByMinionsRecently" }, limit = tonumber(num), limitTotal = true } } end,
["for each (%d+) total mana y?o?u? ?h?a?v?e? ?spent recently"] = function(num) return { tag = { type = "Multiplier", var = "ManaSpentRecently", div = num } } end,
Expand Down Expand Up @@ -1729,6 +1737,7 @@ local modTagList = {
["during effect of any life flask"] = { tag = { type = "Condition", var = "UsingLifeFlask" } },
["if you've used a life flask in the past 10 seconds"] = { tag = { type = "Condition", var = "UsingLifeFlask" } },
["if you've used a mana flask in the past 10 seconds"] = { tag = { type = "Condition", var = "UsingManaFlask" } },
["while you have no life flask uses left"] = { tag = { type = "Condition", var = "NoLifeFlaskUsesLeft" } },
["during effect of any life or mana flask"] = { tag = { type = "Condition", varList = { "UsingManaFlask", "UsingLifeFlask" } } },
["while on consecrated ground"] = { tag = { type = "Condition", var = "OnConsecratedGround" } },
["while on caustic ground"] = { tag = { type = "Condition", var = "OnCausticGround" } },
Expand Down Expand Up @@ -1760,6 +1769,7 @@ local modTagList = {
["while t?h?e?r?e? ?i?s? ?a rare or unique enemy i?s? ?nearby"] = { tag = { type = "ActorCondition", actor = "enemy", varList = { "NearbyRareOrUniqueEnemy", "RareOrUnique" } } },
["while a rare or unique enemy is in your presence"] = { tag = { type = "ActorCondition", actor = "enemy", varList = { "NearbyRareOrUniqueEnemy", "RareOrUnique" } } },
["if you[' ]h?a?ve been stunned recently"] = { tag = { type = "Condition", var = "StunnedRecently" } },
["if you[' ]h?a?ve been heavy stunned recently"] = { tag = { type = "Condition", var = "StunnedRecently" } },
["if you haven't been stunned recently"] = { tag = { type = "Condition", var = "StunnedRecently", neg = true } },
["if you[' ]h?a?ve hit recently"] = { tag = { type = "Condition", var = "HitRecently" } },
["if you[' ]h?a?ve hit an enemy recently"] = { tag = { type = "Condition", var = "HitRecently" } },
Expand Down Expand Up @@ -2303,6 +2313,7 @@ local specialModList = {
mod(firstToUpper(ailment:gsub("ing","")) .. "DurationBase", "OVERRIDE", num)
} end,
["bleeding you inflict is aggravated"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:BleedAggravated") }) },
["bleeding you inflict on pinned enemies is aggravated"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:BleedAggravated", { type = "Condition", var = "Pinned" } ) }) },
["your minions spread caustic ground on death, dealing 20%% of their maximum life as chaos damage per second"] = { mod("ExtraMinionSkill", "LIST", { skillId = "SiegebreakerCausticGround" }) },
["your minions spread burning ground on death, dealing 20%% of their maximum life as fire damage per second"] = { mod("ExtraMinionSkill", "LIST", { skillId = "ReplicaSiegebreakerBurningGround" }) },
["you can have an additional brand attached to an enemy"] = { mod("BrandsAttachedLimit", "BASE", 1) },
Expand Down Expand Up @@ -2454,6 +2465,9 @@ local specialModList = {
["defend with (%d+)%% of armour"] = function(num) return {
mod("ArmourDefense", "MAX", num - 100),
} end,
["defend with (%d+)%% of armour during effect"] = function(num) return {
mod("ArmourDefense", "MAX", num - 100),
} end,
["defend with (%d+)%% of armour while not on low energy shield"] = function(num) return {
mod("ArmourDefense", "MAX", num - 100, "Armour and Energy Shield Mastery", { type = "Condition", var = "LowEnergyShield", neg = true }),
} end,
Expand Down Expand Up @@ -4411,6 +4425,7 @@ local specialModList = {
["(%d+)%% reduced essence drain and soulrend projectile speed"] = function(num) return { mod("ProjectileSpeed", "INC", -num, nil, { type = "SkillName", skillNameList = { "Essence Drain", "Soulrend" }, includeTransfigured = true }) } end,
["tornado shot fires an additional secondary projectile"] = { mod("tornadoShotSecondaryProjectiles", "BASE", 1, nil, { type = "SkillName", skillNameList = { "Tornado Shot" } }) },
["projectiles pierce an additional target"] = { mod("PierceCount", "BASE", 1) },
["projectiles pierce enemies with fully broken armour"] = { mod("PierceCount", "BASE", 1, { type = "Condition", var = "ArmourFullyBroken" }) },
["projectiles pierce (%d+) targets?"] = function(num) return { mod("PierceCount", "BASE", num) } end,
["projectiles pierce (%d+) additional targets?"] = function(num) return { mod("PierceCount", "BASE", num) } end,
["projectiles pierce (%d+) additional targets while you have phasing"] = function(num) return { mod("PierceCount", "BASE", num, { type = "Condition", var = "Phasing" }) } end,
Expand All @@ -4436,6 +4451,7 @@ local specialModList = {
["right ring slot: your shocking skitterbot's aura applies socketed h?e?x? ?curse instead"] = { flag("SkitterbotsCannotShock", { type = "SlotNumber", num = 2 }) },
["projectiles from spells cannot pierce"] = { flag("CannotPierce", nil, ModFlag.Spell) },
["projectiles fork"] = { flag("ForkOnce", nil, ModFlag.Projectile), mod("ForkCountMax", "BASE", 1, nil, ModFlag.Projectile) },
["arrows fork"] = { flag("ForkOnce", nil, ModFlag.Bow), mod("ForkCountMax", "BASE", 1, nil, ModFlag.Projectile) },
["projectiles from attacks fork"] = { flag("ForkOnce", nil, ModFlag.Projectile, { type = "SkillType", skillType = SkillType.RangedAttack }), mod("ForkCountMax", "BASE", 1, nil, ModFlag.Projectile, { type = "SkillType", skillType = SkillType.RangedAttack }) },
["projectiles from attacks fork an additional time"] = { flag("ForkTwice", nil, ModFlag.Projectile, { type = "SkillType", skillType = SkillType.RangedAttack }), mod("ForkCountMax", "BASE", 1, nil, ModFlag.Projectile, { type = "SkillType", skillType = SkillType.RangedAttack }) },
["projectiles from attacks can fork (%d+) additional times?"] = function(num) return {
Expand Down