Skip to content

Commit 0ddbf76

Browse files
author
LocalIdentity
committed
Add support for many other mods
1 parent 38a55c4 commit 0ddbf76

4 files changed

Lines changed: 31 additions & 14 deletions

File tree

src/Data/ModCache.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8305,7 +8305,7 @@ c["Gain 2 Endurance, Frenzy or Power Charges every 6 seconds Adds 70 to 130 Fire
83058305
c["Gain 2 Grasping Vines each second while stationary"]={{[1]={[1]={limit=10,limitTotal=true,type="Multiplier",var="StationarySeconds"},[2]={type="Condition",var="Stationary"},flags=0,keywordFlags=0,name="Multiplier:GraspingVinesCount",type="BASE",value=2}},nil}
83068306
c["Gain 2 Mana per Enemy Hit with Attacks"]={{[1]={flags=4,keywordFlags=65536,name="ManaOnHit",type="BASE",value=2}},nil}
83078307
c["Gain 2 Power Charges on Using a Warcry"]={{}," Power Charges on Using a "}
8308-
c["Gain 2 Power Charges on Using a Warcry Warcries grant Arcane Surge to you and Allies, with 10% increased effect per 5 power, up to 50%"]={{[1]={flags=0,keywordFlags=4,name="Condition:ArcaneSurge",type="BASE",value=2}}," Power Charges on Using a Warcries grant , with 10% increased effect per 5 power, up to 50% "}
8308+
c["Gain 2 Power Charges on Using a Warcry Warcries grant Arcane Surge to you and Allies, with 10% increased effect per 5 power, up to 50%"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=4,name="Condition:ArcaneSurge",type="BASE",value=2}}}}," Power Charges on Using a Warcries grant , with 10% increased effect per 5 power, up to 50% "}
83098309
c["Gain 2 Rage on Hit with Axes"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil}
83108310
c["Gain 2 Rage on Hit with Axes or Swords"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil}
83118311
c["Gain 2 Rage on Melee Hit"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil}
@@ -8402,8 +8402,7 @@ c["Gain 40% of Physical Attack Damage as Extra Fire Damage"]={{[1]={flags=1,keyw
84028402
c["Gain 40% of Physical Damage as Extra Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="PhysicalDamageGainAsChaos",type="BASE",value=40}},nil}
84038403
c["Gain 40% of Physical Damage as Extra Damage of a random Element while you are Ignited"]={{[1]={[1]={type="Condition",var="Ignited"},flags=0,keywordFlags=0,name="PhysicalDamageGainAsRandom",type="BASE",value=40}},nil}
84048404
c["Gain 40% of Physical Damage as a Random Element if you've cast Elemental Weakness in the past 10 seconds"]={{[1]={[1]={type="Condition",var="SelfCastElementalWeakness"},flags=0,keywordFlags=0,name="PhysicalDamageGainAsRandom",type="BASE",value=40}},nil}
8405-
c["Gain 5 Life for each Ignited Enemy hit with Attacks"]={{[1]={flags=0,keywordFlags=65536,name="Life",type="BASE",value=5}}," for each Ignited Enemy hit "}
8406-
c["Gain 5 Life for each Ignited Enemy hit with Attacks 15% increased Ignite Duration on Enemies"]={{[1]={flags=0,keywordFlags=65536,name="Life",type="BASE",value=5}}," for each Ignited Enemy hit 15% increased Ignite Duration "}
8405+
c["Gain 5 Life for each Ignited Enemy hit with Attacks"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Ignited"},flags=5,keywordFlags=0,name="LifeOnHit",type="BASE",value=5}},nil}
84078406
c["Gain 5 Life per Enemy Hit with Attacks"]={{[1]={flags=4,keywordFlags=65536,name="LifeOnHit",type="BASE",value=5}},nil}
84088407
c["Gain 5 Mana per Enemy Killed"]={{[1]={flags=0,keywordFlags=0,name="ManaOnKill",type="BASE",value=5}},nil}
84098408
c["Gain 5 Rage on Hit with Retaliation Skills"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil}

src/Modules/CalcOffence.lua

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,7 +2415,7 @@ function calcs.offence(env, actor, activeSkill)
24152415

24162416
-- Exerted Attack members
24172417
local exertedDoubleDamage = env.modDB:Sum("BASE", cfg, "ExertDoubleDamageChance")
2418-
local exertingWarcryCount = env.modDB:Sum("BASE", nil, "ExertingWarcryCount")
2418+
local exertingWarcryCount = env.modDB:Sum("BASE", nil, "Multiplier:ExertingWarcryCount")
24192419
globalOutput.OffensiveWarcryEffect = 1
24202420
globalOutput.MaxOffensiveWarcryEffect = 1
24212421
globalOutput.TheoreticalOffensiveWarcryEffect = 1
@@ -2841,7 +2841,12 @@ function calcs.offence(env, actor, activeSkill)
28412841
output.CritChance = (1 - (1 - output.CritChance / 100) ^ (critRolls + 1)) * 100
28422842
end
28432843
local preHitCheckCritChance = output.CritChance
2844+
local pre3rdUseCritChance= output.CritChance
28442845
if env.mode_effective then
2846+
if skillModList:Flag(skillCfg, "Every3UseCrit") then
2847+
output.CritChance = (2 * output.CritChance + 100) / 3
2848+
end
2849+
preHitCheckCritChance = output.CritChance
28452850
output.CritChance = output.CritChance * output.AccuracyHitChance / 100
28462851
end
28472852
if breakdown and output.CritChance ~= baseCrit then
@@ -2863,9 +2868,14 @@ function calcs.offence(env, actor, activeSkill)
28632868
local overCap = preCapCritChance - 100
28642869
t_insert(breakdown.CritChance, s_format("Crit is overcapped by %.2f%% (%d%% increased Critical Strike Chance)", overCap, overCap / more / (baseCrit + base) * 100))
28652870
end
2866-
if env.mode_effective and critRolls ~= 0 then
2867-
t_insert(breakdown.CritChance, "Crit Chance is Lucky:")
2868-
t_insert(breakdown.CritChance, s_format("1 - (1 - %.4f)^ %d", preLuckyCritChance / 100, critRolls + 1))
2871+
if env.mode_effective and (critRolls ~= 0 or skillModList:Flag(skillCfg, "Every3UseCrit")) then
2872+
if critRolls ~= 0 then
2873+
t_insert(breakdown.CritChance, "Crit Chance is Lucky:")
2874+
t_insert(breakdown.CritChance, s_format("1 - (1 - %.4f)^ %d", preLuckyCritChance / 100, critRolls + 1))
2875+
end
2876+
if skillModList:Flag(skillCfg, "Every3UseCrit") then
2877+
t_insert(breakdown.CritChance, s_format("+ %.2f%% ^8(crit every 3rd use)", (2 * pre3rdUseCritChance + 100) / 3 - pre3rdUseCritChance))
2878+
end
28692879
t_insert(breakdown.CritChance, s_format("= %.2f%%", preHitCheckCritChance))
28702880
end
28712881
if env.mode_effective and output.AccuracyHitChance < 100 then
@@ -5500,7 +5510,7 @@ function calcs.offence(env, actor, activeSkill)
55005510
end
55015511
local averageWarcryCount = output.GlobalWarcryUptimeRatio / 100
55025512
if activeSkill.skillModList:Flag(nil, "Condition:WarcryMaxHit") then
5503-
averageWarcryCount = env.modDB:Sum("BASE", nil, "ExertingWarcryCount")
5513+
averageWarcryCount = env.modDB:Sum("BASE", nil, "Multiplier:ExertingWarcryCount")
55045514
end
55055515
if averageWarcryCount and dmgType and dmgMult then
55065516
local dmgBreakdown, totalDmgTaken = calcs.applyDmgTakenConversion(activeSkill, output, breakdown, dmgType, (output.Life or 0) * dmgMult/100 * averageWarcryCount)

src/Modules/CalcPerform.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ function calcs.perform(env, skipEHP)
20032003
local extraExertions = modStore:Sum("BASE", nil, "ExtraExertedAttacks") or 0
20042004
local exertMultiplier = modStore:More(nil, "ExtraExertedAttacks")
20052005
env.player.modDB:NewMod("Num"..warcryName.."Exerts", "BASE", m_floor((baseExerts + extraExertions) * exertMultiplier))
2006-
env.player.modDB:NewMod("ExertingWarcryCount", "BASE", 1)
2006+
env.player.modDB:NewMod("Multiplier:ExertingWarcryCount", "BASE", 1)
20072007
end
20082008
if not activeSkill.skillModList:Flag(nil, "CannotShareWarcryBuffs") then
20092009
local warcryPower = modDB:Override(nil, "WarcryPower") or m_max((modDB:Sum("BASE", nil, "WarcryPower") or 0) * (1 + (modDB:Sum("INC", nil, "WarcryPower") or 0)/100), (modDB:Sum("BASE", nil, "MinimumWarcryPower") or 0))

src/Modules/ModParser.lua

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ local modNameList = {
678678
["damage over time multiplier"] = "DotMultiplier",
679679
-- Crit/accuracy/speed modifiers
680680
["critical strike chance"] = "CritChance",
681+
["critical hit chance"] = "CritChance",
681682
["attack critical strike chance"] = { "CritChance", flags = ModFlag.Attack },
682683
["critical strike multiplier"] = "CritMultiplier",
683684
["attack critical strike multiplier"] = { "CritMultiplier", flags = ModFlag.Attack },
@@ -963,6 +964,7 @@ local modFlagList = {
963964
["of movement skills used"] = { keywordFlags = KeywordFlag.Movement },
964965
["of travel skills"] = { tag = { type = "SkillType", skillType = SkillType.Travel } },
965966
["of banner skills"] = { tag = { type = "SkillType", skillType = SkillType.Banner } },
967+
["lightning skills"] = { keywordFlags = KeywordFlag.Lightning },
966968
["with lightning skills"] = { keywordFlags = KeywordFlag.Lightning },
967969
["with cold skills"] = { keywordFlags = KeywordFlag.Cold },
968970
["with fire skills"] = { keywordFlags = KeywordFlag.Fire },
@@ -1051,6 +1053,7 @@ local preFlagList = {
10511053
["^while a pinnacle atlas boss is in your presence, minions [hd][ae][va][el] "] = { addToMinion = true, playerTag = { type = "ActorCondition", actor = "enemy", var = "PinnacleBoss" } },
10521054
["^minions leech "] = { addToMinion = true },
10531055
["^minions' attacks deal "] = { addToMinion = true, flags = ModFlag.Attack },
1056+
["^minions created recently have "] = { addToMinion = true, playerTag = { type = "Condition", var = "MinionsCreatedRecently" } },
10541057
["^golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillType", skillType = SkillType.Golem } },
10551058
["^summoned golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillType", skillType = SkillType.Golem } },
10561059
["^golem skills have "] = { tag = { type = "SkillType", skillType = SkillType.Golem } },
@@ -1220,7 +1223,7 @@ local preFlagList = {
12201223
["attacks with energy blades "] = { flags = ModFlag.Attack, tag = { type = "Condition", var = "AffectedByEnergyBlade" } },
12211224
["^for each nearby corpse, "] = { tag = { type = "Multiplier", var = "NearbyCorpse" } },
12221225
["^enemies in your link beams have "] = { tag = { type = "Condition", var = "BetweenYouAndLinkedTarget" }, applyToEnemy = true },
1223-
["^consecrated ground you create also grants "] = { tag = { type = "Condition", var = "OnConsecratedGround" } },
1226+
["^consecrated ground you create a?l?s?o? ?grants "] = { tag = { type = "Condition", var = "OnConsecratedGround" } },
12241227
-- While in the presence of...
12251228
["^while a unique enemy is in your presence, "] = { tag = { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" } },
12261229
["^while a pinnacle atlas boss is in your presence, "] = { tag = { type = "ActorCondition", actor = "enemy", var = "PinnacleBoss" } },
@@ -1237,6 +1240,7 @@ local modTagList = {
12371240
["with critical strikes"] = { tag = { type = "Condition", var = "CriticalStrike" } },
12381241
["while affected by auras you cast"] = { tag = { type = "Condition", var = "AffectedByAura" } },
12391242
["for you and nearby allies"] = { newAura = true },
1243+
["to you and allies"] = { newAura = true },
12401244
-- Multipliers
12411245
["per power charge"] = { tag = { type = "Multiplier", var = "PowerCharge" } },
12421246
["per frenzy charge"] = { tag = { type = "Multiplier", var = "FrenzyCharge" } },
@@ -1333,7 +1337,6 @@ local modTagList = {
13331337
["per enemy killed by you or your totems recently"] = { tag = { type = "Multiplier", varList = { "EnemyKilledRecently","EnemyKilledByTotemsRecently" } } },
13341338
["per nearby enemy, up to %+?(%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "NearbyEnemies", limit = num, limitTotal = true } } end,
13351339
["per enemy in close range"] = { tagList = { { type = "Condition", var = "AtCloseRange" }, { type = "Multiplier", var = "NearbyEnemies" } } },
1336-
["to you and allies"] = { },
13371340
["per red socket"] = { tag = { type = "Multiplier", var = "RedSocketIn{SlotName}" } },
13381341
["per green socket on main hand weapon"] = { tag = { type = "Multiplier", var = "GreenSocketInWeapon 1" } },
13391342
["per green socket on"] = { tag = { type = "Multiplier", var = "GreenSocketInWeapon 1" } },
@@ -1412,7 +1415,7 @@ local modTagList = {
14121415
["per (%d+)%% missing cold resistance, up to a maximum of (%d+)%%"] = function(num, _, limit) return { tag = { type = "PerStat", stat = "MissingColdResist", div = num, globalLimit = tonumber(limit), globalLimitKey = "ReplicaNebulisCold" } } end,
14131416
["per endurance, frenzy or power charge"] = { tag = { type = "PerStat", stat = "TotalCharges" } },
14141417
["per fortification"] = { tag = { type = "PerStat", stat = "FortificationStacks" } },
1415-
["per two fortification on you"] = { tag = { type = "PerStat", stat= "FortificationStacks", div=2, actor = "player" } },
1418+
["per two fortification on you"] = { tag = { type = "PerStat", stat= "FortificationStacks", div = 2, actor = "player" } },
14161419
["per fortification above 20"] = { tag = { type = "PerStat", stat = "FortificationStacksOver20" } },
14171420
["per totem"] = { tag = { type = "PerStat", stat = "TotemsSummoned" } },
14181421
["per summoned totem"] = { tag = { type = "PerStat", stat = "TotemsSummoned" } },
@@ -1451,6 +1454,7 @@ local modTagList = {
14511454
["against targets they pierce"] = { tag = { type = "StatThreshold", stat = "PierceCount", threshold = 1 } },
14521455
["against pierced targets"] = { tag = { type = "StatThreshold", stat = "PierceCount", threshold = 1 } },
14531456
["to targets they pierce"] = { tag = { type = "StatThreshold", stat = "PierceCount", threshold = 1 } },
1457+
["that fire a single projectile"] = { tag = { type = "StatThreshold", stat = "ProjectileCount", threshold = 1, upper = true } },
14541458
["w?h?i[lf]e? you have at least (%d+) devotion"] = function(num) return { tag = { type = "StatThreshold", stat = "Devotion", threshold = num } } end,
14551459
["while you have at least (%d+) rage"] = function(num) return { tag = { type = "MultiplierThreshold", var = "Rage", threshold = num } } end,
14561460
["while affected by a unique abyss jewel"] = { tag = { type = "MultiplierThreshold", var = "UniqueAbyssJewels", threshold = 1 } },
@@ -1718,6 +1722,7 @@ local modTagList = {
17181722
["when you warcry"] = { tag = { type = "Condition", var = "UsedWarcryRecently" } },
17191723
["if you[' ]h?a?ve warcried recently"] = { tag = { type = "Condition", var = "UsedWarcryRecently" } },
17201724
["for each time you[' ]h?a?ve warcried recently"] = { tag = { type = "Multiplier", var = "WarcryUsedRecently" } },
1725+
["for each warcry exerting them"] = { tag = { type = "Multiplier", var = "ExertingWarcryCount" } },
17211726
["when you warcry"] = { tag = { type = "Condition", var = "UsedWarcryRecently" } },
17221727
["if you[' ]h?a?ve warcried in the past 8 seconds"] = { tag = { type = "Condition", var = "UsedWarcryInPast8Seconds" } },
17231728
["for each second you've been affected by a warcry buff, up to a maximum of (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "AffectedByWarcryBuffDuration", limit = num, limitTotal = true } } end,
@@ -2082,6 +2087,8 @@ local specialModList = {
20822087
["removes all energy shield"] = { mod("EnergyShield", "MORE", -100) },
20832088
["skills cost life instead of mana"] = { flag("CostLifeInsteadOfMana") },
20842089
["skills reserve life instead of mana"] = { flag("BloodMagicReserved") },
2090+
["your skills that throw mines reserve life instead of mana"] = { flag("BloodMagicReserved", nil, 0, KeywordFlag.Mine) },
2091+
["your travel skills critically strike once every 3 uses"] = { flag("Every3UseCrit", { type = "SkillType", skillType = SkillType.Travel }) },
20852092
["non%-aura skills cost no mana or life while focus?sed"] = {
20862093
mod("ManaCost", "MORE", -100, { type = "Condition", var = "Focused" }, { type = "SkillType", skillType = SkillType.Aura, neg = true }),
20872094
mod("LifeCost", "MORE", -100, { type = "Condition", var = "Focused" }, { type = "SkillType", skillType = SkillType.Aura, neg = true })
@@ -3479,6 +3486,7 @@ local specialModList = {
34793486
["(%d+)%% chance on hitting an enemy for all impales on that enemy to last for an additional hit"] = function(num) return {
34803487
mod("ImpaleAdditionalDurationChance", "BASE", num)
34813488
} end,
3489+
["projectiles gain impale effect as they travel farther, causing impales they inflict to have up to (%d+)%% increased effect"] = function(num) return { mod("ImpaleEffect", "INC", num, nil, ModFlag.Projectile, { type = "DistanceRamp", ramp = { {35,0},{70,1} } }) } end,
34823490
-- Poison and Bleed
34833491
["(%d+)%% increased damage with bleeding inflicted on poisoned enemies"] = function(num) return {
34843492
mod("Damage", "INC", num, nil, 0, KeywordFlag.Bleed, { type = "ActorCondition", actor = "enemy", var = "Poisoned" })
@@ -3942,8 +3950,6 @@ local specialModList = {
39423950
["your strength is added to your minions"] = { mod("StrengthAddedToMinions", "BASE", 100) },
39433951
["half of your strength is added to your minions"] = { mod("StrengthAddedToMinions", "BASE", 50) },
39443952
["minions' accuracy rating is equal to yours"] = { flag("MinionAccuracyEqualsAccuracy") },
3945-
["minions created recently have (%d+)%% increased attack and cast speed"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("Speed", "INC", num) }, { type = "Condition", var = "MinionsCreatedRecently" }) } end,
3946-
["minions created recently have (%d+)%% increased movement speed"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("MovementSpeed", "INC", num) }, { type = "Condition", var = "MinionsCreatedRecently" }) } end,
39473953
["minions poison enemies on hit"] = { mod("MinionModifier", "LIST", { mod = mod("PoisonChance", "BASE", 100) }) },
39483954
["minions have (%d+)%% chance to poison enemies on hit"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("PoisonChance", "BASE", num) }) } end,
39493955
["(%d+)%% increased minion damage if you have hit recently"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num) }, { type = "Condition", var = "HitRecently" }) } end,
@@ -4214,6 +4220,7 @@ local specialModList = {
42144220
} end,
42154221
["(%d+) life gained for each cursed enemy hit by your attacks"] = function(num) return { mod("LifeOnHit", "BASE", num, nil, bor(ModFlag.Attack, ModFlag.Hit), { type = "ActorCondition", actor = "enemy", var = "Cursed" }) } end,
42164222
["gain (%d+) life per cursed enemy hit with attacks"] = function(num) return { mod("LifeOnHit", "BASE", num, nil, bor(ModFlag.Attack, ModFlag.Hit), { type = "ActorCondition", actor = "enemy", var = "Cursed" }) } end,
4223+
["gain (%d+) life for each ignited enemy hit with attacks"] = function(num) return { mod("LifeOnHit", "BASE", num, nil, bor(ModFlag.Attack, ModFlag.Hit), { type = "ActorCondition", actor = "enemy", var = "Ignited" }) } end,
42174224
["(%d+) mana gained for each cursed enemy hit by your attacks"] = function(num) return { mod("ManaOnHit", "BASE", num, nil, bor(ModFlag.Attack, ModFlag.Hit), { type = "ActorCondition", actor = "enemy", var = "Cursed" }) } end,
42184225
["gain (%d+) mana per cursed enemy hit with attacks"] = function(num) return { mod("ManaOnHit", "BASE", num, nil, bor(ModFlag.Attack, ModFlag.Hit), { type = "ActorCondition", actor = "enemy", var = "Cursed" }) } end,
42194226
["gain (%d+) life per blinded enemy hit with this weapon"] = function(num) return { mod("LifeOnHit", "BASE", num, nil, ModFlag.Hit,{ type = "ActorCondition", actor = "enemy", var = "Blinded" }, { type = "Condition", var = "{Hand}Attack" }) } end,
@@ -4290,6 +4297,7 @@ local specialModList = {
42904297
["replenishes energy shield by (%d+)%% of armour when you block"] = function(num) return { mod("EnergyShieldOnBlock", "BASE", 1, { type = "PercentStat", stat = "Armour", percent = num }) } end,
42914298
["recover energy shield equal to (%d+)%% of armour when you block"] = function(num) return { mod("EnergyShieldOnBlock", "BASE", 1, { type = "PercentStat", stat = "Armour", percent = num }) } end,
42924299
["(%d+)%% of damage taken while affected by clarity recouped as mana"] = function(num) return { mod("ManaRecoup", "BASE", num, { type = "Condition", var = "AffectedByClarity" }) } end,
4300+
["(%d+)%% of damage taken while frozen recouped as life"] = function(num) return { mod("LifeRecoup", "BASE", num, { type = "Condition", var = "Frozen" }) } end,
42934301
["recoup effects instead occur over 3 seconds"] = { flag("3SecondRecoup") },
42944302
["life recoup effects instead occur over 3 seconds"] = { flag("3SecondLifeRecoup") },
42954303
["([%d%.]+)%% of physical damage prevented from hits in the past (%d+) seconds is regenerated as life per second"] = function(num, _, duration) return {

0 commit comments

Comments
 (0)