Add support for Echoes of Creation (#7999)
Adds support for the 2 mods on Echoes of Creation Leverages the code from Overexertion for the damage mod Co-authored-by: LocalIdentity <localidentity2@gmail.com>
This commit is contained in:
@@ -10431,7 +10431,8 @@ c["Skills Supported by Nightblade have 40% increased Effect of Elusive"]={{[1]={
|
||||
c["Skills Supported by Unleash have 30% increased Seal gain frequency"]={{[1]={flags=0,keywordFlags=0,name="SealGainFrequency",type="INC",value=30}},nil}
|
||||
c["Skills Supported by Unleash have 40% increased Seal gain frequency"]={{[1]={flags=0,keywordFlags=0,name="SealGainFrequency",type="INC",value=40}},nil}
|
||||
c["Skills Supported by Unleash have 50% increased Seal gain frequency"]={{[1]={flags=0,keywordFlags=0,name="SealGainFrequency",type="INC",value=50}},nil}
|
||||
c["Skills deal 15% more Damage for each Warcry Exerting them"]={{[1]={flags=0,keywordFlags=4,name="Damage",type="MORE",value=15}}," for each Exerting them "}
|
||||
c["Skills deal 13% more Damage for each Warcry Exerting them"]={{[1]={flags=0,keywordFlags=0,name="ExertAverageIncrease",type="MORE",value=13}},nil}
|
||||
c["Skills deal 15% more Damage for each Warcry Exerting them"]={{[1]={flags=0,keywordFlags=0,name="ExertAverageIncrease",type="MORE",value=15}},nil}
|
||||
c["Skills fire 2 additional Projectiles"]={{[1]={flags=0,keywordFlags=0,name="ProjectileCount",type="BASE",value=2}},nil}
|
||||
c["Skills fire 2 additional Projectiles during Effect"]={{[1]={[1]={type="Condition",var="UsingFlask"},flags=0,keywordFlags=0,name="ProjectileCount",type="BASE",value=2}},nil}
|
||||
c["Skills fire 2 additional Projectiles if you've been Hit Recently"]={{[1]={[1]={type="Condition",var="BeenHitRecently"},flags=0,keywordFlags=0,name="ProjectileCount",type="BASE",value=2}},nil}
|
||||
@@ -11388,8 +11389,8 @@ c["When Hit, gain a random Movement Speed modifier from 40% reduced to 100% incr
|
||||
c["When Hit, lose a Ghost Shroud to Recover Energy Shield equal to 3% of your Evasion Rating"]={nil,"lose a Ghost Shroud to Recover Energy Shield equal to 3% of your Evasion Rating "}
|
||||
c["When Hit, lose a Ghost Shroud to Recover Energy Shield equal to 3% of your Evasion Rating Limited to 1 Keystone Tattoo"]={nil,"lose a Ghost Shroud to Recover Energy Shield equal to 3% of your Evasion Rating Limited to 1 Keystone Tattoo "}
|
||||
c["When an Enemy Hit deals Elemental Damage to you, their Resistance to those Elements becomes zero for 4 seconds"]={{[1]={flags=0,keywordFlags=0,name="Condition:HaveTrickstersSmile",type="FLAG",value=true}},nil}
|
||||
c["When you Attack, take 20% of Life as Physical Damage for each Warcry Exerting the Attack"]={nil,"When you Attack, take 20% of Life as Physical Damage for each Warcry Exerting the Attack "}
|
||||
c["When you Attack, take 20% of Life as Physical Damage for each Warcry Exerting the Attack Skills deal 15% more Damage for each Warcry Exerting them"]={nil,"When you Attack, take 20% of Life as Physical Damage for each Warcry Exerting the Attack Skills deal 15% more Damage for each Warcry Exerting them "}
|
||||
c["When you Attack, take 18% of Life as Physical Damage for each Warcry Exerting the Attack"]={{[1]={flags=0,keywordFlags=0,name="EchoesOfCreationSelfDamage",type="LIST",value={damageType="physical",dmgMult=18}}},nil}
|
||||
c["When you Attack, take 20% of Life as Physical Damage for each Warcry Exerting the Attack"]={{[1]={flags=0,keywordFlags=0,name="EchoesOfCreationSelfDamage",type="LIST",value={damageType="physical",dmgMult=20}}},nil}
|
||||
c["When you Cast a Spell, Sacrifice all Mana to gain Added Maximum Lightning Damage"]={nil,"When you Cast a Spell, Sacrifice all Mana to gain Added Maximum Lightning Damage "}
|
||||
c["When you Cast a Spell, Sacrifice all Mana to gain Added Maximum Lightning Damage equal to 25% of Sacrificed Mana for 4 seconds"]={{[1]={flags=0,keywordFlags=0,name="Condition:HaveManaStorm",type="FLAG",value=true},[2]={[1]={percent=25,stat="ManaUnreserved",type="PercentStat"},[2]={type="Condition",var="SacrificeManaForLightning"},flags=0,keywordFlags=0,name="LightningMax",type="BASE",value=1}},nil}
|
||||
c["When you Cast a Spell, Sacrifice all Mana to gain Added Maximum Lightning Damage equal to 50% of Sacrificed Mana for 4 seconds"]={{[1]={flags=0,keywordFlags=0,name="Condition:HaveManaStorm",type="FLAG",value=true},[2]={[1]={percent=50,stat="ManaUnreserved",type="PercentStat"},[2]={type="Condition",var="SacrificeManaForLightning"},flags=0,keywordFlags=0,name="LightningMax",type="BASE",value=1}},nil}
|
||||
|
||||
@@ -5291,6 +5291,25 @@ function calcs.offence(env, actor, activeSkill)
|
||||
return dmgBreakdown, totalDmgTaken
|
||||
end
|
||||
end,
|
||||
["Echoes of Creation"] = function(activeSkill, output, breakdown)
|
||||
local dmgType, dmgMult
|
||||
for _, value in ipairs(activeSkill.skillModList:List(nil, "EchoesOfCreationSelfDamage")) do
|
||||
dmgMult = value.dmgMult
|
||||
dmgType = string.gsub(" "..value.damageType, "%W%l", string.upper):sub(2)
|
||||
break -- Only one mod of this kind is expected here
|
||||
end
|
||||
local averageWarcryCount = output.GlobalWarcryUptimeRatio / 100
|
||||
if activeSkill.skillModList:Flag(nil, "Condition:WarcryMaxHit") then
|
||||
averageWarcryCount = env.modDB:Sum("BASE", nil, "GlobalWarcryCount")
|
||||
end
|
||||
if averageWarcryCount and dmgType and dmgMult then
|
||||
local dmgBreakdown, totalDmgTaken = calcs.applyDmgTakenConversion(activeSkill, output, breakdown, dmgType, (output.Life or 0) * dmgMult/100 * averageWarcryCount)
|
||||
t_insert(dmgBreakdown, 1, s_format("Echoes of Creation base damage: %d ^8(Life)^7 * %d%% * %.2f ^8(Avg. Warcry Count)^7 = %.2f", (output.Life or 0), dmgMult, averageWarcryCount, (output.Life or 0) * dmgMult/100* averageWarcryCount ))
|
||||
t_insert(dmgBreakdown, 2, s_format(""))
|
||||
t_insert(dmgBreakdown, s_format("Total Echoes of Creation damage taken per Attack: %.2f ", totalDmgTaken))
|
||||
return dmgBreakdown, totalDmgTaken
|
||||
end
|
||||
end,
|
||||
["Scold's Bridle"] = function(activeSkill, output, breakdown)
|
||||
local dmgType, dmgMult
|
||||
for _, value in ipairs(activeSkill.skillModList:List(nil, "ScoldsBridleSelfDamage")) do
|
||||
|
||||
@@ -2845,6 +2845,9 @@ local specialModList = {
|
||||
["take (%d+) (.+) damage when you ignite an enemy"] = function(dmg, _, dmgType) return {
|
||||
mod("EyeOfInnocenceSelfDamage", "LIST", {baseDamage = dmg, damageType = dmgType})
|
||||
} end,
|
||||
["when you attack, take (%d+)%% of life as (.+) damage for each warcry exerting the attack"] = function(dmgMult, _, dmgType) return {
|
||||
mod("EchoesOfCreationSelfDamage", "LIST", {dmgMult = dmgMult, damageType = dmgType})
|
||||
} end,
|
||||
["(%d+) (.+) damage taken on minion death"] = function(dmg, _, dmgType) return {
|
||||
mod("HeartboundLoopSelfDamage", "LIST", {baseDamage = dmg, damageType = dmgType})
|
||||
}end,
|
||||
@@ -4556,6 +4559,7 @@ local specialModList = {
|
||||
["cannot recover energy shield to above evasion rating"] = { flag("EvasionESRecoveryCap") },
|
||||
["warcries exert (%d+) additional attacks?"] = function(num) return { mod("ExtraExertedAttacks", "BASE", num) } end,
|
||||
["warcries have (%d+)%% chance to exert (%d+) additional attacks?"] = function(num, _, var) return { mod("ExtraExertedAttacks", "BASE", (num*var/100)) } end,
|
||||
["skills deal (%d+)%% more damage for each warcry exerting them"] = function(num) return { mod("ExertAverageIncrease", "MORE", num, nil) } end,
|
||||
["iron will"] = { flag("IronWill") },
|
||||
["iron reflexes while stationary"] = { mod("Keystone", "LIST", "Iron Reflexes", { type = "Condition", var = "Stationary" }) },
|
||||
["you have iron reflexes while at maximum frenzy charges"] = { mod("Keystone", "LIST", "Iron Reflexes", { type = "StatThreshold", stat = "FrenzyCharges", thresholdStat = "FrenzyChargesMax" }) },
|
||||
|
||||
Reference in New Issue
Block a user