Formula

CommonFun.IsCanBlock

function CommonFun.IsCanBlock(srcUser, targetUser)
  local srcAttrEffect = srcUser:GetProperty("AttrEffect3")
  local bits4 = CommonFun.getBits(srcAttrEffect)
  local AttrEffect4 = targetUser:GetProperty("AttrEffect3")
  local bits5 = CommonFun.getBits(AttrEffect4)
  local isCanBlock = true
  if bits4[CommonFun.AttrEffect3.MustHit] == 1 and srcUser:HasBuffID(21930030_UNIVERSE_FUSION_IS_GUARANTEED_TO_HIT_:MAX_STACK_0) then
    isCanBlock = false
  end
  if bits5[CommonFun.AttrEffect3.CantBlock] == 1 then
    isCanBlock = false
  end
  local skill_qy = srcUser:GetLernedSkillLevel(2561_HIGH_PRIEST:SUPREME_POWER)
  if 7 <= skill_qy and srcUser:HasBuffID(136780_11105_:MAX_STACK_0) and targetUser:HasBuffID(136781_11106_:MAX_STACK_0) then
    isCanBlock = false
  end
  if srcUser:HasBuffID(107480_REAPER_DAMAGE_CONVERTED_TO_LIFE_LOSS_:MAX_STACK_0) then
    isCanBlock = false
  end
  return isCanBlock
end