
Thunder
Lvl: 1
Attack
Physical
This thunder cloud deals continuous Wind Magic Damage to players in range. After dealing damage 3 times in total, the cloud's following attack stuns.
Formula
function CommonFun.calcDamage_20(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 Refine = srcUser:GetProperty("Refine")
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 damChangePer = damageParam.damChangePer
local raceparam = CommonFun.CalcRaceParam(srcUser, targetUser, params, damageParam, logger)
local bodyparam = CommonFun.CalcBodyParam(srcUser, targetUser, params, damageParam, logger)
local elementparam = CommonFun.CalcElementParam(srcUser, targetUser, params, damageParam, logger)
local bossparam = CommonFun.CalcBossParam(srcUser, targetUser, params, damageParam, logger)
local raceparam2 = CommonFun.CalcRaceParam2(srcUser, targetUser, params, damageParam, logger)
local bodyparam2 = CommonFun.CalcBodyParam2(srcUser, targetUser, params, damageParam, logger)
local elementparam2 = CommonFun.CalcElementParam2(srcUser, targetUser, params, damageParam, logger)
local bossparam2 = CommonFun.CalcBossParam2(srcUser, targetUser, params, damageParam, logger)
local skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
if skillID == 380_RUNE_KNIGHT:SONIC_CLAW or skillID == 383_RUNE_KNIGHT:SILVER_CHARGE or skillID == 384_RUNE_KNIGHT:TINDER_BREAKER then
AtkPer = 0
end
local BaseAtk = Str * 2 + math.floor(Str * Str / 100) + math.floor(Dex / 5) + math.floor(Luk / 5)
local AtkFinal = ((Atk - BaseAtk) * (1 + AtkPer) * CommonFun.ShapeCorrection(srcUser, targetUser) * bodyparam * elementparam * elementparam2 + BaseAtk) * raceparam * bossparam * bossparam2
local DefReduc = CommonFun.CalcDef(srcUser, targetUser)
local ShortRangeDamReduc2 = targetUser:GetProperty("ShortRangeDamReduc")
local A = (AtkFinal * DefReduc * (1 - DamReduc2) + Refine) * damChangePer * (1 - RefineDamReduc) * (1 + DamIncrease - ShortRangeDamReduc2) - Vit2 * (1 + VitPer2)
if A <= 1 then
return 1
end
return A
end
Self 4630
function CommonFun.calcBuff_4630(srcUser, targetUser, a, b, c, d, lv)
local Vit = srcUser:GetProperty("Vit")
local MAtk = srcUser:GetProperty("MAtk")
local MAtkPer = srcUser:GetProperty("MAtkPer")
local MaxHp = targetUser:GetProperty("MaxHp")
local MDamIncrease = CommonFun.calcMDamIncrease(srcUser, targetUser)
local IgnoreMDef = srcUser:GetProperty("IgnoreMDef")
if 1 <= IgnoreMDef then
IgnoreMDef = 1
end
local MRefine = srcUser:GetProperty("MRefine")
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 raceparam = 1
local srcRace = srcUser.race
local targetRace = targetUser.race
if targetUser:HasBuffID(139410_TWO_FACE_DEMON_KING_HUMAN_:MAX_STACK_0) then
targetRace = 3
end
if srcUser:HasBuffID(139411_TWO_FACE_DEMON_KING_DEMON_:MAX_STACK_0) then
srcRace = 3
end
if srcUser:HasBuffID(49320_RACIAL_ANCIENT_RELICS_PERMANENT_:MAX_STACK_0) and srcUser:HasBuffID(49325_RACIAL_ANCIENT_RELICS_CD_:MAX_STACK_0) then
elseif srcUser:HasBuffID(49320_RACIAL_ANCIENT_RELICS_PERMANENT_:MAX_STACK_0) then
targetRace = 2
end
if targetUser:HasBuffID(49320_RACIAL_ANCIENT_RELICS_PERMANENT_:MAX_STACK_0) and targetUser:HasBuffID(49325_RACIAL_ANCIENT_RELICS_CD_:MAX_STACK_0) then
elseif targetUser:HasBuffID(49320_RACIAL_ANCIENT_RELICS_PERMANENT_:MAX_STACK_0) then
srcRace = 2
end
if nil == CommonFun.RaceProps[targetRace] then
return 0
end
if nil == CommonFun.RaceProps[srcRace] then
return 0
end
local raceInc = srcUser:GetProperty(CommonFun.RaceProps[targetRace][1])
local raceRed = targetUser:GetProperty(CommonFun.RaceProps[srcRace][2])
local raceparam = 1 + raceInc - raceRed
if raceparam <= 0.1 then
raceparam = 0.1
end
local srcAtkElement = c
local targetDefElement = targetUser:GetProperty("DefAttr")
local ElementRate = CommonFun.GetElementRate(srcUser, srcAtkElement, targetUser, targetDefElement)
if nil == CommonFun.NatureProps[srcAtkElement] or nil == CommonFun.NatureProps[targetDefElement] or nil == targetDefElement then
return 0
end
local elementInc = srcUser:GetProperty(CommonFun.NatureProps[targetDefElement][1])
local elementRed = targetUser:GetProperty(CommonFun.NatureProps[srcAtkElement][2])
local elementAtk = srcUser:GetProperty(CommonFun.NatureProps[srcAtkElement][3])
local elementThrough = srcUser:GetProperty(CommonFun.NatureProps[srcAtkElement][4])
local elementResistance = targetUser:GetProperty(CommonFun.NatureProps[srcAtkElement][5])
if 0 <= elementRed then
elementRed = elementRed * math.max(1 - elementThrough, 0)
end
if 0 <= elementAtk then
elementAtk = elementAtk * math.max(1 - elementResistance, 0)
end
local elementparam = (1 + elementInc) * ElementRate
local elementparam2 = 1 + elementAtk - elementRed
if elementparam2 <= 0.1 then
elementparam2 = 0.1
end
local ele = elementparam * elementparam2
if targetDefElement == nil or ElementRate == nil or elementInc == nil or elementRed == nil or elementAtk == nil then
ele = 1
end
local MAtkFinal = b * CommonFun.ShapeCorrection(srcUser, targetUser) * ele * raceparam
local MDefReduc = CommonFun.CalcMDef(srcUser, targetUser)
local A = (MAtkFinal * MDefReduc * (1 - MDamReduc2) + MRefine) * (1 - RefineMDamReduc) * (1 + MDamIncrease) - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2) + MaxHp * a
if targetUser:GetNpcID() == 280931_BOVINE_OF_EARTH then
A = MaxHp * 0.1
end
return -A
end
Self
{
"id": 163020,
"BuffName": "Thunder",
"BuffRate": {
"Odds": 100
},
"BuffEffect": {
"id": [
163021,
163022,
163023
],
"type": "AddBuff"
},
"BuffStateID": 163020
}
Self
{
"id": 163021,
"BuffName": "Conductivity",
"BuffRate": {
"Odds": 100
},
"BuffEffect": {
"type": "AttrChange",
"MoveSpdPer": 0
},
"BuffStateID": 163021
}
Self
{
"id": 163022,
"BuffName": "Conductivity",
"BuffRate": {
"Odds": 100
},
"BuffEffect": {
"Hp": {
"a": 0.05,
"b": 5000,
"c": 1,
"type": 4630
},
"type": "HSPChange"
}
}
Self
{
"id": 163023,
"BuffName": "Conductivity",
"BuffRate": {
"Odds": {
"type": 4570
}
},
"BuffEffect": {
"id": [
163024,
163025
],
"type": "AddBuff"
}
}
Self
{
"id": 163024,
"BuffName": "Conductivity",
"BuffRate": {
"Odds": {
"a": 0,
"b": 100,
"type": 130
}
},
"BuffEffect": {
"type": "StatusChange",
"NoAct": 1,
"StateEffect": "4_Dizzy"
},
"BuffStateID": 80010
}
Self
{
"id": 163025,
"BuffName": "Conductivity",
"BuffRate": {
"Odds": 100
},
"BuffEffect": {
"type": "DelBuff",
"layer": [
{
"id": 163021,
"layer": 3
}
]
}
}
Formula
{
"id": 72880001,
"Buff": {
"self": [
163020
]
},
"Cost": 0,
"Desc": [
{
"id": 72880001
}
],
"Icon": "skill_84001",
"Camps": "Enemy",
"Level": 1,
"Logic": "SkillSelfRange",
"Damage": [
{
"type": 20,
"damChangePer": 0.1
}
],
"DescId": "##171384",
"NameZh": "##154212",
"DamTime": {
"type": 1,
"value": 1
},
"Fire_EP": 3,
"Pvp_buff": {
"self": [
163020
]
},
"RollType": 1,
"AttackAct": [
"use_skill"
],
"Attack_EP": 0,
"SkillType": "Attack",
"Target_EP": 3,
"Logic_Param": {
"range": 2,
"range_num": 12
},
"Launch_Range": 0.5
}