Skip to content

Commit f139d89

Browse files
author
LocalIdentity
committed
Add support for mods on Waveshaper
Adds support for the gain mana as armour and the conversion mod
1 parent 7e512dc commit f139d89

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

src/Data/ModCache.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4630,6 +4630,7 @@ c["Gain 4% of Damage as Extra Fire Damage for"]={{[1]={flags=0,keywordFlags=0,na
46304630
c["Gain 4% of Damage as Extra Fire Damage for every different Grenade fired in the past 8 seconds"]={{[1]={[1]={skillType=158,type="SkillType"},flags=0,keywordFlags=0,name="DamageGainAsFire",type="BASE",value=4}}," for every different fired in the past 8 seconds "}
46314631
c["Gain 40 Life per Enemy Killed"]={{[1]={flags=0,keywordFlags=0,name="LifeOnKill",type="BASE",value=40}},nil}
46324632
c["Gain 40% of Damage as Extra Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="DamageGainAsChaos",type="BASE",value=40}},nil}
4633+
c["Gain 40% of Maximum Mana as Armour"]={{[1]={flags=0,keywordFlags=0,name="ManaGainAsArmour",type="BASE",value=40}},nil}
46334634
c["Gain 5 Life per Enemy Hit with Attacks"]={{[1]={flags=4,keywordFlags=65536,name="LifeOnHit",type="BASE",value=5}},nil}
46344635
c["Gain 5 Life per Enemy Killed"]={{[1]={flags=0,keywordFlags=0,name="LifeOnKill",type="BASE",value=5}},nil}
46354636
c["Gain 5 Mana per Enemy Killed"]={{[1]={flags=0,keywordFlags=0,name="ManaOnKill",type="BASE",value=5}},nil}
@@ -4646,7 +4647,7 @@ c["Gain 5% of Maximum Mana as Extra Maximum Energy Shield while you have at leas
46464647
c["Gain 5% of maximum Mana as Extra maximum Energy Shield"]={{[1]={flags=0,keywordFlags=0,name="ManaGainAsEnergyShield",type="BASE",value=5}},nil}
46474648
c["Gain 50 Life per Enemy Killed"]={{[1]={flags=0,keywordFlags=0,name="LifeOnKill",type="BASE",value=50}},nil}
46484649
c["Gain 50% of Damage as Extra Fire Damage"]={{[1]={flags=0,keywordFlags=0,name="DamageGainAsFire",type="BASE",value=50}},nil}
4649-
c["Gain 50% of Maximum Mana as Armour"]={{[1]={flags=0,keywordFlags=0,name="Mana",type="BASE",value=50}}," as Armour "}
4650+
c["Gain 50% of Maximum Mana as Armour"]={{[1]={flags=0,keywordFlags=0,name="ManaGainAsArmour",type="BASE",value=50}},nil}
46504651
c["Gain 50% of maximum Energy Shield as additional Freeze Threshold"]={{[1]={[1]={percent=50,stat="EnergyShield",type="PercentStat"},flags=0,keywordFlags=0,name="FreezeThreshold",type="BASE",value=1}},nil}
46514652
c["Gain 6 Mana per Enemy Killed"]={{[1]={flags=0,keywordFlags=0,name="ManaOnKill",type="BASE",value=6}},nil}
46524653
c["Gain 6% of Elemental Damage as Extra Cold Damage"]={{[1]={flags=0,keywordFlags=0,name="ElementalDamageGainAsCold",type="BASE",value=6}},nil}
@@ -4933,7 +4934,7 @@ c["Increases and Reductions to Armour also apply to Energy Shield"]={nil,"Increa
49334934
c["Increases and Reductions to Armour also apply to Energy Shield Recharge Rate at 40% of their value"]={{[1]={flags=0,keywordFlags=0,name="ArmourAppliesToEnergyShieldRecharge",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ImprovedArmourAppliesToEnergyShieldRecharge",type="MAX",value=40}},nil}
49344935
c["Increases and Reductions to Companion Damage also apply to you"]={{[1]={flags=0,keywordFlags=0,name="CompanionDamageAppliesToPlayer",type="FLAG",value=true}},nil}
49354936
c["Increases and Reductions to Mana Regeneration Rate also"]={nil,"Increases and Reductions to Mana Regeneration Rate also "}
4936-
c["Increases and Reductions to Mana Regeneration Rate also apply to Energy Shield Recharge Rate"]={nil,"Increases and Reductions to Mana Regeneration Rate also apply to Energy Shield Recharge Rate "}
4937+
c["Increases and Reductions to Mana Regeneration Rate also apply to Energy Shield Recharge Rate"]={{[1]={flags=0,keywordFlags=0,name="ManaRegenAppliesToEnergyShieldRecharge",type="FLAG",value=true}},nil}
49374938
c["Increases and Reductions to Minion Attack Speed also affect you"]={{[1]={flags=0,keywordFlags=0,name="MinionAttackSpeedAppliesToPlayer",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ImprovedMinionAttackSpeedAppliesToPlayer",type="MAX",value=100}},nil}
49384939
c["Increases and Reductions to Minion Damage also affect you"]={{[1]={flags=0,keywordFlags=0,name="MinionDamageAppliesToPlayer",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ImprovedMinionDamageAppliesToPlayer",type="MAX",value=100}},nil}
49394940
c["Increases and Reductions to Projectile Speed also apply to Damage with Bows"]={{[1]={flags=0,keywordFlags=0,name="ProjectileSpeedAppliesToBowDamage",type="FLAG",value=true}},nil}
@@ -5714,8 +5715,6 @@ c["Your Offerings can target Enemies in Culling range Your Offerings affect you
57145715
c["Your base Energy Shield Recharge Delay is 10 seconds"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldRechargeBase",type="OVERRIDE",value=10}},nil}
57155716
c["Your speed is unaffected by Slows"]={{[1]={flags=0,keywordFlags=0,name="UnaffectedBySlows",type="FLAG",value=true}},nil}
57165717
c["additional Elemental Infusion of the same type"]={nil,"additional Elemental Infusion of the same type "}
5717-
c["apply to Energy Shield Recharge Rate"]={nil,"apply to Energy Shield Recharge Rate "}
5718-
c["apply to Energy Shield Recharge Rate Gain 50% of Maximum Mana as Armour"]={nil,"apply to Energy Shield Recharge Rate Gain 50% of Maximum Mana as Armour "}
57195718
c["every different Grenade fired in the past 8 seconds"]={nil,"every different Grenade fired in the past 8 seconds "}
57205719
c["for 4 seconds, every 0.25 seconds while raised"]={nil,"for 4 seconds, every 0.25 seconds while raised "}
57215720
c["gain 6 Cold Surges or 6 Fire Surges"]={{}," Cold Surges or 6 Fire Surges "}

src/Modules/CalcDefence.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,14 @@ function calcs.defence(env, actor)
10461046
modDB:NewMod("EnergyShieldRecharge", "INC", m_floor(mod.value * multiplier), mod.source, mod.flags, mod.keywordFlags, unpack(modifiers))
10471047
end
10481048
end
1049+
1050+
if modDB:Flag(nil, "ManaRegenAppliesToEnergyShieldRecharge") then
1051+
-- Mana Regen conversion from Waveshaper
1052+
for i, value in ipairs(modDB:Tabulate("INC", { }, "ManaRegen")) do
1053+
local mod = value.mod
1054+
modDB:NewMod("EnergyShieldRecharge", "INC", mod.value, mod.source, mod.flags, mod.keywordFlags, unpack(mod))
1055+
end
1056+
end
10491057

10501058
if modDB:Flag(nil, "EnergyShieldIncreasedByOvercappedColdRes") then
10511059
for i, value in ipairs(modDB:Tabulate("FLAG", nil, "EnergyShieldIncreasedByOvercappedColdRes")) do

src/Modules/ModParser.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3358,6 +3358,7 @@ local specialModList = {
33583358
["increases and reductions to cast speed also apply to trap throwing speed"] = { flag("CastSpeedAppliesToTrapThrowingSpeed") },
33593359
["increases and reductions to armour also apply to energy shield recharge rate at (%d+)%% of their value"] = function(num) return { flag("ArmourAppliesToEnergyShieldRecharge"), mod("ImprovedArmourAppliesToEnergyShieldRecharge", "MAX", num) } end,
33603360
["increases and reductions to projectile speed also apply to damage with bows"] = { flag("ProjectileSpeedAppliesToBowDamage") },
3361+
["increases and reductions to mana regeneration rate also apply to energy shield recharge rate"] = { flag("ManaRegenAppliesToEnergyShieldRecharge") },
33613362
["modifiers to maximum (%a+) resistance also [ga][rp][ap][nl][ty] ?t?o? maximum (%a+) and (%a+) resistances?"] = function(_, resFrom, resTo1, resTo2) return {
33623363
mod((resFrom:gsub("^%l", string.upper)).."MaxResConvertTo"..(resTo1:gsub("^%l", string.upper)), "BASE", 100),
33633364
mod((resFrom:gsub("^%l", string.upper)).."MaxResConvertTo"..(resTo2:gsub("^%l", string.upper)), "BASE", 100),
@@ -5743,6 +5744,7 @@ local suffixTypes = {
57435744
["added as energy shield"] = "GainAsEnergyShield",
57445745
["as extra maximum energy shield"] = "GainAsEnergyShield",
57455746
["converted to energy shield"] = "ConvertToEnergyShield",
5747+
["as armour"] = "GainAsArmour",
57465748
["as extra armour"] = "GainAsArmour",
57475749
["as physical damage"] = "AsPhysical",
57485750
["as lightning damage"] = "AsLightning",

0 commit comments

Comments
 (0)