Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Doom Blast rate calcs #6568

Merged
merged 14 commits into from
Sep 6, 2023
9 changes: 0 additions & 9 deletions src/Data/Skills/sup_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3076,15 +3076,6 @@ skills["ViciousHexExplosion"] = {
skillTypes = { [SkillType.Spell] = true, [SkillType.Area] = true, [SkillType.Damage] = true, [SkillType.Triggerable] = true, [SkillType.Triggered] = true, [SkillType.AreaSpell] = true, [SkillType.Chaos] = true, [SkillType.Cooldown] = true, [SkillType.InbuiltTrigger] = true, [SkillType.SkillGrantedBySupport] = true, },
statDescriptionScope = "skill_stat_descriptions",
castTime = 1,
parts = {
{
name = "No Overlaps",
},
{
name = "Overlaps (# hits per cast)",
stages = true,
}
},
baseFlags = {
spell = true,
area = true,
Expand Down
9 changes: 0 additions & 9 deletions src/Export/Skills/sup_int.txt
Original file line number Diff line number Diff line change
Expand Up @@ -417,15 +417,6 @@ local skills, mod, flag, skill = ...

#skill ViciousHexExplosion
#flags spell area
parts = {
{
name = "No Overlaps",
},
{
name = "Overlaps (# hits per cast)",
stages = true,
}
},
#baseMod skill("radius", 20)
#mods

Expand Down
3 changes: 3 additions & 0 deletions src/Modules/Build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,9 @@ function buildMode:AddDisplayStatList(statList, actor)
end
InsertIfNew(self.controls.warnings.lines, line)
end
if actor.output.VixensTooMuchCastSpeedWarn then
InsertIfNew(self.controls.warnings.lines, "You may have too much cast speed or too little cooldown reduction to effectively use Vixen's Curse replacement")
end
end

function buildMode:InsertItemWarnings()
Expand Down
23 changes: 17 additions & 6 deletions src/Modules/CalcTriggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,11 @@ local function defaultTriggerHandler(env, config)
output.TriggerRateCap = 1 / rateCapAdjusted
end


if source and source.skillData.triggeredByCurseOnCurse and trigRate > output.TriggerRateCap then
trigRate = trigRate - m_ceil(trigRate - output.TriggerRateCap)
if config.triggerName == "Doom Blast" and env.build.configTab.input["doomBlastSource"] == "expiration" then
trigRate = 1 / GlobalCache.cachedData["CACHE"][uuid].Env.player.output.Duration
if breakdown and breakdown.EffectiveSourceRate then
breakdown.EffectiveSourceRate[1] = s_format("1 / %.2f ^8(source curse duration)", GlobalCache.cachedData["CACHE"][uuid].Env.player.output.Duration)
end
end

if breakdown then
Expand Down Expand Up @@ -1095,7 +1097,18 @@ local function defaultTriggerHandler(env, config)

--If spell count is missing the skill likely comes from a unique and /or triggers it self
if output.EffectiveSourceRate ~= 0 then
if actor.mainSkill.skillFlags.globalTrigger and not config.triggeredSkillCond then
if config.triggerName == "Doom Blast" and env.build.configTab.input["doomBlastSource"] == "vixen" then
local overlaps = m_max(env.player.modDB:Sum("BASE", nil, "Multiplier:CurseOverlaps") or 1, 1)
output.SkillTriggerRate = m_min(output.EffectiveSourceRate * overlaps, output.TriggerRateCap)
local vixens = env.data.skills["SupportUniqueCastCurseOnCurse"]
local vixensCD = vixens and vixens.levels[1].cooldown
output.VixensTooMuchCastSpeedWarn = (vixensCD / icdr) > (1 / trigRate)
if breakdown then
breakdown.SkillTriggerRate = {
s_format("min(%.2f, %.2f * %d)", output.TriggerRateCap, output.EffectiveSourceRate, overlaps)
}
end
elseif actor.mainSkill.skillFlags.globalTrigger and not config.triggeredSkillCond then
output.SkillTriggerRate = output.EffectiveSourceRate
else
output.SkillTriggerRate, simBreakdown = calcMultiSpellRotationImpact(env, config.triggeredSkillCond and triggeredSkills or {packageSkillDataForSimulation(actor.mainSkill, env)}, output.EffectiveSourceRate, (not actor.mainSkill.skillData.triggeredByBrand and ( triggerCD or triggeredCD ) or 0) / icdr, actor)
Expand Down Expand Up @@ -1513,9 +1526,7 @@ local configTable = {
["doom blast"] = function(env)
env.player.mainSkill.skillData.ignoresTickRate = true
return {useCastRate = true,
stagesAreOverlaps = 2,
customTriggerName = "Doom Blast triggering Hex: ",
allowTriggered = true,
triggerSkillCond = function(env, skill) return skill.skillTypes[SkillType.Hex] and slotMatch(env, skill) end}
end,
["cast while channelling"] = function()
Expand Down
12 changes: 9 additions & 3 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,15 @@ return {
{ var = "divineIreUniqueEnemy", type = "count", label = "Unique Enemies in AoE:", tooltip = "# of Unique Enemies in Divine Ire's Channel radius", ifSkill = "Divine Ire", apply = function(val, modList, enemyModList)
modList:NewMod("Multiplier:DivineIreUniqueEnemyCount", "BASE", val, "Config")
end },
{ label = "Doom Blast:", ifSkill = "Doom Blast" },
{ var = "doomBlastSource", type = "list", label = "Doom Blast Trigger Source:", ifSkill = "Doom Blast", list = {{val="expiration",label="Curse Expiration"},{val="replacement",label="Curse Replacement"},{val="vixen",label="Vixen's Curse"}}, defaultIndex = 3, apply = function(val, modList, enemyModList)
if val == "vixen" then
modList:NewMod("UsesCurseOverlaps", "FLAG", true, "Config")
end
end },
{ var = "curseOverlaps", type = "count", label = "Curse overlaps:", ifFlag = "UsesCurseOverlaps", apply = function(val, modList, enemyModList)
modList:NewMod("Multiplier:CurseOverlaps", "BASE", val, "Config", { type = "Condition", var = "Effective" })
end },
{ label = "Predator:", ifSkill = "Predator" },
{ var = "deathmarkDeathmarkActive", type = "check", label = "Is the enemy marked with Signal Prey?", ifSkill = "Predator", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:EnemyHasDeathmark", "FLAG", true, "Config")
Expand Down Expand Up @@ -1363,9 +1372,6 @@ Huge sets the radius to 11.
{ var = "conditionHaveManaStorm", type = "check", label = "Do you have Manastorm's ^xADAA47Lightning ^7Buff?", ifFlag = "Condition:HaveManaStorm", tooltip = "This option enables Manastorm's ^xADAA47Lightning ^7Damage Buff.\n(When you cast a Spell, Sacrifice all ^x7070FFMana ^7to gain Added Maximum ^xADAA47Lightning ^7Damage\nequal to 25% of Sacrificed ^x7070FFMana ^7for 4 seconds)", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:SacrificeManaForLightning", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "conditionHaveVixensEntrapment", type = "check", defaultState = true, label = "Use Vixen's Entrapment cooldown?", ifFlag = "Condition:HaveVixensEntrapment", tooltip = "Causes Impending Doom calculations to take the cooldown of Vixen's Entrapment into account,\nlowering DPS if cast rate is higher than the gloves' trigger cooldown.", apply = function(val, modList, enemyModList)
modList:NewMod("VixenTriggerCap", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "buffFanaticism", type = "check", label = "Do you have Fanaticism?", ifFlag = "Condition:CanGainFanaticism", tooltip = "This will enable the Fanaticism buff itself. (Grants 75% more cast speed, reduced skill cost, and increased area of effect)", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:Fanaticism", "FLAG", true, "Config", { type = "Condition", var = "Combat" }, { type = "Condition", var = "CanGainFanaticism" })
end },
Expand Down