This commit is contained in:
xiekaidong 2023-06-19 11:55:10 +08:00
parent 3c9a656192
commit f1b4a21ae6
7 changed files with 91 additions and 19 deletions

View File

@ -668,6 +668,12 @@ local buff = {
["fx_disappear"]={
27
}
},
[76]={
["id"]=76,
["name"]="invalid_control",
["buff_type"]=7,
["decr"]=3
}
}
local keys = {
@ -746,12 +752,13 @@ local keys = {
["death_summon"]=buff[72],
["shield_rebound_400"]=buff[73],
["shield_ice"]=buff[74],
["shield_ice_rebound_400"]=buff[75]
["shield_ice_rebound_400"]=buff[75],
["invalid_control"]=buff[76]
}
}
local config = {
data=buff,
keys=keys,
count=75
count=76
}
return config

View File

@ -5,7 +5,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10008
@ -36,7 +37,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10009
@ -67,7 +69,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10010
@ -98,7 +101,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10011
@ -129,7 +133,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10012
@ -160,7 +165,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10008
@ -191,7 +197,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10009
@ -222,7 +229,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10010
@ -253,7 +261,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10011
@ -284,7 +293,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10012
@ -315,7 +325,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10008
@ -346,7 +357,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10009
@ -377,7 +389,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10010
@ -408,7 +421,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10011
@ -439,7 +453,8 @@ local monster_dungeon_gold = {
["atk"]=10000000000,
["atk_times"]=0,
["skill"]={
10072
10072,
10073
},
["passive_skill"]={
10012

View File

@ -9006,6 +9006,25 @@ local skill = {
400
}
},
[10073]={
["effect_type"]=1,
["trigger"]=1,
["effect"]={
{
["type"]="invalid_control",
["num"]=10000,
["ratio"]=10000,
["round"]=999
}
},
["obj"]=1,
["skill_position"]={
2,
0
},
["cd"]=99,
["cd_start"]=0
},
[20001]={
["effect_type"]=1,
["trigger"]=1,
@ -20365,6 +20384,6 @@ local skill = {
}
}
local config = {
data=skill,count=760
data=skill,count=761
}
return config

View File

@ -97,7 +97,8 @@ BattleConst.MIN_NODE_HEIGHT = {
}
BattleConst.BUFF_TYPE = {
DIRECT_HURT = 3
DIRECT_HURT = 3,
CONTROL = 8,
}
BattleConst.BUFF_STACK_TYPE = {
@ -307,6 +308,7 @@ local BUFF_NAME = {
SHIELD_REBOUND_400 = "shield_rebound_400",
SHIELD_ICE = "shield_ice",
SHIELD_ICE_REBOUND_400 = "shield_ice_rebound_400",
INVALID_CONTROL = "invalid_control",
}
BattleConst.BUFF_NAME = BUFF_NAME
@ -359,6 +361,7 @@ local ATTR_NAME = {
SKILL_HURT = "skill_hurt",
DEATH_SUMMON = "death_summon",
BLEED = "bleed",
INVALID_CONTROL = "invalid_control",
}
BattleConst.ATTR_NAME = ATTR_NAME

View File

@ -1501,6 +1501,14 @@ function BattleUnitComp:takeEffect(buff, target, conditionResult)
end
return
end
if target.unitEntity:getIsInvalidControl() then -- 控制效果
if buff:getBuffType() == BattleConst.BUFF_TYPE.CONTROL then
return
elseif buff:getName() == BattleConst.BUFF_NAME.FROZEN or
buff:getName() == BattleConst.BUFF_NAME.IMPRISON then
return
end
end
local round = buff:getRound()
local buffEffect
if round > 0 then

View File

@ -100,6 +100,20 @@ local function _lockOff(buffSender, target, buff, buffEffect)
return 1
end
local function _invalidControlOn(buffSender, buff, target, buffEffect)
if not target.unitEntity:getIsInvalidControl() then --只能添加一次
target.unitEntity:addAttr(BattleConst.ATTR_NAME.INVALID_CONTROL, 1, false)
end
return 1
end
local function _invalidControlOff(buffSender, target, buff, buffEffect)
if target.unitEntity:getIsInvalidControl() then
target.unitEntity:addAttr(BattleConst.ATTR_NAME.INVALID_CONTROL, -1, false)
end
return 1
end
local _handleOn = {
[BUFF_NAME.ADD_SKILL] = _addSkillOn, -- 添加技能
@ -109,6 +123,7 @@ local _handleOn = {
[BUFF_NAME.IMPRISON] = _imprisonOn, -- 禁锢
[BUFF_NAME.FROZEN] = _frozenOn, -- 冻结
[BUFF_NAME.LOCK] = _lockOn, -- 锁定
[BUFF_NAME.INVALID_CONTROL] = _invalidControlOn, -- 无控
}
local _handleOff = {
@ -119,6 +134,7 @@ local _handleOff = {
[BUFF_NAME.IMPRISON] = _imprisonOff, -- 禁锢
[BUFF_NAME.FROZEN] = _frozenOff, -- 冻结
[BUFF_NAME.LOCK] = _lockOff, -- 锁定
[BUFF_NAME.INVALID_CONTROL] = _invalidControlOff, -- 无控
}
local _handleWork = {

View File

@ -427,6 +427,10 @@ function BattleUnitEntity:getIsDead()
return self.team:getIsDead()
end
function BattleUnitEntity:getIsInvalidControl()
return self:getAttrValue(GConst.BattleConst.ATTR_NAME.INVALID_CONTROL) > 0
end
function BattleUnitEntity:getAttrValue(attr)
return self.team:getAttrValue(attr)
end