Skip to content

Commit a68fe82

Browse files
author
LocalIdentity
committed
Fix Block chance calculation
1 parent 938e9ae commit a68fe82

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Classes/Item.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,6 @@ function ItemClass:BuildModListForSlotNum(baseList, slotNum)
13851385
local energyShieldVariance = (self.base.armour.EnergyShieldBaseMax or 0) - (self.base.armour.EnergyShieldBaseMin or 0)
13861386
local armourEnergyShieldBase = calcLocal(modList, "ArmourAndEnergyShield", "BASE", 0)
13871387
local wardBase = calcLocal(modList, "Ward", "BASE", 0) + (self.base.armour.WardBaseMin or 0)
1388-
local blockBase = calcLocal(modList, "BlockChance", "BASE", 0)
13891388
local wardVariance = (self.base.armour.WardBaseMax or 0) - (self.base.armour.WardBaseMin or 0)
13901389
local armourInc = calcLocal(modList, "Armour", "INC", 0)
13911390
local armourEvasionInc = calcLocal(modList, "ArmourAndEvasion", "INC", 0)
@@ -1394,7 +1393,6 @@ function ItemClass:BuildModListForSlotNum(baseList, slotNum)
13941393
local energyShieldInc = calcLocal(modList, "EnergyShield", "INC", 0)
13951394
local wardInc = calcLocal(modList, "Ward", "INC", 0)
13961395
local armourEnergyShieldInc = calcLocal(modList, "ArmourAndEnergyShield", "INC", 0)
1397-
local blockInc = calcLocal(modList, "BlockChance", "INC", 0)
13981396
local defencesInc = calcLocal(modList, "Defences", "INC", 0)
13991397
local qualityScalar = self.quality
14001398
if calcLocal(modList, "AlternateQualityArmour", "BASE", 0) > 0 then
@@ -1437,7 +1435,7 @@ function ItemClass:BuildModListForSlotNum(baseList, slotNum)
14371435
end
14381436

14391437
if self.base.armour.BlockChance then
1440-
armourData.BlockChance = m_floor((self.base.armour.BlockChance + blockBase) * (1 + blockInc / 100))
1438+
armourData.BlockChance = m_floor((self.base.armour.BlockChance + calcLocal(modList, "BlockChance", "BASE", 0)) * (1 + calcLocal(modList, "BlockChance", "INC", 0) / 100))
14411439
end
14421440
if self.base.armour.MovementPenalty then
14431441
modList:NewMod("MovementSpeed", "INC", -self.base.armour.MovementPenalty, self.modSource, { type = "Condition", var = "IgnoreMovementPenalties", neg = true })

0 commit comments

Comments
 (0)