Server Tick used on Rate Cap; Started adding The Saviour support; ICDR recommendation

This commit is contained in:
Nostrademous
2021-03-08 00:19:56 -05:00
parent e185864708
commit 1c2f531613
5 changed files with 67 additions and 6 deletions

View File

@@ -167,6 +167,9 @@ return {
["unique_cospris_malice_cold_spells_triggered"] = {
skill("triggeredByCospris", true, { type = "SkillType", skillType = SkillType.Triggerable }, { type = "SkillType", skillType = SkillType.ColdSkill }),
},
["display_mirage_warriors_no_spirit_strikes"] = {
skill("triggeredBySaviour", true, { type = "SkillType", skillType = SkillType.Attack } ),
},
["cast_spell_on_linked_attack_crit"] = {
skill("triggeredByCoC", true, { type = "SkillType", skillType = SkillType.Triggerable }, { type = "SkillType", skillType = SkillType.Spell }),
},

View File

@@ -1796,6 +1796,14 @@ skills["UniqueMirageWarriors"] = {
statDescriptionScope = "skill_stat_descriptions",
castTime = 0,
fromItem = true,
statMap = {
["skill_used_by_mirage_warrior_damage_+%_final"] = {
mod("SaviourMirageWarriorLessDamage", "BASE", nil),
},
["maximum_number_of_mirage_warriors"] = {
mod("SaviourMirageWarriorMaxCount", "BASE", nil),
},
},
baseFlags = {
spell = true,
duration = true,

View File

@@ -461,6 +461,14 @@ local skills, mod, flag, skill = ...
#skill UniqueMirageWarriors
#flags spell duration minion
fromItem = true,
statMap = {
["skill_used_by_mirage_warrior_damage_+%_final"] = {
mod("SaviourMirageWarriorLessDamage", "BASE", nil),
},
["maximum_number_of_mirage_warriors"] = {
mod("SaviourMirageWarriorMaxCount", "BASE", nil),
},
},
#mods
#skill TriggeredSummonSpider

View File

@@ -3679,6 +3679,30 @@ function calcs.offence(env, actor, activeSkill)
end
end
-- The Saviour
if actor.mainSkill.activeEffect.grantedEffect.name == "Reflection" then
local usedSkillOutput = nil
local usedSkill = nil
for _, triggerSkill in ipairs(actor.activeSkillList) do
if triggerSkill ~= activeSkill and triggerSkill.skillTypes[SkillType.Attack] and band(triggerSkill.skillCfg.flags, bor(ModFlag.Sword, ModFlag.Weapon1H)) == bor(ModFlag.Sword, ModFlag.Weapon1H) then
-- Grab a fully-processed by calcs.perform() version of the skill that Mirage Warrior(s) will use
local uuid = cacheSkillUUID(triggerSkill)
if not GlobalCache.cachedData[uuid] then
calcs.buildActiveSkill(env.build, "CACHE", triggerSkill)
env.dontCache = true
end
if GlobalCache.cachedData[uuid] then
usedSkill = GlobalCache.cachedData[uuid].ActiveSkill
usedSkillOutput = GlobalCache.cachedData[uuid].Env.player.output
end
break
end
end
if usedSkill then
end
end
-- Calculate combined DPS estimate, including DoTs
local baseDPS = output[(skillData.showAverage and "AverageDamage") or "TotalDPS"]
output.CombinedDPS = baseDPS

View File

@@ -43,18 +43,24 @@ local function getTriggerActionTriggerRate(env, breakdown)
local baseActionCooldown = env.player.mainSkill.skillData.cooldown
local icdr = calcLib.mod(env.player.mainSkill.skillModList, env.player.mainSkill.skillCfg, "CooldownRecovery")
local modActionCooldown = baseActionCooldown / (icdr)
local rateCapAdjusted = m_ceil(modActionCooldown * data.misc.ServerTickRate) / data.misc.ServerTickRate
local extraICDRNeeded = (modActionCooldown - (rateCapAdjusted - data.misc.ServerTickTime)) * icdr * 1000
if breakdown then
breakdown.ActionTriggerRate = {
s_format("%.2f ^8(base cooldown of triggered skill)", baseActionCooldown),
s_format("/ %.2f ^8(increased/reduced cooldown recovery)", icdr),
s_format("= %.3f ^8(final cooldown of trigger)", modActionCooldown),
s_format(""),
s_format("%.3f ^8(adjusted for server tick rate)", rateCapAdjusted),
s_format("^8(extra ICDR of %.3f%% would reach next breakpoint)", extraICDRNeeded),
s_format(""),
s_format("Trigger rate:"),
s_format("1 / %.3f", modActionCooldown),
s_format("= %.2f ^8per second", 1 / modActionCooldown),
s_format("1 / %.3f", rateCapAdjusted),
s_format("= %.2f ^8per second", 1 / rateCapAdjusted),
}
end
return 1 / modActionCooldown
--return 1 / modActionCooldown
return 1 / rateCapAdjusted
end
-- Calculate Trigger Rate impact due to other skills in rotation
@@ -235,13 +241,14 @@ local function calcActualTriggerRate(env, source, sourceAPS, spellCount, output,
trigRate = output.SourceTriggerRate
end
--[[
-- Adjust for server tick rate
local trigCD = 1 / trigRate
--[[
local adjTrigCD = m_ceil(trigCD * data.misc.ServerTickRate) / data.misc.ServerTickRate
trigRate = 1 / adjTrigCD
if breakdown then
breakdown.ServerTriggerRate = {
s_format("1 / %.2f ^8(smaller of 'cap' and 'skill' trigger rates)", trigRate),
s_format("1 / %.2f ^8(smaller of 'cap' and 'skill' trigger rates)", trigRate * adjTrigCD),
s_format("= %.3f ^8(seconds between each action)", trigCD),
s_format("= %.3f ^8(rounded up to nearest server tick)", adjTrigCD),
s_format(""),
@@ -250,8 +257,13 @@ local function calcActualTriggerRate(env, source, sourceAPS, spellCount, output,
s_format("= %.2f ^8per second", 1 / adjTrigCD),
}
end
trigRate = 1 / adjTrigCD
--]]
if breakdown then
breakdown.ServerTriggerRate = {
s_format("%.2f ^8(smaller of 'cap' and 'skill' trigger rates)", trigRate),
--s_format("= %.3f ^8(seconds between each action)", trigCD),
}
end
output.ServerTriggerRate = trigRate
return trigRate
end
@@ -2072,6 +2084,12 @@ function calcs.perform(env)
env.player.mainSkill.infoTrigger = "General's Cry"
end
-- The Saviour
if env.player.mainSkill.activeEffect.grantedEffect.name == "Reflection" or env.player.mainSkill.skillData.triggeredBySaviour then
env.player.mainSkill.infoMessage = "Triggered by a Crit from The Saviour"
env.player.mainSkill.infoTrigger = "Saviour"
end
-- Fix the configured impale stacks on the enemy
-- If the config is missing (blank), then use the maximum number of stacks
-- If the config is larger than the maximum number of stacks, replace it with the correct maximum