Skip to content

Commit be1e1e7

Browse files
PaliakWires77
andauthored
Add parsing for some new mods (#878)
* FEAT: Add parsing for Maximum Physical Damage Reduction is 50% This commit converts the maximum damage reduction for any damage type is (%d+)%% mod to also use the MAX mod type instead of OVERRIDE and implements a more general solution in case other damage types have simillar mods in the future. Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FEAT: Add parsing for Maximum Evade Chance is 50% The cap is applied after all calculations. Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FEAT: Add support for Defend with 200% of Armour This uses the logis from simillar mods. I tried making it more generic with piece wise parsing but i wouldn't work with the existing mods. Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FEAT: Add parsing for Gain 100% of Armour as extra Stun Threshold Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FEAT: Add parsing for Gain 100% of Evasion Rating as extra Ailment Threshold Solution is general and should work for other simillar mods. This also adds general Ailment Threshold parsing and adds it under the "Other Ailment Defenses" section on the calcs tab. This is currently just a modDB:Sum display without any extra processing. Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FEAT: Add parsing for 50% more Mana Cost if you have no Energy Shield Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FEAT: Add parsing for Modifiers to Maximum Fire Resistance also grant Maximum Cold and Lightning Resistance Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FEAT: Add parsing for Modifiers to Fire Resistance also grant Cold and Lightning Resistance at 50% of their value Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FEAT: Add parsing for Totems have 30% more Skill Speed Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * FEAT: Add parsing for Open Weakness mods 20% increased Movement Speed while an enemy with an Open Weakness is in your Presence 40% increased Skill Speed while an enemy with an Open Weakness is in your Presence 50% more damage against enemies with an Open Weakness Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> * Fixup more parsing and calcs --------- Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com> Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
1 parent 054e1b3 commit be1e1e7

File tree

5 files changed

+66
-34
lines changed

5 files changed

+66
-34
lines changed

src/Data/ModCache.lua

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ c["+350 to Accuracy Rating"]={{[1]={flags=0,keywordFlags=0,name="Accuracy",type=
534534
c["+36 to maximum Mana"]={{[1]={flags=0,keywordFlags=0,name="Mana",type="BASE",value=36}},nil}
535535
c["+37% to Chaos Resistance"]={{[1]={flags=0,keywordFlags=0,name="ChaosResist",type="BASE",value=37}},nil}
536536
c["+39 to Evasion Rating"]={{[1]={flags=0,keywordFlags=0,name="Evasion",type="BASE",value=39}},nil}
537-
c["+4 to Ailment Threshold per Dexterity"]={{[1]={flags=0,keywordFlags=0,name="Dex",type="BASE",value=4}}," Ailment Threshold per "}
537+
c["+4 to Ailment Threshold per Dexterity"]={{[1]={[1]={stat="Dex",type="PerStat"},flags=0,keywordFlags=0,name="AilmentThreshold",type="BASE",value=4}},nil}
538538
c["+4 to Level of all Chaos Spell Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keywordList={[1]="chaos",[2]="spell"},value=4}}},nil}
539539
c["+4 to Level of all Elemental Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="elemental",value=4}}},nil}
540540
c["+4 to Level of all Fire Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="fire",value=4}}},nil}
@@ -553,6 +553,7 @@ c["+4% to all Elemental Resistances"]={{[1]={flags=0,keywordFlags=0,name="Elemen
553553
c["+4% to all Elemental Resistances per socketed Grand Spectrum"]={{[1]={[1]={type="Multiplier",var="GrandSpectrum"},flags=0,keywordFlags=0,name="ElementalResist",type="BASE",value=4}},nil}
554554
c["+4% to maximum Block chance"]={{[1]={flags=0,keywordFlags=0,name="BlockChanceMax",type="BASE",value=4}},nil}
555555
c["+40 to Accuracy Rating"]={{[1]={flags=0,keywordFlags=0,name="Accuracy",type="BASE",value=40}},nil}
556+
c["+40 to Ailment Threshold"]={{[1]={flags=0,keywordFlags=0,name="AilmentThreshold",type="BASE",value=40}},nil}
556557
c["+40 to Armour"]={{[1]={flags=0,keywordFlags=0,name="Armour",type="BASE",value=40}},nil}
557558
c["+40 to Dexterity"]={{[1]={flags=0,keywordFlags=0,name="Dex",type="BASE",value=40}},nil}
558559
c["+40 to Evasion Rating"]={{[1]={flags=0,keywordFlags=0,name="Evasion",type="BASE",value=40}},nil}
@@ -598,8 +599,7 @@ c["+5% to all Maximum Elemental Resistances"]={{[1]={flags=0,keywordFlags=0,name
598599
c["+5% to maximum Block chance"]={{[1]={flags=0,keywordFlags=0,name="BlockChanceMax",type="BASE",value=5}},nil}
599600
c["+5% to maximum Chaos Resistance"]={{[1]={flags=0,keywordFlags=0,name="ChaosResistMax",type="BASE",value=5}},nil}
600601
c["+50 to Accuracy Rating"]={{[1]={flags=0,keywordFlags=0,name="Accuracy",type="BASE",value=50}},nil}
601-
c["+50 to Ailment Threshold"]={{}," Ailment Threshold "}
602-
c["+50 to Ailment Threshold Iron Reflexes"]={{}," Ailment Threshold Iron Reflexes "}
602+
c["+50 to Ailment Threshold"]={{[1]={flags=0,keywordFlags=0,name="AilmentThreshold",type="BASE",value=50}},nil}
603603
c["+50 to Armour"]={{[1]={flags=0,keywordFlags=0,name="Armour",type="BASE",value=50}},nil}
604604
c["+50 to Dexterity"]={{[1]={flags=0,keywordFlags=0,name="Dex",type="BASE",value=50}},nil}
605605
c["+50 to Evasion Rating"]={{[1]={flags=0,keywordFlags=0,name="Evasion",type="BASE",value=50}},nil}
@@ -1096,7 +1096,7 @@ c["15% increased Duration of Damaging Ailments on Enemies"]={{[1]={flags=0,keywo
10961096
c["15% increased Duration of Ignite, Shock and Chill on Enemies"]={{[1]={flags=0,keywordFlags=0,name="EnemyShockDuration",type="INC",value=15},[2]={flags=0,keywordFlags=0,name="EnemyChillDuration",type="INC",value=15},[3]={flags=0,keywordFlags=0,name="EnemyIgniteDuration",type="INC",value=15}},nil}
10971097
c["15% increased Effect of your Mark Skills"]={{[1]={[1]={skillType=109,type="SkillType"},flags=0,keywordFlags=0,name="LocalEffect",type="INC",value=15}},nil}
10981098
c["15% increased Electrocute Buildup"]={{}," Electrocute Buildup "}
1099-
c["15% increased Elemental Ailment Threshold"]={{}," Elemental Ailment Threshold "}
1099+
c["15% increased Elemental Ailment Threshold"]={{[1]={flags=0,keywordFlags=0,name="AilmentThreshold",type="INC",value=15}}," Elemental "}
11001100
c["15% increased Energy Shield Recharge Rate"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldRecharge",type="INC",value=15}},nil}
11011101
c["15% increased Energy Shield Recovery rate"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldRecoveryRate",type="INC",value=15}},nil}
11021102
c["15% increased Evasion Rating"]={{[1]={flags=0,keywordFlags=0,name="Evasion",type="INC",value=15}},nil}
@@ -1518,7 +1518,7 @@ c["25% increased Daze Buildup 25% increased Daze Duration"]={{[1]={flags=0,keywo
15181518
c["25% increased Daze Duration"]={{[1]={flags=0,keywordFlags=0,name="Duration",type="INC",value=25}}," Daze "}
15191519
c["25% increased Defences from Equipped Shield"]={{[1]={[1]={slotName="Weapon 2",type="SlotName"},[2]={type="Condition",var="UsingShield"},flags=0,keywordFlags=0,name="Defences",type="INC",value=25}},nil}
15201520
c["25% increased Electrocute Buildup"]={{}," Electrocute Buildup "}
1521-
c["25% increased Elemental Ailment Threshold"]={{}," Elemental Ailment Threshold "}
1521+
c["25% increased Elemental Ailment Threshold"]={{[1]={flags=0,keywordFlags=0,name="AilmentThreshold",type="INC",value=25}}," Elemental "}
15221522
c["25% increased Energy Shield Recharge Rate"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldRecharge",type="INC",value=25}},nil}
15231523
c["25% increased Evasion Rating"]={{[1]={flags=0,keywordFlags=0,name="Evasion",type="INC",value=25}},nil}
15241524
c["25% increased Evasion Rating if you've Dodge Rolled Recently"]={{[1]={[1]={type="Condition",var="DodgeRolledRecently"},flags=0,keywordFlags=0,name="Evasion",type="INC",value=25}},nil}
@@ -1702,7 +1702,7 @@ c["30% increased Daze Buildup with Quarterstaves 30% increased Freeze Buildup wi
17021702
c["30% increased Defences from Equipped Shield"]={{[1]={[1]={slotName="Weapon 2",type="SlotName"},[2]={type="Condition",var="UsingShield"},flags=0,keywordFlags=0,name="Defences",type="INC",value=30}},nil}
17031703
c["30% increased Defences while wielding a Staff"]={{[1]={[1]={type="Condition",var="UsingStaff"},flags=0,keywordFlags=0,name="Defences",type="INC",value=30}},nil}
17041704
c["30% increased Electrocute Buildup"]={{}," Electrocute Buildup "}
1705-
c["30% increased Elemental Ailment Threshold"]={{}," Elemental Ailment Threshold "}
1705+
c["30% increased Elemental Ailment Threshold"]={{[1]={flags=0,keywordFlags=0,name="AilmentThreshold",type="INC",value=30}}," Elemental "}
17061706
c["30% increased Elemental Damage"]={{[1]={flags=0,keywordFlags=0,name="ElementalDamage",type="INC",value=30}},nil}
17071707
c["30% increased Elemental Damage if you've Chilled an Enemy Recently"]={{[1]={[1]={type="Condition",var="ChilledEnemyRecently"},flags=0,keywordFlags=0,name="ElementalDamage",type="INC",value=30}},nil}
17081708
c["30% increased Elemental Damage if you've Ignited an Enemy Recently"]={{[1]={[1]={type="Condition",var="IgnitedEnemyRecently"},flags=0,keywordFlags=0,name="ElementalDamage",type="INC",value=30}},nil}
@@ -1890,8 +1890,8 @@ c["40% increased Damage with Warcries"]={{[1]={flags=0,keywordFlags=4,name="Dama
18901890
c["40% increased Defences from Equipped Shield"]={{[1]={[1]={slotName="Weapon 2",type="SlotName"},[2]={type="Condition",var="UsingShield"},flags=0,keywordFlags=0,name="Defences",type="INC",value=40}},nil}
18911891
c["40% increased Electrocute Buildup"]={{}," Electrocute Buildup "}
18921892
c["40% increased Electrocute Buildup 30% increased Shock Chance against Electrocuted Enemies"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Electrocuted"},flags=0,keywordFlags=0,name="EnemyShockChance",type="INC",value=40}}," Electrocute Buildup 30% increased "}
1893-
c["40% increased Elemental Ailment Threshold"]={{}," Elemental Ailment Threshold "}
1894-
c["40% increased Elemental Ailment Threshold 10% reduced Duration of Ailments on You"]={{[1]={flags=0,keywordFlags=0,name="SelfAilmentDuration",type="INC",value=40}}," Elemental Ailment Threshold 10% reduced "}
1893+
c["40% increased Elemental Ailment Threshold"]={{[1]={flags=0,keywordFlags=0,name="AilmentThreshold",type="INC",value=40}}," Elemental "}
1894+
c["40% increased Elemental Ailment Threshold 10% reduced Duration of Ailments on You"]={{[1]={flags=0,keywordFlags=0,name="AilmentThreshold",type="INC",value=40}}," Elemental 10% reduced Duration of Ailments on You "}
18951895
c["40% increased Elemental Damage"]={{[1]={flags=0,keywordFlags=0,name="ElementalDamage",type="INC",value=40}},nil}
18961896
c["40% increased Elemental Damage if you've dealt a Critical Hit Recently"]={{[1]={[1]={type="Condition",var="CritRecently"},flags=0,keywordFlags=0,name="ElementalDamage",type="INC",value=40}},nil}
18971897
c["40% increased Elemental Damage with Attack Skills during any Flask Effect"]={{[1]={[1]={type="Condition",var="UsingFlask"},flags=0,keywordFlags=65536,name="ElementalDamage",type="INC",value=40}},nil}
@@ -2506,7 +2506,6 @@ c["Allocates Breath of Lightning"]={{[1]={flags=0,keywordFlags=0,name="GrantedPa
25062506
c["Allocates Bringer of Order"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="bringer of order"}},nil}
25072507
c["Allocates Briny Carapace"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="briny carapace"}},nil}
25082508
c["Allocates Brutal"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="brutal"}},nil}
2509-
c["Allocates Brute Strength"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="brute strength"}},nil}
25102509
c["Allocates Building Toxins"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="building toxins"}},nil}
25112510
c["Allocates Burn Away"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="burn away"}},nil}
25122511
c["Allocates Burning Nature"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="burning nature"}},nil}
@@ -2645,7 +2644,6 @@ c["Allocates Feel the Earth"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive
26452644
c["Allocates Feral Force"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="feral force"}},nil}
26462645
c["Allocates Fervour"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="fervour"}},nil}
26472646
c["Allocates Final Barrage"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="final barrage"}},nil}
2648-
c["Allocates Finality"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="finality"}},nil}
26492647
c["Allocates Finesse"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="finesse"}},nil}
26502648
c["Allocates Finishing Blows"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="finishing blows"}},nil}
26512649
c["Allocates Fireproof"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="fireproof"}},nil}
@@ -3011,7 +3009,6 @@ c["Allocates Unbreaking"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",ty
30113009
c["Allocates Unerring Impact"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="unerring impact"}},nil}
30123010
c["Allocates Unexpected Finesse"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="unexpected finesse"}},nil}
30133011
c["Allocates Unforgiving"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="unforgiving"}},nil}
3014-
c["Allocates Unhindered"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="unhindered"}},nil}
30153012
c["Allocates Unimpeded"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="unimpeded"}},nil}
30163013
c["Allocates Unnatural Resilience"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="unnatural resilience"}},nil}
30173014
c["Allocates Unsight"]={{[1]={flags=0,keywordFlags=0,name="GrantedPassive",type="LIST",value="unsight"}},nil}
@@ -3911,12 +3908,11 @@ c["Thorns damage is triggered by all Hits"]={nil,"Thorns damage is triggered by
39113908
c["Totems Regenerate 3% of Life per second"]={nil,"Totems Regenerate 3% of Life per second "}
39123909
c["Totems gain +12% to all Elemental Resistances"]={{[1]={flags=0,keywordFlags=0,name="TotemElementalResist",type="BASE",value=12}},nil}
39133910
c["Totems gain +20% to all Elemental Resistances"]={{[1]={flags=0,keywordFlags=0,name="TotemElementalResist",type="BASE",value=20}},nil}
3914-
c["Totems have 12% additional Physical Damage Reduction"]={nil,"Totems have 12% additional Physical Damage Reduction "}
3915-
c["Totems have 2% increased Attack Speed per Summoned Totem"]={nil,"Totems have 2% increased Attack Speed per Summoned Totem "}
3916-
c["Totems have 2% increased Cast Speed per Summoned Totem"]={nil,"Totems have 2% increased Cast Speed per Summoned Totem "}
3917-
c["Totems have 2% increased Cast Speed per Summoned Totem Totems have 2% increased Attack Speed per Summoned Totem"]={nil,"Totems have 2% increased Cast Speed per Summoned Totem Totems have 2% increased Attack Speed per Summoned Totem "}
3918-
c["Totems have 20% additional Physical Damage Reduction"]={nil,"Totems have 20% additional Physical Damage Reduction "}
3919-
c["Totems have 4% increased Attack Speed per Summoned Totem"]={nil,"Totems have 4% increased Attack Speed per Summoned Totem "}
3911+
c["Totems have 12% additional Physical Damage Reduction"]={{[1]={flags=0,keywordFlags=16384,name="PhysicalDamageReduction",type="BASE",value=12}},nil}
3912+
c["Totems have 2% increased Attack Speed per Summoned Totem"]={{[1]={[1]={stat="TotemsSummoned",type="PerStat"},flags=1,keywordFlags=16384,name="Speed",type="INC",value=2}},nil}
3913+
c["Totems have 2% increased Cast Speed per Summoned Totem"]={{[1]={[1]={stat="TotemsSummoned",type="PerStat"},flags=16,keywordFlags=16384,name="Speed",type="INC",value=2}},nil}
3914+
c["Totems have 20% additional Physical Damage Reduction"]={{[1]={flags=0,keywordFlags=16384,name="PhysicalDamageReduction",type="BASE",value=20}},nil}
3915+
c["Totems have 4% increased Attack Speed per Summoned Totem"]={{[1]={[1]={stat="TotemsSummoned",type="PerStat"},flags=1,keywordFlags=16384,name="Speed",type="INC",value=4}},nil}
39203916
c["Totems reserve 100 Spirit each"]={nil,"Totems reserve 100 Spirit each "}
39213917
c["Trigger Ancestral Spirits when you Summon a Totem"]={nil,"Trigger Ancestral Spirits when you Summon a Totem "}
39223918
c["Trigger Ancestral Spirits when you Summon a Totem Grants Skill: Ancestral Spirits"]={nil,"Trigger Ancestral Spirits when you Summon a Totem Grants Skill: Ancestral Spirits "}

0 commit comments

Comments
 (0)