Level 1
##2741000
Skill #2741001
Level 1
##2741000
Formulas & functions
Formula source
function CommonFun.calcDamage_68501(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 Vit = srcUser:GetProperty("Vit")
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 Hp2 = targetUser:GetProperty("Hp")
local MaxHp2 = targetUser:GetProperty("MaxHp")
local damChangePer = damageParam.damChangePer
local AttrEffect = srcUser:GetProperty("AttrEffect")
local bits = CommonFun.getBits(AttrEffect)
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 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 skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
local MaxSp = targetUser:GetProperty("MaxSp")
if skillID == 2734 then
AtkFinal = (((Atk - BaseAtk) * (1 + AtkPer) + MaxSp) * CommonFun.ShapeCorrection(srcUser, targetUser) * bodyparam * elementparam * elementparam2 + BaseAtk) * raceparam * bossparam * bossparam2
end
if skillID == 2731 or skillID == 2732 or skillID == 2733 or skillID == 2734 or skillID == 2746 then
local skilllv_bd = srcUser:GetLernedSkillLevel(2745)
if 0 < skilllv_bd then
damChangePer = (damChangePer + skilllv_bd * 0.2) * (1 + Vit / 800)
end
end
local Num = srcUser:GetBuffLayer(137710)
if skillID == 2740 then
local GemValue = srcUser:GetGemValue(208121)
damChangePer = damChangePer * (1 + Num * 0.1)
if srcUser:HasBuffID(137700) then
damChangePer = damChangePer * (1 + GemValue / 100000)
end
end
local Hp = srcUser:GetProperty("Hp")
local MaxHp = srcUser:GetProperty("MaxHp")
if skillID == 2741 then
local mapid, maptype = srcUser:GetMapInfo()
local pvpRatio = 1
if maptype == 2 or maptype == 4 then
pvpRatio = 0.25
end
damChangePer = (damChangePer + Hp * pvpRatio / 50000) * (1 + Num * 0.1)
end
local tx_lv = srcUser:GetLernedSkillLevel(2730)
local NormalAtkDam = srcUser:GetProperty("NormalAtkDam")
local NormalEnd = 1 + NormalAtkDam
if 7 <= tx_lv then
damChangePer = damChangePer * NormalEnd
end
if srcUser:HasBuffID(137720) then
local xm_lv = srcUser:GetLernedSkillLevel(2737)
if 0.6 <= Hp / MaxHp then
damChangePer = damChangePer * (1 + 0.05 * xm_lv)
end
end
local A = (AtkFinal * DefReduc * (1 - DamReduc2) + Refine) * damChangePer * (1 - RefineDamReduc) * (1 + DamIncrease - ShortRangeDamReduc2) - Vit2 * (1 + VitPer2)
local CriDamPer = srcUser:GetProperty("CriDamPer")
local CriDefPer2 = targetUser:GetProperty("CriDefPer")
local fushou = srcUser:GetEquipTypeByPos(1)
local wuqi = srcUser:GetEquipTypeByPos(7)
local WeaponNum = 0
if fushou == 180 or fushou == 250 then
WeaponNum = WeaponNum + 1
end
if wuqi == 180 or wuqi == 250 then
WeaponNum = WeaponNum + 1
end
local Rate = (7 + 4 * tx_lv) * WeaponNum
if 4 <= tx_lv then
Rate = (7 + 4 * tx_lv) * WeaponNum + Num * 3
end
if CommonFun.IsInRate(Rate, srcUser:GetRandom()) then
A = (AtkFinal * (1 - DamReduc2) + Refine) * damChangePer * (1 - RefineDamReduc) * (1 + DamIncrease - ShortRangeDamReduc2) - Vit2 * (1 + VitPer2)
return math.max(A * (1.5 + CriDamPer - CriDefPer2), 1), CommonFun.DamageType.Crit
end
if A <= 1 then
return 1
end
return A
endSkill JSON (Level 1)
{
"id": 2741001,
"NameZh": "劫火之击",
"Level": 1,
"Icon": "skill_2741001",
"Cost": 1,
"Contidion": {
"skillid": 2739008
},
"Desc": [
{
"id": 2741000,
"params": [
2500
]
}
],
"RollType": 1,
"SkillHit": 1,
"DamageType": 1,
"SkillType": "Attack",
"Camps": "Enemy",
"Launch_Range": 2,
"Fire_EP": 3,
"Target_EP": 3,
"Attack_EP": 2,
"CD": 8,
"FixCD": 1,
"DelayCD": 1,
"Logic": "SkillTargetBehindRect",
"Logic_Param": {
"behind_distance": 2,
"forward_offset": 0,
"range_num": 1,
"width": 1
},
"Damage": [
{
"damChangePer": 25,
"type": 68501
}
],
"DamTime": {
"type": 1,
"value": 6
},
"AttackEffects": [
{
"direction": "forward",
"speed": 60,
"target_behind": 2,
"type": 1
}
],
"Buff": {
"enemy": [
137803
],
"self": [
137790,
137800
]
},
"Pvp_buff": {
"enemy": [
137803
],
"self": [
137790,
137800
]
},
"AttackAct": [
"use_skill5"
],
"E_Attack_On": 1,
"SE_attack": "Skill/skill_hero_haiyinlixi_katana_attack_01",
"FashionAttackAct": "use_skill4_Ninja",
"description": {
"chinesesimplified": "##2741000",
"english": "##2741000",
"german": "##2741000",
"portuguese": "##2741000",
"spanish": "##2741000"
}
}