Skill #40033001

Energy Beam

Level 1

##40033000

CD 1s | Attack

ID 40033001

Formulas & functions

CommonFun links

Energy BeamLv 1 | damage

Formula source

function CommonFun.calcDamage_8021(srcUser, targetUser, params, damageParam, logger)
  local Str = srcUser:GetProperty("Str")
  local Dex = srcUser:GetProperty("Dex")
  local Luk = srcUser:GetProperty("Luk")
  local Atk = srcUser:GetProperty("Atk")
  local AtkPer = srcUser:GetProperty("AtkPer")
  local DamIncrease = srcUser:GetProperty("DamIncrease")
  local IgnoreDef = 0
  local IgnoreDef1 = srcUser:GetProperty("IgnoreDef")
  local IgnoreDef2 = srcUser:GetProperty("IgnoreEquipDef")
  if targetUser.boss or targetUser.mini then
    IgnoreDef = IgnoreDef1
  else
    IgnoreDef = IgnoreDef1 + IgnoreDef2
  end
  if 1 <= IgnoreDef then
    IgnoreDef = 1
  end
  local BaseLv = targetUser.BaseLv
  local WeaponType = srcUser:GetEquipedWeaponType()
  local skilllv_1 = srcUser:GetLernedSkillLevel(damageParam.skill1_id)
  local Refine = srcUser:GetProperty("Refine")
  local damChangePer = damageParam.damChangePer
  local damChangePer1 = damageParam.damChangePer1
  local Def2 = targetUser:GetProperty("Def")
  local DefPer2 = targetUser:GetProperty("DefPer")
  local Vit2 = targetUser:GetProperty("Vit")
  local VitPer2 = targetUser:GetProperty("VitPer")
  local DamReduc2 = CommonFun.calcDamReDuc(srcUser, targetUser)
  local RefineDamReduc = targetUser:GetProperty("RefineDamReduc")
  local AttrEffect2 = srcUser:GetProperty("AttrEffect")
  local bits2 = CommonFun.getBits(AttrEffect2)
  local AtkFinal = math.random(BaseLv * 10, BaseLv * 16) * damChangePer + math.random(500, 1500) * damChangePer1
  local DefReduc = CommonFun.CalcDef(srcUser, targetUser)
  local skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
  if targetUser:GetNpcID() ~= 56008 and targetUser:GetNpcID() ~= 56009 and skillID == 40032 then
    AtkFinal = 0
  end
  if targetUser:GetNpcID() ~= 56010 and targetUser:GetNpcID() ~= 56011 and skillID == 40034 then
    AtkFinal = 0
  end
  if targetUser:GetNpcID() ~= 56012 and targetUser:GetNpcID() ~= 56013 and skillID == 40036 then
    AtkFinal = 0
  end
  local A = AtkFinal
  if A <= 1 then
    return 1
  end
  return A
end

Skill JSON (Level 1)

{
  "id": 40033001,
  "NameZh": "能量光线",
  "Level": 1,
  "Icon": "skill_82001",
  "Desc": [
    {
      "id": 40033000,
      "params": [
        150
      ]
    }
  ],
  "RollType": 2,
  "SkillType": "Attack",
  "Camps": "Enemy",
  "Launch_Range": 6,
  "Fire_EP": 3,
  "Target_EP": 3,
  "Attack_EP": 3,
  "CD": 1,
  "Logic": "SkillLockedTarget",
  "Damage": [
    {
      "damChangePer": 1.5,
      "damChangePer1": 2,
      "type": 8021
    }
  ],
  "DamTime": {
    "type": 1,
    "value": 3
  },
  "AttackAct": [
    "use_magic"
  ],
  "SE_attack": "Skill/BigCatSkill_shamaoguangxian_attack",
  "description": {
    "chinesesimplified": "##40033000",
    "english": "##40033000",
    "german": "##40033000",
    "portuguese": "##40033000",
    "spanish": "##40033000"
  }
}