diff --git a/lua/app/config/buff.lua b/lua/app/config/buff.lua index ea2f02e1..3dd3ce0a 100644 --- a/lua/app/config/buff.lua +++ b/lua/app/config/buff.lua @@ -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 \ No newline at end of file diff --git a/lua/app/config/monster_dungeon_gold.lua b/lua/app/config/monster_dungeon_gold.lua index 0a00f2bc..c4cfefb2 100644 --- a/lua/app/config/monster_dungeon_gold.lua +++ b/lua/app/config/monster_dungeon_gold.lua @@ -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 diff --git a/lua/app/config/skill.lua b/lua/app/config/skill.lua index 5edd9ec0..3312010f 100644 --- a/lua/app/config/skill.lua +++ b/lua/app/config/skill.lua @@ -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 \ No newline at end of file diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 56478a0f..e1bcc25d 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -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 diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index fbc7b598..98b1b8a0 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -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 diff --git a/lua/app/module/battle/helper/battle_buff_special.lua b/lua/app/module/battle/helper/battle_buff_special.lua index b547b4e0..095c70c8 100644 --- a/lua/app/module/battle/helper/battle_buff_special.lua +++ b/lua/app/module/battle/helper/battle_buff_special.lua @@ -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 = { diff --git a/lua/app/userdata/battle/team/battle_unit_entity.lua b/lua/app/userdata/battle/team/battle_unit_entity.lua index 06e3fce1..04ab878d 100644 --- a/lua/app/userdata/battle/team/battle_unit_entity.lua +++ b/lua/app/userdata/battle/team/battle_unit_entity.lua @@ -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