Skip to content

Commit 5887edb

Browse files
LocalIdentityLocalIdentity
andauthored
Add support for Ambrosia and Concoct Support (#1137)
* Add support for Ambrosia and Concoct Support Now automatically grabs the max flask charges and uses that for the mod without the need to manually input a value Calc Setup has the local variable before the slots loop so when we add support for Waistgate, it properly adds together the flask charges from both flasks * Simplify handling of multipliers when using 2 flasks + correct rounding --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 29dd0d5 commit 5887edb

File tree

8 files changed

+45
-13
lines changed

8 files changed

+45
-13
lines changed

src/Classes/ModStore.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,9 @@ function ModStoreClass:EvalMod(mod, cfg)
453453
end
454454
local percent = tag.percent or self:GetMultiplier(tag.percentVar, cfg)
455455
local mult = base * (percent and percent / 100 or 1)
456+
if tag.floor then
457+
mult = m_floor(mult)
458+
end
456459
local limitTotal
457460
if tag.limit or tag.limitVar then
458461
local limit = tag.limit or self:GetMultiplier(tag.limitVar, cfg)

src/Data/Skills/sup_int.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,20 @@ skills["SupportAmbrosiaPlayer"] = {
119119
label = "Ambrosia",
120120
incrementalEffectiveness = 0.054999999701977,
121121
statDescriptionScope = "gem_stat_descriptions",
122+
statMap = {
123+
["consume_%_of_maximum_mana_flask_charges_on_skill_use"] = {
124+
mod("Multiplier:ManaFlaskMaxChargesPercent", "BASE", nil),
125+
},
126+
["gain_%_damage_as_lighting_per_mana_flask_charge_consumed"] = {
127+
mod("DamageGainAsLightning", "BASE", nil, 0, 0, { type = "Multiplier", var = "ManaFlaskChargeConsumed"}),
128+
},
129+
},
122130
baseFlags = {
123131
},
132+
baseMods = {
133+
mod("Multiplier:ManaFlaskChargeConsumed", "BASE", 1, 0, 0, { type = "PercentStat", stat = "ManaFlask1MaxCharges", percentVar = "ManaFlaskMaxChargesPercent", floor = true }),
134+
mod("Multiplier:ManaFlaskChargeConsumed", "BASE", 1, 0, 0, { type = "PercentStat", stat = "ManaFlask2MaxCharges", percentVar = "ManaFlaskMaxChargesPercent", floor = true }),
135+
},
124136
constantStats = {
125137
{ "consume_%_of_maximum_mana_flask_charges_on_skill_use", 20 },
126138
{ "gain_%_damage_as_lighting_per_mana_flask_charge_consumed", 3 },

src/Data/Skills/sup_str.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,15 +607,19 @@ skills["SupportConcoctPlayer"] = {
607607
incrementalEffectiveness = 0.054999999701977,
608608
statDescriptionScope = "gem_stat_descriptions",
609609
statMap = {
610-
["support_concoct_bleed_effect_+%_final_per_life_flask_charge_consumed"] = {
611-
mod("AilmentMagnitude", "MORE", nil, 0, KeywordFlag.Bleed, { type = "Multiplier", var = "LifeFlaskChargesUsed"}),
612-
},
613610
["consume_%_of_maximum_life_flask_charges_on_skill_use"] = {
614-
-- Display only
611+
mod("Multiplier:LifeFlaskMaxChargesPercent", "BASE", nil),
612+
},
613+
["support_concoct_bleed_effect_+%_final_per_life_flask_charge_consumed"] = {
614+
mod("AilmentMagnitude", "MORE", nil, 0, KeywordFlag.Bleed, { type = "Multiplier", var = "LifeFlaskChargeConsumed"}),
615615
},
616616
},
617617
baseFlags = {
618618
},
619+
baseMods = {
620+
mod("Multiplier:LifeFlaskChargeConsumed", "BASE", 1, 0, 0, { type = "PercentStat", stat = "LifeFlask1MaxCharges", percentVar = "LifeFlaskMaxChargesPercent", floor = true }),
621+
mod("Multiplier:LifeFlaskChargeConsumed", "BASE", 1, 0, 0, { type = "PercentStat", stat = "LifeFlask2MaxCharges", percentVar = "LifeFlaskMaxChargesPercent", floor = true }),
622+
},
619623
constantStats = {
620624
{ "consume_%_of_maximum_life_flask_charges_on_skill_use", 20 },
621625
{ "support_concoct_bleed_effect_+%_final_per_life_flask_charge_consumed", 3 },

src/Export/Skills/sup_int.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ statMap = {
2727

2828
#skill SupportAmbrosiaPlayer
2929
#set SupportAmbrosiaPlayer
30+
statMap = {
31+
["consume_%_of_maximum_mana_flask_charges_on_skill_use"] = {
32+
mod("Multiplier:ManaFlaskMaxChargesPercent", "BASE", nil),
33+
},
34+
["gain_%_damage_as_lighting_per_mana_flask_charge_consumed"] = {
35+
mod("DamageGainAsLightning", "BASE", nil, 0, 0, { type = "Multiplier", var = "ManaFlaskChargeConsumed"}),
36+
},
37+
},
38+
#baseMod mod("Multiplier:ManaFlaskChargeConsumed", "BASE", 1, 0, 0, { type = "PercentStat", stat = "ManaFlask1MaxCharges", percentVar = "ManaFlaskMaxChargesPercent", floor = true })
39+
#baseMod mod("Multiplier:ManaFlaskChargeConsumed", "BASE", 1, 0, 0, { type = "PercentStat", stat = "ManaFlask2MaxCharges", percentVar = "ManaFlaskMaxChargesPercent", floor = true })
3040
#mods
3141
#skillEnd
3242

src/Export/Skills/sup_str.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,15 @@ statMap = {
131131
#skill SupportConcoctPlayer
132132
#set SupportConcoctPlayer
133133
statMap = {
134-
["support_concoct_bleed_effect_+%_final_per_life_flask_charge_consumed"] = {
135-
mod("AilmentMagnitude", "MORE", nil, 0, KeywordFlag.Bleed, { type = "Multiplier", var = "LifeFlaskChargesUsed"}),
136-
},
137134
["consume_%_of_maximum_life_flask_charges_on_skill_use"] = {
138-
-- Display only
135+
mod("Multiplier:LifeFlaskMaxChargesPercent", "BASE", nil),
136+
},
137+
["support_concoct_bleed_effect_+%_final_per_life_flask_charge_consumed"] = {
138+
mod("AilmentMagnitude", "MORE", nil, 0, KeywordFlag.Bleed, { type = "Multiplier", var = "LifeFlaskChargeConsumed"}),
139139
},
140140
},
141+
#baseMod mod("Multiplier:LifeFlaskChargeConsumed", "BASE", 1, 0, 0, { type = "PercentStat", stat = "LifeFlask1MaxCharges", percentVar = "LifeFlaskMaxChargesPercent", floor = true })
142+
#baseMod mod("Multiplier:LifeFlaskChargeConsumed", "BASE", 1, 0, 0, { type = "PercentStat", stat = "LifeFlask2MaxCharges", percentVar = "LifeFlaskMaxChargesPercent", floor = true })
141143
#mods
142144
#skillEnd
143145

src/Modules/CalcOffence.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,10 @@ function calcs.offence(env, actor, activeSkill)
571571

572572
-- set flask scaling
573573
output.LifeFlaskRecovery = env.itemModDB.multipliers["LifeFlaskRecovery"]
574+
output.LifeFlask1MaxCharges = env.itemModDB.multipliers["LifeFlask1MaxCharges"]
575+
output.LifeFlask2MaxCharges = env.itemModDB.multipliers["LifeFlask2MaxCharges"]
576+
output.ManaFlask1MaxCharges = env.itemModDB.multipliers["ManaFlask1MaxCharges"]
577+
output.ManaFlask2MaxCharges = env.itemModDB.multipliers["ManaFlask2MaxCharges"]
574578

575579
if modDB.conditions["AffectedByEnergyBlade"] then
576580
local dmgMod = calcLib.mod(skillModList, skillCfg, "EnergyBladeDamage")

src/Modules/CalcSetup.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ function calcs.initEnv(build, mode, override, specEnv)
906906
items[slot] = nil
907907
end
908908
end
909-
909+
910910
for _, slot in pairs(build.itemsTab.orderedSlots) do
911911
local slotName = slot.slotName
912912
local item = items[slotName]
@@ -920,6 +920,7 @@ function calcs.initEnv(build, mode, override, specEnv)
920920
env.itemModDB.multipliers["LifeFlaskRecovery"] = item.flaskData.lifeTotal
921921
end
922922
end
923+
env.itemModDB.multipliers[item.base.subType..slotName:gsub(" ", "").."MaxCharges"] = item.flaskData.chargesMax
923924
item = nil
924925
elseif item and item.type == "Charm" then
925926
if slot.active then

src/Modules/ConfigOptions.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,6 @@ local configSettings = {
288288
{ var = "ColdSnapBypassCD", type = "check", label = "Bypass CD?", ifSkill = "Cold Snap", includeTransfigured = true, apply = function(val, modList, enemyModList)
289289
modList:NewMod("CooldownRecovery", "OVERRIDE", 0, "Config", { type = "SkillName", skillName = "Cold Snap", includeTransfigured = true })
290290
end },
291-
{ label = "Concoct:", ifSkill = "Concoct" },
292-
{ var = "concoctLifeFlaskChargesUsed", type = "count", label = "# of Life Flask charges used:", ifSkill = "Concoct", apply = function(val, modList, enemyModList)
293-
modList:NewMod("Multiplier:LifeFlaskChargesUsed", "BASE", val, "Config")
294-
end },
295291
{ label = "Consecrated Path of Endurance:", ifSkill = "Consecrated Path of Endurance" },
296292
{ var = "ConcPathBypassCD", type = "check", label = "Bypass CD?", ifSkill = "Consecrated Path of Endurance", defaultState = true, apply = function(val, modList, enemyModList)
297293
modList:NewMod("CooldownRecovery", "OVERRIDE", 0, "Config", { type = "SkillName", skillName = "Consecrated Path of Endurance" })

0 commit comments

Comments
 (0)