Formula

CommonFun.ShapeCorrection

formula.lua
1function CommonFun.ShapeCorrection(srcUser, targetUser)
2  local value = 2
3  local WeaponType = srcUser:GetEquipedWeaponType()
4  local ShapeAtkPer = srcUser:GetProperty("ShapeAtkPer")
5  local AttrEffect = srcUser:GetProperty("AttrEffect")
6  local bits = CommonFun.getBits(AttrEffect)
7  if nil ~= CommonFun.Shape then
8    if CommonFun.Shape.S == targetUser.shape then
9      value = 1
10    elseif CommonFun.Shape.M == targetUser.shape then
11      value = 2
12    elseif CommonFun.Shape.L == targetUser.shape then
13      value = 3
14    end
15  end
16  if bits[CommonFun.AttrEffect.IgnoreBodyDamage] == 1 then
17    return 1
18  end
19  local A = WeaponShapeCorrection[WeaponType][value] * (1 + ShapeAtkPer)
20  if 1 <= A then
21    return 1
22  end
23  return WeaponShapeCorrection[WeaponType] ~= nil and A or 1
24end
Formula Graph

Connected Archive Data

See which cards, equipment, headwears, buffs, and other archived records connect to this formula.

Loading graph filters

CommonFun.ShapeCorrection

commonfun-shapecorrection

Nodes

0

Edges

0

Related Nodes

Select at least one node type.