From c9bea9d04fbb32482635b78edd3eec4f40288ef7 Mon Sep 17 00:00:00 2001 From: Regisle <49933620+Regisle@users.noreply.github.com> Date: Fri, 1 Dec 2023 18:09:52 +1030 Subject: [PATCH] Fix aspect of the avian party tab export (#6837) * fix aspect of the avian party tab export * fix aspect of the avian not double applying to minions * fix mod export --- src/Classes/PartyTab.lua | 2 +- src/Data/ModCache.lua | 2 +- src/Data/Skills/other.lua | 11 ++++++----- src/Export/Skills/other.txt | 9 ++++++--- src/Modules/CalcPerform.lua | 16 ++++++++-------- src/Modules/ModParser.lua | 2 +- src/Modules/ModTools.lua | 2 +- 7 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/Classes/PartyTab.lua b/src/Classes/PartyTab.lua index 9867899c17..0fc4369a98 100644 --- a/src/Classes/PartyTab.lua +++ b/src/Classes/PartyTab.lua @@ -763,7 +763,7 @@ function PartyTabClass:ParseBuffs(list, buf, buffType, label) elseif line == "---" then mode = "Name" else - if line:find("|") and currentName ~= "SKIP" then + if line:find("|") and currentName ~= "SKIP" and not line:find("MinionModifier|LIST") then if currentModType == "otherEffects" then currentName, currentEffect, line = line:match("([%w ]-%w+)|(%w+)|(.+)") end diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index 74077c2c16..6f1b6042d6 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -6796,7 +6796,7 @@ c["Arrows gain Critical Strike Chance as they travel farther, up to 100% increas c["Arrows gain Damage as they travel farther, dealing up to 50% increased Damage with Hits to targets"]={{[1]={[1]={ramp={[1]={[1]=35,[2]=0},[2]={[1]=70,[2]=1}},type="DistanceRamp"},flags=131076,keywordFlags=0,name="Damage",type="INC",value=50}},nil} c["Arrows that Pierce have +50% to Critical Strike Multiplier"]={{[1]={[1]={stat="PierceCount",threshold=1,type="StatThreshold"},flags=131072,keywordFlags=0,name="CritMultiplier",type="BASE",value=50}},nil} c["Arrows that Pierce have 50% chance to cause Bleeding"]={{[1]={[1]={stat="PierceCount",threshold=1,type="StatThreshold"},flags=1025,keywordFlags=0,name="BleedChance",type="BASE",value=50}},nil} -c["Aspect of the Avian also grants Avian's Might and Avian's Flight to nearby Allies"]={{[1]={[1]={skillName="Aspect of the Avian",type="SkillName"},flags=0,keywordFlags=0,name="ExtraSkillMod",type="LIST",value={mod={flags=0,keywordFlags=0,name="BuffEffectOnMinion",type="MORE",value=100}}}},nil} +c["Aspect of the Avian also grants Avian's Might and Avian's Flight to nearby Allies"]={{[1]={[1]={skillName="Aspect of the Avian",type="SkillName"},flags=0,keywordFlags=0,name="ExtraSkillMod",type="LIST",value={mod={flags=0,keywordFlags=0,name="BuffAppliesToAllies",type="FLAG",value=true}}}},nil} c["Aspect of the Cat has no Reservation"]={{[1]={[1]={skillId="CatAspect",type="SkillId"},[2]={neg=true,skillType=119,type="SkillType"},flags=0,keywordFlags=0,name="SkillData",type="LIST",value={key="manaReservationFlat",value=0}},[2]={[1]={skillId="CatAspect",type="SkillId"},[2]={neg=true,skillType=119,type="SkillType"},flags=0,keywordFlags=0,name="SkillData",type="LIST",value={key="lifeReservationFlat",value=0}},[3]={[1]={skillId="CatAspect",type="SkillId"},[2]={neg=true,skillType=119,type="SkillType"},flags=0,keywordFlags=0,name="SkillData",type="LIST",value={key="manaReservationPercent",value=0}},[4]={[1]={skillId="CatAspect",type="SkillId"},[2]={neg=true,skillType=119,type="SkillType"},flags=0,keywordFlags=0,name="SkillData",type="LIST",value={key="lifeReservationPercent",value=0}}},nil} c["Aspect of the Spider can inflict Spider's Web on Enemies an additional time"]={{[1]={[1]={skillName="Aspect of the Spider",type="SkillName"},flags=0,keywordFlags=0,name="ExtraSkillMod",type="LIST",value={mod={flags=0,keywordFlags=0,name="Multiplier:SpiderWebApplyStackMax",type="BASE",value=1}}}},nil} c["Aspect of the Spider inflicts Spider's Webs and Hinder every 0.5 Seconds instead"]={nil,"Aspect of the Spider inflicts Spider's Webs and Hinder every 0.5 Seconds instead "} diff --git a/src/Data/Skills/other.lua b/src/Data/Skills/other.lua index cb65d3c4da..5aaf24da32 100644 --- a/src/Data/Skills/other.lua +++ b/src/Data/Skills/other.lua @@ -143,19 +143,20 @@ skills["BirdAspect"] = { ["chance_to_deal_double_damage_%"] = { mod("DoubleDamageChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Might", effectCond = "AviansMightActive" }), }, + ["minion_chance_to_deal_double_damage_%"] = { + mod("MinionModifier", "LIST", { mod = mod("DoubleDamageChance", "BASE", nil) }, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Might", effectCond = "AviansMightActive" }), + }, ["base_movement_velocity_+%"] = { mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Flight", effectCond = "AviansFlightActive" }), }, ["minion_movement_speed_+%"] = { + mod("MinionModifier", "LIST", { mod = mod("MovementSpeed", "INC", nil) }, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Flight", effectCond = "AviansFlightActive" }), }, }, baseFlags = { cast = true, duration = true, }, - baseMods = { - skill("buffMinions", true), - }, constantStats = { { "chance_to_deal_double_damage_%", 10 }, { "minion_chance_to_deal_double_damage_%", 10 }, @@ -2815,7 +2816,7 @@ skills["SummonHarbingerOfTimeUber"] = { }, baseMods = { mod("ActionSpeed", "INC", 10, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Greater Harbinger of Time", modCond = "GreaterHarbingerOfTime" }), - skill("buffMinions", true), + skill("buffAllies", true), }, constantStats = { { "alternate_minion", 7 }, @@ -2961,7 +2962,7 @@ skills["SummonHarbingerOfTime"] = { }, baseMods = { mod("ActionSpeed", "INC", 10, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Harbinger of Time", modCond = "HarbingerOfTime" }), - skill("buffMinions", true), + skill("buffAllies", true), }, constantStats = { { "alternate_minion", 1 }, diff --git a/src/Export/Skills/other.txt b/src/Export/Skills/other.txt index fe5a81ad14..853498e5ee 100644 --- a/src/Export/Skills/other.txt +++ b/src/Export/Skills/other.txt @@ -57,13 +57,16 @@ local skills, mod, flag, skill = ... ["chance_to_deal_double_damage_%"] = { mod("DoubleDamageChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Might", effectCond = "AviansMightActive" }), }, + ["minion_chance_to_deal_double_damage_%"] = { + mod("MinionModifier", "LIST", { mod = mod("DoubleDamageChance", "BASE", nil) }, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Might", effectCond = "AviansMightActive" }), + }, ["base_movement_velocity_+%"] = { mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Flight", effectCond = "AviansFlightActive" }), }, ["minion_movement_speed_+%"] = { + mod("MinionModifier", "LIST", { mod = mod("MovementSpeed", "INC", nil) }, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Avian's Flight", effectCond = "AviansFlightActive" }), }, }, -#baseMod skill("buffMinions", true) #mods #skill CatAspect @@ -774,7 +777,7 @@ local skills, mod, flag, skill = ... #flags spell minion fromItem = true, #baseMod mod("ActionSpeed", "INC", 10, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Greater Harbinger of Time", modCond = "GreaterHarbingerOfTime" }) -#baseMod skill("buffMinions", true) +#baseMod skill("buffAllies", true) #mods #skill SummonHarbingerOfTheArcane @@ -806,7 +809,7 @@ local skills, mod, flag, skill = ... #flags spell minion fromItem = true, #baseMod mod("ActionSpeed", "INC", 10, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Harbinger of Time", modCond = "HarbingerOfTime" }) -#baseMod skill("buffMinions", true) +#baseMod skill("buffAllies", true) #mods #skill TriggeredSummonGhostOnKill Triggered Summon Phantasm diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index 8d461c43ee..bded35d1d9 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1726,16 +1726,16 @@ function calcs.perform(env, fullDPSSkipEHP) buffs[buff.name].notBuff = true end end - if env.minion and (buff.applyMinions or buff.applyAllies) then + if env.minion and (buff.applyMinions or buff.applyAllies or skillModList:Flag(nil, "BuffAppliesToAllies")) then activeSkill.minionBuffSkill = true env.minion.modDB.conditions["AffectedBy"..buff.name:gsub(" ","")] = true local srcList = new("ModList") - local inc = modStore:Sum("INC", skillCfg, "BuffEffect", "BuffEffectOnMinion") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf") - local more = modStore:More(skillCfg, "BuffEffect", "BuffEffectOnMinion") * env.minion.modDB:More(nil, "BuffEffectOnSelf") + local inc = modStore:Sum("INC", skillCfg, "BuffEffect") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf") + local more = modStore:More(skillCfg, "BuffEffect") * env.minion.modDB:More(nil, "BuffEffectOnSelf") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, minionBuffs, buff.name) end - if partyTabEnableExportBuffs and (buff.name == "Harbinger of Time" or buff.name == "Greater Harbinger of Time") then -- special case + if partyTabEnableExportBuffs and (buff.applyAllies or skillModList:Flag(nil, "BuffAppliesToAllies") or skillModList:Flag(nil, "BuffAppliesToPartyMembers")) then local inc = modStore:Sum("INC", skillCfg, "BuffEffect") + skillModList:Sum("INC", skillCfg, buff.name:gsub(" ", "").."Effect") local more = modStore:More(skillCfg, "BuffEffect") buffExports["Aura"]["otherEffects"] = buffExports["Aura"]["otherEffects"] or { } @@ -2207,8 +2207,8 @@ function calcs.perform(env, fullDPSSkipEHP) activeMinionSkill.minionBuffSkill = true activeSkill.minion.modDB.conditions["AffectedBy"..buff.name:gsub(" ","")] = true local srcList = new("ModList") - local inc = skillModList:Sum("INC", skillCfg, "BuffEffect", "BuffEffectOnMinion") - local more = skillModList:More(skillCfg, "BuffEffect", "BuffEffectOnMinion") + local inc = skillModList:Sum("INC", skillCfg, "BuffEffect") + local more = skillModList:More(skillCfg, "BuffEffect") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, minionBuffs, buff.name) mergeBuff(buff.modList, minionBuffs, buff.name) @@ -2497,8 +2497,8 @@ function calcs.perform(env, fullDPSSkipEHP) activeSkill.minionBuffSkill = true env.minion.modDB.conditions["AffectedBy"..buff.name:gsub(" ","")] = true local srcList = new("ModList") - local inc = modStore:Sum("INC", skillCfg, "BuffEffect", "BuffEffectOnMinion") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf") - local more = modStore:More(skillCfg, "BuffEffect", "BuffEffectOnMinion") * env.minion.modDB:More(nil, "BuffEffectOnSelf") + local inc = modStore:Sum("INC", skillCfg, "BuffEffect") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf") + local more = modStore:More(skillCfg, "BuffEffect") * env.minion.modDB:More(nil, "BuffEffectOnSelf") srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more) mergeBuff(srcList, minionBuffs, buff.name) mergeBuff(srcList, newMinionBuffs, buff.name) diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 3b62a46200..846d669165 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -3330,7 +3330,7 @@ local specialModList = { ["([%+%-][%d%.]+) seconds to avian's might duration"] = function(num) return { mod("PrimaryDuration", "BASE", num, { type = "SkillName", skillName = "Aspect of the Avian" }) } end, ["([%+%-][%d%.]+) seconds to avian's flight duration"] = function(num) return { mod("SecondaryDuration", "BASE", num, { type = "SkillName", skillName = "Aspect of the Avian" }) } end, ["aspect of the spider can inflict spider's web on enemies an additional time"] = { mod("ExtraSkillMod", "LIST", { mod = mod("Multiplier:SpiderWebApplyStackMax", "BASE", 1) }, { type = "SkillName", skillName = "Aspect of the Spider" }) }, - ["aspect of the avian also grants avian's might and avian's flight to nearby allies"] = { mod("ExtraSkillMod", "LIST", { mod = mod("BuffEffectOnMinion", "MORE", 100) }, { type = "SkillName", skillName = "Aspect of the Avian" }) }, + ["aspect of the avian also grants avian's might and avian's flight to nearby allies"] = { mod("ExtraSkillMod", "LIST", { mod = flag("BuffAppliesToAllies") }, { type = "SkillName", skillName = "Aspect of the Avian" }) }, ["marked enemy takes (%d+)%% increased damage"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("DamageTaken", "INC", num) }, {type = "ActorCondition", actor = "enemy", var = "Marked" }), } end, diff --git a/src/Modules/ModTools.lua b/src/Modules/ModTools.lua index 5f763b3f65..834749797e 100644 --- a/src/Modules/ModTools.lua +++ b/src/Modules/ModTools.lua @@ -207,7 +207,7 @@ function modLib.formatMod(mod) end function modLib.formatSourceMod(mod) - return s_format("%s|%s|%s", mod.value, mod.source, modLib.formatModParams(mod)) + return s_format("%s|%s|%s", modLib.formatValue(mod.value), mod.source, modLib.formatModParams(mod)) end function modLib.setSource(mod, source)