Skip to content

Commit 7131534

Browse files
authored
Merge pull request #2 from krryan/barbs-support
Add basic Barbs support, make Thorns skill unsupportable, remove some…
2 parents 982d2d7 + 27d04fb commit 7131534

6 files changed

Lines changed: 226 additions & 46 deletions

File tree

src/Data/Skills/other.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9305,6 +9305,7 @@ skills["VoidIllusionSpawnPlayer"] = {
93059305
hidden = true,
93069306
fromItem = true,
93079307
skillTypes = { [SkillType.Damage] = true },
9308+
cannotBeSupported = true,
93089309
qualityStats = {},
93099310
levels = {
93109311
[1] = { levelRequirement = 0 },

src/Data/Skills/sup_str.lua

Lines changed: 96 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ skills["SupportBarbsPlayer"] = {
542542
statDescriptionScope = "gem_stat_descriptions",
543543
statMap = {
544544
["deal_thorns_damage_on_hit_for_X_hits_after_thorns_trigger"] = {
545-
flag("ThornsDamageAppliesToHits"),
545+
-- handled by TriggeredBarbsPlayer as an additionalGrantedEffect hard-coded in Modules/Data.lua
546546
},
547547
},
548548
baseFlags = {
@@ -558,6 +558,35 @@ skills["SupportBarbsPlayer"] = {
558558
},
559559
}
560560
}
561+
skills["TriggeredBarbsPlayer"] = {
562+
name = "Barbs I",
563+
hidden = true,
564+
description = "Deal your thorns damage.",
565+
skillTypes = { [SkillType.Damage] = true, [SkillType.SkillGrantedBySupport] = true, [SkillType.AttackInPlace] = true },
566+
cannotBeSupported = true,
567+
qualityStats = {},
568+
levels = {
569+
[1] = { levelRequirement = 0 },
570+
},
571+
statSets = {
572+
[1] = {
573+
label = "Barbs I",
574+
incrementalEffectiveness = 0,
575+
statDescriptionScope = "skill_stat_descriptions",
576+
baseFlags = {
577+
thorns = true,
578+
},
579+
baseMods = {
580+
},
581+
constantStats = {},
582+
stats = {},
583+
levels = {
584+
[1] = {},
585+
},
586+
},
587+
},
588+
}
589+
561590
skills["SupportBarbsPlayerTwo"] = {
562591
name = "Barbs II",
563592
description = "Supports Melee Strike Skills. Supported Skills deal your Thorns Damage on Hit after you've Retaliated with Thorns Damage.",
@@ -578,7 +607,7 @@ skills["SupportBarbsPlayerTwo"] = {
578607
statDescriptionScope = "gem_stat_descriptions",
579608
statMap = {
580609
["deal_thorns_damage_on_hit_for_X_hits_after_thorns_trigger"] = {
581-
flag("ThornsDamageAppliesToHits"),
610+
-- handled by TriggeredBarbsPlayerTwo as an additionalGrantedEffect hard-coded in Modules/Data.lua
582611
},
583612
},
584613
baseFlags = {
@@ -594,6 +623,35 @@ skills["SupportBarbsPlayerTwo"] = {
594623
},
595624
}
596625
}
626+
skills["TriggeredBarbsPlayerTwo"] = {
627+
name = "Barbs II",
628+
hidden = true,
629+
description = "Deal your thorns damage.",
630+
skillTypes = { [SkillType.Damage] = true, [SkillType.SkillGrantedBySupport] = true, [SkillType.AttackInPlace] = true },
631+
cannotBeSupported = true,
632+
qualityStats = {},
633+
levels = {
634+
[1] = { levelRequirement = 0 },
635+
},
636+
statSets = {
637+
[1] = {
638+
label = "Barbs II",
639+
incrementalEffectiveness = 0,
640+
statDescriptionScope = "skill_stat_descriptions",
641+
baseFlags = {
642+
thorns = true,
643+
},
644+
baseMods = {
645+
},
646+
constantStats = {},
647+
stats = {},
648+
levels = {
649+
[1] = {},
650+
},
651+
},
652+
},
653+
}
654+
597655
skills["SupportBarbsPlayerThree"] = {
598656
name = "Barbs III",
599657
description = "Supports Melee Strike Skills. Supported Skills deal your Thorns Damage on Hit twice after you've Retaliated with Thorns Damage.",
@@ -614,8 +672,7 @@ skills["SupportBarbsPlayerThree"] = {
614672
statDescriptionScope = "gem_stat_descriptions",
615673
statMap = {
616674
["deal_thorns_damage_twice_on_hit_for_X_hits_after_thorns_trigger"] = {
617-
flag("ThornsDamageAppliesToHits"),
618-
flag("BarbsThornsTwiceOnHit"),
675+
-- handled by TriggeredBarbsPlayerThree as an additionalGrantedEffect hard-coded in Modules/Data.lua
619676
},
620677
},
621678
baseFlags = {
@@ -631,6 +688,36 @@ skills["SupportBarbsPlayerThree"] = {
631688
},
632689
}
633690
}
691+
skills["TriggeredBarbsPlayerThree"] = {
692+
name = "Barbs III",
693+
hidden = true,
694+
description = "Deal twice your thorns damage.",
695+
skillTypes = { [SkillType.Damage] = true, [SkillType.SkillGrantedBySupport] = true, [SkillType.AttackInPlace] = true },
696+
cannotBeSupported = true,
697+
qualityStats = {},
698+
levels = {
699+
[1] = { levelRequirement = 0 },
700+
},
701+
statSets = {
702+
[1] = {
703+
label = "Barbs III",
704+
incrementalEffectiveness = 0,
705+
statDescriptionScope = "skill_stat_descriptions",
706+
baseFlags = {
707+
thorns = true,
708+
},
709+
baseMods = {
710+
mod("DoubleDamageChance", "BASE", 100, 0, 0),
711+
},
712+
constantStats = {},
713+
stats = {},
714+
levels = {
715+
[1] = {},
716+
},
717+
},
718+
},
719+
}
720+
634721
skills["SupportBattershoutPlayer"] = {
635722
name = "Battershout",
636723
description = "Supports Warcry Skills. Supported Skills Consume Fully Broken Armour to trigger Physical Damage explosions on Enemies within their range but cannot themselves Break Armour. ",
@@ -5250,6 +5337,11 @@ skills["TriggeredQuillburstPlayer"] = {
52505337
label = "Quill Burst",
52515338
incrementalEffectiveness = 0.054999999701977,
52525339
statDescriptionScope = "triggered_spiked_gauntlets",
5340+
statMap = {
5341+
["display_skill_deals_thorns_damage"] = {
5342+
-- display only
5343+
},
5344+
},
52535345
baseFlags = {
52545346
thorns = true,
52555347
},

src/Export/Skills/other.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ skills["ThornsPlayer"] = {
779779
hidden = true,
780780
fromItem = true,
781781
skillTypes = { [SkillType.Damage] = true },
782+
cannotBeSupported = true,
782783
qualityStats = {},
783784
levels = {
784785
[1] = { levelRequirement = 0 },

src/Export/Skills/sup_str.txt

Lines changed: 112 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,32 +109,122 @@ statMap = {
109109
#set SupportBarbsPlayer
110110
statMap = {
111111
["deal_thorns_damage_on_hit_for_X_hits_after_thorns_trigger"] = {
112-
flag("ThornsDamageAppliesToHits"),
113-
},
114-
},
115-
#mods
116-
#skillEnd
112+
-- handled by TriggeredBarbsPlayer as an additionalGrantedEffect hard-coded in Modules/Data.lua
113+
},
114+
},
115+
#mods
116+
#skillEnd
117+
118+
skills["TriggeredBarbsPlayer"] = {
119+
name = "Barbs I",
120+
hidden = true,
121+
description = "Deal your thorns damage.",
122+
skillTypes = { [SkillType.Damage] = true, [SkillType.SkillGrantedBySupport] = true, [SkillType.AttackInPlace] = true },
123+
cannotBeSupported = true,
124+
qualityStats = {},
125+
levels = {
126+
[1] = { levelRequirement = 0 },
127+
},
128+
statSets = {
129+
[1] = {
130+
label = "Barbs I",
131+
incrementalEffectiveness = 0,
132+
statDescriptionScope = "skill_stat_descriptions",
133+
baseFlags = {
134+
thorns = true,
135+
triggeredOnHitBySupportedSkill = true,
136+
},
137+
baseMods = {
138+
},
139+
constantStats = {},
140+
stats = {},
141+
levels = {
142+
[1] = {},
143+
},
144+
},
145+
},
146+
}
117147

118148
#skill SupportBarbsPlayerTwo
119149
#set SupportBarbsPlayerTwo
120150
statMap = {
121151
["deal_thorns_damage_on_hit_for_X_hits_after_thorns_trigger"] = {
122-
flag("ThornsDamageAppliesToHits"),
123-
},
124-
},
125-
#mods
126-
#skillEnd
152+
-- handled by TriggeredBarbsPlayerTwo as an additionalGrantedEffect hard-coded in Modules/Data.lua
153+
},
154+
},
155+
#mods
156+
#skillEnd
157+
158+
skills["TriggeredBarbsPlayerTwo"] = {
159+
name = "Barbs II",
160+
hidden = true,
161+
description = "Deal your thorns damage.",
162+
skillTypes = { [SkillType.Damage] = true, [SkillType.SkillGrantedBySupport] = true, [SkillType.AttackInPlace] = true },
163+
cannotBeSupported = true,
164+
qualityStats = {},
165+
levels = {
166+
[1] = { levelRequirement = 0 },
167+
},
168+
statSets = {
169+
[1] = {
170+
label = "Barbs II",
171+
incrementalEffectiveness = 0,
172+
statDescriptionScope = "skill_stat_descriptions",
173+
baseFlags = {
174+
thorns = true,
175+
triggeredOnHitBySupportedSkill = true,
176+
},
177+
baseMods = {
178+
},
179+
constantStats = {},
180+
stats = {},
181+
levels = {
182+
[1] = {},
183+
},
184+
},
185+
},
186+
}
127187

128188
#skill SupportBarbsPlayerThree
129189
#set SupportBarbsPlayerThree
130190
statMap = {
131191
["deal_thorns_damage_twice_on_hit_for_X_hits_after_thorns_trigger"] = {
132-
flag("ThornsDamageAppliesToHits"),
133-
flag("BarbsThornsTwiceOnHit"),
134-
},
135-
},
136-
#mods
137-
#skillEnd
192+
-- handled by TriggeredBarbsPlayerThree as an additionalGrantedEffect hard-coded in Modules/Data.lua
193+
},
194+
},
195+
#mods
196+
#skillEnd
197+
198+
skills["TriggeredBarbsPlayerThree"] = {
199+
name = "Barbs III",
200+
hidden = true,
201+
description = "Deal twice your thorns damage.",
202+
skillTypes = { [SkillType.Damage] = true, [SkillType.SkillGrantedBySupport] = true, [SkillType.AttackInPlace] = true },
203+
cannotBeSupported = true,
204+
qualityStats = {},
205+
levels = {
206+
[1] = { levelRequirement = 0 },
207+
},
208+
statSets = {
209+
[1] = {
210+
label = "Barbs III",
211+
incrementalEffectiveness = 0,
212+
statDescriptionScope = "skill_stat_descriptions",
213+
baseFlags = {
214+
thorns = true,
215+
triggeredOnHitBySupportedSkill = true,
216+
},
217+
baseMods = {
218+
mod("DoubleDamageChance", "BASE", 100, 0, 0),
219+
},
220+
constantStats = {},
221+
stats = {},
222+
levels = {
223+
[1] = {},
224+
},
225+
},
226+
},
227+
}
138228

139229
#skill SupportBattershoutPlayer
140230
#set SupportBattershoutPlayer
@@ -1229,7 +1319,7 @@ statMap = {
12291319
#set SupportQuillburstPlayer
12301320
statMap = {
12311321
["trigger_spiked_gauntlets_for_X_hits_after_thorns_trigger"] = {
1232-
flag("EnableTriggeredQuillburst"),
1322+
-- display only
12331323
},
12341324
},
12351325
#mods
@@ -1238,6 +1328,11 @@ statMap = {
12381328
#skill TriggeredQuillburstPlayer
12391329
#set TriggeredQuillburstPlayer
12401330
#flags thorns
1331+
statMap = {
1332+
["display_skill_deals_thorns_damage"] = {
1333+
-- display only
1334+
},
1335+
},
12411336
#mods thorns area
12421337
#skillEnd
12431338

src/Modules/CalcOffence.lua

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ function calcs.offence(env, actor, activeSkill)
727727
end
728728

729729
-- Apply thorns-derived modifiers to hits
730-
if skillModList:Flag(nil, "thorns") or skillModList:Flag(nil, "ThornsModifiersApplyToHits") or skillModList:Flag(nil, "ThornsDamageAppliesToHits") then
730+
if skillModList:Flag(nil, "thorns") then
731731
-- % increased Thorns damage
732732
for _, value in ipairs(skillModList:Tabulate("INC", { flags = ModFlag.Thorns }, "Damage")) do
733733
local mod = value.mod
@@ -757,30 +757,6 @@ function calcs.offence(env, actor, activeSkill)
757757
end
758758
end
759759

760-
-- Apply full thorns damage payload to hits
761-
if skillModList:Flag(nil, "ThornsDamageAppliesToHits") then
762-
local multiplier = skillModList:Flag(nil, "BarbsThornsTwiceOnHit") and 2 or 1
763-
764-
local function remapThornsBase(fromStat, toStat)
765-
for _, value in ipairs(skillModList:Tabulate("BASE", {}, fromStat)) do
766-
local mod = value.mod
767-
skillModList:NewMod(toStat, "BASE", mod.value * multiplier, mod.source, ModFlag.Hit, mod.keywordFlags)
768-
end
769-
end
770-
771-
-- Base thorns damage to hits
772-
remapThornsBase("PhysicalThornsMin", "PhysicalMin")
773-
remapThornsBase("PhysicalThornsMax", "PhysicalMax")
774-
remapThornsBase("FireThornsMin", "FireMin")
775-
remapThornsBase("FireThornsMax", "FireMax")
776-
remapThornsBase("ColdThornsMin", "ColdMin")
777-
remapThornsBase("ColdThornsMax", "ColdMax")
778-
remapThornsBase("LightningThornsMin", "LightningMin")
779-
remapThornsBase("LightningThornsMax", "LightningMax")
780-
remapThornsBase("ChaosThornsMin", "ChaosMin")
781-
remapThornsBase("ChaosThornsMax", "ChaosMax")
782-
end
783-
784760
if skillModList:Flag(nil, "CastSpeedAppliesToAttacks") then
785761
-- Get all increases for this; assumption is that multiple sources would not stack, so find the max
786762
local multiplier = (skillModList:Max(skillCfg, "ImprovedCastSpeedAppliesToAttacks") or 100) / 100

src/Modules/Data.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,21 @@ local function setupGem(gem, gemId)
917917
table.insert(gem.additionalGrantedEffects, data.skills[gem["additionalGrantedEffectId"..i]])
918918
i = i + 1
919919
end
920+
--handle Barbs
921+
if gem.name:sub(1, 7) == "Barbs I" then -- also covers Barbs II and Barbs III
922+
local additionalGrantedEffectId = "TriggeredBarbsPlayer"
923+
if gem.name == "Barbs II" then
924+
additionalGrantedEffectId = additionalGrantedEffectId .. "Two"
925+
else
926+
if gem.name == "Barbs III" then
927+
additionalGrantedEffectId = additionalGrantedEffectId .. "Three"
928+
end
929+
end
930+
gem["additionalGrantedEffectId"..i] = additionalGrantedEffectId
931+
table.insert(gem.grantedEffectList, data.skills[gem["additionalGrantedEffectId"..i]])
932+
table.insert(gem.additionalGrantedEffects, data.skills[gem["additionalGrantedEffectId"..i]])
933+
i = i + 1
934+
end
920935
if gem.grantedEffectDisplayOrder then
921936
local tempTable = {}
922937
local moved = false

0 commit comments

Comments
 (0)