Nightmare
Lvl: 5 Buff CD: 21 sec SP: 300 Range: 4

Thanatos unleashes the power in his magic sword, causing enemies within 4m of him to be haunted by nightmares, forcing them into [Nightmare] for 4 seconds. Enemies in [Nightmare] state can not move and attack and will return to normal after they take 2 attacks. When the state ends, all the buffs on enemies will be removed, and the cooldown time is fixed and can't be reduced

Lvl: 4 Buff CD: 22 sec SP: 250 Range: 4
• Thanatos unleashes the power in his magic sword, causing enemies within 4m of him to be haunted by nightmares, forcing them into [Nightmare] for 4 seconds. Enemies in [Nightmare] state can not move and attack and will return to normal after they take 2 attacks. When the state ends, all the buffs on enemies will be removed, and the cooldown time is fixed and can't be reduced
Lvl: 3 Buff CD: 23 sec SP: 200 Range: 4
• Thanatos unleashes the power in his magic sword, causing enemies within 4m of him to be haunted by nightmares, forcing them into [Nightmare] for 4 seconds. Enemies in [Nightmare] state can not move and attack and will return to normal after they take 2 attacks. When the state ends, all the buffs on enemies will be removed, and the cooldown time is fixed and can't be reduced
Lvl: 2 Buff CD: 24 sec SP: 150 Range: 4
• Thanatos unleashes the power in his magic sword, causing enemies within 4m of him to be haunted by nightmares, forcing them into [Nightmare] for 4 seconds. Enemies in [Nightmare] state can not move and attack and will return to normal after they take 2 attacks. When the state ends, all the buffs on enemies will be removed, and the cooldown time is fixed and can't be reduced
Lvl: 1 Buff CD: 25 sec SP: 100 Range: 4
• Thanatos unleashes the power in his magic sword, causing enemies within 4m of him to be haunted by nightmares, forcing them into [Nightmare] for 4 seconds. Enemies in [Nightmare] state can not move and attack and will return to normal after they take 2 attacks. When the state ends, all the buffs on enemies will be removed, and the cooldown time is fixed and can't be reduced

Enemy 5261

function CommonFun.calcBuff_5261(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Value = srcUser:GetGemValue(c)
  local MaxHp = targetUser:GetProperty("MaxHp")
  local MaxSp = targetUser:GetProperty("MaxSp")
  local A = Value / 100000 * MaxHp * a + Value / 100000 * MaxSp * b
  return A
end

Enemy

{
  "id": 136410,
  "BuffDesc": "Stuck in Nightmare, unable to move",
  "BuffIcon": "skillbuff_2508001",
  "BuffName": "Nightmare",
  "BuffRate": {
    "Odds": {
      "a": 0,
      "b": 100,
      "type": 3077
    }
  },
  "BuffType": {
    "isgain": 0,
    "isdisperse": 1
  },
  "IconType": 1,
  "BuffEffect": {
    "type": "StatusChange",
    "NoAct": 1,
    "end_extra_buff": [
      136411,
      136412
    ]
  },
  "BuffStateID": 80020
}

Enemy

{
  "id": 136411,
  "BuffName": "Nightmare (Clears Buff)",
  "BuffRate": {
    "Odds": 100
  },
  "BuffEffect": {
    "num": 99,
    "type": "Disperse",
    "value": "GainBuff"
  },
  "BuffStateID": 118260
}

Enemy

{
  "id": 136412,
  "BuffName": "Nightmare (sp reduction)",
  "BuffRate": {
    "Odds": {
      "a": 201121,
      "type": 5000
    }
  },
  "BuffEffect": {
    "Sp": {
      "a": 0,
      "b": -1,
      "c": 201121,
      "type": 5261
    },
    "type": "HSPChange"
  },
  "BuffStateID": 116440
}

Formula

{
  "CD": 21,
  "id": 2508005,
  "Buff": {
    "enemy": [
      136410
    ]
  },
  "Cost": 1,
  "Desc": [
    {
      "id": 2508000
    }
  ],
  "Icon": "skill_2508001",
  "Camps": "Enemy",
  "FixCD": 1,
  "Level": 5,
  "Logic": "SkillSelfRange",
  "DescId": "##1262242",
  "NameZh": "##139503",
  "Fire_EP": 3,
  "Pvp_buff": {
    "enemy": [
      136410
    ]
  },
  "AttackAct": [
    "use_magic"
  ],
  "Attack_EP": 2,
  "SE_attack": "Skill/Skill_Hero_Thanatos_Attack_05",
  "SkillCost": {
    "sp": 300
  },
  "SkillType": "Buff",
  "Target_EP": 3,
  "Logic_Param": {
    "range": 4,
    "range_num": 12,
    "no_skill_delay": 1
  },
  "Launch_Range": 4
}