Dark Night Storm
Lvl: 10 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 300 Range: 7 Cast Time: 4

Inflicts one stack of [Demon King's Wrath] and deals M.ATK*2360% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.

Lvl: 9 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 280 Range: 7 Cast Time: 4
• Inflicts one stack of [Demon King's Wrath] and deals M.ATK*2260% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.
Lvl: 8 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 260 Range: 7 Cast Time: 4
• Inflicts one stack of [Demon King's Wrath] and deals M.ATK*2160% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.
Lvl: 7 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 240 Range: 7 Cast Time: 4
• Inflicts one stack of [Demon King's Wrath] and deals M.ATK*2060% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.
Lvl: 6 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 220 Range: 7 Cast Time: 4
• Inflicts one stack of [Demon King's Wrath] and deals M.ATK*1960% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.
Lvl: 5 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 200 Range: 7 Cast Time: 4
• Inflicts one stack of [Demon King's Wrath] and deals M.ATK*1860% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.
Lvl: 4 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 180 Range: 7 Cast Time: 4
• Inflicts one stack of [Demon King's Wrath] and deals M.ATK*1760% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.
Lvl: 3 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 160 Range: 7 Cast Time: 4
• Inflicts one stack of [Demon King's Wrath] and deals M.ATK*1660% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.
Lvl: 2 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 140 Range: 7 Cast Time: 4
• Inflicts one stack of [Demon King's Wrath] and deals M.ATK*1560% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.
Lvl: 1 Attack Magic CD: 2.5 sec Skill Delay: 1.5 sec SP: 120 Range: 7 Cast Time: 4
• Inflicts one stack of [Demon King's Wrath] and deals M.ATK*1460% as Dark M.DMG per sec to all enemies within a specified circular area with a radius of 3m. Lasts 5s. When dealing DMG, a 20% chance to inflict [Dark] on the enemy. DMG to enemies with [Dark] increases by 50%.

Formula

function CommonFun.calcDamage_76501(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, targetUser, 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 skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
  local BaseMAtk = Int + math.floor(Int * Int / 100)
  local MAtkFinal = ((MAtk - BaseMAtk) * (1 + MAtkPer) + BaseMAtk) * raceparam * bossparam * bossparam2
  local MDefReduc = CommonFun.CalcMDef(srcUser, targetUser)
  if skillID == 2951_MERCHANT:DARK_NIGHT_STORM_MERCHANT:DARK_NIGHT_STORM or skillID == 2968_MERCHANT:DARK_STORM_DAMAGE_MERCHANT:DARK_STORM_DAMAGE_MERCHANT:DARK_STORM_DAMAGE then
    if skillID == 2968_MERCHANT:DARK_STORM_DAMAGE_MERCHANT:DARK_STORM_DAMAGE_MERCHANT:DARK_STORM_DAMAGE then
      local skilllv_fengbao = srcUser:GetLernedSkillLevel(2951_MERCHANT:DARK_NIGHT_STORM)
      damChangePer = skilllv_fengbao * 1 + 13.6
    end
    local GemValue = srcUser:GetGemValue(216101_DARK_NIGHT_STORM_DMG_PERCENTAGE)
    damChangePer = damChangePer * (1 + GemValue / 100000)
    if srcUser:HasBuffID(90006134_1225_:MAX_STACK_0) and targetUser:HasBuffID(139370_DEMON_KING_S_CHAIN_:MAX_STACK_0) then
      damChangePer = damChangePer * 1.5
    end
    local StateEffect = targetUser:GetProperty("StateEffect")
    local bits = CommonFun.getBits(StateEffect)
    if bits[CommonFun.StateEffect.Dark] == 1 then
      damChangePer = damChangePer * 1.5
    end
  end
  if skillID == 2963_MERCHANT:DISCERNING_AURA_TRIGGER then
    local skilllv_jinmo = srcUser:GetLernedSkillLevel(2952_MERCHANT:DEMON_KING_S_ARRAY)
    damChangePer = skilllv_jinmo * 0.8 + 4.8
  end
  if skillID == 2965_MERCHANT:DARK_ULTIMATUM then
    local skilllv_zhongjie = srcUser:GetLernedSkillLevel(2956_MERCHANT:END_OF_EVERYTHING)
    damChangePer = skilllv_zhongjie * 3.6 + 6
  end
  if skillID == 2971_MERCHANT:DEMON_KING_S_WRATH_TRIGGER then
    local skilllv_heian = srcUser:GetLernedSkillLevel(2950_MERCHANT:DARKNESS_DOMINATOR)
    local Yichang = 1
    if skilllv_heian == 7 then
      local NumDebuff = targetUser:GetStatusNum()
      if targetUser:HasBuffID(139314_1225_:MAX_STACK_0) then
        NumDebuff = NumDebuff + 1
      end
      if targetUser:HasBuffID(139320_DEMON_S_REFLECTION_:MAX_STACK_0) then
        NumDebuff = NumDebuff + 1
      end
      if targetUser:HasBuffID(139370_DEMON_KING_S_CHAIN_:MAX_STACK_0) then
        NumDebuff = NumDebuff + 1
      end
      if 1 <= NumDebuff then
        Yichang = NumDebuff * NumDebuff * 0.05 + 1
      end
    end
    damChangePer = (0.6 + skilllv_heian * 0.6) * Yichang * (1 + Int * 0.04)
    if skilllv_heian == 7 then
      damChangePer = 4.8 * Yichang * (1 + Int * 0.04)
    end
  end
  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)
  if skillID == 2951_MERCHANT:DARK_NIGHT_STORM_MERCHANT:DARK_NIGHT_STORM or skillID == 2968_MERCHANT:DARK_STORM_DAMAGE_MERCHANT:DARK_STORM_DAMAGE_MERCHANT:DARK_STORM_DAMAGE then
    A = A * (1 + RangeDam)
    local StateEffect = targetUser:GetProperty("StateEffect")
    local bits = CommonFun.getBits(StateEffect)
    if bits[CommonFun.StateEffect.Dark] == 1 then
      A = A * 1.5
    end
  end
  if A <= 1 then
    return 1
  end
  return A
end

Enemy

{
  "id": 139300,
  "BuffName": "Demon King's Taunt",
  "BuffRate": {
    "Odds": {
      "a": 100,
      "b": 0,
      "type": 8920
    }
  },
  "BuffType": {
    "isgain": 0,
    "isdisperse": 1
  },
  "LayerBuff": [
    [
      139304
    ]
  ],
  "BuffEffect": {
    "type": "AttrChange",
    "MoveSpdPer": 0,
    "end_extra_buff": [
      139308,
      139303,
      139490
    ]
  }
}

Enemy

{
  "id": 139430,
  "BuffName": "Torturing Ritual",
  "BuffRate": {
    "Odds": {
      "type": 8980
    }
  },
  "BuffEffect": {
    "id": [
      139431,
      139432,
      139433,
      139434
    ],
    "Odds": 100,
    "type": "AddBuff",
    "random": 1
  }
}

Enemy

{
  "id": 139471,
  "BuffName": "1225",
  "BuffRate": {
    "Odds": {
      "a": 100,
      "b": 0,
      "type": 9000
    }
  },
  "BuffEffect": {
    "type": "AddBuff",
    "layer": [
      {
        "id": 139301,
        "layer": 2
      }
    ]
  }
}

Enemy

{
  "id": 139436,
  "BuffName": "Torturing Ritual",
  "BuffRate": {
    "Odds": 100
  },
  "Condition": {
    "type": "HasBuff",
    "buffid": [
      139301
    ],
    "delWhenInvalid": 1
  },
  "BuffEffect": {
    "id": [
      139430
    ],
    "type": "AddBuff"
  }
}

Enemy

{
  "id": 139380,
  "BuffName": "Darkness Effect [Darkness]",
  "BuffRate": {
    "Odds": {
      "a": 0,
      "b": 20,
      "type": 186
    }
  },
  "BuffType": {
    "isgain": 0,
    "isdisperse": 1
  },
  "BuffEffect": {
    "type": "StatusChange",
    "HitPer": -0.5,
    "FleePer": -0.5,
    "AttrEffect3": [
      17
    ],
    "StateEffect": "12_Dark"
  }
}

Enemy

{
  "id": 139431,
  "BuffDesc": "Silence: disable all skills except auto attacks",
  "BuffIcon": "skillbuff_231001",
  "BuffName": "Silence Effect [Silence]",
  "BuffRate": {
    "Odds": {
      "a": 0,
      "b": 100,
      "type": 100
    }
  },
  "BuffType": {
    "isgain": 0,
    "isdisperse": 1
  },
  "IconType": 1,
  "BuffEffect": {
    "type": "StatusChange",
    "NoSkill": 1,
    "StateEffect": "10_Silence"
  },
  "BuffStateID": 96040
}

Enemy

{
  "id": 139432,
  "BuffDesc": "Curse: Decrease Atk, Move Speed, Luck",
  "BuffIcon": "skillbuff_1614001",
  "BuffName": "Curse Effect [Curse]",
  "BuffRate": {
    "Odds": {
      "a": 0,
      "b": 100,
      "type": 180
    }
  },
  "BuffType": {
    "isgain": 0,
    "isdisperse": 1
  },
  "IconType": 1,
  "BuffEffect": {
    "type": "StatusChange",
    "AtkPer": -0.25,
    "MoveSpdPer": -0.5,
    "StateEffect": "11_Curse"
  }
}

Enemy

{
  "id": 139433,
  "BuffDesc": "Darkness: Decrease Hit & Flee",
  "BuffIcon": "skillbuff_commonbuff",
  "BuffName": "Darkness Effect [Darkness]",
  "BuffRate": {
    "Odds": {
      "a": 0,
      "b": 100,
      "type": 186
    }
  },
  "BuffType": {
    "isgain": 0,
    "isdisperse": 1
  },
  "IconType": 1,
  "BuffEffect": {
    "type": "StatusChange",
    "HitPer": -0.5,
    "FleePer": -0.5,
    "AttrEffect3": [
      17
    ],
    "StateEffect": "12_Dark"
  }
}

Enemy

{
  "id": 139434,
  "BuffDesc": "Fear: free of control",
  "BuffIcon": "skillbuff_commonbuff",
  "BuffName": "Fearing Effect [Fear]",
  "BuffRate": {
    "Odds": {
      "a": 0,
      "b": 100,
      "type": 170
    }
  },
  "BuffType": {
    "isgain": 0,
    "isdisperse": 1
  },
  "IconType": 1,
  "BuffEffect": {
    "Flee": -20,
    "type": "StatusChange",
    "FearRun": 1,
    "NoSkill": 1,
    "NoAttack": 1,
    "StateEffect": "8_Fear"
  }
}

Enemy

{
  "id": 139435,
  "BuffName": "Torturing Ritual",
  "BuffRate": {
    "Odds": 100
  },
  "Condition": {
    "type": "HasBuff",
    "buffid": [
      139300
    ],
    "delWhenInvalid": 1
  },
  "BuffEffect": {
    "id": [
      139430
    ],
    "type": "AddBuff"
  }
}

Enemy

{
  "id": 139301,
  "BuffName": "1225",
  "BuffRate": {
    "Odds": {
      "a": 0,
      "b": 100,
      "type": 8920
    }
  },
  "BuffType": {
    "isgain": 0,
    "isdisperse": 0
  },
  "LayerBuff": [
    [
      139305
    ]
  ],
  "BuffEffect": {
    "type": "AttrChange",
    "MoveSpdPer": 0,
    "end_extra_buff": [
      139308,
      139303,
      139470,
      139490
    ]
  }
}

Enemy

{
  "id": 139309,
  "BuffName": "1225",
  "BuffRate": {
    "Odds": 100
  },
  "BuffEffect": {
    "id": [
      139300,
      139301,
      139435,
      139436,
      139471
    ],
    "Odds": 100,
    "type": "AddBuff"
  }
}

Formula

{
  "CD": 2.5,
  "id": 2951010,
  "Buff": {
    "enemy": [
      139380,
      139309
    ]
  },
  "Cost": 1,
  "Desc": [
    {
      "id": 2951000,
      "params": [
        2360
      ]
    }
  ],
  "Icon": "skill_2951001",
  "Camps": "Enemy",
  "Level": 10,
  "Logic": "SkillPointRange",
  "Damage": [
    {
      "type": 76501,
      "damChangePer": 23.6,
      "elementparam": 7
    }
  ],
  "DescId": "##42531618",
  "NameZh": "##42531506",
  "CastAct": "skill_ready_morocc",
  "DamTime": {
    "type": 1,
    "value": 1
  },
  "DelayCD": 1.5,
  "Fire_EP": 3,
  "SE_cast": "Skill/sfx_skill_mengluoke_darknight_charge_01",
  "Pvp_buff": {
    "enemy": [
      139380,
      139309
    ]
  },
  "RollType": 2,
  "AttackAct": [
    "use_skill"
  ],
  "Attack_EP": 3,
  "Lead_Type": {
    "CCT": 0,
    "FCT": 4,
    "type": 2
  },
  "SE_attack": "Skill/sfx_skill_mengluoke_darknight_attack_01",
  "SkillCost": {
    "sp": 300
  },
  "SkillType": "Attack",
  "Target_EP": 3,
  "DamageType": 2,
  "Logic_Param": {
    "count": 5,
    "range": 3,
    "interval": 1,
    "no_select": 1,
    "whitelist": 1,
    "isCountTrap": 1,
    "trap_effect": "sfx_morocc_asxfb_ground_prf,LowRange_B"
  },
  "Launch_Range": 7
}