Skip to content

Commit 4a2810e

Browse files
LocalIdentityLocalIdentity
andauthored
Add support for many Rune mods (#1352)
Wither Magnitude Minions gain 10% of their Physical Damage as Extra Lightning Damage Minions take 10% of Physical Damage as Lightning Damage Minions deal 40% increased Damage with Command Skills Attacks with this Weapon have 10% chance to inflict Lightning Exposure Gain 5% of Damage as Extra Damage of all Elements Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 541a660 commit 4a2810e

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

src/Data/ModCache.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ c["10% increased Thorns damage"]={{[1]={flags=0,keywordFlags=0,name="ThornsDamag
11241124
c["10% increased Trap Damage"]={{[1]={flags=0,keywordFlags=4096,name="Damage",type="INC",value=10}},nil}
11251125
c["10% increased Warcry Cooldown Recovery Rate"]={{[1]={flags=0,keywordFlags=4,name="CooldownRecovery",type="INC",value=10}},nil}
11261126
c["10% increased Weapon Damage per 10 Strength"]={{[1]={[1]={div=10,stat="Str",type="PerStat"},flags=8192,keywordFlags=0,name="Damage",type="INC",value=10}},nil}
1127-
c["10% increased Withered Magnitude"]={{}," Withered Magnitude "}
1127+
c["10% increased Withered Magnitude"]={{[1]={flags=0,keywordFlags=0,name="WitherEffect",type="INC",value=10}},nil}
11281128
c["10% increased amount of Life Leeched"]={{[1]={flags=0,keywordFlags=0,name="MaxLifeLeechRate",type="INC",value=10}},nil}
11291129
c["10% increased amount of Mana Leeched"]={{[1]={flags=0,keywordFlags=0,name="MaxManaLeechRate",type="INC",value=10}},nil}
11301130
c["10% increased chance to Shock"]={{[1]={flags=0,keywordFlags=0,name="EnemyShockChance",type="INC",value=10}},nil}
@@ -1831,7 +1831,7 @@ c["20% increased Totem Life"]={{[1]={flags=0,keywordFlags=0,name="TotemLife",typ
18311831
c["20% increased Totem Placement range"]={{[1]={flags=0,keywordFlags=16384,name="WeaponRange",type="INC",value=20}}," Placement "}
18321832
c["20% increased Totem Placement speed"]={{[1]={flags=0,keywordFlags=0,name="TotemPlacementSpeed",type="INC",value=20}},nil}
18331833
c["20% increased Warcry Speed"]={{[1]={flags=0,keywordFlags=4,name="WarcrySpeed",type="INC",value=20}},nil}
1834-
c["20% increased Withered Magnitude"]={{}," Withered Magnitude "}
1834+
c["20% increased Withered Magnitude"]={{[1]={flags=0,keywordFlags=0,name="WitherEffect",type="INC",value=20}},nil}
18351835
c["20% increased amount of Life Leeched"]={{[1]={flags=0,keywordFlags=0,name="MaxLifeLeechRate",type="INC",value=20}},nil}
18361836
c["20% increased bonuses gained from Equipped Quiver"]={{[1]={flags=0,keywordFlags=0,name="EffectOfBonusesFromQuiver",type="INC",value=20}},nil}
18371837
c["20% increased chance to Shock"]={{[1]={flags=0,keywordFlags=0,name="EnemyShockChance",type="INC",value=20}},nil}

src/Modules/ModParser.lua

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ local formList = {
7171
["(%d+) additional hits?"] = "BASE",
7272
["^throw up to (%d+)"] = "BASE",
7373
["^you gain ([%d%.]+)"] = "GAIN",
74+
["^gains? ([%d%.]+)%% of their"] = "GAIN",
7475
["^gains? ([%d%.]+)%% of"] = "GAIN",
7576
["^gains? ([%d%.]+)"] = "GAIN",
7677
["^gain %+(%d+)%% to"] = "GAIN",
@@ -473,6 +474,7 @@ local modNameList = {
473474
["effect of buffs your ancestor totems grant "] = { "BuffEffect", tag = { type = "SkillName", skillNameList = { "Ancestral Warchief", "Ancestral Protector", "Earthbreaker" } } },
474475
["effect of shrine buffs on you"] = "ShrineBuffEffect",
475476
["effect of withered"] = "WitherEffect",
477+
["withered magnitude"] = "WitherEffect",
476478
["effect of fully broken armour"] = "FullyBrokenArmourEffect",
477479
["warcry effect"] = { "BuffEffect", keywordFlags = KeywordFlag.Warcry },
478480
["aspect of the avian buff effect"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Aspect of the Avian" } },
@@ -840,6 +842,7 @@ local modNameList = {
840842
["to inflict cold exposure on hit"] = "ColdExposureChance",
841843
["to apply cold exposure on hit"] = "ColdExposureChance",
842844
["to inflict lightning exposure on hit"] = "LightningExposureChance",
845+
["to inflict lightning exposure"] = "LightningExposureChance",
843846
["to apply lightning exposure on hit"] = "LightningExposureChance",
844847
["to ignore enemy physical damage reduction"] = "ChanceToIgnoreEnemyPhysicalDamageReduction",
845848
["weapon swap speed"] = "WeaponSwapSpeed",
@@ -1070,6 +1073,7 @@ local modFlagList = {
10701073
["of mark skills"] = { tag = { type = "SkillType", skillType = SkillType.Mark } },
10711074
["of your mark skills"] = { tag = { type = "SkillType", skillType = SkillType.Mark } },
10721075
["with skills that cost life"] = { tag = { type = "StatThreshold", stat = "LifeCost", threshold = 1 } },
1076+
["with command skills"] = { tag = { type = "Condition", var = "CommandableSkill" } },
10731077
["for command skills"] = { tag = { type = "Condition", var = "CommandableSkill" } },
10741078
["minion"] = { addToMinion = true },
10751079
["zombie"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie", includeTransfigured = true } },
@@ -1136,7 +1140,7 @@ local preFlagList = {
11361140
["^poisons you inflict with critical hits have "] = { keywordFlags = bor(KeywordFlag.Poison, KeywordFlag.MatchAll), tag = { type = "Condition", var = "CriticalStrike" } },
11371141
-- Add to minion
11381142
["^minions "] = { addToMinion = true },
1139-
["^minions [hd][ae][va][el] "] = { addToMinion = true },
1143+
["^minions [thd][ae][kva][el] "] = { addToMinion = true },
11401144
["^while a unique enemy is in your presence, minions [hd][ae][va][el] "] = { addToMinion = true, playerTag = { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" } },
11411145
["^while a pinnacle atlas boss is in your presence, minions [hd][ae][va][el] "] = { addToMinion = true, playerTag = { type = "ActorCondition", actor = "enemy", var = "PinnacleBoss" } },
11421146
["^minions leech "] = { addToMinion = true },
@@ -3378,6 +3382,11 @@ local specialModList = {
33783382
mod("PhysicalDamageGainAsCold", "BASE", num, { type = "Multiplier", var = "SpiritCharge" }),
33793383
mod("PhysicalDamageGainAsFire", "BASE", num, { type = "Multiplier", var = "SpiritCharge" }),
33803384
} end,
3385+
["gain (%d+)%% of damage as extra damage of all elements"] = function(num) return {
3386+
mod("DamageGainAsLightning", "BASE", num),
3387+
mod("DamageGainAsCold", "BASE", num),
3388+
mod("DamageGainAsFire", "BASE", num),
3389+
} end,
33813390
["gain (%d+)%% of weapon physical damage as extra damage of an? r?a?n?d?o?m? ?element"] = function(num) return { mod("PhysicalDamageGainAsRandom", "BASE", num, nil, ModFlag.Weapon) } end,
33823391
["gain (%d+)%% of physical damage as extra damage of a random element"] = function(num) return { mod("PhysicalDamageGainAsRandom", "BASE", num ) } end,
33833392
["(%d+)%% chance for hits to deal (%d+)%% of physical damage as extra damage of a random element"] = function(num, _, physPercent) return { mod("PhysicalDamageGainAsRandom", "BASE", (num*physPercent/100) ) } end,

0 commit comments

Comments
 (0)