From 73659366625b47ac49ad2a2223f28c6043f6a83d Mon Sep 17 00:00:00 2001 From: BlackSun Date: Sun, 12 Jan 2020 02:26:02 +0100 Subject: [PATCH] Changed bleed stacks (Crimson Dance) to be like impale, with the ability to set how much bleed the enemy has in the ConfigOptions. --- Modules/CalcOffence-3_0.lua | 7 ++++++- Modules/CalcSections-3_0.lua | 2 ++ Modules/CalcSetup.lua | 2 +- Modules/ConfigOptions.lua | 3 +++ Modules/ModParser-3_0.lua | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Modules/CalcOffence-3_0.lua b/Modules/CalcOffence-3_0.lua index 132e34fe..24ca7c60 100644 --- a/Modules/CalcOffence-3_0.lua +++ b/Modules/CalcOffence-3_0.lua @@ -1648,7 +1648,10 @@ function calcs.offence(env, actor, activeSkill) local mult = skillModList:Sum("BASE", dotCfg, "PhysicalDotMultiplier", "BleedMultiplier") local effectMod = calcLib.mod(skillModList, dotCfg, "AilmentEffect") local rateMod = calcLib.mod(skillModList, cfg, "BleedFaster") - output.BleedDPS = (baseVal * effectMod * rateMod * effMult) * skillModList:Sum("BASE", cfg, "BleedCount") + local maxStacks = skillModList:Override(cfg, "BleedStacksMax") or skillModList:Sum("BASE", cfg, "BleedStacksMax") + local configStacks = enemyDB:Sum("BASE", nil, "Multiplier:BleedStacks") + local bleedStacks = configStacks > 0 and m_min(configStacks, maxStacks) or maxStacks + output.BleedDPS = (baseVal * effectMod * rateMod * effMult) * bleedStacks local durationBase if skillData.bleedDurationIsSkillDuration then durationBase = skillData.duration @@ -1657,6 +1660,8 @@ function calcs.offence(env, actor, activeSkill) end local durationMod = calcLib.mod(skillModList, dotCfg, "EnemyBleedDuration", "SkillAndDamagingAilmentDuration", skillData.bleedIsSkillEffect and "Duration" or nil) * calcLib.mod(enemyDB, nil, "SelfBleedDuration") globalOutput.BleedDuration = durationBase * durationMod / rateMod * debuffDurationMult + globalOutput.BleedStacksMax = maxStacks + globalOutput.BleedStacks = bleedStacks if breakdown then t_insert(breakdown.BleedDPS, s_format("x %.2f ^8(bleed deals %d%% per second)", basePercent/100, basePercent)) if effectMod ~= 1 then diff --git a/Modules/CalcSections-3_0.lua b/Modules/CalcSections-3_0.lua index f4185f61..2207b229 100644 --- a/Modules/CalcSections-3_0.lua +++ b/Modules/CalcSections-3_0.lua @@ -516,6 +516,8 @@ return { { 1, "Bleed", 1, "Bleed", colorCodes.OFFENCE, { extra = "{0:output:BleedChance}% {1:output:BleedDPS} {2:output:BleedDuration}s", flag = "bleed", + { label = "Max Bleed Stacks", { format = "{0:output:BleedStacksMax}", { modName = "BleedStacksMax" } }, }, + { label = "Stacks on Enemy", { format = "{0:output:BleedStacks}" }}, { label = "Chance to Bleed", { format = "{0:output:BleedChance}%", { breakdown = "MainHand.BleedChance" }, { breakdown = "OffHand.BleedChance" }, diff --git a/Modules/CalcSetup.lua b/Modules/CalcSetup.lua index 1519264f..d19c6fc7 100644 --- a/Modules/CalcSetup.lua +++ b/Modules/CalcSetup.lua @@ -29,6 +29,7 @@ function calcs.initModDB(env, modDB) modDB:NewMod("MaxLifeLeechRate", "BASE", 20, "Base") modDB:NewMod("MaxManaLeechRate", "BASE", 20, "Base") modDB:NewMod("ImpaleStacksMax", "BASE", 5, "Base") + modDB:NewMod("BleedStacksMax", "BASE", 1, "Base") if env.build.targetVersion ~= "2_6" then modDB:NewMod("MaxEnergyShieldLeechRate", "BASE", 10, "Base") modDB:NewMod("MaxLifeLeechInstance", "BASE", 10, "Base") @@ -239,7 +240,6 @@ function calcs.initEnv(build, mode, override) modDB:NewMod("Damage", "MORE", 200, "Base", 0, KeywordFlag.Bleed, { type = "ActorCondition", actor = "enemy", var = "Moving" }, { type = "Condition", var = "NoExtraBleedDamageToMovingEnemy", neg = true }) end modDB:NewMod("Condition:BloodStance", "FLAG", true, "Base", { type = "Condition", var = "SandStance", neg = true }) - modDB:NewMod("BleedCount", "BASE", 1, "Base") -- Add bandit mods if build.targetVersion == "2_6" then diff --git a/Modules/ConfigOptions.lua b/Modules/ConfigOptions.lua index dc4f5e95..33e8c04a 100644 --- a/Modules/ConfigOptions.lua +++ b/Modules/ConfigOptions.lua @@ -705,6 +705,9 @@ return { { var = "multiplierImpalesOnEnemy", type = "count", label = "# of Impales on Enemy (if not maximum):", ifFlag = "impale", tooltip = "Set number of Impales if using Champions Master of Metal node", apply = function(val, modList, enemyModList) enemyModList:NewMod("Multiplier:ImpaleStacks", "BASE", m_min(val, 9), "Config", { type = "Condition", var = "Combat" }) end }, + { var = "multiplierBleedsOnEnemy", type = "count", label = "# of Bleeds on Enemy (if not maximum):", ifFlag = "bleed", tooltip = "Set number of Bleeds if using Crimson Dance node", apply = function(val, modList, enemyModList) + enemyModList:NewMod("Multiplier:BleedStacks", "BASE", val, "Config", { type = "Condition", var = "Combat" }) + end }, { var = "conditionKilledUniqueEnemy", type = "check", ifVer = "3_0", label = "Killed Rare or Unique Enemy Recently?", ifNode = 3184, apply = function(val, modList, enemyModList) modList:NewMod("Condition:KilledUniqueEnemy", "FLAG", true, "Config", { type = "Condition", var = "Combat" }) end }, diff --git a/Modules/ModParser-3_0.lua b/Modules/ModParser-3_0.lua index ea502181..837f45b9 100644 --- a/Modules/ModParser-3_0.lua +++ b/Modules/ModParser-3_0.lua @@ -1087,7 +1087,7 @@ local specialModList = { ["energy shield protects mana instead of life"] = { flag("EnergyShieldProtectsMana") }, ["modifiers to critical strike multiplier also apply to damage over time multiplier for ailments from critical strikes at (%d+)%% of their value"] = function(num) return { mod("CritMultiplierAppliesToDegen", "BASE", num) } end, ["your bleeding does not deal extra damage while the enemy is moving"] = { flag("Condition:NoExtraBleedDamageToMovingEnemy") }, - ["you can inflict bleeding on an enemy up to (%d+) times?"] = function(num) return { mod("BleedCount", "BASE", num) } end, + ["you can inflict bleeding on an enemy up to (%d+) times?"] = function(num) return { mod("BleedStacksMax", "OVERRIDE", num) } end, -- Ascendant ["grants (%d+) passive skill points?"] = function(num) return { mod("ExtraPoints", "BASE", num) } end, ["can allocate passives from the %a+'s starting point"] = { },