Skip to content

Commit b0d0127

Browse files
authored
Fix some tree parsing in 0.2.0 (#905)
1 parent e76a150 commit b0d0127

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

src/Data/ModCache.lua

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ c["+85 to maximum Life"]={{[1]={flags=0,keywordFlags=0,name="Life",type="BASE",v
772772
c["+85 to maximum Mana"]={{[1]={flags=0,keywordFlags=0,name="Mana",type="BASE",value=85}},nil}
773773
c["+86 to maximum Energy Shield"]={{[1]={flags=0,keywordFlags=0,name="EnergyShield",type="BASE",value=86}},nil}
774774
c["+9% to all Elemental Resistances"]={{[1]={flags=0,keywordFlags=0,name="ElementalResist",type="BASE",value=9}},nil}
775+
c["+90 to all Attributes"]={{[1]={flags=0,keywordFlags=0,name="Str",type="BASE",value=90},[2]={flags=0,keywordFlags=0,name="Dex",type="BASE",value=90},[3]={flags=0,keywordFlags=0,name="Int",type="BASE",value=90},[4]={flags=0,keywordFlags=0,name="All",type="BASE",value=90}},nil}
775776
c["+90 to maximum Life"]={{[1]={flags=0,keywordFlags=0,name="Life",type="BASE",value=90}},nil}
776777
c["+90 to maximum Mana"]={{[1]={flags=0,keywordFlags=0,name="Mana",type="BASE",value=90}},nil}
777778
c["+92 to maximum Life"]={{[1]={flags=0,keywordFlags=0,name="Life",type="BASE",value=92}},nil}
@@ -2799,7 +2800,7 @@ c["All Damage taken from Hits while Bleeding Contributes to Magnitude of Chill o
27992800
c["All Damage taken from Hits while Bleeding Contributes to Magnitude of Chill on you All Damage from Hits against Bleeding targets Contributes to Chill Magnitude"]={nil,"All Damage taken from Hits while Bleeding Contributes to Magnitude of Chill on you All Damage from Hits against Bleeding targets Contributes to Chill Magnitude "}
28002801
c["All Damage taken from Hits while Poisoned Contributes to Magnitude of Chill on you"]={nil,"All Damage taken from Hits while Poisoned Contributes to Magnitude of Chill on you "}
28012802
c["All Damage taken from Hits while Poisoned Contributes to Magnitude of Chill on you All Damage from Hits against Poisoned targets Contributes to Chill Magnitude"]={nil,"All Damage taken from Hits while Poisoned Contributes to Magnitude of Chill on you All Damage from Hits against Poisoned targets Contributes to Chill Magnitude "}
2802-
c["All bonuses from Equipped Amulet apply to your Minions instead of you"]={nil,"All bonuses from Equipped Amulet apply to your Minions instead of you "}
2803+
c["All bonuses from Equipped Amulet apply to your Minions instead of you"]={{},nil}
28032804
c["All damage with this Weapon causes Electrocution buildup"]={nil,"All damage with this Weapon causes Electrocution buildup "}
28042805
c["Allies in your Presence Gain 20% of Damage as Extra Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageGainAsChaos",type="BASE",value=20},onlyAllies=true}}},nil}
28052806
c["Allies in your Presence Gain 25% of Damage as Extra Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageGainAsChaos",type="BASE",value=25},onlyAllies=true}}},nil}
@@ -3712,7 +3713,7 @@ c["Dodge Roll passes through Enemies"]={nil,"Dodge Roll passes through Enemies "
37123713
c["Double Activation Delay of Curses"]={{[1]={flags=0,keywordFlags=0,name="CurseDelay",type="MORE",value=100}},nil}
37133714
c["Double Stun Threshold while Shield is Raised"]={nil,"Double Stun Threshold while Shield is Raised "}
37143715
c["Double the number of your Poisons that targets can be affected by at the same time"]={{[1]={flags=0,keywordFlags=0,name="PoisonCanStack",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="PoisonStacks",type="MORE",value=100}},nil}
3715-
c["Doubles Mana Costs"]={nil,"Doubles Mana Costs "}
3716+
c["Doubles Mana Costs"]={{[1]={flags=0,keywordFlags=0,name="ManaCost",type="MORE",value=100}},nil}
37163717
c["Drop Ignited Ground while moving, which lasts 8 seconds and Ignites as though dealing Fire Damage equal to 10% of your maximum Life"]={nil,"Drop Ignited Ground while moving, which lasts 8 seconds and Ignites as though dealing Fire Damage equal to 10% of your maximum Life "}
37173718
c["Drop Shocked Ground while moving, lasting 8 seconds"]={nil,"Drop Shocked Ground while moving, lasting 8 seconds "}
37183719
c["Effect and Duration of Flames of Chayula on You is Doubled"]={{[1]={flags=0,keywordFlags=0,name="Multiplier:FlameEffect",type="BASE",value=1}},nil}
@@ -3927,11 +3928,10 @@ c["Gain a random Shrine buff every 10 seconds"]={nil,"a random Shrine buff every
39273928
c["Gain a stack of Jade every second"]={nil,"a stack of Jade every second "}
39283929
c["Gain a stack of Jade every second Grants Skill: Encase in Jade"]={nil,"a stack of Jade every second Grants Skill: Encase in Jade "}
39293930
c["Gain additional Critical Hit Chance equal to 25% of excess chance to Hit with Attacks"]={{[1]={[1]={type="Multiplier",var="ExcessHitChance"},[2]={skillType=1,type="SkillType"},flags=0,keywordFlags=0,name="CritChance",type="BASE",value=0.25}},nil}
3930-
c["Gain additional Stun Threshold equal to 12% of maximum Energy Shield"]={nil,"additional Stun Threshold equal to 12% of maximum Energy Shield "}
3931-
c["Gain additional Stun Threshold equal to 20% of maximum Energy Shield"]={nil,"additional Stun Threshold equal to 20% of maximum Energy Shield "}
3932-
c["Gain additional Stun Threshold equal to 20% of maximum Energy Shield 20% increased Stun Threshold while on Full Life"]={nil,"additional Stun Threshold equal to 20% of maximum Energy Shield 20% increased Stun Threshold "}
3931+
c["Gain additional Stun Threshold equal to 12% of maximum Energy Shield"]={{[1]={[1]={percent="12",stat="EnergyShield",type="PercentStat"},flags=0,keywordFlags=0,name="StunThreshold",type="BASE",value=1}},nil}
3932+
c["Gain additional Stun Threshold equal to 20% of maximum Energy Shield"]={{[1]={[1]={percent="20",stat="EnergyShield",type="PercentStat"},flags=0,keywordFlags=0,name="StunThreshold",type="BASE",value=1}},nil}
39333933
c["Gain additional Stun Threshold equal to 50% of Armour on Equipped Items"]={nil,"additional Stun Threshold equal to 50% of Armour on Equipped Items "}
3934-
c["Gain additional Stun Threshold equal to 8% of maximum Energy Shield"]={nil,"additional Stun Threshold equal to 8% of maximum Energy Shield "}
3934+
c["Gain additional Stun Threshold equal to 8% of maximum Energy Shield"]={{[1]={[1]={percent="8",stat="EnergyShield",type="PercentStat"},flags=0,keywordFlags=0,name="StunThreshold",type="BASE",value=1}},nil}
39353935
c["Gain additional maximum Life equal to 100% of the Energy Shield on Equipped Body Armour"]={nil,"additional maximum Life equal to 100% of the Energy Shield on Equipped Body Armour "}
39363936
c["Gain an Endurance Charge when you Heavy Stun a Rare or Unique Enemy"]={nil,"an Endurance Charge when you Heavy Stun a Rare or Unique Enemy "}
39373937
c["Gain an additional Charge when you gain a Charge"]={nil,"an additional Charge when you gain a Charge "}
@@ -4065,7 +4065,7 @@ c["Ignore Attribute Requirements"]={{[1]={flags=0,keywordFlags=0,name="IgnoreAtt
40654065
c["Ignore Warcry Cooldowns"]={{[1]={[1]={skillType=63,type="SkillType"},flags=0,keywordFlags=0,name="CooldownRecovery",type="OVERRIDE",value=0}},nil}
40664066
c["Immobilise enemies at 50% buildup instead of 100%"]={nil,"Immobilise enemies at 50% buildup instead of 100% "}
40674067
c["Immobilise enemies at 50% buildup instead of 100% Enemies Immobilised by you take 25% less Damage"]={nil,"Immobilise enemies at 50% buildup instead of 100% Enemies Immobilised by you take 25% less Damage "}
4068-
c["Immune to Chaos Damage"]={nil,"Immune to Chaos Damage "}
4068+
c["Immune to Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="ChaosInoculation",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ChaosDamageTaken",type="MORE",value=-100}},nil}
40694069
c["Immune to Elemental Ailments while on Consecrated Ground if you have at least 150 Devotion"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},[2]={stat="Devotion",threshold=150,type="StatThreshold"},flags=0,keywordFlags=0,name="ElementalAilmentImmune",type="FLAG",value=true}},nil}
40704070
c["Immune to Freeze"]={{[1]={flags=0,keywordFlags=0,name="FreezeImmune",type="FLAG",value=true}},nil}
40714071
c["Immune to Ignite"]={{[1]={flags=0,keywordFlags=0,name="IgniteImmune",type="FLAG",value=true}},nil}
@@ -4646,8 +4646,7 @@ c["You have a Smoke Cloud around you while stationary"]={nil,"a Smoke Cloud arou
46464646
c["You have no Accuracy Penalty at Distance"]={nil,"no Accuracy Penalty at Distance "}
46474647
c["You have no Elemental Resistances"]={{[1]={flags=0,keywordFlags=0,name="FireResist",type="OVERRIDE",value=0},[2]={flags=0,keywordFlags=0,name="ColdResist",type="OVERRIDE",value=0},[3]={flags=0,keywordFlags=0,name="LightningResist",type="OVERRIDE",value=0}},nil}
46484648
c["You have no Life Regeneration"]={{[1]={flags=0,keywordFlags=0,name="NoLifeRegen",type="FLAG",value=true}},nil}
4649-
c["You have no Mana"]={nil,"no Mana "}
4650-
c["You have no Mana Skill Mana Costs Converted to Life Costs"]={nil,"no Mana Skill Mana Costs Converted to Life Costs "}
4649+
c["You have no Mana"]={{[1]={flags=0,keywordFlags=0,name="Mana",type="OVERRIDE",value=0}},nil}
46514650
c["You have no Spirit"]={{[1]={flags=0,keywordFlags=0,name="Spirit",type="OVERRIDE",value=0}},nil}
46524651
c["You lose 5% of maximum Energy Shield per second"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldDegenPercent",type="BASE",value=5}},nil}
46534652
c["You take 10% of damage from Blocked Hits"]={{[1]={flags=0,keywordFlags=0,name="BlockEffect",type="BASE",value=10}},nil}

src/Modules/ModParser.lua

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2125,6 +2125,10 @@ local specialModList = {
21252125
flag("ChaosInoculation"),
21262126
mod("ChaosDamageTaken", "MORE", -100)
21272127
},
2128+
["immune to chaos damage"] = {
2129+
flag("ChaosInoculation"),
2130+
mod("ChaosDamageTaken", "MORE", -100)
2131+
},
21282132
["leech life (%d+)%% slower"] = function(num) return {mod("LifeLeechRate", "INC", -num)} end,
21292133
["leech life (%d+)%% faster"] = function(num) return {mod("LifeLeechRate", "INC", num)} end,
21302134
["life regeneration is applied to energy shield instead"] = { flag("ZealotsOath") },
@@ -2156,6 +2160,8 @@ local specialModList = {
21562160
["all damage is taken from mana before life"] = { mod("DamageTakenFromManaBeforeLife", "BASE", 100) },
21572161
["removes all mana%. spend life instead of mana for skills"] = { mod("Mana", "MORE", -100), flag("CostLifeInsteadOfMana") },
21582162
["removes all mana"] = { mod("Mana", "MORE", -100) },
2163+
["you have no mana"] = { mod("Mana", "MORE", -100) },
2164+
["doubles mana costs"] = { mod("ManaCost", "MORE", 100) },
21592165
["removes all energy shield"] = { mod("EnergyShield", "MORE", -100) },
21602166
["converts all energy shield to mana"] = { mod("EnergyShieldConvertToMana", "BASE", 100) },
21612167
["skills cost life instead of mana"] = { flag("CostLifeInsteadOfMana") },
@@ -2196,7 +2202,7 @@ local specialModList = {
21962202
["leech energy shield instead of life"] = { flag("GhostReaver") },
21972203
["minions explode when reduced to low life, dealing 33%% of their maximum life as fire damage to surrounding enemies"] = { mod("ExtraMinionSkill", "LIST", { skillId = "MinionInstability" }) },
21982204
["minions explode when reduced to low life, dealing 33%% of their life as fire damage to surrounding enemies"] = { mod("ExtraMinionSkill", "LIST", { skillId = "MinionInstability" }) },
2199-
["all bonuses from an equipped amulet apply to your minions instead of you"] = { }, -- The node itself is detected by the code that handles it
2205+
["all bonuses from ?a?n? equipped amulet apply to your minions instead of you"] = { }, -- The node itself is detected by the code that handles it
22002206
["spend energy shield before mana for skill m?a?n?a? ?costs"] = { },
22012207
["you have perfect agony if you've dealt a critical hit recently"] = { mod("Keystone", "LIST", "Perfect Agony", { type = "Condition", var = "CritRecently" }) },
22022208
["energy shield protects mana instead of life"] = { flag("EnergyShieldProtectsMana") },
@@ -4565,6 +4571,9 @@ local specialModList = {
45654571
["gain (%d+)%% of maximum energy shield as additional (%a+) threshold"] = function(num, _, statType)
45664572
return { mod(firstToUpper(statType) .. "Threshold", "BASE", 1, { type = "PercentStat", stat = "EnergyShield", percent = num }) }
45674573
end,
4574+
["gain additional (%a+) threshold equal to (%d+)%% of maximum energy shield"] = function(_, statType, num)
4575+
return { mod(firstToUpper(statType) .. "Threshold", "BASE", 1, { type = "PercentStat", stat = "EnergyShield", percent = num }) }
4576+
end,
45684577
["(%d+)%% increased maximum life, mana and energy shield"] = function(num) return {
45694578
mod("Life", "INC", num),
45704579
mod("Mana", "INC", num),

0 commit comments

Comments
 (0)