Skip to content

Commit 42b786d

Browse files
Add support for "Watch How I Do It" (Tactician Ascendancy Notable) (#931)
* Adjust SumInternal from ModDB to work with source that contain multiple ":" * Add isMartialWeapon local function to CalcOffence * Add certain weapon base stats to output in CalcOffence for "PerStat" mods * Add support for "Watch How I Do It" (Tactician Ascendancy Notable) * Fix typo "calssified" to "classified" --------- Co-authored-by: majochem <majochem@users.noreply.github.com> Co-authored-by: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com>
1 parent f285f49 commit 42b786d

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

src/Data/ModCache.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,7 @@ c["Allies in your Presence deal 50% increased Damage"]={{[1]={flags=0,keywordFla
28172817
c["Allies in your Presence deal 6 to 10 additional Attack Fire Damage"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=65536,name="FireMin",type="BASE",value=6},onlyAllies=true}},[2]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=65536,name="FireMax",type="BASE",value=10},onlyAllies=true}}},nil}
28182818
c["Allies in your Presence deal 70% increased Damage"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="INC",value=70},onlyAllies=true}}},nil}
28192819
c["Allies in your Presence gain added Attack Damage equal"]={nil,"added Attack Damage equal "}
2820-
c["Allies in your Presence gain added Attack Damage equal to 25% of your main hand Weapon's Damage"]={nil,"added Attack Damage equal to 25% of your main hand Weapon's Damage "}
2820+
c["Allies in your Presence gain added Attack Damage equal to 25% of your main hand Weapon's Damage"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="GainMainHandDmgFromParent",type="FLAG",value=true},onlyAllies=true}},[2]={flags=0,keywordFlags=0,name="Multiplier:MainHandDamageToAllies",type="BASE",value=25}},nil}
28212821
c["Allies in your Presence have +100 to Accuracy Rating"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="Accuracy",type="BASE",value=100},onlyAllies=true}}},nil}
28222822
c["Allies in your Presence have +16% to all Elemental Resistances"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="ElementalResist",type="BASE",value=16},onlyAllies=true}}},nil}
28232823
c["Allies in your Presence have 15% increased Attack Speed"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=1,keywordFlags=0,name="Speed",type="INC",value=15},onlyAllies=true}}},nil}

src/Modules/CalcOffence.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,22 @@ function calcs.offence(env, actor, activeSkill)
651651
output["AccuracyOnWeapon " .. i] = actor.itemList["Weapon " .. i].baseModList:Sum("BASE", nil, "Accuracy")
652652
end
653653
end
654+
-- Add bonus mods for Tactician's "Watch How I Do It" (technically this could be done in ModParser, but it would always add 10 mods instead of just the necessary ones)
655+
if actor.parent and actor.modDB:Flag(nil, "GainMainHandDmgFromParent") and actor.parent.itemList["Weapon 1"] then
656+
local modSource = ""
657+
for i, value in ipairs(actor.modDB:Tabulate("FLAG", nil, "GainMainHandDmgFromParent")) do
658+
modSource = value.mod.source
659+
end
660+
local modValue = actor.parent.modDB:Sum("BASE", { source = modSource }, "Multiplier:MainHandDamageToAllies")
661+
for _, damageType in ipairs(dmgTypeList) do
662+
if actor.parent.weaponData1[damageType .. "Min"] then
663+
skillModList:NewMod(damageType .. "Min", "BASE", 1, modSource, { type = "PercentStat", stat = damageType .. "MinOnWeapon 1", percent = modValue, actor = "parent" }, { type = "SkillType", skillType = SkillType.Attack })
664+
end
665+
if actor.parent.weaponData1[damageType .. "Max"] then
666+
skillModList:NewMod(damageType .. "Max", "BASE", 1, modSource, { type = "PercentStat", stat = damageType .. "MaxOnWeapon 1", percent = modValue, actor = "parent" }, { type = "SkillType", skillType = SkillType.Attack })
667+
end
668+
end
669+
end
654670
if skillModList:Flag(nil, "MinionDamageAppliesToPlayer") or skillModList:Flag(skillCfg, "MinionDamageAppliesToPlayer") then
655671
-- Minion Damage conversion from Spiritual Aid and The Scourge
656672
local multiplier = (skillModList:Max(skillCfg, "ImprovedMinionDamageAppliesToPlayer") or 100) / 100

src/Modules/ModParser.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,6 +2889,11 @@ local specialModList = {
28892889
["gain (%d+)%% increased attack speed for 20 seconds when you kill a rare or unique enemy"] = function(num) return { mod("Speed", "INC", num, nil, ModFlag.Attack, 0, { type = "Condition", var = "KilledUniqueEnemy" }) } end,
28902890
["kill enemies that have (%d+)%% or lower life when hit by your skills"] = function(num) return { mod("CullPercent", "MAX", num) } end,
28912891
["you are unaffected by bleeding while leeching"] = { mod("SelfBleedEffect", "MORE", -100, { type = "Condition", var = "Leeching" }) },
2892+
-- Tactician
2893+
["allies in your presence gain added attack damage equal to (%d+)%% of your main hand weapon's damage"] = function(num) return {
2894+
mod("ExtraAura", "LIST", { onlyAllies = true, mod = flag("GainMainHandDmgFromParent") }),
2895+
mod("Multiplier:MainHandDamageToAllies", "BASE", num),
2896+
} end,
28922897
-- Warrior - Titan
28932898
["(%d+)%% increased effect of small passive skills"] = function(num) return { mod("SmallPassiveSkillEffect", "INC", num) } end,
28942899
-- Warrior - Warbringer

0 commit comments

Comments
 (0)