Mental Attack
Lvl: 1 Attack Magic Fixed Cast Time: 4

Deals (Atk100%) Dmg to the target

Formula

function CommonFun.calcDamage_126(srcUser, targetUser, params, damageParam, logger)
  local Int = srcUser:GetProperty("Int")
  local Vit = srcUser:GetProperty("Vit")
  local MAtk = srcUser:GetProperty("MAtk")
  local MAtkPer = srcUser:GetProperty("MAtkPer")
  local MDamIncrease = CommonFun.calcMDamIncrease(srcUser, targetUser)
  local IgnoreMDef = srcUser:GetProperty("IgnoreMDef")
  if 1 <= IgnoreMDef then
    IgnoreMDef = 1
  end
  local MRefine = srcUser:GetProperty("MRefine")
  local RangeDam = srcUser:GetProperty("RangeDam")
  local srcAtkElement = CommonFun.GetUserAtkAttr(srcUser, params, damageParam)
  local targetDefElement = targetUser:GetProperty("DefAttr")
  local elementparam2 = CommonFun.CalcElementParam2(srcUser, targetUser, params, damageParam, logger)
  local raceparam = CommonFun.CalcRaceParam(srcUser, targetUser, params, damageParam, logger)
  local raceparam2 = CommonFun.CalcRaceParam2(srcUser, targetUser, params, damageParam, logger)
  local bossparam = CommonFun.CalcBossParam(srcUser, targetUser, params, damageParam, logger)
  local bossparam2 = CommonFun.CalcBossParam2(srcUser, targetUser, params, damageParam, logger)
  local MDef2 = targetUser:GetProperty("MDef")
  local MDefPer2 = targetUser:GetProperty("MDefPer")
  local Vit2 = targetUser:GetProperty("Vit")
  local VitPer2 = targetUser:GetProperty("VitPer")
  local Int2 = targetUser:GetProperty("Int")
  local IntPer2 = targetUser:GetProperty("IntPer")
  local MDamReduc2 = CommonFun.calcMDamReDuc(srcUser, targetUser)
  local RefineMDamReduc = targetUser:GetProperty("RefineMDamReduc")
  local damChangePer = damageParam.damChangePer
  local BaseMAtk = Int + math.floor(Int * Int / 100)
  local MAtkFinal = ((MAtk - BaseMAtk) * (1 + MAtkPer) + BaseMAtk) * raceparam * bossparam * bossparam2
  local MDefReduc = CommonFun.CalcMDef(srcUser, targetUser)
  local A = (MAtkFinal * MDefReduc * (1 - MDamReduc2) + MRefine) * (1 - RefineMDamReduc) * damChangePer * (1 + MDamIncrease) * CommonFun.calcMagicElement(srcUser, targetUser, params, damageParam) * elementparam2 - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2)
  local skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
  if skillID == 79342_:BALLAD_OF_ONE_THOUGHT then
    local targetid = targetUser:GetGuid()
    local distance = srcUser:GetDistance(targetid)
    if distance <= 7 then
      A = 0
    end
  end
  if skillID == 23113_:MENTAL_ATTACK then
    local targetid = targetUser:GetGuid()
    local distance = srcUser:GetDistance(targetid)
    if distance <= 5 then
      return 0, CommonFun.DamageType.Miss
    end
  end
  if A <= 1 then
    return 0
  end
  return A
end

Enemy

{
  "id": 156420,
  "BuffName": "Totem Mask transformation",
  "BuffRate": {
    "Odds": 100
  },
  "BuffEffect": {
    "Body": 10116,
    "type": "PartTransform"
  }
}

Enemy

{
  "id": 156421,
  "BuffName": "Totem Mask transformation",
  "BuffRate": {
    "Odds": 100
  },
  "BuffEffect": {
    "type": "LimitUseItem",
    "NoSkill": 1,
    "FuncLimit": [
      1
    ],
    "forbid_all": 1
  }
}

Formula

{
  "id": 23113001,
  "Buff": {
    "enemy": [
      156420,
      156421
    ]
  },
  "Cost": 1,
  "Desc": [
    {
      "id": 10000,
      "params": [
        100
      ]
    }
  ],
  "Icon": "skill_10000",
  "Camps": "Enemy",
  "Level": 1,
  "Logic": "SkillSelfRange",
  "Damage": [
    {
      "type": 126,
      "damChangePer": 45,
      "elementparam": 5
    }
  ],
  "DescId": "##170630",
  "NameZh": "##1113244",
  "CastAct": "reading",
  "DamTime": {
    "type": 1,
    "value": 2
  },
  "Fire_EP": 3,
  "Pvp_buff": {
    "enemy": [
      156420,
      156421
    ]
  },
  "RollType": 2,
  "AttackAct": [
    "use_magic"
  ],
  "Attack_EP": 0,
  "Lead_Type": {
    "CCT": 4,
    "FCT": 0,
    "type": 2
  },
  "SkillType": "Attack",
  "Target_EP": 3,
  "Logic_Param": {
    "range": 10,
    "range_num": 8
  },
  "Launch_Range": 0
}