diff --git a/luafight/Modules/Battle/Logic/Base/Effect.lua b/luafight/Modules/Battle/Logic/Base/Effect.lua index 0ba1d0fc5..e39ceb091 100644 --- a/luafight/Modules/Battle/Logic/Base/Effect.lua +++ b/luafight/Modules/Battle/Logic/Base/Effect.lua @@ -19,7 +19,7 @@ local propertyList = { RoleDataName.CritDamageFactor, RoleDataName.TreatFacter, RoleDataName.MaxHp, - RoleDataName.Hp, + RoleDataName.MaxHp, RoleDataName.CureFacter, RoleDataName.Tenacity, } diff --git a/luafight/Modules/Battle/Logic/Base/Passivity.lua b/luafight/Modules/Battle/Logic/Base/Passivity.lua index 4ca012605..70d3e0d7a 100644 --- a/luafight/Modules/Battle/Logic/Base/Passivity.lua +++ b/luafight/Modules/Battle/Logic/Base/Passivity.lua @@ -207,7 +207,7 @@ local passivityList = { end) end end - role.Event:AddEvent(BattleEventName.OnRoleBeDamagedBefore, OnRoleBeDamagedBefore) + role.Event:AddEvent(BattleEventName.RoleBeDamagedBefore, OnRoleBeDamagedBefore) end, --受击时,有[a]的概率抵消[b]*[c]的攻击。 diff --git a/luafight/Modules/Battle/Logic/Base/Skill.lua b/luafight/Modules/Battle/Logic/Base/Skill.lua index 8cdf7c9be..98db31079 100644 --- a/luafight/Modules/Battle/Logic/Base/Skill.lua +++ b/luafight/Modules/Battle/Logic/Base/Skill.lua @@ -32,6 +32,7 @@ function Skill:Init(role, effectData) self.sp = 0 self.spPass = 0 self.isTeamSkill = false + self.isManual = false for i=2, #effectData do local v = effectData[i] @@ -167,6 +168,7 @@ function Skill:Cast() end BattleLogic.SetSkillUsable(self.owner.camp, false) + self.isManual = false BattleLogic.WaitForTrigger(duration, function() BattleLogic.SetSkillUsable(self.owner.camp, true) if not self.isTeamSkill then @@ -178,7 +180,8 @@ function Skill:Cast() end --表现层调用 function Skill:CanManualCast() - return self.owner:CanCastSkill() and self.owner.camp == 0 and not self.owner.Auto and self.sp >= self.spPass + return not self.isManual and self.owner.enable and not self.owner.ctrl_slient and + self.owner.camp == 0 and not self.owner.Auto and self.sp >= self.spPass end --表现层调用 function Skill:ManualCast() @@ -192,6 +195,7 @@ function Skill:ManualCast() else BattleLogic.AddOption(3, self.owner.uid) end + self.isManual = true end end diff --git a/luafight/Modules/Battle/Logic/BattleLogic.lua b/luafight/Modules/Battle/Logic/BattleLogic.lua index 70d178f86..1603c3697 100644 --- a/luafight/Modules/Battle/Logic/BattleLogic.lua +++ b/luafight/Modules/Battle/Logic/BattleLogic.lua @@ -25,6 +25,7 @@ BattleLogic.Result = -1 BattleLogic.Event = BattleEvent.New() BattleLogic.BuffMgr = BuffManager.New() +local skillManualQueue = BattleQueue.New() local playerTeamDummyRole = {camp = 0, Event = BattleLogic.Event, isTeam = true, curSkill = nil} local enemyTeamDummyRole = {camp = 1, Event = BattleLogic.Event, isTeam = true, curSkill = nil} local playerTeamSkillList = {} @@ -76,6 +77,7 @@ function BattleLogic.Init(maxTime, data, optionData) BattleLogic.TotalOrder = #data.enemyData BattleLogic.Clear() + skillManualQueue:Clear() curUid = 0 curBuffId = 0 @@ -289,12 +291,12 @@ function BattleLogic.ExecuteOption(option) elseif opType == 2 then --释放skill local role = objList.kvList[opArg] if role and role.skill then - role.skill:Cast() + skillManualQueue:Enqueue(role.skill) end elseif opType == 3 then --释放superSkill local role = objList.kvList[opArg] if role and role.superSkill then - role.superSkill:Cast() + skillManualQueue:Enqueue(role.superSkill) end elseif opType == 4 then --释放teamSkill local teamSkill = playerTeamSkillList[playerTeamSkillIndex] @@ -399,6 +401,10 @@ function BattleLogic.Update() end end + if playerSkillUsable and skillManualQueue.size > 0 then --手动操作的技能进入队列,等待释放 + skillManualQueue:Dequeue():Cast() + end + local index = 1 while index <= tbActionList.size do local action = tbActionList.buffer[index]