Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit a6f81c8

Browse files
committed
Adding in Renly's Training Block Logic
Base Block Chance calculation change for shields when Renly's is allocated
1 parent bc54dc6 commit a6f81c8

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/Modules/CalcDefence.lua

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,15 +725,24 @@ function calcs.defence(env, actor)
725725
end
726726
output.BlockChanceOverCap = 0
727727
output.SpellBlockChanceOverCap = 0
728+
728729
local baseBlockChance = 0
729730
if actor.itemList["Weapon 2"] and actor.itemList["Weapon 2"].armourData then
730-
baseBlockChance = baseBlockChance + (actor.itemList["Weapon 2"].armourData.BlockChance or 0)
731+
if env.allocNodes[23005] and actor.itemList["Weapon 2"].type == "Shield" then
732+
baseBlockChance = baseBlockChance + 40
733+
else
734+
baseBlockChance = baseBlockChance + (actor.itemList["Weapon 2"].armourData.BlockChance or 0)
735+
end
731736
end
737+
732738
if actor.itemList["Weapon 3"] and actor.itemList["Weapon 3"].armourData then
733-
baseBlockChance = baseBlockChance + (actor.itemList["Weapon 3"].armourData.BlockChance or 0)
739+
if env.allocNodes[23005] and actor.itemList["Weapon 3"].type == "Shield" then
740+
baseBlockChance = baseBlockChance + 40
741+
else
742+
baseBlockChance = baseBlockChance + (actor.itemList["Weapon 3"].armourData.BlockChance or 0)
743+
end
734744
end
735-
output.ShieldBlockChance = baseBlockChance
736-
baseBlockChance = modDB:Override(nil, "ReplaceShieldBlock") or baseBlockChance
745+
737746
if modDB:Flag(nil, "BlockAttackChanceIsEqualToParent") then
738747
output.BlockChance = m_min(actor.parent.output.BlockChance, output.BlockChanceMax)
739748
elseif modDB:Flag(nil, "BlockAttackChanceIsEqualToPartyMember") then

0 commit comments

Comments
 (0)