Skip to content

Commit 318aa71

Browse files
author
LocalIdentity
committed
Fix Hand of Phrecia not restricting Aura's to Player and Linked targets
The mod was not parsed and was applying aura debuffs to enemies Was also applying auras to enemies if you had the new runegraft
1 parent 62bfd8e commit 318aa71

4 files changed

Lines changed: 15 additions & 14 deletions

File tree

src/Data/ModCache.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9129,8 +9129,7 @@ c["Link Skills have 20% increased Buff Effect if you have Linked to a target Rec
91299129
c["Link Skills have 5% increased Buff Effect"]={{[1]={[1]={skillType=118,type="SkillType"},flags=0,keywordFlags=0,name="BuffEffect",type="INC",value=5}},nil}
91309130
c["Linked Targets Cannot Die for 2 seconds after you Die"]={nil,"Linked Targets Cannot Die for 2 seconds after you Die "}
91319131
c["Linked Targets Cannot Die for 2 seconds after you Die Lose no Experience when you die because a Linked target died"]={nil,"Linked Targets Cannot Die for 2 seconds after you Die Lose no Experience when you die because a Linked target died "}
9132-
c["Linked Targets always count as in range of Non-Curse Auras from your Skills"]={nil,"Linked Targets always count as in range of Non-Curse Auras from your Skills "}
9133-
c["Linked Targets always count as in range of Non-Curse Auras from your Skills Non-Curse Auras from your Skills only apply to you and Linked Targets"]={nil,"Linked Targets always count as in range of Non-Curse Auras from your Skills Non-Curse Auras from your Skills only apply to you and Linked Targets "}
9132+
c["Linked Targets always count as in range of Non-Curse Auras from your Skills"]={{},nil}
91349133
c["Linked targets share Endurance, Frenzy and Power Charges with you"]={nil,"Linked targets share Endurance, Frenzy and Power Charges with you "}
91359134
c["Links take twice as long to break"]={nil,"Links take twice as long to break "}
91369135
c["Lose 0.1% of Life per second per Rage while you are not losing Rage"]={{[1]={[1]={percent=0.1,stat="Life",type="PercentStat"},[2]={type="Multiplier",var="RageEffect"},flags=0,keywordFlags=0,name="LifeDegen",type="BASE",value=1}},nil}
@@ -9677,7 +9676,7 @@ c["Non-Critical Strikes cannot inflict Ailments"]={{[1]={flags=0,keywordFlags=0,
96779676
c["Non-Critical Strikes deal no Damage"]={{[1]={[1]={neg=true,type="Condition",var="CriticalStrike"},flags=4,keywordFlags=0,name="Damage",type="MORE",value=-100}},nil}
96789677
c["Non-Curse Aura Skills have 20% increased Duration"]={{[1]={[1]={skillType=43,type="SkillType"},[2]={neg=true,skillType=79,type="SkillType"},flags=0,keywordFlags=0,name="Duration",type="INC",value=20}},nil}
96799678
c["Non-Curse Aura Skills have 50% increased Duration"]={{[1]={[1]={skillType=43,type="SkillType"},[2]={neg=true,skillType=79,type="SkillType"},flags=0,keywordFlags=0,name="Duration",type="INC",value=50}},nil}
9680-
c["Non-Curse Auras from your Skills only apply to you and Linked Targets"]={nil,"Non-Curse Auras from your Skills only apply to you and Linked Targets "}
9679+
c["Non-Curse Auras from your Skills only apply to you and Linked Targets"]={{[1]={[1]={skillType=43,type="SkillType"},[2]={neg=true,skillType=79,type="SkillType"},flags=0,keywordFlags=0,name="SelfAurasAffectYouAndLinkedTarget",type="FLAG",value=true}},nil}
96819680
c["Non-Cursed Enemies you inflict Non-Aura Curses on are Blinded for 4 seconds"]={nil,"Non-Cursed Enemies you inflict Non-Aura Curses on are Blinded for 4 seconds "}
96829681
c["Non-Damaging Ailments Cannot Be inflicted on you while you already have one"]={nil,"Non-Damaging Ailments Cannot Be inflicted on you while you already have one "}
96839682
c["Non-Damaging Ailments have 40% reduced Effect on you while you have Arcane Surge"]={{[1]={[1]={type="Condition",var="AffectedByArcaneSurge"},flags=0,keywordFlags=0,name="SelfChillEffect",type="INC",value=-40},[2]={[1]={type="Condition",var="AffectedByArcaneSurge"},flags=0,keywordFlags=0,name="SelfFreezeEffect",type="INC",value=-40},[3]={[1]={type="Condition",var="AffectedByArcaneSurge"},flags=0,keywordFlags=0,name="SelfShockEffect",type="INC",value=-40},[4]={[1]={type="Condition",var="AffectedByArcaneSurge"},flags=0,keywordFlags=0,name="SelfScorchEffect",type="INC",value=-40},[5]={[1]={type="Condition",var="AffectedByArcaneSurge"},flags=0,keywordFlags=0,name="SelfBrittleEffect",type="INC",value=-40},[6]={[1]={type="Condition",var="AffectedByArcaneSurge"},flags=0,keywordFlags=0,name="SelfSapEffect",type="INC",value=-40}},nil}

src/Modules/CalcOffence.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,9 +1093,9 @@ function calcs.offence(env, actor, activeSkill)
10931093
calcAreaOfEffect(skillModList, skillCfg, skillData, skillFlags, output, breakdown)
10941094
end
10951095
if activeSkill.skillTypes[SkillType.Aura] then
1096-
output.AuraEffectMod = calcLib.mod(skillModList, skillCfg, "AuraEffect", not skillData.auraCannotAffectSelf and "SkillAuraEffectOnSelf" or nil)
1096+
output.AuraEffectMod = calcLib.mod(skillModList, skillCfg, "AuraEffect", not skillData.auraCannotAffectSelf or skillModList:Flag(skillCfg, "SelfAurasAffectYouAndLinkedTarget") and "SkillAuraEffectOnSelf" or nil)
10971097
if breakdown then
1098-
breakdown.AuraEffectMod = breakdown.mod(skillModList, skillCfg, "AuraEffect", not skillData.auraCannotAffectSelf and "SkillAuraEffectOnSelf" or nil)
1098+
breakdown.AuraEffectMod = breakdown.mod(skillModList, skillCfg, "AuraEffect", not skillData.auraCannotAffectSelf or skillModList:Flag(skillCfg, "SelfAurasAffectYouAndLinkedTarget") and "SkillAuraEffectOnSelf" or nil)
10991099
end
11001100
end
11011101
if activeSkill.skillTypes[SkillType.HasReservation] and not activeSkill.skillTypes[SkillType.ReservationBecomesCost] then

src/Modules/CalcPerform.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,7 +2091,7 @@ function calcs.perform(env, skipEHP)
20912091
t_insert(extraAuraModList, copyTable(value.mod, true))
20922092
end
20932093
end
2094-
if not activeSkill.skillData.auraCannotAffectSelf then
2094+
if not activeSkill.skillData.auraCannotAffectSelf or activeSkill.skillModList:Flag(skillCfg, "SelfAurasAffectYouAndLinkedTarget") then
20952095
local inc = skillModList:Sum("INC", skillCfg, "AuraEffect", "BuffEffect", "BuffEffectOnSelf", "AuraEffectOnSelf", "AuraBuffEffect", "SkillAuraEffectOnSelf")
20962096
local more = skillModList:More(skillCfg, "AuraEffect", "BuffEffect", "BuffEffectOnSelf", "AuraEffectOnSelf", "AuraBuffEffect", "SkillAuraEffectOnSelf")
20972097
local mult = (1 + inc / 100) * more
@@ -2108,7 +2108,7 @@ function calcs.perform(env, skipEHP)
21082108
mergeBuff(srcList, buffs, buff.name)
21092109
end
21102110
end
2111-
if not (modDB:Flag(nil, "SelfAurasCannotAffectAllies") or modDB:Flag(nil, "SelfAurasOnlyAffectYou") or modDB:Flag(nil, "SelfAuraSkillsCannotAffectAllies")) then
2111+
if not (modDB:Flag(nil, "SelfAurasCannotAffectAllies") or modDB:Flag(nil, "SelfAurasOnlyAffectYou") or modDB:Flag(nil, "SelfAuraSkillsCannotAffectAllies") ) then
21122112
if env.minion then
21132113
local inc = skillModList:Sum("INC", skillCfg, "AuraEffect", "BuffEffect") + env.minion.modDB:Sum("INC", skillCfg, "BuffEffectOnSelf", "AuraEffectOnSelf")
21142114
local more = skillModList:More(skillCfg, "AuraEffect", "BuffEffect") * env.minion.modDB:More(skillCfg, "BuffEffectOnSelf", "AuraEffectOnSelf")
@@ -2133,7 +2133,7 @@ function calcs.perform(env, skipEHP)
21332133
buffExports["Aura"][buff.name.."_Debuff"] = buffExports["Aura"][buff.name]
21342134
end
21352135
buffExports["Aura"][buff.name] = { effectMult = mult, modList = newModList }
2136-
if modDB:Flag(nil, "AurasAffectEnemies") then
2136+
if modDB:Flag(nil, "AurasAffectEnemies") and not activeSkill.skillModList:Flag(skillCfg, "SelfAurasAffectYouAndLinkedTarget") then
21372137
local newModList = {}
21382138
local srcList = new("ModList")
21392139
for _, mod in ipairs(buff.modList) do
@@ -2179,7 +2179,7 @@ function calcs.perform(env, skipEHP)
21792179
mergeBuff(srcList, buffs, "Totem "..buff.name)
21802180
end
21812181
-- check if aura has a debuff added to it, but does not have an auraDebuff
2182-
if env.mode_effective and #modDB:List(skillCfg, "ExtraAuraDebuffEffect") > 0 and not modDB:Flag(nil, "SelfAurasOnlyAffectYou") then
2182+
if env.mode_effective and #modDB:List(skillCfg, "ExtraAuraDebuffEffect") > 0 and not (modDB:Flag(nil, "SelfAurasOnlyAffectYou") or activeSkill.skillModList:Flag(skillCfg, "SelfAurasAffectYouAndLinkedTarget")) then
21832183
local auraDebuffFound = false
21842184
for _, buff in ipairs(activeSkill.buffList) do
21852185
if buff.type == "AuraDebuff" then
@@ -2250,7 +2250,7 @@ function calcs.perform(env, skipEHP)
22502250
end
22512251
end
22522252
mult = 0
2253-
if not modDB:Flag(nil, "SelfAurasOnlyAffectYou") then
2253+
if not (modDB:Flag(nil, "SelfAurasOnlyAffectYou") or activeSkill.skillModList:Flag(skillCfg, "SelfAurasAffectYouAndLinkedTarget")) then
22542254
local inc = skillModList:Sum("INC", skillCfg, "AuraEffect", "BuffEffect", "DebuffEffect")
22552255
local more = skillModList:More(skillCfg, "AuraEffect", "BuffEffect", "DebuffEffect")
22562256
mult = (1 + inc / 100) * more
@@ -2306,7 +2306,7 @@ function calcs.perform(env, skipEHP)
23062306
more = more * enemyDB:More(nil, "CurseEffectOnSelf")
23072307
end
23082308
local mult = 0
2309-
if not (modDB:Flag(nil, "SelfAurasOnlyAffectYou") and activeSkill.skillTypes[SkillType.Aura]) then --If your aura only effect you blasphemy does nothing
2309+
if not ((modDB:Flag(nil, "SelfAurasOnlyAffectYou") or activeSkill.skillModList:Flag(skillCfg, "SelfAurasAffectYouAndLinkedTarget")) and activeSkill.skillTypes[SkillType.Aura]) then --If your aura only effect you blasphemy does nothing
23102310
mult = (1 + inc / 100) * more
23112311
end
23122312
if buff.type == "Curse" then
@@ -2462,7 +2462,7 @@ function calcs.perform(env, skipEHP)
24622462
t_insert(extraAuraModList, copyTable(value.mod, true))
24632463
end
24642464
end
2465-
if not (activeSkill.minion.modDB:Flag(nil, "SelfAurasCannotAffectAllies") or activeSkill.minion.modDB:Flag(nil, "SelfAurasOnlyAffectYou") or activeSkill.minion.modDB:Flag(nil, "SelfAuraSkillsCannotAffectAllies")) then
2465+
if not (activeSkill.minion.modDB:Flag(nil, "SelfAurasCannotAffectAllies") or activeSkill.minion.modDB:Flag(nil, "SelfAurasOnlyAffectYou") or activeSkill.minion.modDB:Flag(nil, "SelfAuraSkillsCannotAffectAllies") or skillModList:Flag(skillCfg, "SelfAurasAffectYouAndLinkedTarget")) then
24662466
if not modDB:Flag(nil, "AlliesAurasCannotAffectSelf") and not modDB.conditions["AffectedBy"..buff.name:gsub(" ","")] then
24672467
local inc = skillModList:Sum("INC", skillCfg, "AuraEffect", "BuffEffect", "BuffEffectOnPlayer", "AuraBuffEffect") + modDB:Sum("INC", skillCfg, "BuffEffectOnSelf", "AuraEffectOnSelf")
24682468
local more = skillModList:More(skillCfg, "AuraEffect", "BuffEffect", "AuraBuffEffect") * modDB:More(skillCfg, "BuffEffectOnSelf", "AuraEffectOnSelf")
@@ -2566,7 +2566,7 @@ function calcs.perform(env, skipEHP)
25662566
local mult = 1
25672567
if buff.type == "AuraDebuff" then
25682568
mult = 0
2569-
if not skillModList:Flag(nil, "SelfAurasOnlyAffectYou") then
2569+
if not skillModList:Flag(nil, "SelfAurasOnlyAffectYou") or skillModList:Flag(skillCfg, "SelfAurasAffectYouAndLinkedTarget") then
25702570
local inc = skillModList:Sum("INC", skillCfg, "AuraEffect", "BuffEffect", "DebuffEffect")
25712571
local more = skillModList:More(skillCfg, "AuraEffect", "BuffEffect", "DebuffEffect")
25722572
mult = (1 + inc / 100) * more
@@ -2835,7 +2835,7 @@ function calcs.perform(env, skipEHP)
28352835
-- Check if we need to disable a certain curse aura.
28362836
for _, activeSkill in ipairs(env.player.activeSkillList) do
28372837
if (activeSkill.buffList[1] and curse.name == activeSkill.buffList[1].name and activeSkill.skillTypes[SkillType.Aura]) then
2838-
if modDB:Flag(nil, "SelfAurasOnlyAffectYou") then
2838+
if modDB:Flag(nil, "SelfAurasOnlyAffectYou") or activeSkill.skillModList:Flag(env.player.mainSkill.skillCfg, "SelfAurasAffectYouAndLinkedTarget") then
28392839
skipAddingCurse = true
28402840
end
28412841
break

src/Modules/ModParser.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3915,6 +3915,8 @@ local specialModList = {
39153915
["curses are inflicted on you instead of linked targets"] = { mod("ExtraLinkEffect", "LIST", { mod = flag("CurseImmune"), }), },
39163916
["elemental ailments are inflicted on you instead of linked targets"] = { mod("ExtraLinkEffect", "LIST", { mod = flag("ElementalAilmentImmune") }) },
39173917
["non%-unique utility flasks you use apply to linked targets"] = { mod("ExtraLinkEffect", "LIST", { mod = mod("ParentNonUniqueFlasksAppliedToYou", "FLAG", true, { type = "GlobalEffect", effectType = "Global", unscalable = true } ), }) },
3918+
["non%-curse auras from your skills only apply to you and linked targets"] = { flag("SelfAurasAffectYouAndLinkedTarget", { type = "SkillType", skillType = SkillType.Aura }, { type = "SkillType", skillType = SkillType.AppliesCurse, neg = true }) },
3919+
["linked targets always count as in range of non%-curse auras from your skills"] = { },
39183920
["gain unholy might on block for (%d) seconds"] = { flag("Condition:UnholyMight", { type = "Condition", var = "BlockedRecently"}), flag("Condition:CanWither", { type = "Condition", var = "BlockedRecently"}), },
39193921
-- Traps, Mines
39203922
["traps and mines deal (%d+)%-(%d+) additional physical damage"] = function(_, min, max) return { mod("PhysicalMin", "BASE", tonumber(min), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)), mod("PhysicalMax", "BASE", tonumber(max), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)) } end,

0 commit comments

Comments
 (0)