Skip to content

Commit 541a660

Browse files
LocalIdentityLocalIdentity
andauthored
Add support for a number of misc tree mods (#1353)
Pierce chance mods You have 30% less defences Fully broken armour effect Minion command skills nodes Ailment and Stun threshold while surrounded + totem limit for melee attack totems Been heavy stunned recently Aggravated bleeding on pinned targets Defend with 200% armour charm Arrow fork No life flask uses left Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 22008b4 commit 541a660

6 files changed

Lines changed: 47 additions & 39 deletions

File tree

src/Data/ModCache.lua

Lines changed: 24 additions & 36 deletions
Large diffs are not rendered by default.

src/Modules/CalcOffence.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ function calcs.offence(env, actor, activeSkill)
12101210
output.PierceCount = 100
12111211
output.PierceCountString = "All targets"
12121212
else
1213-
output.PierceCount = skillModList:Sum("BASE", skillCfg, "PierceCount")
1213+
output.PierceCount = skillModList:Sum("BASE", skillCfg, "PierceCount") + skillModList:Sum("BASE", skillCfg, "PierceChance") / 100
12141214
output.PierceCountString = output.PierceCount
12151215
end
12161216
if output.PierceCount > 0 then

src/Modules/CalcPerform.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ local function doActorMisc(env, actor)
572572
modDB:NewMod("ChaosDamageTaken", "INC", effect, "Withered", { type = "Multiplier", var = "WitheredStack", limit = 10 } )
573573
end
574574
if enemyDB:Flag(nil, "Condition:ArmourFullyBroken") then
575-
enemyDB:NewMod("PhysicalDamageTaken", "INC", 20, "Fully Broken Armour", ModFlag.Hit)
575+
local effect = 20 * (1 + modDB:Sum("INC", nil, "FullyBrokenArmourEffect") / 100)
576+
enemyDB:NewMod("PhysicalDamageTaken", "INC", effect, "Fully Broken Armour", ModFlag.Hit)
576577
end
577578
if modDB:Flag(nil, "Blind") and not modDB:Flag(nil, "CannotBeBlinded") then
578579
if not modDB:Flag(nil, "IgnoreBlindHitChance") then

src/Modules/CalcSections.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ return {
677677
{ label = "Repeat Count", haveOutput = "RepeatCount", { format = "{output:Repeats}", { modName = { "RepeatCount" }, cfg = "skill" }, }, },
678678
{ label = "Projectile Count", flag = "projectile", { format = "{output:ProjectileCount}", { modName = { "NoAdditionalProjectiles" , "ProjectileCount" }, cfg = "skill" }, }, },
679679
{ label = "2 Add. Proj. Chance", haveOutput = "TwoAdditionalProjectiles", { format = "{output:TwoAdditionalProjectiles}%", { modName = { "TwoAdditionalProjectilesChance", "NoAdditionalProjectiles" }, cfg = "skill" }, }, },
680-
{ label = "Pierce Count", haveOutput = "PierceCount", { format = "{output:PierceCountString}", { modName = { "CannotPierce", "PierceCount", "PierceAllTargets" }, cfg = "skill" }, }, },
680+
{ label = "Pierce Count", haveOutput = "PierceCount", { format = "{output:PierceCountString}", { modName = { "CannotPierce", "PierceCount", "PierceChance", "PierceAllTargets" }, cfg = "skill" }, }, },
681681
{ label = "Fork Count", haveOutput = "ForkCountMax", { format = "{output:ForkCountString}", { modName = { "CannotFork", "ForkCountMax" }, cfg = "skill" }, }, },
682682
{ label = "Max Chain Count", haveOutput = "ChainMax", { format = "{output:ChainMaxString}", { modName = { "CannotChain", "ChainCountMax", "NoAdditionalChains" }, cfg = "skill" }, }, },
683683
{ label = "Terrain Chain", haveOutput = "TerrainChain", { format = "{output:TerrainChain}%", { modName = { "TerrainChainChance", "NoAdditionalChains" }, cfg = "skill" }, }, },

src/Modules/ConfigOptions.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,9 @@ Huge sets the radius to 11.
930930
{ 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)
931931
modList:NewMod("Condition:UsingFlask", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
932932
end },
933+
{ 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)
934+
modList:NewMod("Condition:NoLifeFlaskUsesLeft", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
935+
end },
933936
{ 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)
934937
modList:NewMod("Condition:UsingCharm", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
935938
end },

src/Modules/ModParser.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ local formList = {
6060
["^(%d+)%% reduced"] = "RED",
6161
["^(%d+)%% slower"] = "RED",
6262
["^(%d+)%% more"] = "MORE",
63+
["^you have (%d+)%% more"] = "MORE",
6364
["^(%d+)%% less"] = "LESS",
65+
["^you have (%d+)%% less"] = "LESS",
6466
["^([%+%-][%d%.]+)%%?"] = "BASE",
6567
["^([%+%-][%d%.]+)%%? to"] = "BASE",
6668
["^([%+%-]?[%d%.]+)%%? of"] = "BASE",
@@ -425,6 +427,7 @@ local modNameList = {
425427
["block and stun recovery"] = "StunRecovery",
426428
["stun duration on you"] = "StunDuration",
427429
["stun threshold"] = "StunThreshold",
430+
["ailment and stun threshold"] = { "StunThreshold", "AilmentThreshold" },
428431
["block recovery"] = "BlockRecovery",
429432
["enemy stun threshold"] = "EnemyStunThreshold",
430433
["stun duration"] = "EnemyStunDuration",
@@ -470,6 +473,7 @@ local modNameList = {
470473
["effect of buffs your ancestor totems grant "] = { "BuffEffect", tag = { type = "SkillName", skillNameList = { "Ancestral Warchief", "Ancestral Protector", "Earthbreaker" } } },
471474
["effect of shrine buffs on you"] = "ShrineBuffEffect",
472475
["effect of withered"] = "WitherEffect",
476+
["effect of fully broken armour"] = "FullyBrokenArmourEffect",
473477
["warcry effect"] = { "BuffEffect", keywordFlags = KeywordFlag.Warcry },
474478
["aspect of the avian buff effect"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Aspect of the Avian" } },
475479
["maximum rage"] = "MaximumRage",
@@ -841,6 +845,7 @@ local modNameList = {
841845
["weapon swap speed"] = "WeaponSwapSpeed",
842846
["to chain an additional time from terrain"] = "TerrainChainChance",
843847
["to apply lightning exposure on hit"] = "LightningExposureChance",
848+
["to pierce an enemy"] = "PierceChance",
844849
-- Flask and Charm modifiers
845850
["effect"] = "LocalEffect",
846851
["effect of flasks"] = "FlaskEffect",
@@ -1065,6 +1070,7 @@ local modFlagList = {
10651070
["of mark skills"] = { tag = { type = "SkillType", skillType = SkillType.Mark } },
10661071
["of your mark skills"] = { tag = { type = "SkillType", skillType = SkillType.Mark } },
10671072
["with skills that cost life"] = { tag = { type = "StatThreshold", stat = "LifeCost", threshold = 1 } },
1073+
["for command skills"] = { tag = { type = "Condition", var = "CommandableSkill" } },
10681074
["minion"] = { addToMinion = true },
10691075
["zombie"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie", includeTransfigured = true } },
10701076
["raised zombie"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie", includeTransfigured = true } },
@@ -1218,6 +1224,7 @@ local preFlagList = {
12181224
["^hex skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Hex } },
12191225
["^mark skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Mark } },
12201226
["^melee skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Melee } },
1227+
["^melee attack skills [hd][ae][va][el] "] = { tagList = { { type = "SkillType", skillType = SkillType.Melee }, { type = "SkillType", skillType = SkillType.Attack } } },
12211228
["^guard skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Guard } },
12221229
["^banner skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Banner } },
12231230
["^nova spells [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Nova } },
@@ -1433,6 +1440,7 @@ local modTagList = {
14331440
["per enemy killed recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "EnemyKilledRecently", limit = tonumber(num), limitTotal = true } } end,
14341441
["per (%d+) rampage kills"] = function(num) return { tag = { type = "Multiplier", var = "Rampage", div = num, limit = 1000 / num, limitTotal = true } } end,
14351442
["per minion, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "SummonedMinion", limit = tonumber(num), limitTotal = true } } end,
1443+
["for each different type of persistent minion in your presence"] = { tag = { type = "Multiplier", var = "PersistentMinionTypes" } },
14361444
["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,
14371445
["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,
14381446
["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,
@@ -1729,6 +1737,7 @@ local modTagList = {
17291737
["during effect of any life flask"] = { tag = { type = "Condition", var = "UsingLifeFlask" } },
17301738
["if you've used a life flask in the past 10 seconds"] = { tag = { type = "Condition", var = "UsingLifeFlask" } },
17311739
["if you've used a mana flask in the past 10 seconds"] = { tag = { type = "Condition", var = "UsingManaFlask" } },
1740+
["while you have no life flask uses left"] = { tag = { type = "Condition", var = "NoLifeFlaskUsesLeft" } },
17321741
["during effect of any life or mana flask"] = { tag = { type = "Condition", varList = { "UsingManaFlask", "UsingLifeFlask" } } },
17331742
["while on consecrated ground"] = { tag = { type = "Condition", var = "OnConsecratedGround" } },
17341743
["while on caustic ground"] = { tag = { type = "Condition", var = "OnCausticGround" } },
@@ -1760,6 +1769,7 @@ local modTagList = {
17601769
["while t?h?e?r?e? ?i?s? ?a rare or unique enemy i?s? ?nearby"] = { tag = { type = "ActorCondition", actor = "enemy", varList = { "NearbyRareOrUniqueEnemy", "RareOrUnique" } } },
17611770
["while a rare or unique enemy is in your presence"] = { tag = { type = "ActorCondition", actor = "enemy", varList = { "NearbyRareOrUniqueEnemy", "RareOrUnique" } } },
17621771
["if you[' ]h?a?ve been stunned recently"] = { tag = { type = "Condition", var = "StunnedRecently" } },
1772+
["if you[' ]h?a?ve been heavy stunned recently"] = { tag = { type = "Condition", var = "StunnedRecently" } },
17631773
["if you haven't been stunned recently"] = { tag = { type = "Condition", var = "StunnedRecently", neg = true } },
17641774
["if you[' ]h?a?ve hit recently"] = { tag = { type = "Condition", var = "HitRecently" } },
17651775
["if you[' ]h?a?ve hit an enemy recently"] = { tag = { type = "Condition", var = "HitRecently" } },
@@ -2303,6 +2313,7 @@ local specialModList = {
23032313
mod(firstToUpper(ailment:gsub("ing","")) .. "DurationBase", "OVERRIDE", num)
23042314
} end,
23052315
["bleeding you inflict is aggravated"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:BleedAggravated") }) },
2316+
["bleeding you inflict on pinned enemies is aggravated"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:BleedAggravated", { type = "Condition", var = "Pinned" } ) }) },
23062317
["your minions spread caustic ground on death, dealing 20%% of their maximum life as chaos damage per second"] = { mod("ExtraMinionSkill", "LIST", { skillId = "SiegebreakerCausticGround" }) },
23072318
["your minions spread burning ground on death, dealing 20%% of their maximum life as fire damage per second"] = { mod("ExtraMinionSkill", "LIST", { skillId = "ReplicaSiegebreakerBurningGround" }) },
23082319
["you can have an additional brand attached to an enemy"] = { mod("BrandsAttachedLimit", "BASE", 1) },
@@ -2454,6 +2465,9 @@ local specialModList = {
24542465
["defend with (%d+)%% of armour"] = function(num) return {
24552466
mod("ArmourDefense", "MAX", num - 100),
24562467
} end,
2468+
["defend with (%d+)%% of armour during effect"] = function(num) return {
2469+
mod("ArmourDefense", "MAX", num - 100),
2470+
} end,
24572471
["defend with (%d+)%% of armour while not on low energy shield"] = function(num) return {
24582472
mod("ArmourDefense", "MAX", num - 100, "Armour and Energy Shield Mastery", { type = "Condition", var = "LowEnergyShield", neg = true }),
24592473
} end,
@@ -4411,6 +4425,7 @@ local specialModList = {
44114425
["(%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,
44124426
["tornado shot fires an additional secondary projectile"] = { mod("tornadoShotSecondaryProjectiles", "BASE", 1, nil, { type = "SkillName", skillNameList = { "Tornado Shot" } }) },
44134427
["projectiles pierce an additional target"] = { mod("PierceCount", "BASE", 1) },
4428+
["projectiles pierce enemies with fully broken armour"] = { mod("PierceCount", "BASE", 1, { type = "Condition", var = "ArmourFullyBroken" }) },
44144429
["projectiles pierce (%d+) targets?"] = function(num) return { mod("PierceCount", "BASE", num) } end,
44154430
["projectiles pierce (%d+) additional targets?"] = function(num) return { mod("PierceCount", "BASE", num) } end,
44164431
["projectiles pierce (%d+) additional targets while you have phasing"] = function(num) return { mod("PierceCount", "BASE", num, { type = "Condition", var = "Phasing" }) } end,
@@ -4436,6 +4451,7 @@ local specialModList = {
44364451
["right ring slot: your shocking skitterbot's aura applies socketed h?e?x? ?curse instead"] = { flag("SkitterbotsCannotShock", { type = "SlotNumber", num = 2 }) },
44374452
["projectiles from spells cannot pierce"] = { flag("CannotPierce", nil, ModFlag.Spell) },
44384453
["projectiles fork"] = { flag("ForkOnce", nil, ModFlag.Projectile), mod("ForkCountMax", "BASE", 1, nil, ModFlag.Projectile) },
4454+
["arrows fork"] = { flag("ForkOnce", nil, ModFlag.Bow), mod("ForkCountMax", "BASE", 1, nil, ModFlag.Projectile) },
44394455
["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 }) },
44404456
["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 }) },
44414457
["projectiles from attacks can fork (%d+) additional times?"] = function(num) return {

0 commit comments

Comments
 (0)