Add parsing for many new mods (#2630)

* Add parsing for many new mods

Add parsing for many of the mods on the new uniques and also add the variants of Glimpse of Chaos

* Use better regex

* Fix parsing on Uniques

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
This commit is contained in:
LocalIdentity
2021-04-22 15:40:41 +10:00
committed by GitHub
parent 3d89ccc6cf
commit 548d9334c4
4 changed files with 69 additions and 13 deletions

View File

@@ -459,7 +459,7 @@ Requires Level 69, 154 Int
(6-10)% increased maximum Mana
Recover (8-10)% of maximum Life when you use a Mana Flask
Non-instant Mana recovery from Flasks is also recovered as Life
(50-60)% increased Mana Cost of Skills for each 200 total Mana you have Spent Recently
(50-60)% increased Cost of Skills for each 200 total Mana Spent Recently
{variant:1}(50-60)% increased Spell Damage for each 200 total Mana you have Spent Recently, up to 2000%
{variant:2}(20-25)% increased Spell Damage for each 200 total Mana you have Spent Recently, up to 2000%
Shaper Item
@@ -1042,10 +1042,32 @@ Vaal Mask
League: Ultimatum
Requires Level 62, 79 Dex, 72 Int
Implicits: 1
Variant: 1
Variant: 2
Variant: Area of Effect
Variant: Blind
Variant: Mana Cost + Reservation
Variant: Curse Effect
Variant: Skill Effect Duration
Variant: Crushed
Variant: +2 Gems
Variant: Minimum Charges
Variant: Cooldown Recovery
Variant: Aura Effect
Variant: Additional Projectile
Variant: Malediction
Variant: Quantity
{variant:1}(15-25)% increased Area of Effect
{variant:2}Nearby Enemies are Blinded
{variant:3}Socketed Skill Gems get a 80% Cost & Reservation Multiplier
{variant:4}(10-15)% increased Effect of your Curses
{variant:5}(15-25)% increased Skill Effect Duration
{variant:6}Nearby Enemies are Crushed
{variant:7}+2 to Level of Socketed Gems
{variant:8}+1 to Minimum Endurance, Frenzy and Power Charges
{variant:9}(8-12)% increased Cooldown Recovery Rate
{variant:10}(10-15)% increased effect of Non-Curse Auras from your Skills
{variant:11}Skills fire an additional Projectile
{variant:12}Nearby Enemies have Malediction
{variant:13}(5-7)% increased Quantity of Items found
Can be modified while Corrupted
(30-40)% increased maximum Life and reduced Fire Resistance
(30-40)% increased maximum Mana and reduced Cold Resistance

View File

@@ -1366,7 +1366,7 @@ Radius: Medium
Ancient Waystones
Crimson Jewel
Limited to: 1
60% reduced Mana Cost of Totem Skills that cast an Aura
60% reduced Cost of Aura Skills that summon Totems
Corrupted
]],[[
Atziri's Reign
@@ -1688,7 +1688,7 @@ Variant: Duration of Curses
Variant: Minion Attack and Cast Speed
Variant: Minions Accuracy Rating
Variant: Mana Regen
Variant: Mana Cost
Variant: Skill Cost
Variant: Non-Curse Aura Effect
Variant: Defences from Shield
Radius: Large
@@ -1709,7 +1709,7 @@ Implicits: 0
{variant:14}1% increased Minion Attack and Cast Speed per 10 Devotion
{variant:15}Minions have +60 to Accuracy Rating per 10 Devotion
{variant:16}Regenerate 0.6 Mana per Second per 10 Devotion
{variant:17}1% reduced Mana Cost of Skills per 10 Devotion
{variant:17}1% reduced Cost of Skills per 10 Devotion
{variant:18}1% increased effect of Non-Curse Auras per 10 Devotion
{variant:19}3% increased Defences from Equipped Shield per 10 Devotion
Passives in radius are Conquered by the Templars

View File

@@ -792,6 +792,9 @@ return {
{ var = "conditionBeenCritRecently", type = "check", label = "Have you been Crit Recently?", ifCond = "BeenCritRecently", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:BeenCritRecently", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "conditionConsumed12SteelShardsRecently", type = "check", label = "Consumed 12 Steel Shards Recently?", ifCond = "Consumed12SteelShardsRecently", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:Consumed12SteelShardsRecently", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "conditionGainedPowerChargeRecently", type = "check", label = "Gained a Power Charge Recently?", ifCond = "GainedPowerChargeRecently", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:GainedPowerChargeRecently", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },

View File

@@ -116,6 +116,7 @@ local modNameList = {
["total mana cost"] = "ManaCost",
["total mana cost of skills"] = "ManaCost",
["life cost of skills"] = "LifeCost",
["rage cost of skills"] = "RageCost",
["cost of"] = "Cost",
["cost of skills"] = "Cost",
["mana reserved"] = "ManaReserved",
@@ -123,6 +124,7 @@ local modNameList = {
["mana reservation of skills"] = "ManaReserved",
["reservation of skills"] = "Reserved",
["mana reservation if cast as an aura"] = { "ManaReserved", tag = { type = "SkillType", skillType = SkillType.Aura } },
["reservation if cast as an aura"] = { "Reserved", tag = { type = "SkillType", skillType = SkillType.Aura } },
["reservation"] = { "Reserved" },
-- Primary defences
["maximum energy shield"] = "EnergyShield",
@@ -333,6 +335,7 @@ local modNameList = {
["maximum endurance charges"] = "EnduranceChargesMax",
["minimum endurance charge"] = "EnduranceChargesMin",
["minimum endurance charges"] = "EnduranceChargesMin",
["minimum endurance, frenzy and power charges"] = { "PowerChargesMin", "FrenzyChargesMin", "EnduranceChargesMin" },
["endurance charge duration"] = "EnduranceChargesDuration",
["maximum frenzy charges and maximum power charges"] = { "FrenzyChargesMax", "PowerChargesMax" },
["maximum power charges and maximum endurance charges"] = { "PowerChargesMax", "EnduranceChargesMax" },
@@ -676,6 +679,7 @@ local modFlagList = {
["with totem skills"] = { keywordFlags = KeywordFlag.Totem },
["for skills used by totems"] = { keywordFlags = KeywordFlag.Totem },
["totem skills that cast an aura"] = { tag = { type = "SkillType", skillType = SkillType.Aura }, keywordFlags = KeywordFlag.Totem },
["aura skills that summon totems"] = { tag = { type = "SkillType", skillType = SkillType.Aura }, keywordFlags = KeywordFlag.Totem },
["of aura skills"] = { tag = { type = "SkillType", skillType = SkillType.Aura } },
["of curse skills"] = { keywordFlags = KeywordFlag.Curse },
["with curse skills"] = { keywordFlags = KeywordFlag.Curse },
@@ -693,6 +697,7 @@ local modFlagList = {
["warcry"] = { keywordFlags = KeywordFlag.Warcry },
["vaal"] = { keywordFlags = KeywordFlag.Vaal },
["vaal skill"] = { keywordFlags = KeywordFlag.Vaal },
["with vaal skills"] = { keywordFlags = KeywordFlag.Vaal },
["with movement skills"] = { keywordFlags = KeywordFlag.Movement },
["of movement skills"] = { keywordFlags = KeywordFlag.Movement },
["of movement skills used"] = { keywordFlags = KeywordFlag.Movement },
@@ -936,6 +941,8 @@ local modTagList = {
["for each curse on enemy"] = { tag = { type = "Multiplier", var = "CurseOnEnemy" } },
["per curse on you"] = { tag = { type = "Multiplier", var = "CurseOnSelf" } },
["per poison on you"] = { tag = { type = "Multiplier", var = "PoisonStack" } },
["for each poison on you"] = { tag = { type = "Multiplier", var = "PoisonStack" } },
["for each poison on you up to a maximum of (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "PoisonStack", limit = tonumber(num), limitTotal = true } } end,
["per poison on you, up to (%d+) per second"] = function(num) return { tag = { type = "Multiplier", var = "PoisonStack", limit = tonumber(num), limitTotal = true } } end,
["for each poison you have inflicted recently"] = { tag = { type = "Multiplier", var = "PoisonAppliedRecently" } },
["for each shocked enemy you've killed recently"] = { tag = { type = "Multiplier", var = "ShockedEnemyKilledRecently" } },
@@ -944,7 +951,7 @@ local modTagList = {
["per minion, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "SummonedMinion", limit = tonumber(num), limitTotal = true } } end,
["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,
["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,
["for each (%d+) total mana you have spent recently"] = function(num) return { tag = { type = "Multiplier", var = "ManaSpentRecently", div = num } } end,
["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,
["for each (%d+) total mana you have spent recently, up to (%d+)%%"] = function(num, _, limit) return { tag = { type = "Multiplier", var = "ManaSpentRecently", div = num, limit = tonumber(limit), limitTotal = true } } end,
["per (%d+) mana spent recently, up to (%d+)%%"] = function(num, _, limit) return { tag = { type = "Multiplier", var = "ManaSpentRecently", div = num, limit = tonumber(limit), limitTotal = true } } end,
["for each time you've blocked in the past 10 seconds"] = { tag = { type = "Multiplier", var = "BlockedPast10Sec" } },
@@ -1455,9 +1462,9 @@ local specialModList = {
["auras from your skills have (%d+)%% more effect on you"] = function(num) return { mod("SkillAuraEffectOnSelf", "MORE", num) } end,
["increases and reductions to mana regeneration rate instead apply to rage regeneration rate"] = { flag("ManaRegenToRageRegen") },
["maximum energy shield is (%d+)"] = function(num) return { mod("EnergyShield", "OVERRIDE", num ) } end,
["while not on full life, sacrifice ([%d%.]+)%% of mana per second to recover that much life"] = function(num) return {
["while not on full life, sacrifice ([%d%.]+)%% of mana per second to recover that much life"] = function(num) return {
mod("ManaDegen", "BASE", 1, { type = "PercentStat", stat = "ManaUnreserved", percent = num }, { type = "Condition", var = "FullLife", neg = true }),
mod("LifeRecovery", "BASE", 1, { type = "PercentStat", stat = "ManaUnreserved", percent = num }, { type = "Condition", var = "FullLife", neg = true })
mod("LifeRecovery", "BASE", 1, { type = "PercentStat", stat = "ManaUnreserved", percent = num }, { type = "Condition", var = "FullLife", neg = true })
} end,
["you are blind"] = { flag("Condition:Blinded") },
["armour applies to fire, cold and lightning damage taken from hits instead of physical damage"] = { flag("ArmourAppliesToFireDamageTaken"), flag("ArmourAppliesToColdDamageTaken"), flag("ArmourAppliesToLightningDamageTaken"), flag("ArmourDoesNotApplyToPhysicalDamageTaken") },
@@ -1466,6 +1473,7 @@ local specialModList = {
mod("ManaConvertToArmour", "BASE", num),
} end,
["life leech effects recover energy shield instead while on full life"] = { flag("ImmortalAmbition", { type = "Condition", var = "FullLife" }, { type = "Condition", var = "LeechingLife"}) },
["shepherd of souls"] = { mod("Damage", "MORE", -30, { type = "SkillType", skillType = SkillType.Vaal, neg = true }) },
-- Exerted Attacks
["exerted attacks deal (%d+)%% increased damage"] = function(num) return { mod("ExertIncrease", "INC", num, nil, ModFlag.Attack, 0) } end,
["exerted attacks have (%d+)%% chance to deal double damage"] = function(num) return { mod("ExertDoubleDamageChance", "BASE", num, nil, ModFlag.Attack, 0) } end,
@@ -1811,6 +1819,7 @@ local specialModList = {
["socketed gems reserve no mana"] = { mod("ManaReserved", "MORE", -100, { type = "SocketedIn", slotName = "{SlotName}" }) },
["socketed gems have no reservation"] = { mod("Reserved", "MORE", -100, { type = "SocketedIn", slotName = "{SlotName}" }) },
["socketed skill gems get a (%d+)%% mana multiplier"] = function(num) return { mod("ExtraSkillMod", "LIST", { mod = mod("SupportManaMultiplier", "MORE", num - 100) }, { type = "SocketedIn", slotName = "{SlotName}" }) } end,
["socketed skill gems get a (%d+)%% cost & reservation multiplier"] = function(num) return { mod("ExtraSkillMod", "LIST", { mod = mod("SupportManaMultiplier", "MORE", num - 100) }, { type = "SocketedIn", slotName = "{SlotName}" }) } end,
["socketed gems have blood magic"] = { mod("ExtraSupport", "LIST", { skillId = "SupportBloodMagicUniquePrismGuardian", level = 1 }, { type = "SocketedIn", slotName = "{SlotName}" }) },
["socketed gems cost and reserve life instead of mana"] = { mod("ExtraSupport", "LIST", { skillId = "SupportBloodMagicUniquePrismGuardian", level = 1 }, { type = "SocketedIn", slotName = "{SlotName}" }) },
["socketed gems have elemental equilibrium"] = { mod("Keystone", "LIST", "Elemental Equilibrium") },
@@ -2178,6 +2187,7 @@ local specialModList = {
["enemies take (%d+)%% increased elemental damage from your hits for"] = { flag("Condition:CanElementalWithered") },
["each withered you have inflicted on them"] = { },
["your hits cannot penetrate or ignore elemental resistances"] = { flag("CannotElePenIgnore") },
["nearby enemies have malediction"] = { mod("EnemyModifier", "LIST", { mod = flag("HasMalediction") }) },
["elemental damage you deal with hits is resisted by lowest elemental resistance instead"] = { flag("ElementalDamageUsesLowestResistance") },
["you take (%d+) chaos damage per second for 3 seconds on kill"] = function(num) return { mod("ChaosDegen", "BASE", num, { type = "Condition", var = "KilledLast3Seconds" }) } end,
["regenerate (%d+) life over 1 second for each spell you cast"] = function(num) return { mod("LifeRegen", "BASE", num, { type = "Condition", var = "CastLast1Seconds" }) } end,
@@ -2334,6 +2344,7 @@ local specialModList = {
["arrows pierce all targets after forking"] = { flag("PierceAllTargets", nil, ModFlag.Bow, { type = "StatThreshold", stat = "ForkedCount", threshold = 1 }) },
["modifiers to number of projectiles instead apply to the number of targets projectiles split towards"] = { flag("NoAdditionalProjectiles") },
["attack skills fire an additional projectile while wielding a claw or dagger"] = { mod("ProjectileCount", "BASE", 1, nil, ModFlag.Attack, { type = "ModFlagOr", modFlags = bor(ModFlag.Claw, ModFlag.Dagger) }) },
["skills fire (%d+) additional projectiles for 4 seconds after you consume a total of 12 steel shards"] = function(num) return { mod("ProjectileCount", "BASE", num, { type = "Condition", var = "Consumed12SteelShardsRecently" }) } end,
-- Leech/Gain on Hit
["cannot leech life"] = { flag("CannotLeechLife") },
["cannot leech mana"] = { flag("CannotLeechMana") },
@@ -2535,7 +2546,7 @@ local specialModList = {
["grants eldritch battery during flask effect"] = { mod("Keystone", "LIST", "Eldritch Battery", { type = "Condition", var = "UsingFlask" }) },
["eldritch battery during flask effect"] = { mod("Keystone", "LIST", "Eldritch Battery", { type = "Condition", var = "UsingFlask" }) },
["chaos damage does not bypass energy shield during effect"] = { flag("ChaosNotBypassEnergyShield") },
["your skills have no mana cost during flask effect"] = { mod("ManaCost", "MORE", -100, { type = "Condition", var = "UsingFlask" }) },
["your skills [ch][oa][sv][te] no mana c?o?s?t? ?during flask effect"] = { mod("ManaCost", "MORE", -100, { type = "Condition", var = "UsingFlask" }) },
["life recovery from flasks also applies to energy shield during flask effect"] = { flag("LifeFlaskAppliesToEnergyShield", { type = "Condition", var = "UsingFlask" }) },
["consecrated ground created during effect applies (%d+)%% increased damage taken to enemies"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("DamageTaken", "INC", num, { type = "Condition", var = "OnConsecratedGround" }) }, { type = "Condition", var = "UsingFlask" }) } end,
["gain alchemist's genius when you use a flask"] = {
@@ -2597,6 +2608,7 @@ local specialModList = {
["deal no damage"] = { flag("DealNoLightning"), flag("DealNoCold"), flag("DealNoFire"), flag("DealNoChaos"), flag("DealNoPhysical") },
["deal no non%-elemental damage"] = { flag("DealNoPhysical"), flag("DealNoChaos") },
["deal no non%-lightning damage"] = { flag("DealNoPhysical"), flag("DealNoCold"), flag("DealNoFire"), flag("DealNoChaos") },
["deal no non%-physical damage"] = { flag("DealNoLightning"), flag("DealNoCold"), flag("DealNoFire"), flag("DealNoChaos") },
["cannot deal non%-chaos damage"] = { flag("DealNoPhysical"), flag("DealNoCold"), flag("DealNoFire"), flag("DealNoLightning") },
["chaos damage does not bypass energy shield while not on low life or low mana"] = { flag("ChaosNotBypassEnergyShield", { type = "Condition", varList = { "LowLife", "LowMana" }, neg = true }) },
["deal no damage when not on low life"] = {
@@ -2611,6 +2623,7 @@ local specialModList = {
["cast a socketed lightning spell on hit"] = { mod("ExtraSupport", "LIST", { skillId = "SupportUniqueMjolnerLightningSpellsCastOnHit", level = 1 }, { type = "SocketedIn", slotName = "{SlotName}" }) },
["trigger a socketed lightning spell on hit"] = { mod("ExtraSupport", "LIST", { skillId = "SupportUniqueMjolnerLightningSpellsCastOnHit", level = 1 }, { type = "SocketedIn", slotName = "{SlotName}" }) },
["[ct][ar][si][tg]g?e?r? a socketed cold s[pk][ei]ll on melee critical strike"] = { mod("ExtraSupport", "LIST", { skillId = "SupportUniqueCosprisMaliceColdSpellsCastOnMeleeCriticalStrike", level = 1 }, { type = "SocketedIn", slotName = "{SlotName}" }) },
["[ct][ar][si][tg]g?e?r? a socketed cold s[pk][ei]ll on melee critical strike, with a 0.15 second cooldown"] = { mod("ExtraSupport", "LIST", { skillId = "SupportUniqueCosprisMaliceColdSpellsCastOnMeleeCriticalStrike", level = 1 }, { type = "SocketedIn", slotName = "{SlotName}" }) },
["your curses can apply to hexproof enemies"] = { flag("CursesIgnoreHexproof") },
["your hexes can affect hexproof enemies"] = { flag("CursesIgnoreHexproof") },
["hexes from socketed skills ignore curse limit"] = { flag("CursesIgnoreHexLimit", { type = "SocketedIn", slotName = "{SlotName}" } )},
@@ -2620,9 +2633,26 @@ local specialModList = {
["items and gems have (%d+)%% reduced attribute requirements"] = function(num) return { mod("GlobalAttributeRequirements", "INC", -num) } end,
["items and gems have (%d+)%% increased attribute requirements"] = function(num) return { mod("GlobalAttributeRequirements", "INC", num) } end,
["mana reservation of herald skills is always (%d+)%%"] = function(num) return { mod("SkillData", "LIST", { key = "manaReservationPercent", value = num }, { type = "SkillType", skillType = SkillType.Herald }) } end,
["([%a%s]+) reserves no mana"] = function(_, name) return { mod("SkillData", "LIST", { key = "manaCostForced", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }) } end,
["banner skills reserve no mana"] = { mod("SkillData", "LIST", { key = "manaCostForced", value = 0 }, { type = "SkillType", skillType = SkillType.Banner }) },
["banner skills have no reservation"] = { mod("SkillData", "LIST", { key = "manaCostForced", value = 0 }, { type = "SkillType", skillType = SkillType.Banner }) },
["([%a%s]+) reserves no mana"] = function(_, name) return {
mod("SkillData", "LIST", { key = "manaReservationFlat", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }),
mod("SkillData", "LIST", { key = "lifeReservationFlat", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }),
mod("SkillData", "LIST", { key = "manaReservationPercent", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }),
mod("SkillData", "LIST", { key = "lifeReservationPercent", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }),
} end,
["([%a%s]+) has no reservation"] = function(_, name) return {
mod("SkillData", "LIST", { key = "manaReservationFlat", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }),
mod("SkillData", "LIST", { key = "lifeReservationFlat", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }),
mod("SkillData", "LIST", { key = "manaReservationPercent", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }),
mod("SkillData", "LIST", { key = "lifeReservationPercent", value = 0 }, { type = "SkillId", skillId = gemIdLookup[name] }),
} end,
["banner skills reserve no mana"] = {
mod("SkillData", "LIST", { key = "manaReservationPercent", value = 0 }, { type = "SkillType", skillType = SkillType.Banner }),
mod("SkillData", "LIST", { key = "lifeReservationPercent", value = 0 }, { type = "SkillType", skillType = SkillType.Banner }),
},
["banner skills have no reservation"] = {
mod("SkillData", "LIST", { key = "manaReservationPercent", value = 0 }, { type = "SkillType", skillType = SkillType.Banner }),
mod("SkillData", "LIST", { key = "lifeReservationPercent", value = 0 }, { type = "SkillType", skillType = SkillType.Banner }),
},
["placed banners also grant (%d+)%% increased attack damage to you and allies"] = function(num) return { mod("ExtraAuraEffect", "LIST", { mod = mod("Damage", "INC", num, nil, ModFlag.Attack) }, { type = "Condition", var = "BannerPlanted" }) } end,
["your aura skills are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Aura }) },
["your spells are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Spell }) },
@@ -2699,6 +2729,7 @@ local specialModList = {
} end,
["nearby enemies are crushed while you have least (%d+) rage"] = function(num) return { mod("EnemyPhysicalDamageReduction", "BASE", -15, { type = "MultiplierThreshold", var = "Rage", threshold = num }) } end,
["you are crushed"] = function(num) return { mod("PhysicalDamageReduction", "BASE", -15) } end,
["nearby enemies are crushed"] = { mod("EnemyPhysicalDamageReduction", "BASE", -15) },
["enemies on fungal ground you kill explode, dealing 5%% of their life as chaos damage"] = {},
["you have fungal ground around you while stationary"] = {
mod("ExtraAura", "LIST", { mod = mod("NonChaosDamageGainAsChaos", "BASE", 10) }, { type = "Condition", varList = { "OnFungalGround", "Stationary" } }),