战斗同步

master_ob2
PC-202302260912\Administrator 2023-06-28 16:34:13 +08:00
parent 9baf7f486e
commit 4ededb5d69
23 changed files with 1775 additions and 1358 deletions

View File

@ -45,13 +45,13 @@ local _fightData
local _optionData
local function pairsByKeys(t)
local test.a = {}
local a = {}
for n in pairs(t) do
if n then
test.a[#test.a+1] = n
a[#a+1] = n
end
end
table.sort(test.a, function( op1, op2 )
table.sort(a, function( op1, op2 )
local type1, type2 = type(op1), type(op2)
local num1, num2 = tonumber(op1), tonumber(op2)
@ -71,7 +71,7 @@ local function pairsByKeys(t)
local i = 0
return function()
i = i + 1
return test.a[i], t[test.a[i]]
return a[i], t[a[i]]
end
end
@ -119,7 +119,7 @@ local function generateRecordFile()
os.date("%H"),
os.date("%M"),
os.date("%S"))
local file = io.open("luafight/BattleRecord/"..time..".txt", "test.a")
local file = io.open("luafight/BattleRecord/"..time..".txt", "a")
local record = BattleLogic.GetRecord()
for i=1, #record do
file:write(record[i].."\n")
@ -258,17 +258,17 @@ function BattleMain.Execute(args, fightData, optionData)
local platform
-- linux
if not file then
file = io.open("../luafight/LogError/"..time..".txt", "test.a")
file = io.open("../luafight/LogError/"..time..".txt", "a")
platform = "Linux"
end
-- local window server
if not file then
file = io.open("luafight/LogError/"..time..".txt", "test.a")
file = io.open("luafight/LogError/"..time..".txt", "a")
platform = "Local Windows Server"
end
-- local
if not file then
file = io.open("LogError/"..time..".txt", "test.a")
file = io.open("LogError/"..time..".txt", "a")
platform = "Local"
end

View File

@ -94,7 +94,7 @@ local function error( err )
os.date("%H"),
os.date("%M"),
os.date("%S"))
local file = io.open("LogError/"..time..".txt", "test.a")
local file = io.open("LogError/"..time..".txt", "a")
--file:write("fightData:\n"..PrintTable(_fightData).."\n")
--file:write("optionData:\n"..PrintTable(_optionData).."\n")
file:write("error:\n"..debug.traceback(err).."\n")
@ -110,7 +110,7 @@ local function generateRecordFile()
os.date("%H"),
os.date("%M"),
os.date("%S"))
local file = io.open("BattleRecord/"..time..".txt", "test.a")
local file = io.open("BattleRecord/"..time..".txt", "a")
local record = BattleLogic.GetRecord()
for i=1, #record do
file:write(record[i].."\n")

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ local type = type
local setmetatable = setmetatable
local function readonlyMT(t,k,v)
Log("attempt to update test.a read-only table")
Log("attempt to update a read-only table")
end
local function setDefaultTable(rT, dT)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -17,13 +17,13 @@ end
local isLog = (true and not isMobile) or isEditor
local function pairsByKeys(t)
local test.a = {}
local a = {}
for n in pairs(t) do
if n then
test.a[#test.a+1] = n
a[#a+1] = n
end
end
table.sort(test.a, function( op1, op2 )
table.sort(a, function( op1, op2 )
local type1, type2 = type(op1), type(op2)
local num1, num2 = tonumber(op1), tonumber(op2)
@ -43,7 +43,7 @@ local function pairsByKeys(t)
local i = 0
return function()
i = i + 1
return test.a[i], t[test.a[i]]
return a[i], t[a[i]]
end
end
function this.PrintBattleTable(tb)
@ -165,7 +165,7 @@ end
-- 将日志写入log
function this.WriteLogToFile()
if not isLog then return end
local file, platform = this.GetFile("test.a")
local file, platform = this.GetFile("a")
for i = 1, #this.logList do
file:write(this.logList[i].."\n")
end

View File

@ -606,7 +606,6 @@ function BattleLogic.BattleEnd(result)
local v1 = HardStageCondition.CheckCondition(harConfig.ConditionType,harConfig.ConditionValue)
table.insert(levelStarRecord,hardStageConfig.ConditionValue[i])
table.insert(levelStarRecord,v1)
print("k=="..hardStageConfig.ConditionValue[i].." v=="..v1)
end
end
end

View File

@ -9,15 +9,22 @@ function Control:SetData(...)
self.sort = 4
end
--初始化后调用一次
function Control:OnStart()
local lockTargetFun=function()
self.target.ctrl_slient = false
self.target.lockTarget=nil
self.disperse=true
end
if self.ctrlType == 1 then --眩晕
self.target.ctrl_dizzy = true
elseif self.ctrlType == 2 then --沉默
self.target.ctrl_slient = true
elseif self.ctrlType == 3 then --嘲讽(包括沉默)
self.target.lockTarget = self.caster
self.target.ctrl_slient = true
self.target.ctrl_lock = true
self.caster.Event:AddEvent(BattleEventName.RoleDead,lockTargetFun,nil,nil,self.target)
elseif self.ctrlType == 4 then --禁疗
self.target.ctrl_noheal = true
elseif self.ctrlType == 5 then --致盲
@ -50,7 +57,7 @@ function Control:OnEnd()
self.target.ctrl_slient = false
elseif self.ctrlType == 3 then --嘲讽(包括沉默)
self.target.lockTarget = nil
self.target.ctrl_slient = false
self.target.ctrl_lock = false
elseif self.ctrlType == 4 then --禁疗
local isHave=self.target:CheckHavePassive(315)
if not isHave then

View File

@ -9,7 +9,7 @@ local _ConditionConfig = {
end
return 0
end,
--[test.a]回合内通过关卡
--[a]回合内通过关卡
[2]=function(condition)
local v1 = condition[1]
local round,maxRound=BattleLogic.GetCurRound()
@ -18,7 +18,7 @@ local _ConditionConfig = {
end
return 0
end,
--上阵[test.a]个神将通过关卡
--上阵[a]个神将通过关卡
[3]=function(condition)
local v1 = condition[1]
local list = RoleManager.QueryIncludeExile(function(v) return v.camp == 0 end,true)
@ -27,7 +27,7 @@ local _ConditionConfig = {
end
return 0
end,
--[test.a]回合内造成[b]伤害
--[a]回合内造成[b]伤害
[4]=function(condition)
local v1 = condition[1]
local v2 = condition[2]
@ -43,7 +43,7 @@ local _ConditionConfig = {
end
return 0
end,
--使用指定[test.a]系神将[b]名
--使用指定[a]系神将[b]名
[5]=function(condition)
local v1 = condition[1]
local v2 = condition[2]
@ -53,7 +53,7 @@ local _ConditionConfig = {
end
return 0
end,
--存活[test.a]名
--存活[a]名
[6]=function(condition)
local v1 = condition[1]
local list = RoleManager.QueryIncludeExile(function(v) return v.camp == 0 and not v:IsDead() end)
@ -62,7 +62,7 @@ local _ConditionConfig = {
end
return 0
end,
--不上阵[test.a]职能神将通过关卡
--不上阵[a]职能神将通过关卡
[7]=function(condition)
local v1 = condition[1]
local list = RoleManager.QueryIncludeExile(function(v) return v.camp == 0 and v.professionId==v1 end,true)
@ -71,7 +71,7 @@ local _ConditionConfig = {
end
return 0
end,
--不上阵[test.a]阵营神将通过关卡
--不上阵[a]阵营神将通过关卡
[8]=function(condition)
local v1 = condition[1]
local list = RoleManager.QueryIncludeExile(function(v) return v.camp == 0 and v.element==v1 end,true)
@ -104,7 +104,7 @@ local _ConditionConfig = {
end
return 1
end,
--全部上阵[test.a]职业神将通过关卡
--全部上阵[a]职业神将通过关卡
[11]=function(condition)
local v1 = condition[1]
local list = RoleManager.QueryIncludeExile(function(v) return v.camp == 0 and v.professionId~=v1 end,true)
@ -113,7 +113,7 @@ local _ConditionConfig = {
end
return 0
end,
--达成[test.a]次斩杀
--达成[a]次斩杀
[12]=function(condition)
local v1 = condition[1]
local num=HardStageEventManager.GetSeckKillNum()
@ -122,7 +122,7 @@ local _ConditionConfig = {
end
return 0
end,
--控制[test.a]类型 [b]次
--控制[a]类型 [b]次
[13]=function(condition)
local v1 = condition[1]
local v2 = condition[2]
@ -145,8 +145,8 @@ local _ConditionConfig = {
end
return 0
end,
--持续伤害[test.a]杀死[b]人
--test.a[int 0:所有 1:燃烧 2:毒死]
--持续伤害[a]杀死[b]人
--a[int 0:所有 1:燃烧 2:毒死]
[14]=function(condition)
local v1 = condition[1]
local v2 = condition[2]
@ -167,8 +167,8 @@ local _ConditionConfig = {
end
return 0
end,
--追击击杀[test.a]人,击杀[b]号位敌方(填b 就不会判断 test.a)
--test.a[int] b[int]
--追击击杀[a]人,击杀[b]号位敌方(填b 就不会判断 a)
--a[int] b[int]
[15]=function(condition)
local v1 = condition[1]
local v2 = condition[2]
@ -188,7 +188,7 @@ local _ConditionConfig = {
end
return 0
end,
--回复血量[test.a]次
--回复血量[a]次
[16]=function(condition)
local v1=condition[1]
local time=HardStageEventManager.GetAllTreatTime()
@ -197,8 +197,8 @@ local _ConditionConfig = {
end
return 0
end,
--第[test.a]个击杀敌方[b]号位
--test.a[int 0:是最后],b[int]
--第[a]个击杀敌方[b]号位
--a[int 0:是最后],b[int]
[17]=function(condition)
local v1=condition[1]
local v2=condition[2]

View File

@ -205,6 +205,7 @@ BattleEventName = {
WeaponSkillCast = indexAdd(), --神兵技能释放
CheckFalseNoDead = indexAdd(), --检测伪不灭
CheckTreatVoid = indexAdd(), --检测治疗是否无效
CheckDamShift=indexAdd(), --检测伤害转移
}
BattleMaxFrame = 1000000
@ -320,6 +321,7 @@ ControlType = {
BattleSkillType = {
Monster = 0,
Normal = 1,
--大招
Special = 2,
--额外技能
Extra = 3,

View File

@ -56,8 +56,8 @@ function BattleUtil.ChooseFRow(arr)
table.insert(tempArr, r)
end
end
table.sort(tempArr, function(test.a, b)
return test.a.position < b.position
table.sort(tempArr, function(a, b)
return a.position < b.position
end)
return tempArr
end
@ -69,8 +69,8 @@ function BattleUtil.ChooseBRow(arr)
table.insert(tempArr, r)
end
end
table.sort(tempArr, function(test.a, b)
return test.a.position < b.position
table.sort(tempArr, function(a, b)
return a.position < b.position
end)
return tempArr
end
@ -82,8 +82,8 @@ function BattleUtil.ChooseCol(arr, col)
table.insert(tempArr, role)
end
end
table.sort(tempArr, function(test.a, b)
return test.a.position < b.position
table.sort(tempArr, function(a, b)
return a.position < b.position
end)
return tempArr
end
@ -173,16 +173,16 @@ if one>two then
end
table.sort(teamArr, function(test.a, b)
return test.a.position < b.position
table.sort(teamArr, function(a, b)
return a.position < b.position
end)
return teamArr
end
-- 根据属性排序
function BattleUtil.SortByProp(arr, prop, sort)
BattleUtil.Sort(arr, function(test.a, b)
local r1 = test.a:GetRoleData(prop)
BattleUtil.Sort(arr, function(a, b)
local r1 = a:GetRoleData(prop)
local r2 = b:GetRoleData(prop)
if sort == 1 then return r1 > r2 else return r1 < r2 end
end)
@ -190,8 +190,8 @@ function BattleUtil.SortByProp(arr, prop, sort)
end
-- 按百分比血量排序
function BattleUtil.SortByHpFactor(arr, sort)
BattleUtil.Sort(arr, function(test.a, b)
local r1 = test.a:GetRoleData(RoleDataName.Hp) / test.a:GetRoleData(RoleDataName.MaxHp)
BattleUtil.Sort(arr, function(a, b)
local r1 = a:GetRoleData(RoleDataName.Hp) / a:GetRoleData(RoleDataName.MaxHp)
local r2 = b:GetRoleData(RoleDataName.Hp) / b:GetRoleData(RoleDataName.MaxHp)
if sort == 1 then return r1 > r2 else return r1 < r2 end
end)
@ -200,18 +200,18 @@ end
-- 按百分比血量排序
function BattleUtil.SortByHpFactorAndHp(arr, sort)
BattleUtil.Sort(arr, function(test.a, b)
local r1 = test.a:GetRoleData(RoleDataName.Hp) / test.a:GetRoleData(RoleDataName.MaxHp)
BattleUtil.Sort(arr, function(a, b)
local r1 = a:GetRoleData(RoleDataName.Hp) / a:GetRoleData(RoleDataName.MaxHp)
local r2 = b:GetRoleData(RoleDataName.Hp) / b:GetRoleData(RoleDataName.MaxHp)
if sort == 1 then
if r1==r2 then
return test.a:GetRoleData(RoleDataName.Hp)<b:GetRoleData(RoleDataName.Hp)
return a:GetRoleData(RoleDataName.Hp)<b:GetRoleData(RoleDataName.Hp)
else
return r1 > r2
end
else
if r1==r2 then
return test.a:GetRoleData(RoleDataName.Hp)<b:GetRoleData(RoleDataName.Hp)
return a:GetRoleData(RoleDataName.Hp)<b:GetRoleData(RoleDataName.Hp)
else
return r1 < r2
end
@ -231,18 +231,18 @@ function BattleUtil.RemoveNoDeadRole(arr)
end
--按怒气排序
function BattleUtil.SortByRage(arr, sort)
BattleUtil.Sort(arr, function(test.a, b)
local r1 = test.a.Rage
BattleUtil.Sort(arr, function(a, b)
local r1 = a.Rage
local r2 = b.Rage
if sort == 1 then
if r1==r2 then
return test.a.position>b.position
return a.position>b.position
else
return r1 > r2
end
else
if r1==r2 then
return test.a.position>b.position
return a.position>b.position
else
return r1 < r2
end
@ -299,7 +299,7 @@ function BattleUtil.ChooseTarget(role, chooseId,queryType)
arr = RoleManager.Query(function (r) return r.camp == role.camp end)
end
elseif chooseType == 2 then
if role.lockTarget and not role.lockTarget:IsRealDead() and not role.lockTarget.isExile and num == 1 then --嘲讽时对单个敌军生效
if role.lockTarget and not role.lockTarget:IsRealDead() and not role.lockTarget.isExile then --嘲讽时对单个敌军生效
return {role.lockTarget}
end
arr = RoleManager.Query(function (r) return r.camp ~= role.camp end)
@ -414,8 +414,8 @@ function BattleUtil.ChooseTarget(role, chooseId,queryType)
arr = RoleManager.GetArrAggroList(role, arr)
end
-- elseif chooseWeight == 9 then -- 展位距离
-- BattleUtil.Sort(arr, function(test.a, b)
-- local r1 = math.abs(role.position - test.a.position) * 10 + test.a.position
-- BattleUtil.Sort(arr, function(a, b)
-- local r1 = math.abs(role.position - a.position) * 10 + a.position
-- local r2 = math.abs(role.position - b.position) * 10 + b.position
-- if sort == 1 then return r1 > r2 else return r1 < r2 end
-- end)
@ -484,8 +484,8 @@ function BattleUtil.ChooseTarget(role, chooseId,queryType)
end
end
-- table.sort(finalArr, function(test.a, b)
-- return test.a.position < b.position
-- table.sort(finalArr, function(a, b)
-- return a.position < b.position
-- end)
return finalArr
@ -754,6 +754,18 @@ function BattleUtil.ApplyDamageNoPassive(skill, atkRole, defRole, damage, bCrit,
damage=realDamage
end
defRole.Event:DispatchEvent(BattleEventName.CheckFalseNoDead, damagingFunc, atkRole, realDamage, skill, dotType, bCrit, damageType,isDirect)
local isToDied=false
--检测时空猪八戒格挡致死伤害
local checkDamageShift = function(isDead)
isToDied=isDead
end
BattleLogic.Event:DispatchEvent(BattleEventName.CheckDamShift, checkDamageShift, atkRole, realDamage, defRole,skill)
--格挡成功
if isToDied then
return
end
local finalDmg = defRole.data:SubValue(RoleDataName.Hp,realDamage)
if finalDmg >= 0 then
if defRole:GetRoleData(RoleDataName.Hp) <= 0 and not defRole:IsDead() then
@ -921,6 +933,19 @@ function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageTy
damage=realDamage
end
defRole.Event:DispatchEvent(BattleEventName.CheckFalseNoDead, damagingFunc, atkRole, realDamage, skill, dotType, bCrit, damageType,isDirect)
local isToDied=false
--检测时空猪八戒格挡致死伤害
local checkDamageShift = function(isDead)
isToDied=isDead
end
BattleLogic.Event:DispatchEvent(BattleEventName.CheckDamShift, checkDamageShift, atkRole, realDamage, defRole,skill)
--格挡成功
if isToDied then
return
end
--御甲过滤后的伤害只会处理扣血 by: wangzhenxing shihongyi 2021/09/27
local finalDmg = defRole.data:SubValue(RoleDataName.Hp,realDamage)
if finalDmg >= 0 then
@ -980,8 +1005,12 @@ function BattleUtil.FinalDamageCountShield(skill, atkRole, defRole, damage, bCri
end
-- 计算无敌盾减伤
damage = BattleUtil.CalAllReduceShield(atkRole, defRole, damage,skill)
if damage < 0 then damage = 0 end
--计算主角增伤
if atkRole.type==BattleUnitType.Monster and atkRole.isPlayer then
damage=floor(damage*(1+atkRole:GetRoleData(RoleDataName.DamageBocusFactor)))
end
if skill and skill.type==BattleSkillType.Special then
skill.owner.superSkillDamage=damage
end
@ -1012,6 +1041,18 @@ function BattleUtil.FinalDamageCountShield(skill, atkRole, defRole, damage, bCri
damage=realDamage
end
defRole.Event:DispatchEvent(BattleEventName.CheckFalseNoDead, damagingFunc, atkRole, realDamage, skill, dotType, bCrit, damageType,isDirect)
local isToDied=false
--检测时空猪八戒格挡致死伤害
local checkDamageShift = function(isDead)
isToDied=isDead
end
BattleLogic.Event:DispatchEvent(BattleEventName.CheckDamShift, checkDamageShift, atkRole, realDamage, defRole,skill)
--格挡成功
if isToDied then
return
end
local finalDmg = defRole.data:SubValue(RoleDataName.Hp,realDamage)
if finalDmg >= 0 then
if defRole:GetRoleData(RoleDataName.Hp) <= 0 and not defRole:IsDead() then

View File

@ -16,12 +16,14 @@ end
function Monster:Init(data)
self.type = BattleUnitType.Monster
self.camp = data.camp
-- if data.position==10 then
-- self.type = BattleUnitType.Player
-- end
self.position = data.position
self.star = data.star
self.isPlayer=false
self.uid= data.id
if data.position==100 then
self.isPlayer = true
end
self.teamDamage=data.teamDamage
self.roleData = data
self.sex=data.sex
@ -41,8 +43,8 @@ function Monster:Init(data)
self.skillGroupList[i] = MSkillManager.CreateMSkillGroup(self, i, data.skill[i])
end
if data.passivity and #data.passivity > 0 then
table.sort(data.passivity,function(test.a,b)
return test.a[1] < b[1]
table.sort(data.passivity,function(a,b)
return a[1] < b[1]
end)
for i = 1, #data.passivity do
local v = data.passivity[i]

View File

@ -237,31 +237,31 @@ function this.InitListener()
end
end
-- 对技能进行排序
table.sort(firstList, function(test.a, b)
table.sort(firstList, function(a, b)
-- 同阵营按位置排序
if test.a.owner.camp == b.owner.camp then
if test.a.owner.position == b.owner.position then
return test.a.id < b.id
if a.owner.camp == b.owner.camp then
if a.owner.position == b.owner.position then
return a.id < b.id
else
return test.a.owner.position < b.owner.position
return a.owner.position < b.owner.position
end
else
-- 不同阵营的根据先手阵营排序
return test.a.owner.camp == BattleLogic.FirstCamp
return a.owner.camp == BattleLogic.FirstCamp
end
end)
-- 对技能进行排序
table.sort(sortList, function(test.a, b)
table.sort(sortList, function(a, b)
-- 同阵营按位置排序
if test.a.owner.camp == b.owner.camp then
if test.a.owner.position == b.owner.position then
return test.a.id < b.id
if a.owner.camp == b.owner.camp then
if a.owner.position == b.owner.position then
return a.id < b.id
else
return test.a.owner.position < b.owner.position
return a.owner.position < b.owner.position
end
else
-- 不同阵营的根据先手阵营排序
return test.a.owner.camp == BattleLogic.FirstCamp
return a.owner.camp == BattleLogic.FirstCamp
end
end)
-- 依次加入技能管理

View File

@ -83,6 +83,7 @@ function RoleLogic:Init(uid, data, position)
self.IsDebug = false
self.enemyType = EnemyType.normal
self.lockTarget = nil --嘲讽
self.ctrl_lock = false --是否被嘲讽
self.ctrl_dizzy = false --眩晕 不能释放所有技能
self.ctrl_slient = false --沉默 只能1技能
self.ctrl_palsy = false --麻痹 只能2技能
@ -112,11 +113,11 @@ function RoleLogic:Init(uid, data, position)
self.passiveList = {}
if data.passivity and #data.passivity > 0 then
--排序363类型的排在前面
table.sort(data.passivity,function(test.a,b)
if test.a[3]==b[3] then
return test.a[1] < b[1]
table.sort(data.passivity,function(a,b)
if a[3]==b[3] then
return a[1] < b[1]
else
if test.a[3]==363 then
if a[3]==363 then
return true
end
if b[3]==363 then
@ -124,7 +125,7 @@ function RoleLogic:Init(uid, data, position)
end
end
return test.a[1] < b[1]
return a[1] < b[1]
end)
local coverPass={}
for i = 1, #data.passivity do
@ -556,6 +557,14 @@ function RoleLogic:AddSkill(type, isRage, isAdd, targets,isTrigger,isLoop)
effectData={self.skill[1],self.skill[2],self.skill[3],self.skill[4],{100001,{1,1,1}}}
isTriggerJudge=false
end
if self.ctrl_lock then
type=BattleSkillType.ChaosNormal
--嘲讽普攻使用普攻特效
effectData={self.skill[1],self.skill[2],self.skill[3],self.skill[4],{200221,{1,1,1}}}
isTriggerJudge=false
end
SkillManager.AddSkill(self, effectData, type, targets, isAdd, isRage,isTriggerJudge,isLoop)
--
end
@ -580,6 +589,13 @@ function RoleLogic:AddSuperSkill(isRage, isAdd, targets,isTrigger,isLoop,scale)
effectData={self.skill[1],self.skill[2],self.skill[3],self.skill[4],{100001,{1,1,1}}}
isTriggerJudge=false
end
if self.ctrl_lock then
type=BattleSkillType.ChaosNormal
--嘲讽普攻使用普攻特效
effectData={self.skill[1],self.skill[2],self.skill[3],self.skill[4],{200221,{1,1,1}}}
isTriggerJudge=false
end
local skill=SkillManager.AddSkill(self, effectData, type, targets, isAdd, isRage,isTriggerJudge,isLoop)
skill.AttactScale=scale
--

View File

@ -188,8 +188,8 @@ function RoleManager.Query(func, inCludeDeadRole)
end
end
end
table.sort(list, function(test.a, b)
return test.a.position < b.position
table.sort(list, function(a, b)
return a.position < b.position
end)
return list
end
@ -206,8 +206,8 @@ function RoleManager.QueryIncludeExile(func, inCludeDeadRole)
end
end
end
table.sort(list, function(test.a, b)
return test.a.position < b.position
table.sort(list, function(a, b)
return a.position < b.position
end)
return list
end
@ -224,8 +224,8 @@ function RoleManager.QueryIncludeExileNoNoDead(func, inCludeDeadRole)
end
end
end
table.sort(list, function(test.a, b)
return test.a.position < b.position
table.sort(list, function(a, b)
return a.position < b.position
end)
return list
end
@ -243,8 +243,8 @@ function RoleManager.QueryNoDead(func)
end
end
end
table.sort(list, function(test.a, b)
return test.a.position < b.position
table.sort(list, function(a, b)
return a.position < b.position
end)
return list
end
@ -359,8 +359,8 @@ function this.GetArrAggroList(role, arr)
end
end
end
table.sort(targetList, function(test.a, b)
return test.a.position < b.position
table.sort(targetList, function(a, b)
return a.position < b.position
end)
return targetList
end
@ -441,8 +441,8 @@ function this.GetNeighbor(role, chooseType)
end
end
end
table.sort(posList, function(test.a, b)
return test.a.position < b.position
table.sort(posList, function(a, b)
return a.position < b.position
end)
return posList
end

View File

@ -108,6 +108,13 @@ function this.InsertSkill(caster, effectData, type, targets, isAdd, isRage,isTri
effectData={caster.skill[1],caster.skill[2],caster.skill[3],caster.skill[4],{100001,{1,1,1}}}
isTriggerJudge=false
end
if caster.ctrl_lock and type~=BattleSkillType.DeadSkill then
type=BattleSkillType.ChaosNormal
--嘲讽普攻使用普攻特效
effectData={caster.skill[1],caster.skill[2],caster.skill[3],caster.skill[4],{200221,{1,1,1}}}
isTriggerJudge=false
end
skill:Init(caster, effectData, type, targets, isAdd, isRage,isTriggerJudge)
skill.isNotLoop=isLoop
if type == BattleSkillType.DeadSkill then -- 死亡技能加入单独的对列

View File

@ -42,8 +42,8 @@ function FightWeapon:Init(data)
self.skillGroupList[i] = WeaponSkillManager.CreateMSkillGroup(self, i, data.skill[i])
end
if data.passivity and #data.passivity > 0 then
table.sort(data.passivity,function(test.a,b)
return test.a[1] < b[1]
table.sort(data.passivity,function(a,b)
return a[1] < b[1]
end)
for i = 1, #data.passivity do
local v = data.passivity[i]

View File

@ -287,31 +287,31 @@ function this.InitListener()
end
end
-- 对技能进行排序
table.sort(firstList, function(test.a, b)
table.sort(firstList, function(a, b)
-- 同阵营按位置排序
if test.a.owner.camp == b.owner.camp then
if test.a.owner.position == b.owner.position then
return test.a.id < b.id
if a.owner.camp == b.owner.camp then
if a.owner.position == b.owner.position then
return a.id < b.id
else
return test.a.owner.position < b.owner.position
return a.owner.position < b.owner.position
end
else
-- 不同阵营的根据先手阵营排序
return test.a.owner.camp == BattleLogic.FirstCamp
return a.owner.camp == BattleLogic.FirstCamp
end
end)
-- 对技能进行排序
table.sort(sortList, function(test.a, b)
table.sort(sortList, function(a, b)
-- 同阵营按位置排序
if test.a.owner.camp == b.owner.camp then
if test.a.owner.position == b.owner.position then
return test.a.id < b.id
if a.owner.camp == b.owner.camp then
if a.owner.position == b.owner.position then
return a.id < b.id
else
return test.a.owner.position < b.owner.position
return a.owner.position < b.owner.position
end
else
-- 不同阵营的根据先手阵营排序
return test.a.owner.camp == BattleLogic.FirstCamp
return a.owner.camp == BattleLogic.FirstCamp
end
end)
--依次加入技能管理

View File

@ -1,46 +1,287 @@
v1.0.130
1.同步到凤体分支
v1.0.129
1.新英雄提交
v1.0.128
1.御甲修改提交
v1.0.127
1.被动327修改
v1.0.126
1. 注释无用log
v1.0.125
1. 添加神兵战斗
v1.0.124
1. 被动441修改
v1.0.123
1. 修改困难副本星级条件
v1.0.122
1. 添加女娲,阎罗王新英雄
v1.0.121
1. 战斗添加回合最大伤害治疗限制
v1.0.120
1. 添加金翅大鹏变身卡
v1.0.119
1. 添加法相相关被动 454被动
v1.0.118
1. 添加152效果
v1.0.117
1. 添加151效果
2. 御甲也对间接伤害生效
v1.0.116
1. 187被动治疗神将也会生效
v1.0.115
1.添加被动444445
v1.0.114
1.被动273189184修改
master_zh_test同步数据表2022_09_02_16_53_59
master_zh_test同步数据表2022_08_24_16_07_52
v1.0.113
1.被动387 437修改
master_zh_test同步数据表2022_08_17_18_26_38
master_zh_test同步数据表2022_08_10_18_33_50
master_zh_test同步数据表2022_08_10_17_37_10
master_zh_test同步数据表2022_08_10_15_22_09
master_zh_test同步数据表2022_08_03_17_06_59
v1.0.112
1.online_special 同步到zh_test
v1.0.111
1.438修改
v1.0.110
1.新增神印
master_zh_test同步数据表2022_03_29_17_06_53
master_zh_test同步数据表2022_03_22_11_35_14
master_zh_test同步数据表2022_03_22_11_35_01
master_zh_test同步数据表2022_03_21_16_48_11
v1.0.109
1.新增神系英雄技能被动
master_zh_test同步数据表2022_03_14_18_15_06
master_zh_test同步数据表2022_03_14_17_24_10
v1.0.108
1.新增429 430 431被动
master_zh_test同步数据表2022_03_08_16_52_49
v1.0.107
1.新增427 428被动
master_zh_test同步数据表2022_03_07_17_48_07
master_zh_test同步数据表2022_03_02_15_24_08
v1.0.106
1.新增425 426被动
master_zh_test同步数据表2022_03_01_15_02_06
v1.0.105
1.新增425 426被动
v1.0.104
1.被动375修改
master_zh_test同步数据表2022_02_22_19_20_35
master_zh_test同步数据表2022_02_22_18_59_21
v1.0.103
1.被动226 423 424修改
master_zh_test同步数据表2022_02_22_10_34_06
master_zh_test同步数据表2022_02_15_15_03_42
v1.0.102
1.效果108修改
2.被动356修改 新增422
master_zh_test同步数据表2022_02_08_14_14_42
v1.0.101
1.修复姑获鸟神魂五对所有人生效的问题
v1.0.100
1.御甲初始化修改
master_zh_test同步数据表2022_01_24_18_51_19
v1.0.99
1.御甲显示修改
v1.0.98
1.被动414修改
master_zh_test同步数据表2022_01_24_10_59_41
master_zh_test同步数据表2022_01_18_15_41_40
v1.0.97
1.护盾buff修改
master_zh_test同步数据表2022_01_17_16_56_13
master_zh_test同步数据表2022_01_17_16_30_59
master_zh_test同步数据表2022_01_15_19_12_17
v1.0.96
1.被动417-421 白金法宝
master_zh_test同步数据表2022_01_11_16_23_47
master_zh_test同步数据表2022_01_10_18_57_57
v1.0.95
1.新增被动414-417
2.添加御甲修改
v1.0.94
1.被动283修改
v1.0.93
1.战斗结束获取队伍剩余角色信息接口修改
master_zh_test同步数据表2021_12_28_09_56_49
master_zh_test同步数据表2021_12_24_18_32_21
v1.0.92
1.新增412被动 56被动修改
master_zh_test同步数据表2021_12_21_18_13_54
v1.0.91
1.护盾buff修改
2.鲸吞魂印修改
v1.0.90
1、修复RoleManager table.removebyvalue方法空报错
master_zh_test同步数据表2021_12_14_12_03_26
v1.0.89
1.第五期神魂
2.第二期变身卡
master_zh_test同步数据表2021_12_13_18_06_46
v1.0.88
1.被动257修改
2.不灭修改
v1.0.87
1.被动257修改
master_zh_test同步数据表2021_12_07_17_09_58
master_zh_test同步数据表2021_12_07_16_56_46
v1.0.86
1 战斗驱动逻辑修改 回合转换添加延时减半
2.被动257修改
v1.0.85
1 战斗驱动逻辑修改 回合转换添加延时减半
v1.0.84
1 战斗驱动逻辑修改 回合转换添加延时
master_zh_test同步数据表2021_12_06_19_02_28
v1.0.83
1 第四期神魂添加
master_zh_test同步数据表2021_11_30_12_06_26
v1.0.82
1 目标选择逻辑添加
master_zh_test同步数据表2021_11_29_19_48_14
v1.0.81
1、效果137修改
master_zh_test同步数据表2021_11_27_22_26_12
v1.0.80
1、同步战斗逻辑
master_zh_test同步数据表2021_11_23_11_29_17
v1.0.79
1、被动391修改 我方流血显示修改
master_zh_test同步数据表2021_11_22_18_00_26
v1.0.78
1、被动112 258 360修改提交
2. 伤害公式修改
3.战斗超时 pvp添加战斗类型
v1.0.77
1、第三批神魂提交
v1.0.76
1、修复前后端战斗数据格式不一致导致的结果不一致
master_zh_test同步数据表2021_11_16_11_07_25
v1.0.75
1添加不处理增伤的伤害接口
master_zh_test同步数据表2021_11_15_17_10_47
v1.0.74
1第二期神魂技能
master_zh_test同步数据表2021_11_08_18_01_19
v1.0.73
1被动285修改
master_zh_test同步数据表2021_11_08_17_48_59
v1.0.72
1第一期神魂技能
v1.0.71
1灵兽技能检测添加初始化
2.追加技能特效修改
v1.0.70
1、添加神魂被动技能
master_zh_test同步数据表2021_11_01_14_07_31
master_zh_test同步数据表2021_10_26_10_10_26
master_zh_test同步数据表2021_10_25_18_57_36
v1.0.69
1、战斗公式修改
master_zh_test同步数据表2021_10_22_18_57_18
v1.0.68
1、添加主角技能
2. 被动199修改
master_zh_test同步数据表2021_10_18_11_00_42
master_zh_test同步数据表2021_10_16_19_07_28
master_zh_test同步数据表2021_10_16_19_06_48
v1.0.67
1、被动344添加空判断
2. 战斗力公式修改
master_zh_test同步数据表2021_10_12_15_58_23
master_zh_test同步数据表2021_10_12_10_25_47
master_zh_test同步数据表2021_10_11_18_25_43
v1.0.66
1、被动312修改
master_zh_test同步数据表2021_10_09_18_47_41
master_zh_test同步数据表2021_10_09_18_46_50
v1.0.65
1、被动116 258 281 312 344 250修改
2. 精卫借的怒气不会回复怒气
3. 添加不处理增伤被动的方法
master_zh_test同步数据表2021_09_28_17_45_03
v1.0.64
1. 同步战斗
1、353 351 137 被动修改
2. 添加获取没有出发不灭的目标
master_zh_test同步数据表2021_09_27_18_41_38
v1.0.63
1. 同步战斗
1、353被动修改
v1.0.62
1. 同步战斗
1、添加御甲buff
2.添加最后一期紫府神印,添加白金装备被动 觉醒被动修改
master_zh_test同步数据表2021_09_26_20_35_14
master_zh_test同步数据表2021_09_18_21_14_36
master_zh_test同步数据表2021_09_18_18_42_35
v1.0.61
1. 同步战斗
1、技能是否能释放 添加是否有技能目标判断
2.被动196 200 188 修改
master_zh_test同步数据表2021_09_17_16_21_53
master_zh_test同步数据表2021_09_15_20_05_28
master_zh_test同步数据表2021_09_15_14_23_26
master_zh_test同步数据表2021_09_14_15_46_46
master_zh_test同步数据表2021_09_14_11_51_05
v1.0.60
1. 同步战斗
1、被动56修改
master_zh_test同步数据表2021_09_11_18_04_19
v1.0.59
1. 同步战斗
1、被动261 修改
master_zh_test同步数据表2021_09_10_18_24_51
v1.0.58
1. 被动414修改
2.御甲显示修改
1、修复方法缺失报错
v1.0.57
1. 护盾buff修改
1、尝试修复孙悟空大招不会增加伤害的问题
2、添加用于debug的log
master_zh_test同步数据表2021_09_07_11_00_31
v1.0.56
1. 被动417-421
1.选生命百分比最少目标逻辑修改 去掉有不灭单位
2. 死亡不把怒气显示清空
3.被动99 307 选目标逻辑修改
v1.0.55
1. 56被动修改
v1.0.54
1. 新加被动412
1.被动263 269 274 332 112 145 修改
2. 添加战斗日志
v1.0.54
1. 被动91 被动115 160修改
2. Dot类buff清除逻辑修改
master_zh_test同步数据表2021_08_27_18_25_18
master_zh_test同步数据表2021_08_21_16_34_06
v1.0.54
1. 被动141 310 283 330 336修改
master_zh_test同步数据表2021_08_02_19_27_29
v1.0.53
1. 神魂第一期英雄技能添加
1. 随机种子修改
master_zh_test同步数据表2021_07_31_17_55_16
master_zh_test同步数据表2021_07_31_17_54_20
v1.0.52
1. 灵兽技能检测修改
1. 死亡技能不会被控制
2.追加技能是否触发特性修改
master_zh_test同步数据表2021_07_26_11_10_56
v1.0.51
1. 山河社稷图星级检测修改
1. 被动292 修改
v1.0.50
1. 灵兽技能触发机制修改
1. 被动292 319修改
master_zh_test同步数据表2021_07_13_18_19_09
master_zh_test同步数据表2021_07_10_20_33_05
v1.0.49
1. 同步dev分支战斗逻辑
1. 同步客户端逻辑
v1.0.48
1. 同步dev分支战斗逻辑
v1.0.47
1. 同步dev分支战斗逻辑
v1.0.46
1. 同步dev分支战斗逻辑
v1.0.45
1. 新增紫府神印被动效果
v1.0.44
v1.0.47
1. 新增英雄觉醒被动 及 困难副本被动 效果
master_zh_test同步数据表2021_06_30_07_33_23
master_zh_test同步数据表2021_06_28_13_40_30
v1.0.46
1、同步数据表
v1.0.45
1. 【战斗】修改免疫控制效果清除提示
v1.0.44
1. 【战斗】修复群体性的免疫效果不会正常消失的问题
v1.0.43
1. 被动200修改
v1.0.42
@ -185,4 +426,4 @@ v1.0.1
v1.0.0
1、创建战斗版本文件
2、灵兽技能加入
2、灵兽技能加入

File diff suppressed because one or more lines are too long