Formula
CommonFun.calcBuff_3151
function CommonFun.calcBuff_3151(srcUser, targetUser, a, b, c, d, lv)
if srcUser == nil or targetUser == nil then
return 0
end
local off2 = targetUser:IsEquipForceOff(2)
local off7 = targetUser:IsEquipForceOff(7)
local equiped2 = targetUser:GetEquipedID(2) ~= 0
local equiped7 = targetUser:GetEquipedID(7_WEAPON) ~= 0
local list = {}
if off2 == false and equiped2 == true then
table.insert(list, 2)
end
if off7 == false and equiped7 == true then
table.insert(list, 7)
end
if #list <= 0 then
return 0
end
local random = srcUser:GetRandom()
return list[random % #list + 1]
end