Skip to content

Commit 812ac61

Browse files
committed
add skillTypeCheck to repeats logic in CalcOffence
1 parent 3d6d0a4 commit 812ac61

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

src/Data/ModCache.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8668,7 +8668,7 @@ c["Exposure you inflict applies at least -18% to the affected Resistance"]={{[1]
86688668
c["Extra Gore"]={{},nil}
86698669
c["Extra gore"]={{},nil}
86708670
c["Far Shot"]={{[1]={flags=0,keywordFlags=0,name="FarShot",type="FLAG",value=true}},nil}
8671-
c["Final Repeat of Attack Skills deals 60% more Damage"]={{[1]={[1]={neg=true,skillTypeList={[1]=132,[2]=90,[3]=57,[4]=74,[5]=41},type="SkillType"},flags=1,keywordFlags=0,name="RepeatFinalDamage",type="MORE",value=60}},nil}
8671+
c["Final Repeat of Attack Skills deals 60% more Damage"]={{[1]={[1]={neg=true,skillTypeList={[1]=90},type="SkillType"},flags=1,keywordFlags=0,name="RepeatFinalDamage",type="MORE",value=60}},nil}
86728672
c["Final Repeat of Spells has 40% increased Area of Effect"]={{[1]={[1]={neg=true,type="Condition",var="CastOnFrostbolt"},[2]={type="Condition",varList={[1]="averageRepeat",[2]="alwaysFinalRepeat"}},flags=2,keywordFlags=0,name="RepeatFinalAreaOfEffect",type="INC",value=40}},nil}
86738673
c["Fire Exposure you inflict applies an extra -5% to Fire Resistance"]={{[1]={flags=0,keywordFlags=0,name="ExtraFireExposure",type="BASE",value=-5}},nil}
86748674
c["Fire Resistance is 75%"]={{[1]={flags=0,keywordFlags=0,name="FireResist",type="OVERRIDE",value=75}},nil}
@@ -10337,7 +10337,7 @@ c["Non-Damaging Elemental Ailments you inflict have 100% more Effect"]={{[1]={fl
1033710337
c["Non-Damaging Elemental Ailments you inflict spread to nearby enemies within 2 metres"]={nil,"Non-Damaging Elemental Ailments you inflict spread to nearby enemies within 2 metres "}
1033810338
c["Non-Damaging Elemental Ailments you inflict spread to nearby enemies within 2 metres Non-Damaging Elemental Ailments you inflict have 100% more Effect"]={nil,"Non-Damaging Elemental Ailments you inflict spread to nearby enemies within 2 metres Non-Damaging Elemental Ailments you inflict have 100% more Effect "}
1033910339
c["Non-Exerted Attacks deal no Damage"]={nil,"Non-Exerted Attacks deal no Damage "}
10340-
c["Non-Travel Attack Skills Repeat an additional Time"]={{[1]={[1]={neg=true,skillTypeList={[1]=132,[2]=90,[3]=57,[4]=74,[5]=41},type="SkillType"},[2]={type="Condition",varList={[1]="averageRepeat",[2]="alwaysFinalRepeat"}},flags=1,keywordFlags=0,name="RepeatCount",type="BASE",value=1}},nil}
10340+
c["Non-Travel Attack Skills Repeat an additional Time"]={{[1]={[1]={neg=true,skillTypeList={[1]=90},type="SkillType"},[2]={type="Condition",varList={[1]="averageRepeat",[2]="alwaysFinalRepeat"}},flags=1,keywordFlags=0,name="RepeatCount",type="BASE",value=1}},nil}
1034110341
c["Non-Unique Jewels cause Small and Notable Passive Skills in a Large Radius to"]={nil,"Non-Unique Jewels cause Small and Notable Passive Skills in a Large Radius to "}
1034210342
c["Non-Unique Utility Flasks you Use apply to Linked Targets"]={{[1]={flags=0,keywordFlags=0,name="ExtraLinkEffect",type="LIST",value={mod={[1]={effectType="Global",type="GlobalEffect",unscalable=true},flags=0,keywordFlags=0,name="ParentNonUniqueFlasksAppliedToYou",type="FLAG",value=true}}}},nil}
1034310343
c["Non-Vaal Strike Skills target 1 additional nearby Enemy"]={{[1]={[1]={skillType=25,type="SkillType"},[2]={neg=true,skillType=42,type="SkillType"},flags=0,keywordFlags=0,name="AdditionalStrikeTarget",type="BASE",value=1}},nil}

src/Modules/CalcOffence.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,19 @@ function calcs.offence(env, actor, activeSkill)
759759
-- Applies DPS multiplier based on projectile count
760760
skillData.dpsMultiplier = skillModList:Sum("BASE", skillCfg, "ProjectileCount")
761761
end
762-
output.Repeats = 1 + (skillModList:Sum("BASE", skillCfg, "RepeatCount") or 0)
762+
763+
local function repeatSkillTypesCheck(activeSkillTypes)
764+
local excludeSkillTypes = { SkillType.SummonsTotem, SkillType.Trapped, SkillType.RemoteMined, SkillType.Triggered,
765+
SkillType.HasReservation, SkillType.Instant, SkillType.NonRepeatable, SkillType.CreatesMinion,
766+
}
767+
for _, type in ipairs(excludeSkillTypes) do
768+
if activeSkillTypes[type] then
769+
return false
770+
end
771+
end
772+
return (activeSkillTypes[SkillType.Multicastable] or activeSkillTypes[SkillType.Multistrikeable])
773+
end
774+
output.Repeats = 1 + (repeatSkillTypesCheck(activeSkill.skillTypes) and (skillModList:Sum("BASE", skillCfg, "RepeatCount") or 0) or 0)
763775
if output.Repeats > 1 then
764776
output.RepeatCount = output.Repeats
765777
-- handle all the multipliers from Repeats

src/Modules/ModParser.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,10 +2400,10 @@ local specialModList = {
24002400
["exerted attacks have (%d+)%% chance to deal double damage"] = function(num) return { mod("ExertDoubleDamageChance", "BASE", num, nil, ModFlag.Attack, 0) } end,
24012401
-- Duelist (Fatal flourish)
24022402
["final repeat of attack skills deals (%d+)%% more damage"] = function(num) return { mod("RepeatFinalDamage", "MORE", num, nil, ModFlag.Attack, 0,
2403-
{ type = "SkillType", skillTypeList = { SkillType.Retaliation, SkillType.Travel, SkillType.Channel, SkillType.Instant, SkillType.Triggered }, neg = true }),
2403+
{ type = "SkillType", skillTypeList = { SkillType.Travel }, neg = true }),
24042404
} end,
24052405
["non%-travel attack skills repeat an additional time"] = { mod("RepeatCount", "BASE", 1, nil, ModFlag.Attack, 0,
2406-
{ type = "SkillType", skillTypeList = { SkillType.Retaliation, SkillType.Travel, SkillType.Channel, SkillType.Instant, SkillType.Triggered }, neg = true },
2406+
{ type = "SkillType", skillTypeList = { SkillType.Travel }, neg = true },
24072407
{ type = "Condition", varList = {"averageRepeat", "alwaysFinalRepeat"} })
24082408
},
24092409
-- Ascendant

0 commit comments

Comments
 (0)