Skip to content

Commit 0eb0fdb

Browse files
committed
update for double mana cost wording
update a few piecemeal for new wording add parsing for The Catha's Balance
1 parent f3b9382 commit 0eb0fdb

2 files changed

Lines changed: 19 additions & 16 deletions

File tree

src/Data/ModCache.lua

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,6 @@ c["150% increased Global Evasion Rating when on Low Life"]={{[1]={[1]={type="Glo
16691669
c["150% increased Mana Regeneration Rate if you've dealt a Critical Hit Recently"]={{[1]={[1]={type="Condition",var="CritRecently"},flags=0,keywordFlags=0,name="ManaRegen",type="INC",value=150}},nil}
16701670
c["150% increased Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="PhysicalDamage",type="INC",value=150}},nil}
16711671
c["150% increased amount of Life Leeched"]={{[1]={flags=0,keywordFlags=0,name="MaxLifeLeechRate",type="INC",value=150}},nil}
1672-
c["150% of Strength Requirements from Boots, Gloves and Helmets also added to Armour"]={{[1]={[1]={percent=150,stat="StrRequirementsOnBoots",type="PercentStat"},flags=0,keywordFlags=0,name="Armour",type="BASE",value=1},[2]={[1]={percent=150,stat="StrRequirementsOnGloves",type="PercentStat"},flags=0,keywordFlags=0,name="Armour",type="BASE",value=1},[3]={[1]={percent=150,stat="StrRequirementsOnHelmet",type="PercentStat"},flags=0,keywordFlags=0,name="Armour",type="BASE",value=1}},nil}
16731672
c["16% increased Accuracy Rating at Close Range"]={{[1]={[1]={type="Condition",var="AtCloseRange"},flags=0,keywordFlags=0,name="AccuracyVsEnemy",type="INC",value=16}},nil}
16741673
c["16% increased Accuracy Rating with One Handed Melee Weapons"]={{[1]={flags=21474836484,keywordFlags=0,name="Accuracy",type="INC",value=16}},nil}
16751674
c["16% increased Accuracy Rating with Two Handed Melee Weapons"]={{[1]={flags=38654705668,keywordFlags=0,name="Accuracy",type="INC",value=16}},nil}
@@ -3901,11 +3900,11 @@ c["Companions deal 10% increased damage per Idol in your Equipment 2% increased
39013900
c["Companions deal 12% increased Damage"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="INC",value=12}}}},nil}
39023901
c["Companions deal 15% increased Damage"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="INC",value=15}}}},nil}
39033902
c["Companions deal 60% increased damage against Immobilised enemies"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={[1]={actor="enemy",type="ActorCondition",var="Immobilised"},flags=0,keywordFlags=0,name="Damage",type="INC",value=60}}}},nil}
3904-
c["Companions gain 12% Damage as extra Chaos Damage"]={nil,"Companions gain 12% Damage as extra Chaos Damage "}
3905-
c["Companions gain 12% Damage as extra Cold Damage"]={nil,"Companions gain 12% Damage as extra Cold Damage "}
3906-
c["Companions gain 4% Damage as extra Chaos Damage"]={nil,"Companions gain 4% Damage as extra Chaos Damage "}
3907-
c["Companions gain 4% Damage as extra Cold Damage"]={nil,"Companions gain 4% Damage as extra Cold Damage "}
3908-
c["Companions gain added Attack damage equal to 60% of your main hand Weapon's damage"]={nil,"Companions gain added Attack damage equal to 60% of your main hand Weapon's damage "}
3903+
c["Companions gain 12% Damage as extra Chaos Damage"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageGainAsChaos",type="BASE",value=12}}}},nil}
3904+
c["Companions gain 12% Damage as extra Cold Damage"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageGainAsCold",type="BASE",value=12}}}},nil}
3905+
c["Companions gain 4% Damage as extra Chaos Damage"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageGainAsChaos",type="BASE",value=4}}}},nil}
3906+
c["Companions gain 4% Damage as extra Cold Damage"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageGainAsCold",type="BASE",value=4}}}},nil}
3907+
c["Companions gain added Attack damage equal to 60% of your main hand Weapon's damage"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="GainMainHandDmgFromParent",type="FLAG",value=true},onlyAllies=true}},[2]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="Multiplier:MainHandDamageToAllies",type="BASE",value=60}},nil}
39093908
c["Companions gain your Strength"]={{[1]={flags=0,keywordFlags=0,name="StrengthAddedToCompanions",type="FLAG",value=true}},nil}
39103909
c["Companions have +12% to all Elemental Resistances"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ElementalResist",type="BASE",value=12}}}},nil}
39113910
c["Companions have +30% to Chaos Resistance"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ChaosResist",type="BASE",value=30}}}},nil}
@@ -3920,13 +3919,12 @@ c["Companions have 30% increased Area of Effect"]={{[1]={[1]={skillType=219,type
39203919
c["Companions have 50% chance to gain Onslaught on Kill"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={[1]={type="Condition",var="KilledRecently"},flags=0,keywordFlags=0,name="Condition:Onslaught",type="FLAG",value=true}}}},nil}
39213920
c["Companions have 6% increased Attack Speed"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=1,keywordFlags=0,name="Speed",type="INC",value=6}}}},nil}
39223921
c["Companions have 8% increased Movement Speed"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="MovementSpeed",type="INC",value=8}}}},nil}
3923-
c["Companions have a 40% chance to Poison on Hit"]={nil,"a 40% chance to Poison on Hit "}
3922+
c["Companions have a 40% chance to Poison on Hit"]={{[1]={[1]={skillType=219,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="PoisonChance",type="BASE",value=40}}}},nil}
39243923
c["Companions in your Presence have Onslaught while you are Shapeshifted"]={nil,"in your Presence have Onslaught while you are Shapeshifted "}
39253924
c["Conduit"]={{[1]={flags=0,keywordFlags=0,name="Keystone",type="LIST",value="Conduit"}},nil}
39263925
c["Consume all Rage when Shapeshifting to Human form to recover 1% of maximum life per Rage Consumed"]={nil,"Consume all Rage when Shapeshifting to Human form to recover 1% of maximum life per Rage Consumed "}
39273926
c["Consuming Glory grants you 3% increased Attack damage per Glory consumed for 6 seconds, up to 60%"]={nil,"Consuming Glory grants you 3% increased Attack damage per Glory consumed for 6 seconds, up to 60% "}
3928-
c["Convert 100% of maximum Energy Shield to maximum Mana"]={nil,"Convert 100% of maximum Energy Shield to maximum Mana "}
3929-
c["Convert 100% of maximum Energy Shield to maximum Mana Mana Costs are Doubled"]={{[1]={[1]={globalLimit=100,globalLimitKey="EnergyShieldDoubledLimit",type="Multiplier",var="EnergyShieldDoubled"},flags=0,keywordFlags=0,name="EnergyShield",type="MORE",value=100},[2]={flags=0,keywordFlags=0,name="Multiplier:EnergyShieldDoubled",type="OVERRIDE",value=1}},"Convert 100% of to maximum Mana Mana Costs are d "}
3927+
c["Convert 100% of maximum Energy Shield to maximum Mana"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldConvertToMana",type="BASE",value=100}},nil}
39303928
c["Converts all Evasion Rating to Armour"]={{[1]={flags=0,keywordFlags=0,name="IronReflexes",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="EvasionConvertToArmour",type="BASE",value=100}},nil}
39313929
c["Copy a random Modifier from each enemy in your Presence when"]={nil,"Copy a random Modifier from each enemy in your Presence when "}
39323930
c["Copy a random Modifier from each enemy in your Presence when you Shapeshift to an Animal form"]={nil,"Copy a random Modifier from each enemy in your Presence when you Shapeshift to an Animal form "}
@@ -4396,7 +4394,7 @@ c["Gain Arcane Surge when a Minion Dies"]={{[1]={flags=0,keywordFlags=0,name="Mi
43964394
c["Gain Arcane Surge when a Minion Dies 40% increased maximum Energy Shield"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Condition:ArcaneSurge",type="FLAG",value=true}}}}," when a Dies 40% increased "}
43974395
c["Gain Arcane Surge when you Shapeshift to Human form after"]={{[1]={flags=0,keywordFlags=0,name="Condition:ArcaneSurge",type="FLAG",value=true}}," when you Shapeshift to Human form after "}
43984396
c["Gain Arcane Surge when you Shapeshift to Human form after being Shapeshifted for at least 8 seconds"]={{[1]={flags=0,keywordFlags=0,name="Condition:ArcaneSurge",type="FLAG",value=true}}," when you Shapeshift to Human form after being Shapeshifted for at least 8 seconds "}
4399-
c["Gain Armour equal to 150% of total Strength Requirements of Equipped Boots, Gloves and Helmet"]={nil,"Armour equal to 150% of total Strength Requirements of Equipped Boots, Gloves and Helmet "}
4397+
c["Gain Armour equal to 150% of total Strength Requirements of Equipped Boots, Gloves and Helmet"]={{[1]={[1]={percent=150,stat="StrRequirementsOnBoots",type="PercentStat"},flags=0,keywordFlags=0,name="Armour",type="BASE",value=1},[2]={[1]={percent=150,stat="StrRequirementsOnGloves",type="PercentStat"},flags=0,keywordFlags=0,name="Armour",type="BASE",value=1},[3]={[1]={percent=150,stat="StrRequirementsOnHelmet",type="PercentStat"},flags=0,keywordFlags=0,name="Armour",type="BASE",value=1}},nil}
44004398
c["Gain Cold Thorns Damage equal to 18% of your maximum Mana"]={nil,"Cold Thorns Damage equal to 18% of your maximum Mana "}
44014399
c["Gain Combo from all Attack Hits"]={nil,"Combo from all Attack Hits "}
44024400
c["Gain Deflection Rating equal to 10% of Evasion Rating"]={{[1]={flags=0,keywordFlags=0,name="EvasionGainAsDeflection",type="BASE",value=10}},nil}
@@ -4885,7 +4883,7 @@ c["Lose all Power Charges on reaching maximum Power Charges Shocks you when you
48854883
c["Lose all Rage on reaching Maximum Rage"]={nil,"Lose all Rage on reaching Maximum Rage "}
48864884
c["Lose all Tailwind when Hit"]={nil,"Lose all Tailwind when Hit "}
48874885
c["Maim on Critical Hit"]={nil,"Maim on Critical Hit "}
4888-
c["Mana Costs are Doubled"]={{[1]={[1]={globalLimit=100,globalLimitKey="ManaCostDoubledLimit",type="Multiplier",var="ManaCostDoubled"},flags=0,keywordFlags=0,name="ManaCost",type="MORE",value=100},[2]={flags=0,keywordFlags=0,name="Multiplier:ManaCostDoubled",type="OVERRIDE",value=1}},"s are d "}
4886+
c["Mana Costs are Doubled"]={{[1]={flags=0,keywordFlags=0,name="ManaCost",type="MORE",value=100}},nil}
48894887
c["Mana Flasks also recover Life"]={nil,"Mana Flasks also recover Life "}
48904888
c["Mana Flasks gain 0.1 charges per Second"]={{[1]={flags=0,keywordFlags=0,name="ManaFlaskChargesGenerated",type="BASE",value=0.1}},nil}
48914889
c["Mana Flasks gain 0.22 charges per Second"]={{[1]={flags=0,keywordFlags=0,name="ManaFlaskChargesGenerated",type="BASE",value=0.22}},nil}
@@ -5364,7 +5362,7 @@ c["Skills have 20% increased Critical Hit Chance per Connected Blue Support Gem"
53645362
c["Skills have 5% chance to not remove Elemental Infusions but still count as consuming them"]={{}," to not remove Elemental Infusions but still count as consuming them "}
53655363
c["Skills have 6% increased Skill Speed per Connected Green Support Gem"]={{[1]={flags=0,keywordFlags=0,name="SkillSpeedIncreasedPerGreenSupport",type="FLAG",value=6}},nil}
53665364
c["Skills have a 125% longer Perfect Timing window"]={{[1]={flags=0,keywordFlags=0,name="PerfectTiming",type="INC",value=125}},nil}
5367-
c["Skills have a 15% chance to not consume Glory"]={nil,"a 15% chance to not consume Glory "}
5365+
c["Skills have a 15% chance to not consume Glory"]={{}," to not consume Glory "}
53685366
c["Skills have a 150% longer Perfect Timing window"]={{[1]={flags=0,keywordFlags=0,name="PerfectTiming",type="INC",value=150}},nil}
53695367
c["Skills lose Combo 20% slower"]={nil,"Skills lose Combo 20% slower "}
53705368
c["Skills reserve 50% less Spirit"]={{[1]={flags=0,keywordFlags=0,name="SpiritReserved",type="MORE",value=-50}},nil}

src/Modules/ModParser.lua

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ local formList = {
7777
["^throw up to (%d+)"] = "BASE",
7878
["^you gain ([%d%.]+)"] = "GAIN",
7979
["^gains? ([%d%.]+)%% of their"] = "GAIN",
80-
["^gains? ([%d%.]+)%% of"] = "GAIN",
80+
["^gains? ([%d%.]+)%% ?o?f?"] = "GAIN",
8181
["^gains? ([%d%.]+)"] = "GAIN",
8282
["^gain %+(%d+)%% to"] = "GAIN",
8383
["^you lose ([%d%.]+)"] = "LOSE",
@@ -88,7 +88,7 @@ local formList = {
8888
["^grants ([%d%.]+) additional"] = "GRANTS_GLOBAL",
8989
["^removes? ([%d%.]+) ?o?f? ?y?o?u?r?"] = "REMOVES", -- local
9090
["^(%d+)"] = "BASE",
91-
["^([%+%-]?%d+)%% chance"] = "CHANCE",
91+
["^a? ?([%+%-]?%d+)%% chance"] = "CHANCE",
9292
["^([%+%-]?%d+)%% chance to gain "] = "FLAG",
9393
["^([%+%-]?%d+)%% additional chance"] = "CHANCE",
9494
["costs? ([%+%-]?%d+)"] = "TOTALCOST",
@@ -2378,7 +2378,7 @@ local specialModList = {
23782378
["removes all mana%. spend life instead of mana for skills"] = { mod("Mana", "OVERRIDE", 0 ), flag("CostLifeInsteadOfMana") },
23792379
["removes all mana"] = { mod("Mana", "OVERRIDE", 0 ) },
23802380
["you have no mana"] = { mod("Mana", "OVERRIDE", 0 ) },
2381-
["doubles mana costs"] = { mod("ManaCost", "MORE", 100) },
2381+
["d?o?u?b?l?e?s? ?mana costs ?a?r?e? ?d?o?u?b?l?e?d?"] = { mod("ManaCost", "MORE", 100) },
23822382
["removes all energy shield"] = { mod("EnergyShield", "OVERRIDE", 0 ) },
23832383
["converts all energy shield to mana"] = { mod("EnergyShieldConvertToMana", "BASE", 100) },
23842384
["convert (%d+)%% of maximum energy shield to maximum mana"] = function(num) return { mod("EnergyShieldConvertToMana", "BASE", num) } end,
@@ -2874,6 +2874,11 @@ local specialModList = {
28742874
["benefits from consuming (%a+) charges for your skills have (%d+)%% chance to be doubled"] = function(_, type, num) return {
28752875
mod("Multiplier:Consumed"..firstToUpper(type).."ChargeEffect", "BASE", num)
28762876
} end,
2877+
-- Spirit Walker
2878+
["companions gain added attack damage equal to (%d+)%% of your main hand weapon's damage"] = function(num) return {
2879+
mod("ExtraAura", "LIST", { onlyAllies = true, mod = flag("GainMainHandDmgFromParent") }, { type = "SkillType", skillType = SkillType.CreatesCompanion }),
2880+
mod("Multiplier:MainHandDamageToAllies", "BASE", num, { type = "SkillType", skillType = SkillType.CreatesCompanion }),
2881+
} end,
28772882
-- Disciple of Varashta
28782883
["(%d+)%% of your current energy shield is added to your armour for determining your physical damage reduction from armour"] = function(num) return {
28792884
mod("EnergyShieldAppliesToPhysicalDamageTaken", "BASE", num),
@@ -3227,7 +3232,7 @@ local specialModList = {
32273232
mod("Multiplier:MainHandDamageToAllies", "BASE", num),
32283233
} end,
32293234
["projectile damage builds pin"] = { flag("CanPin", nil, ModFlag.Projectile) },
3230-
["totems you place grant embankment auras"] = { flag("Condition:StrategicEmbankments") },
3235+
["totems you place grant embankment auras"] = { flag("Condition:StrategicEmbankments") },
32313236
-- Witchhunter
32323237
["grants skill: sorcery ward"] = {
32333238
flag("Condition:SorceryWard"),

0 commit comments

Comments
 (0)