CommonFun

CommonFun.IsMiss

Dataset · 20251127_update

Formula Source

function CommonFun.IsMiss(srcUser, targetUser, skillParams)
  local AttrEffect = srcUser:GetProperty("AttrEffect")
  local StateEffect2 = targetUser:GetProperty("StateEffect")
  local bits = CommonFun.getBits(AttrEffect)
  local bits2 = CommonFun.getBits(StateEffect2)
  if bits[CommonFun.AttrEffect.MustHitAndCri] == 1 or bits2[CommonFun.StateEffect.Sleep] == 1 then
    return false
  end
  local hitRate = CommonFun.CalcHitRate(srcUser, targetUser, skillParams)
  if CommonFun.IsInRate(hitRate, srcUser:GetRandom()) == false then
    return true
  end
  return false
end
No formula links

Version History

Loading dependencies...
Loading usage...