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

Add config options to override the number of Trap/Mines per throw #7879

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ function calcs.offence(env, actor, activeSkill)
if skillData.trapCooldown or skillData.cooldown then
trapThrowCount = 1
end
output.TrapThrowCount = trapThrowCount
output.TrapThrowCount = env.modDB:Override(nil, "TrapThrowCount") or trapThrowCount
output.TrapThrowingSpeed = m_min(output.TrapThrowingSpeed, data.misc.ServerTickRate)
output.TrapThrowingTime = 1 / output.TrapThrowingSpeed
skillData.timeOverride = output.TrapThrowingTime / output.TrapThrowCount
Expand Down Expand Up @@ -1219,10 +1219,10 @@ function calcs.offence(env, actor, activeSkill)
if skillData.trapCooldown or skillData.cooldown then
mineThrowCount = 1
end
output.MineThrowCount = mineThrowCount
if mineThrowCount >= 1 then
output.MineThrowCount = env.modDB:Override(nil, "MineThrowCount") or mineThrowCount
if output.MineThrowCount >= 1 then
-- Throwing Mines takes 10% more time for each *additional* Mine thrown
output.MineLayingSpeed = output.MineLayingSpeed / (1 + (mineThrowCount - 1) * 0.1)
output.MineLayingSpeed = output.MineLayingSpeed / (1 + (output.MineThrowCount - 1) * 0.1)
end

output.MineLayingSpeed = m_min(output.MineLayingSpeed, data.misc.ServerTickRate)
Expand Down
6 changes: 6 additions & 0 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,9 @@ Huge sets the radius to 11.
{ var = "multiplierMineDetonatedRecently", type = "count", label = "# of Mines Detonated Recently:", ifMult = "MineDetonatedRecently", implyCond = "DetonatedMinesRecently", apply = function(val, modList, enemyModList)
modList:NewMod("Multiplier:MineDetonatedRecently", "BASE", val, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "minesPerThrow", type = "count", label = "# of Mines per throw:", ifFlag = "mine", tooltip = "This will override the number of Mines per throw", apply = function(val, modList, enemyModList)
modList:NewMod("MineThrowCount", "OVERRIDE", val, "Config", {type = "Condition", var = "Combat"})
end },
{ var = "TriggeredTrapsRecently", type = "check", label = "Have you Triggered a Trap Recently?", ifCond = "TriggeredTrapsRecently", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:TriggeredTrapsRecently", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
Expand All @@ -1398,6 +1401,9 @@ Huge sets the radius to 11.
{ var = "conditionThrownTrapOrMineRecently", type = "check", label = "Have you thrown a Trap or Mine Recently?", ifCond = "TrapOrMineThrownRecently", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:TrapOrMineThrownRecently", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
end },
{ var = "trapsPerThrow", type = "count", label = "# of Traps per throw:", ifFlag = "trap", tooltip = "This will override the number of Traps per throw", apply = function(val, modList, enemyModList)
modList:NewMod("TrapThrowCount", "OVERRIDE", val, "Config", {type = "Condition", var = "Combat"})
end },
{ var = "conditionCursedEnemyRecently", type = "check", label = "Have you Cursed an enemy Recently?", ifCond="CursedEnemyRecently", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:CursedEnemyRecently", "FLAG", true, "Config", { type = "Condition", var = "Effective" })
end },
Expand Down
Loading