Enemy 6350
function CommonFun.calcBuff_6350(srcUser, targetUser, a, b, c, d, lv, damage)
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 MRefine = srcUser:GetProperty("MRefine")
local NpcParam = CommonFun.NpcParam(srcUser, targetUser, params, damageParam, logger)
local BaseMAtk = Int + math.floor(Int * Int / 100)
local MAtkFinal = ((MAtk - BaseMAtk) * (1 + MAtkPer) + BaseMAtk) * NpcParam
local skilllv = srcUser:GetLernedSkillLevel(4110_PROFESSOR:PEPPER_BOMB)
local Num = damage
local srcAtkElement = 5
local targetDefElement = targetUser:GetProperty("DefAttr")
local ElementRate = CommonFun.GetElementRate(srcUser, srcAtkElement, targetUser, targetDefElement)
if (srcUser:HasBuffID(69650_8608_:MAX_STACK_0) or srcUser:HasBuffID(71090_10658_:MAX_STACK_0)) and 1 < ElementRate then
ElementRate = ElementRate * 1.1
end
if targetUser:HasBuffID(49130_DIVINE_HYMN_CARVER_:MAX_STACK_0) then
ElementRate = math.min(ElementRate, 1)
end
if srcUser:HasBuffID(49210_7892_:MAX_STACK_0) then
ElementRate = ElementRate + 0.15
end
if srcUser:HasBuffID(77480_48193_VICTORY_SWALLOW_1_:MAX_STACK_0) then
ElementRate = ElementRate + 0.1
end
if nil == CommonFun.NatureProps[srcAtkElement] or nil == CommonFun.NatureProps[targetDefElement] or nil == targetDefElement then
return 0
end
local NeutralAtk = srcUser:GetProperty("NeutralAtk")
local ele = ElementRate * (1 + NeutralAtk)
local RefineMDamReduc = targetUser:GetProperty("RefineMDamReduc")
local MDamSpike = srcUser:GetProperty("MDamSpike_MPEN")
local ResultDamInc = srcUser:GetProperty("ResultDamInc")
local ResultDamRes = targetUser:GetProperty("ResultDamRes")
if srcUser:HasBuffID(57200_DEVIL_GOVERNOR_CARD_:MAX_STACK_0) then
ResultDamInc = ResultDamInc + 0.15
end
local Result = 1 + ResultDamInc - ResultDamRes
Result = math.max(Result, 0.1)
local A = -(MAtkFinal * (1 + MDamSpike) + MRefine) * (skilllv * 0.3 * Num) * (1 - RefineMDamReduc) * (1 + MDamIncrease) * Result * ele
if targetUser:GetNpcID() == 30043_YEAR or targetUser:GetNpcID() == 280303_WILDNESS_SPIRIT_BEAST or targetUser:GetNpcID() == 56008_GOMORA or targetUser:GetNpcID() == 56009_BALTAN or targetUser:GetNpcID() == 56010_GOLZA or targetUser:GetNpcID() == 56011_BEMSTAR or targetUser:GetNpcID() == 56012_ELEKING or targetUser:GetNpcID() == 56013_KING_JOE then
A = -1
end
if targetUser:DamageAlways1() then
A = -1
end
return A
end
Enemy
{
"id": 131621,
"BuffDesc": "Watch Out for Bombs",
"BuffIcon": "skillbuff_commonbuff",
"BuffName": "Pepper Bomb (Layers)",
"BuffRate": {
"Odds": 100
},
"IconType": 2,
"BuffEffect": {
"type": "AccumLayer",
"LayerState": [
131621,
131622,
131623
],
"end_del_buff": [
131620
],
"trigger_buff": [
131622
],
"trigger_layer": {
"a": 4125,
"b": 1,
"c": 11,
"type": 8
}
}
}
Enemy
{
"id": 131622,
"BuffName": "Pepper Bomb (increases DMG to surrounding people)",
"BuffRate": {
"Odds": 100
},
"BuffEffect": {
"id": [
131623
],
"type": "AddBuff"
}
}
Enemy
{
"id": 131623,
"BuffName": "Pepper Bomb (DMG)",
"BuffRate": {
"Odds": 100
},
"BuffEffect": {
"Hp": {
"type": 6350
},
"type": "HSPChange"
},
"BuffStateID": 131620
}
Enemy
{
"id": 178304,
"BuffName": "Pepper Bomb",
"BuffRate": {
"Odds": 100
},
"Condition": {
"type": "BeAttack",
"all_skill": 1
},
"BuffEffect": {
"id": [
178305
],
"type": "AddBuff"
}
}
Enemy
{
"id": 178305,
"BuffDesc": "Watch Out for Bombs",
"BuffIcon": "skillbuff_commonbuff",
"BuffName": "Pepper Bomb (Layers)",
"BuffRate": {
"Odds": 100
},
"IconType": 1,
"BuffEffect": {
"type": "AccumLayer",
"LayerState": [
131621,
131622,
131623
],
"end_del_buff": [
178304
],
"trigger_buff": [
178306
],
"trigger_layer": {
"a": 0,
"b": 5,
"type": 1
}
}
}
Formula
{
"id": 25692001,
"Buff": {
"enemy": [
178304,
178305
]
},
"Icon": "",
"Camps": "Enemy",
"Level": 10,
"Logic": "SkillLockedTarget",
"NameZh": "##159232",
"CastAct": "wait",
"Fire_EP": 3,
"Pvp_buff": {
"enemy": [
178304,
178305
]
},
"AttackAct": [
"attack"
],
"Attack_EP": 2,
"SE_attack": "Skill/Whisperer_lajiaozhadan",
"SkillType": "Buff",
"Target_EP": 2,
"DamageType": 4,
"Launch_Range": 15
}