Skip to content

Commit

Permalink
Fixes parsing for some mods from the pantheon (#6686)
Browse files Browse the repository at this point in the history
* FIX: fixes parsing for some mods from the pantheon

* FIX: less -> reduced

* FIX: use parsed value
  • Loading branch information
Paliak authored Sep 15, 2023
1 parent 7e9136f commit 85be39a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ c["10% increased Area Damage"]={{[1]={flags=512,keywordFlags=0,name="Damage",typ
c["10% increased Area of Effect"]={{[1]={flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=10}},nil}
c["10% increased Area of Effect of Area Skills"]={{[1]={flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=10}},nil}
c["10% increased Area of Effect of Aura Skills"]={{[1]={[1]={skillType=43,type="SkillType"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=10}},nil}
c["10% increased Area of Effect per second you've been stationary, up to a maximum of 50%"]={{[1]={flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=10}}," per second you've been stationary, up to a maximum of 50% "}
c["10% increased Area of Effect per second you've been stationary, up to a maximum of 50%"]={{[1]={[1]={limit=50,limitTotal=true,type="Multiplier",var="StationarySeconds"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=10}},nil}
c["10% increased Armour"]={{[1]={flags=0,keywordFlags=0,name="Armour",type="INC",value=10}},nil}
c["10% increased Armour per Red Socket on Main Hand Weapon"]={{[1]={[1]={type="Multiplier",var="RedSocketInWeapon 1"},flags=0,keywordFlags=0,name="Armour",type="INC",value=10}},nil}
c["10% increased Attack Damage"]={{[1]={flags=1,keywordFlags=0,name="Damage",type="INC",value=10}},nil}
Expand Down
3 changes: 3 additions & 0 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,9 @@ Huge sets the radius to 11.
modList:NewMod("Condition:OnConsecratedGround", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
modList:NewMod("MinionModifier", "LIST", { mod = modLib.createMod("Condition:OnConsecratedGround", "FLAG", true, "Config", { type = "Condition", var = "Combat" }) })
end },
{ var = "conditionOnCausticGround", type = "check", label = "Are you on Caustic Ground?", ifCond = "OnCausticGround", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:OnCausticGround", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "conditionOnFungalGround", type = "check", label = "Are you on Fungal Ground?", ifCond = "OnFungalGround", tooltip = "Allies on your Fungal Ground gain 10% of Non-Chaos Damage as extra ^xD02090Chaos ^7Damage.", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:OnFungalGround", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
Expand Down
12 changes: 8 additions & 4 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ local modNameList = {
["physical damage taken from attacks"] = "PhysicalDamageTakenFromAttacks",
["physical damage taken from attack hits"] = "PhysicalDamageTakenFromAttacks",
["physical damage taken over time"] = "PhysicalDamageTakenOverTime",
["physical damage over time taken"] = "PhysicalDamageTakenOverTime",
["physical damage over time damage taken"] = "PhysicalDamageTakenOverTime",
["reflected physical damage taken"] = "PhysicalReflectedDamageTaken",
["lightning damage taken"] = "LightningDamageTaken",
Expand Down Expand Up @@ -705,6 +706,7 @@ local modNameList = {
["to poison on hit"] = "PoisonChance",
["poison duration"] = { "EnemyPoisonDuration" },
["poison duration on you"] = "SelfPoisonDuration",
["duration of poisons on you"] = "SelfPoisonDuration",
["duration of poisons you inflict"] = { "EnemyPoisonDuration" },
["to cause bleeding"] = "BleedChance",
["to cause bleeding on hit"] = "BleedChance",
Expand Down Expand Up @@ -1275,6 +1277,7 @@ local modTagList = {
["per allocated notable passive skill"] = { tag = { type = "Multiplier", var = "AllocatedNotable" } },
["for each different type of mastery you have allocated"] = { tag = { type = "Multiplier", var = "AllocatedMasteryType" } },
["per grand spectrum"] = { tag = { type = "Multiplier", var = "GrandSpectrum" } },
["per second you've been stationary, up to a maximum of (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "StationarySeconds", limit = tonumber(num), limitTotal = true } } end,
-- Per stat
["per (%d+)%% of maximum mana they reserve"] = function(num) return { tag = { type = "PerStat", stat = "ManaReservedPercent", div = num } } end,
["per (%d+) strength"] = function(num) return { tag = { type = "PerStat", stat = "Str", div = num } } end,
Expand Down Expand Up @@ -1515,6 +1518,7 @@ local modTagList = {
["if you've used a mana flask in the past 10 seconds"] = { tag = { type = "Condition", var = "UsingManaFlask" } },
["during effect of any life or mana flask"] = { tag = { type = "Condition", varList = { "UsingManaFlask", "UsingLifeFlask" } } },
["while on consecrated ground"] = { tag = { type = "Condition", var = "OnConsecratedGround" } },
["while on caustic ground"] = { tag = { type = "Condition", var = "OnCausticGround" } },
["when you create consecrated ground"] = { },
["on burning ground"] = { tag = { type = "Condition", var = "OnBurningGround" } },
["while on burning ground"] = { tag = { type = "Condition", var = "OnBurningGround" } },
Expand Down Expand Up @@ -2256,6 +2260,10 @@ local specialModList = {
["(%d+)%% increased area of effect while you don't have convergence"] = function(num) return { mod("AreaOfEffect", "INC", num, { type = "Condition", neg = true, var = "Convergence" }) } end,
["exposure you inflict applies an extra (%-?%d+)%% to the affected resistance"] = function(num) return { mod("ExtraExposure", "BASE", num) } end,
["cannot take reflected elemental damage"] = { mod("ElementalReflectedDamageTaken", "MORE", -100, { type = "GlobalEffect", effectType = "Global", unscalable = true }) },
["you and your minions take (%d+)%% reduced reflected damage"] = function(num) return {
mod("ElementalReflectedDamageTaken", "INC", -tonumber(num), { type = "GlobalEffect", effectType = "Global", unscalable = true }),
mod("MinionModifier", "LIST", { mod = mod("ElementalReflectedDamageTaken", "INC", -tonumber(num), { type = "GlobalEffect", effectType = "Global", unscalable = true }) }),
} end,
["every %d+ seconds:"] = { },
["gain chilling conflux for %d seconds"] = {
flag("PhysicalCanChill", { type = "Condition", var = "ChillingConflux" }),
Expand Down Expand Up @@ -4573,10 +4581,6 @@ local specialModList = {
["while stationary, gain ([%d%.]+)%% of life regenerated per second every second, up to a maximum of (%d+)%%"] = function(num, _, limit) return {
mod("LifeRegenPercent", "BASE", num, { type = "Multiplier", var = "StationarySeconds", limit = tonumber(limit), limitTotal = true }, { type = "Condition", var = "Stationary" }),
} end,
-- Pantheon: Soul of Tukohama support
["while stationary, gain (%d+)%% additional physical damage reduction every second, up to a maximum of (%d+)%%"] = function(num, _, limit) return {
mod("PhysicalDamageReduction", "BASE", num, { type = "Multiplier", var = "StationarySeconds", limit = tonumber(limit), limitTotal = true }, { type = "Condition", var = "Stationary" }),
} end,
-- Pantheon: Soul of Ryslatha support
["life flasks gain (%d+) charges? every (%d+) seconds if you haven't used a life flask recently"] = function(num, _, div) return {
mod("LifeFlaskChargesGenerated", "BASE", num / div, { type = "Condition", var = "UsingLifeFlask", neg = true })
Expand Down

0 comments on commit 85be39a

Please sign in to comment.