parent
941cb86845
commit
85a608d21a
|
@ -1776,7 +1776,6 @@ local passivityList = {
|
|||
for i = 1, i1 do
|
||||
role:AddSkill(BattleSkillType.Normal, false, true, nil)
|
||||
end
|
||||
LogError("aaaaaaaaaaaaaaaaaa")
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd)
|
||||
|
@ -2533,7 +2532,6 @@ local passivityList = {
|
|||
local list = skill:GetDirectTargetsNoMiss()
|
||||
if list then
|
||||
local tv = floor(BattleUtil.ErrorCorrection(role:GetRoleData(BattlePropList[pro]) * f1))
|
||||
LogBattle(role:GetRoleData(pro).." ".. f1.." " .. tv)
|
||||
for _, r in ipairs(list) do
|
||||
local auraBuff = Buff.Create(role, BuffName.HOT, i1, 1, tv)
|
||||
auraBuff.interval = 1
|
||||
|
@ -2557,7 +2555,6 @@ local passivityList = {
|
|||
local list = skill:GetDirectTargetsNoMiss()
|
||||
if list then
|
||||
local tv = floor(BattleUtil.ErrorCorrection(role:GetRoleData(BattlePropList[pro]) * f1))
|
||||
LogBattle(role:GetRoleData(pro).." ".. f1.." " .. tv)
|
||||
for _, r in ipairs(list) do
|
||||
local auraBuff = Buff.Create(role, BuffName.HOT, i1, 1, tv)
|
||||
auraBuff.interval = 1
|
||||
|
|
|
@ -202,7 +202,6 @@ end
|
|||
-- debugTurn 用于判断是否是debug轮转的参数
|
||||
function BattleLogic.TurnRound(debugTurn)
|
||||
if BattleLogic.GetIsDebug() and not debugTurn then
|
||||
LogBattle("-------------")
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.DebugStop)
|
||||
return
|
||||
end
|
||||
|
@ -296,28 +295,14 @@ function BattleLogic.CheckBattleLogic()
|
|||
"position", CurSkillPos[CurCamp]
|
||||
)
|
||||
|
||||
-- buff计算
|
||||
BattleLogic.BuffMgr:TurnUpdate(1) -- 计算恢复血量
|
||||
BattleLogic.BuffMgr:TurnUpdate(2) -- 计算持续伤害(除去流血)
|
||||
|
||||
-- 如果角色无法释放技能
|
||||
if not SkillRole:IsAvailable() -- 角色不能释放技能
|
||||
or (SkillRole:IsDead() and not BattleLogic.BuffMgr:HasBuff(SkillRole,BuffName.NoDead)) --将死但没有不死buff
|
||||
then
|
||||
BattleLogic.BuffMgr:TurnUpdate(3) -- 计算持续伤害(流血)
|
||||
BattleLogic.BuffMgr:TurnUpdate(4) -- 计算其他buff
|
||||
BattleLogic.BuffMgr:PassUpdate() -- 计算buff轮数
|
||||
BattleLogic.TurnRoundNextFrame() -- 下一个
|
||||
return
|
||||
end
|
||||
|
||||
-- 行动
|
||||
SkillRole.Event:DispatchEvent(BattleEventName.RoleTurnStart, SkillRole) -- 开始行动
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleTurnStart, SkillRole) -- 开始行动
|
||||
-- BattleLogic.BuffMgr:TurnUpdate(1) -- 计算恢复血量
|
||||
-- BattleLogic.BuffMgr:TurnUpdate(2) -- 计算持续伤害(除去流血)
|
||||
-- 释放技能后,递归交换阵营
|
||||
SkillRole:CastSkill(function()
|
||||
-- buff计算
|
||||
BattleLogic.BuffMgr:TurnUpdate(1) -- 计算恢复血量
|
||||
BattleLogic.BuffMgr:TurnUpdate(2) -- 计算持续伤害(除去流血)
|
||||
-- 设置行动完成回调
|
||||
SkillManager.SetTurnRoundFunc(function()
|
||||
BattleLogic.BuffMgr:TurnUpdate(3) -- 计算持续伤害(流血)
|
||||
BattleLogic.BuffMgr:TurnUpdate(4) -- 计算其他buff
|
||||
BattleLogic.BuffMgr:PassUpdate() -- 计算buff轮数
|
||||
|
@ -325,6 +310,19 @@ function BattleLogic.CheckBattleLogic()
|
|||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleTurnEnd, SkillRole) -- 开始行动
|
||||
BattleLogic.TurnRoundNextFrame()
|
||||
end)
|
||||
|
||||
-- 如果角色无法释放技能
|
||||
if not SkillRole:IsAvailable() -- 角色不能释放技能
|
||||
or (SkillRole:IsDead() -- 将死状态
|
||||
and not BattleLogic.BuffMgr:HasBuff(SkillRole,BuffName.NoDead) --将死但没有不死buff
|
||||
and not SkillManager.HaveMySkill(SkillRole)) -- 也没有要释放的技能
|
||||
then
|
||||
SkillManager.CheckTurnRound()
|
||||
return
|
||||
end
|
||||
|
||||
-- 释放技能后,递归交换阵营
|
||||
SkillRole:CastSkill()
|
||||
end
|
||||
|
||||
function BattleLogic.WaitForTrigger(delayTime, action)
|
||||
|
@ -360,12 +358,9 @@ function BattleLogic.Update()
|
|||
end
|
||||
if CurRound > MaxRound then
|
||||
if BattleLogic.Type==9 or BattleLogic.Type== 0 then
|
||||
LogBattle("我方总输出"..allHeroDamage.."敌方总输出:"..allEnemyDamage)
|
||||
if allHeroDamage>allEnemyDamage then
|
||||
LogBattle("争霸赛我方胜")
|
||||
BattleLogic.BattleEnd(1)
|
||||
else
|
||||
LogBattle("争霸赛敌方胜")
|
||||
BattleLogic.BattleEnd(0)
|
||||
end
|
||||
else
|
||||
|
|
|
@ -637,7 +637,7 @@ function BattleUtil.ApplyTreat(castRole, targetRole, value, baseFactor,critDamag
|
|||
--添加发送到battleLogic的治疗消息,用于计算总的战斗伤害值
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.RoleBeTreated, castRole, treat, baseTreat)
|
||||
BattleLogManager.Log(
|
||||
"Final Damage",
|
||||
"Final Treat",
|
||||
"acamp", castRole.camp,
|
||||
"apos", castRole.position,
|
||||
"tcamp", targetRole.camp,
|
||||
|
|
|
@ -8,7 +8,6 @@ function MSkill:New()
|
|||
end
|
||||
|
||||
function MSkill:Init(owner, group, index, skillData)
|
||||
LogBattle("MSkill Init")
|
||||
self.owner = owner
|
||||
self.group = group
|
||||
self.groupIndex = index
|
||||
|
|
|
@ -9,7 +9,6 @@ end
|
|||
|
||||
-- 初始化数据
|
||||
function MSkillGroup:Init(monster, groupData)
|
||||
LogBattle("MSkillGroup Init")
|
||||
self.owner = monster
|
||||
self.skillGroupData = groupData
|
||||
-- 创建技能
|
||||
|
|
|
@ -148,7 +148,6 @@ end
|
|||
|
||||
-- 技能加入检测
|
||||
function MTrigger.AddSkill(triggerId, condition, skill)
|
||||
LogBattle("AddSkill "..triggerId)
|
||||
if not this.TriggerList then
|
||||
this.TriggerList = {}
|
||||
end
|
||||
|
|
|
@ -422,7 +422,10 @@ end
|
|||
-- 正常触发技能
|
||||
function RoleLogic:CastSkill(func)
|
||||
-- 设置轮转方法
|
||||
SkillManager.SetTurnRoundFunc(func)
|
||||
-- SkillManager.SetTurnRoundFunc(func)
|
||||
if not self:IsAvailable() then
|
||||
return
|
||||
end
|
||||
-- 没有沉默
|
||||
if not self.ctrl_slient and self.Rage >= self.SuperSkillRage then
|
||||
-- 释放大技能
|
||||
|
|
|
@ -10,13 +10,29 @@ this.DeadSkillList = {} -- 人物死亡后技能队列,死亡技能优先级
|
|||
this.MonsterSkillList = {}
|
||||
this.SkillList = {}
|
||||
this.IsSkilling = false
|
||||
this.MaxSkillCount = 20 -- 单个回合内最多释放20次技能
|
||||
-- 初始化
|
||||
function this.Init()
|
||||
this.Clear()
|
||||
end
|
||||
|
||||
function this.CheckMaxCount()
|
||||
if not this.CurSkillCount then
|
||||
this.CurSkillCount = 0
|
||||
end
|
||||
if this.CurSkillCount < this.MaxSkillCount then
|
||||
this.CurSkillCount = this.CurSkillCount + 1
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
--
|
||||
function this.AddMonsterSkill(skill)
|
||||
-- 如果超出最大限制则不再追加技能
|
||||
if not this.CheckMaxCount() then
|
||||
return
|
||||
end
|
||||
if skill.type == BattleSkillType.Monster then
|
||||
table.insert(this.MonsterSkillList, skill)
|
||||
end
|
||||
|
@ -26,6 +42,10 @@ end
|
|||
|
||||
-- 向技能列表中追加技能
|
||||
function this.AddSkill(caster, effectData, type, targets, isAdd, isRage)
|
||||
-- 如果超出最大限制则不再追加技能
|
||||
if not this.CheckMaxCount() then
|
||||
return
|
||||
end
|
||||
local skill = skillPool:Get()
|
||||
skill:Init(caster, effectData, type, targets, isAdd, isRage)
|
||||
if type == BattleSkillType.DeadSkill then -- 死亡技能加入单独的对列
|
||||
|
@ -37,6 +57,10 @@ function this.AddSkill(caster, effectData, type, targets, isAdd, isRage)
|
|||
end
|
||||
-- 插入技能到技能列表首位
|
||||
function this.InsertSkill(caster, effectData, type, targets, isAdd, isRage)
|
||||
-- 如果超出最大限制则不再追加技能
|
||||
if not this.CheckMaxCount() then
|
||||
return
|
||||
end
|
||||
local skill = skillPool:Get()
|
||||
skill:Init(caster, effectData, type, targets, isAdd, isRage)
|
||||
if type == BattleSkillType.DeadSkill then -- 死亡技能加入单独的对列
|
||||
|
@ -87,6 +111,9 @@ function this.CheckTurnRound()
|
|||
-- 没有技能释放的时候才轮转
|
||||
if this.TurnRoundFunc then
|
||||
BattleLogic.WaitForTrigger(0.3, function()
|
||||
-- 清除数量限制
|
||||
this.CurSkillCount = 0
|
||||
--
|
||||
this.TurnRoundFunc()
|
||||
this.TurnRoundFunc = nil
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue