探索事件
parent
b64c22c7a9
commit
c15ab64462
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -2889,6 +2889,79 @@ local effectList = {
|
|||
target.isRealDead=true
|
||||
target:SetRelive(pro, caster)
|
||||
end,
|
||||
--造成[a]%的[b]伤害,造成伤害的[c]%用于医疗生命值最低的队友。(攻击目标为多人治疗不重复)
|
||||
--a[float],b[伤害类型],c[float]
|
||||
[148] = function(caster, target, args, interval, skill)
|
||||
local f1 = args[1]
|
||||
local dt = args[2]
|
||||
local f2 = args[3]
|
||||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
|
||||
local arr = RoleManager.NoOrder(function (r) return r.camp == caster.camp end,false,true)
|
||||
BattleUtil.SortByHpFactor(arr, 1)
|
||||
--之前是finaldag 改成 damage
|
||||
for i = 1, #arr do
|
||||
if not BattleUtil.ChecklistIsContainValue(skill.targets,arr[i]) then
|
||||
f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[i])
|
||||
BattleUtil.ApplyTreat(caster, arr[i], floor(damage*f2))
|
||||
table.insert(skill.targets,arr[i])
|
||||
break
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
target.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit)
|
||||
BattleUtil.CalDamage(skill, caster, target, dt, f1)
|
||||
target.Event:RemoveEvent(BattleEventName.RoleBeHit, OnBeHit)
|
||||
end)
|
||||
|
||||
end,
|
||||
--造成[a]%的[b]伤害并记录技能总伤害
|
||||
--a[float],b[伤害类型]
|
||||
[149] = function(caster, target, args, interval, skill)
|
||||
local f1 = args[1]
|
||||
local dt = args[2]
|
||||
local f2 = args[3]
|
||||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType,curSkill)
|
||||
if curSkill then
|
||||
curSkill.skillDamage=curSkill.skillDamage+damage
|
||||
end
|
||||
end
|
||||
target.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit)
|
||||
BattleUtil.CalDamage(skill, caster, target, dt, f1)
|
||||
target.Event:RemoveEvent(BattleEventName.RoleBeHit, OnBeHit)
|
||||
end)
|
||||
end,
|
||||
--造成技能总伤害的[a]%平分给生命值最低的[b]队友
|
||||
--a[float],b[int]
|
||||
[150] = function(caster, target, args, interval, skill)
|
||||
local f1 = args[1]
|
||||
local num = args[2]
|
||||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local OnSkillEnd
|
||||
OnSkillEnd=function(skill)
|
||||
if skill.skillDamage==0 then
|
||||
return
|
||||
end
|
||||
local hp=BattleUtil.ErrorCorrection(skill.skillDamage*f1/num)
|
||||
local arr = RoleManager.NoOrder(function (r) return r.camp == caster.camp end,false,true)
|
||||
BattleUtil.SortByHpFactor(arr, 1)
|
||||
for i = 1, #arr do
|
||||
if i<=num then
|
||||
BattleUtil.ApplyTreat(caster, arr[i], hp)
|
||||
end
|
||||
end
|
||||
caster.Event:RemoveEvent(BattleEventName.SkillCastEnd,OnSkillEnd)
|
||||
end
|
||||
caster.Event:AddEvent(BattleEventName.SkillCastEnd,OnSkillEnd)
|
||||
|
||||
end)
|
||||
end,
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ function EffectCaster:DoEffect(caster, target, eff, duration, skill)
|
|||
e.args[i] = eff.args[i]
|
||||
end
|
||||
|
||||
-- 检测被动技能对技能参数的影响
|
||||
-- 检测被动技能对技能参数的影响
|
||||
local function _PassiveCheck(pe)
|
||||
if pe then
|
||||
e = pe
|
||||
|
|
@ -77,7 +77,7 @@ end
|
|||
|
||||
function EffectCaster:takeEffect(caster, target, effects, effectIndex, duration, skill)
|
||||
for k=1, #effects do
|
||||
-- 如果不是第一个效果对列的第一个效果则判断是否命中
|
||||
-- 如果不是第一个效果对列的第一个效果则判断是否命中
|
||||
if k ~= 1 and effectIndex == 1 then
|
||||
if self:CheckTargetIsHit(target) then
|
||||
self:DoEffect(caster, target, effects[k], duration, skill)
|
||||
|
|
@ -93,25 +93,25 @@ function EffectCaster:ChooseTarget()
|
|||
--
|
||||
self.effectTargets = {}
|
||||
self.targetIsHit = {}
|
||||
-- 先计算出技能的目标
|
||||
-- 先计算出技能的目标
|
||||
for i=1, #self.effectList do
|
||||
-- 是否重新选择目标
|
||||
-- 是否重新选择目标
|
||||
local isReTarget = true
|
||||
if self.targets and self.targets[i] then
|
||||
self.effectTargets[i] = self.targets[i]
|
||||
-- 判断是否有有效目标
|
||||
-- 判断是否有有效目标
|
||||
for _, role in ipairs(self.effectTargets[i]) do
|
||||
if not role:IsRealDead() then
|
||||
isReTarget = false
|
||||
end
|
||||
end
|
||||
end
|
||||
-- 重新选择目标
|
||||
-- 重新选择目标
|
||||
if isReTarget then
|
||||
local effectGroup = self.effectList[i]
|
||||
local chooseId = effectGroup.chooseId
|
||||
self.effectTargets[i] = BattleUtil.ChooseTarget(self.skill.owner, chooseId)
|
||||
-- 检测被动对攻击目标的影响
|
||||
-- 检测被动对攻击目标的影响
|
||||
if i == 1 then
|
||||
local function _PassiveTarget(targets)
|
||||
self.effectTargets[i] = targets
|
||||
|
|
@ -122,19 +122,19 @@ function EffectCaster:ChooseTarget()
|
|||
end
|
||||
end
|
||||
|
||||
-- 释放技能
|
||||
-- func 技能释放完成回调
|
||||
-- 释放技能
|
||||
-- func 技能释放完成回调
|
||||
function EffectCaster:Cast()
|
||||
-- 选择目标
|
||||
-- 选择目标
|
||||
self:ChooseTarget()
|
||||
|
||||
-- 对目标造成相应的效果
|
||||
-- 对目标造成相应的效果
|
||||
for i=1, #self.effectList do
|
||||
local effectGroup = self.effectList[i]
|
||||
local chooseId = effectGroup.chooseId
|
||||
local arr = self.effectTargets[i]
|
||||
if arr and #arr > 0 then
|
||||
-- 效果延迟1帧生效
|
||||
-- 效果延迟1帧生效
|
||||
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime, function()
|
||||
local effects = effectGroup.effects
|
||||
local weight = math.floor(chooseId % 10000 / 100)
|
||||
|
|
@ -145,10 +145,10 @@ function EffectCaster:Cast()
|
|||
table.sort(arr, function(a, b)
|
||||
return a.position < b.position
|
||||
end)
|
||||
-- 全部同时生效
|
||||
-- 全部同时生效
|
||||
for j=1, count do
|
||||
if arr[j] and not arr[j]:IsRealDead() then
|
||||
-- 检测是否命中
|
||||
-- 检测是否命中
|
||||
if i == 1 then
|
||||
self.targetIsHit[arr[j]] = BattleUtil.CheckIsHit(self.skill.owner, arr[j],self.skill)
|
||||
end
|
||||
|
|
@ -160,7 +160,7 @@ function EffectCaster:Cast()
|
|||
end
|
||||
end
|
||||
|
||||
-- 遍历技能命中目标
|
||||
-- 遍历技能命中目标
|
||||
function EffectCaster:ForeachTargets(func)
|
||||
local targets = self:GetDirectTargets()
|
||||
for _, role in ipairs(targets) do
|
||||
|
|
@ -170,7 +170,7 @@ function EffectCaster:ForeachTargets(func)
|
|||
end
|
||||
end
|
||||
|
||||
-- 获取直接选择目标Id
|
||||
-- 获取直接选择目标Id
|
||||
function EffectCaster:GetDirectChooseId()
|
||||
local effectGroup = self.effectList[1]
|
||||
local chooseId = effectGroup.chooseId
|
||||
|
|
@ -178,12 +178,12 @@ function EffectCaster:GetDirectChooseId()
|
|||
end
|
||||
|
||||
|
||||
-- 获取技能的直接目标,和策划规定第一个效果的目标为直接效果目标,(包含miss的目标)
|
||||
-- 获取技能的直接目标,和策划规定第一个效果的目标为直接效果目标,(包含miss的目标)
|
||||
function EffectCaster:GetDirectTargets()
|
||||
return self.effectTargets[1]
|
||||
end
|
||||
|
||||
-- 获取直接目标,不包含miss的目标,可能为空
|
||||
-- 获取直接目标,不包含miss的目标,可能为空
|
||||
function EffectCaster:GetDirectTargetsNoMiss()
|
||||
local list = {}
|
||||
for _, role in ipairs(self.effectTargets[1]) do
|
||||
|
|
@ -194,7 +194,7 @@ function EffectCaster:GetDirectTargetsNoMiss()
|
|||
return list
|
||||
end
|
||||
|
||||
-- 获取直接目标和没有被放逐的目标,不包含miss的目标,可能为空
|
||||
-- 获取直接目标和没有被放逐的目标,不包含miss的目标,可能为空
|
||||
function EffectCaster:GetDirectTargetsNoExile()
|
||||
local list = {}
|
||||
for _, role in ipairs(self.effectTargets[1]) do
|
||||
|
|
@ -205,7 +205,7 @@ function EffectCaster:GetDirectTargetsNoExile()
|
|||
return list
|
||||
end
|
||||
|
||||
-- 获取直接目标和没有被放逐的目标,不包含不灭可能为空
|
||||
-- 获取直接目标和没有被放逐的目标,不包含不灭可能为空
|
||||
function EffectCaster:GetDirectTargetsNoNODead()
|
||||
local list = {}
|
||||
for _, role in ipairs(self.effectTargets[1]) do
|
||||
|
|
@ -216,7 +216,7 @@ function EffectCaster:GetDirectTargetsNoNODead()
|
|||
return list
|
||||
end
|
||||
|
||||
-- 获取技能目标最大人数
|
||||
-- 获取技能目标最大人数
|
||||
function EffectCaster:GetMaxTargetNum()
|
||||
local mainEffect = self.effectList[1]
|
||||
if not mainEffect then
|
||||
|
|
@ -225,7 +225,7 @@ function EffectCaster:GetMaxTargetNum()
|
|||
return BattleUtil.GetMaxTargetNum(mainEffect.chooseId)
|
||||
end
|
||||
|
||||
-- 判断是否命中
|
||||
-- 判断是否命中
|
||||
function EffectCaster:CheckTargetIsHit(role)
|
||||
return self.targetIsHit[role]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11053,6 +11053,10 @@ local passivityList = {
|
|||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
--只有主角一技能才能触发这个被动
|
||||
if skill.isPlayerSkill~=nil and skill.isPlayerSkill==false then
|
||||
return
|
||||
end
|
||||
local list = skill:GetDirectTargets()
|
||||
if list then
|
||||
for i = 1, #list do
|
||||
|
|
@ -11078,6 +11082,10 @@ local passivityList = {
|
|||
if not skill then
|
||||
return
|
||||
end
|
||||
--只有主角一技能才能触发这个被动
|
||||
if skill.isPlayerSkill~=nil and skill.isPlayerSkill==false then
|
||||
return
|
||||
end
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
|
|
@ -11090,12 +11098,14 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCast,nil,nil,role)
|
||||
end,
|
||||
--释放技能时,我方随机[a]个人,增加[b]%[c]属性的御甲
|
||||
--a[int],b[float],c[int 属性]
|
||||
--释放技能时,我方随机[a]个人,增加[b]%[c]属性的御甲,技能类型[d],目标选择系数[e](d,e可不填的;d不填默认所有技能,e不填随机a人)
|
||||
--a[int],b[float],c[int 属性],d[int 0:所有 1:仅技能],e[int 技能目标查找系数]
|
||||
[431]=function(role, args,id,judge)
|
||||
local v1 = args[1]
|
||||
local v2 = args[2]
|
||||
local pro = args[3]
|
||||
local type = args[4]
|
||||
local targets = args[5]
|
||||
local OnSkillCast = function(skill)
|
||||
if not skill then
|
||||
return
|
||||
|
|
@ -11103,19 +11113,140 @@ local passivityList = {
|
|||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
local list = RoleManager.QueryNoDead(function(v) return role.camp == v.camp end)
|
||||
if list then
|
||||
BattleUtil.RandomList(list)
|
||||
v1=min(v1,#list)
|
||||
for i = 1, v1 do
|
||||
local val = floor(BattleUtil.FP_Mul(v2, list[i]:GetRoleData(BattlePropList[pro])))
|
||||
--如果身上有御甲就添加御甲的值
|
||||
BattleUtil.AddBlood(list[i],val)
|
||||
--只有主角一技能才能触发这个被动
|
||||
if skill.isPlayerSkill~=nil and skill.isPlayerSkill==false then
|
||||
return
|
||||
end
|
||||
if type and type==1 and skill.type~=BattleSkillType.Special then
|
||||
return
|
||||
end
|
||||
if targets then
|
||||
local arr = BattleUtil.ChooseTarget(role,targets,1)
|
||||
for i=1, #arr do
|
||||
local val = floor(BattleUtil.FP_Mul(v2,arr[i]:GetRoleData(BattlePropList[pro])))
|
||||
--如果身上有御甲就添加御甲的值
|
||||
BattleUtil.AddBlood(arr[i],val)
|
||||
end
|
||||
else
|
||||
local list = RoleManager.QueryNoDead(function(v) return role.camp == v.camp end)
|
||||
if list then
|
||||
BattleUtil.RandomList(list)
|
||||
v1=min(v1,#list)
|
||||
for i = 1, v1 do
|
||||
local val = floor(BattleUtil.FP_Mul(v2, list[i]:GetRoleData(BattlePropList[pro])))
|
||||
--如果身上有御甲就添加御甲的值
|
||||
BattleUtil.AddBlood(list[i],val)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCast,nil,nil,role)
|
||||
end,
|
||||
--技能[a]额外造成目标[b][c]%的伤害。
|
||||
--a[int 1:仅主动技能] b[int 属性id],c[float]
|
||||
[432]=function(role,args,id,judge)
|
||||
local type=args[1]
|
||||
local f1 = args[2]
|
||||
local dt = args[3]
|
||||
-- 直接伤害后
|
||||
local onPassiveDamaging = function(func, defRole, damage,skill)
|
||||
if not skill then
|
||||
return
|
||||
end
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if type then
|
||||
if type==1 and skill.type~=BattleSkillType.Special then
|
||||
return
|
||||
end
|
||||
if type==2 and (skill.type~=BattleSkillType.Special or skill.type~=BattleSkillType.Extra) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
--如果是boss 并且额外伤害是根据最大生命则返回
|
||||
if (f1==12 or f1==13) and BattleUtil.CheckIsBoss(defRole) then
|
||||
return
|
||||
end
|
||||
local val = floor(BattleUtil.FP_Mul(dt, defRole:GetRoleData(BattlePropList[f1])))
|
||||
BattleUtil.FinalDamageCountShield(nil,role,defRole,val)
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role)
|
||||
end,
|
||||
--释放技能治疗,给目标添加免疫负面效果的护盾[a],持续[b]回合
|
||||
--a[int],b[int]
|
||||
[433] = function(role, args,id,judge)
|
||||
local type = args[1]
|
||||
local round = args[2]
|
||||
local onRoleTreat=function(target,realTreat,treat)
|
||||
target:AddBuff(Buff.Create(role, BuffName.Shield, round,type, 0, 0))
|
||||
end
|
||||
local OnSkillCast = function(skill)
|
||||
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill.type ~= BattleSkillType.Special and skill.type~=BattleSkillType.Extra then
|
||||
return
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleTreat, onRoleTreat,nil,nil,role)
|
||||
|
||||
end
|
||||
local OnSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill.type ~= BattleSkillType.Special and skill.type~=BattleSkillType.Extra then
|
||||
return
|
||||
end
|
||||
role.Event:RemoveEvent(BattleEventName.RoleTreat,onRoleTreat,nil,nil,role)
|
||||
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
--释放技能时,有[a]%概率为目标增加[b]属性 改变[c][d]%的效果,持续[e]回合
|
||||
--a[float],b[int 属性],c[int],d[float],e[int]
|
||||
[434] = function(role, args,id,judge)
|
||||
local p1 = args[1]
|
||||
local pro = args[2]
|
||||
local ct = args[3]
|
||||
local v1 = args[4]
|
||||
local r1 = args[5]
|
||||
local buff2=nil
|
||||
local onHit = function(target, damage, bCrit, finalDmg)
|
||||
BattleUtil.RandomAction(p1,function()
|
||||
buff2=Buff.Create(role, BuffName.PropertyChange,r1, BattlePropList[pro], v1, ct)
|
||||
local aaa=BattleLogic.BuffMgr:HasBuff(target, BuffName.PropertyChange, function (buff) return buff.propertyName==buff2.propertyName and buff.Value==buff2.Value and buff.changeType==buff2.changeType end)
|
||||
if not aaa then
|
||||
target:AddBuff(buff2)
|
||||
end
|
||||
end)
|
||||
end
|
||||
local onSkillCast = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||
role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role)
|
||||
end
|
||||
end
|
||||
-- 技能后后
|
||||
local onSkillCastEnd = function(skill)
|
||||
if skill and not skill.isTriggerJudge and judge==1 then
|
||||
return
|
||||
end
|
||||
if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then
|
||||
role.Event:RemoveEvent(BattleEventName.RoleHit, onHit)
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
|
||||
|
||||
}
|
||||
return passivityList
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ function Shield:OnStart()
|
|||
end)
|
||||
elseif self.shieldType == ShieldTypeName.ThornsReduce then
|
||||
self.target.Event:AddEvent(BattleEventName.RoleBeHit,self.onRoleBeHit,nil,nil,self.target)
|
||||
elseif self.shieldType == ShieldTypeName.ImmuneReduce then
|
||||
self.target.buffFilter:Add(self.immune0)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -70,7 +72,7 @@ end
|
|||
function Shield:CountShield(damage, atkRole,skill)
|
||||
self.atk = atkRole
|
||||
local isImmuneAllReduceShield=false
|
||||
local finalDamage = 0
|
||||
local finalDamage = damage
|
||||
if self.shieldType == ShieldTypeName.NormalReduce then
|
||||
|
||||
if damage < self.shieldValue then
|
||||
|
|
@ -144,7 +146,7 @@ end
|
|||
|
||||
-- 提前计算护盾吸收伤害
|
||||
function Shield:PreCountShield(damage)
|
||||
local finalDamage = 0
|
||||
local finalDamage = damage
|
||||
if self.shieldType == ShieldTypeName.NormalReduce then
|
||||
if damage > self.shieldValue then
|
||||
finalDamage = damage - self.shieldValue
|
||||
|
|
@ -198,7 +200,7 @@ function Shield:OnEnd()
|
|||
end
|
||||
end
|
||||
|
||||
elseif self.shieldType == ShieldTypeName.AllReduce then
|
||||
elseif self.shieldType == ShieldTypeName.AllReduce or self.shieldType==ShieldTypeName.ImmuneReduce then
|
||||
-- 移除免疫效果
|
||||
for i = 1, self.target.buffFilter.size do
|
||||
if self.target.buffFilter.buffer[i] == self.immune0 then
|
||||
|
|
|
|||
|
|
@ -337,6 +337,7 @@ ShieldTypeName = {
|
|||
RateReduce = 2, -- 百分比减伤
|
||||
AllReduce = 3, -- 无敌护盾
|
||||
ThornsReduce = 5, --反伤盾
|
||||
ImmuneReduce = 6, --免疫负面效果
|
||||
}
|
||||
|
||||
--额外释放技能
|
||||
|
|
@ -383,7 +384,10 @@ BattleArtFontType = {
|
|||
clear = 3, --清除文字
|
||||
Blood = 4, --禁甲文字
|
||||
}
|
||||
RoleQueryType = {
|
||||
NoNodead = 1,--没有不灭
|
||||
|
||||
}
|
||||
|
||||
BattleMieProp = {
|
||||
[BattleRoleElementType.REN] = RoleDataName.RenBonus,
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ function BattleUtil.GetMaxTargetNum(chooseId)
|
|||
end
|
||||
|
||||
--
|
||||
function BattleUtil.ChooseTarget(role, chooseId)
|
||||
function BattleUtil.ChooseTarget(role, chooseId,queryType)
|
||||
local chooseType = floor(chooseId / 100000) % 10
|
||||
local chooseLimit = floor(chooseId / 10000) % 10
|
||||
local chooseWeight = floor(chooseId / 100) % 100
|
||||
|
|
@ -293,7 +293,11 @@ function BattleUtil.ChooseTarget(role, chooseId)
|
|||
local arr
|
||||
-- 选择类型
|
||||
if chooseType == 1 then
|
||||
arr = RoleManager.Query(function (r) return r.camp == role.camp end)
|
||||
if queryType and queryType==1 then
|
||||
arr = RoleManager.QueryNoDead(function (r) return r.camp == role.camp end)
|
||||
else
|
||||
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 --嘲讽时对单个敌军生效
|
||||
return {role.lockTarget}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,9 @@ function Monster:Init(data)
|
|||
self.Event:ClearEvent()
|
||||
self.exileTargets={}--已经被放逐过的目标
|
||||
-- self.skillGroup = MSkillManager.CreateMSkillGroup(self, data.skill)
|
||||
|
||||
|
||||
-- self.skillList=data.skill
|
||||
self.skillNum=#data.skill
|
||||
self.skillGroupList = {}
|
||||
for i = 1, #data.skill do
|
||||
-- LogError("---------------------"..data.skill[i].skillData.effect[1])
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function MSkill:New()
|
|||
return o
|
||||
end
|
||||
|
||||
function MSkill:Init(owner, group, index, skillData)
|
||||
function MSkill:Init(owner, group, index, skillData,playerSkillIndex)
|
||||
self.owner = owner
|
||||
self.group = group
|
||||
self.groupIndex = index
|
||||
|
|
@ -16,7 +16,15 @@ function MSkill:Init(owner, group, index, skillData)
|
|||
self.isAdd = false
|
||||
self.isRage = false
|
||||
self.type = BattleSkillType.Monster
|
||||
|
||||
--后端传过来的数据最后一个是主角技能
|
||||
if owner.position==100 then
|
||||
if playerSkillIndex==self.owner.skillNum then
|
||||
self.isPlayerSkill=true
|
||||
else
|
||||
self.isPlayerSkill=false
|
||||
end
|
||||
end
|
||||
|
||||
self.curCastCount = 0
|
||||
self.maxCastCount = self.skillData.maxCount
|
||||
-- LogError("monster skill id=="..skillData.effect[1])
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ function MSkillGroup:Init(monster, groupIndex, groupData)
|
|||
|
||||
-- end
|
||||
for i = 1, #self.skillGroupData do
|
||||
self.skillList[i] = MSkillManager.CreateMSkill(monster, self, i, self.skillGroupData[i])
|
||||
self.skillList[i] = MSkillManager.CreateMSkill(monster, self, i, self.skillGroupData[i],groupIndex)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ function this.CreateMSkillGroup(monster, groupIndex, skillGroupData)
|
|||
end
|
||||
|
||||
-- 创建一个技能
|
||||
function this.CreateMSkill(monster, group, index, skilldata)
|
||||
function this.CreateMSkill(monster, group, index, skilldata,groupIndex)
|
||||
local owner = group:GetOwner()
|
||||
local groupIndex = group.groupIndex
|
||||
local position = owner:GetCamp() * 6 + owner:GetPosition()
|
||||
|
|
@ -41,7 +41,7 @@ function this.CreateMSkill(monster, group, index, skilldata)
|
|||
if not this.MSkillList[position][groupIndex][index] then
|
||||
this.MSkillList[position][groupIndex][index] = MSkill:New()
|
||||
end
|
||||
this.MSkillList[position][groupIndex][index]:Init(monster, group, index, skilldata)
|
||||
this.MSkillList[position][groupIndex][index]:Init(monster, group, index, skilldata,groupIndex)
|
||||
|
||||
return this.MSkillList[position][groupIndex][index]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ function Skill:Init(role, effectData, type, targets, isAdd, isRage,isTriggerJudg
|
|||
self.isAdd = isAdd
|
||||
self.isRage = isRage
|
||||
self.isNotLoop= false
|
||||
self.targets={}
|
||||
self.skillDamage=0
|
||||
if isTriggerJudge~=nil then
|
||||
self.isTriggerJudge=isTriggerJudge
|
||||
else
|
||||
|
|
@ -149,8 +151,9 @@ function Skill:EndSkill()
|
|||
-- 结束回调
|
||||
self.isTriggePassivity=false
|
||||
self.triggerPassivityId={}
|
||||
self.skillDamage=0
|
||||
if self.castDoneFunc then self.castDoneFunc() end
|
||||
|
||||
self.targets={}
|
||||
end)
|
||||
--
|
||||
self.effectTargets = {}
|
||||
|
|
|
|||
|
|
@ -1,168 +1,228 @@
|
|||
master_zh_online_special同步数据表2022_03_14_17_38_27
|
||||
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.被动429 430 431修改
|
||||
master_zh_online_special同步数据表2022_03_08_14_34_13
|
||||
v1.0.89
|
||||
1.被动427 428修改
|
||||
master_zh_online_special同步数据表2022_03_07_18_33_58
|
||||
master_zh_online_special同步数据表2022_03_02_15_24_02
|
||||
v1.0.88
|
||||
1.被动339修改
|
||||
master_zh_online_special同步数据表2022_03_01_15_11_26
|
||||
v1.0.87
|
||||
1.新增425 426被动
|
||||
v1.0.86
|
||||
1.被动375修改
|
||||
master_zh_online_special同步数据表2022_02_22_19_07_18
|
||||
v1.0.85
|
||||
1.被动226 423 424修改
|
||||
master_zh_online_special同步数据表2022_02_15_15_19_15
|
||||
v1.0.84
|
||||
1.效果108修改
|
||||
2.被动356修改 新增422
|
||||
master_zh_online_special同步数据表2022_02_08_17_17_46
|
||||
v1.0.83
|
||||
1、修复姑获鸟神魂五对所有人生效的问题
|
||||
v1.0.82
|
||||
1.御甲初始化数值修改
|
||||
master_zh_online_special同步数据表2022_01_25_10_12_04
|
||||
v1.0.81
|
||||
1.被动414修改
|
||||
2.御甲显示修改
|
||||
master_zh_online_special同步数据表2022_01_20_10_06_14
|
||||
master_zh_online_special同步数据表2022_01_18_17_33_33
|
||||
master_zh_online_special同步数据表2022_01_18_15_44_08
|
||||
v1.0.80
|
||||
1.被动418-421
|
||||
2.护盾buff修改
|
||||
master_zh_online_special同步数据表2022_01_13_17_48_10
|
||||
master_zh_online_special同步数据表2022_01_11_16_41_51
|
||||
v1.0.79
|
||||
1.被动413-418
|
||||
master_zh_online_special同步数据表2022_01_11_16_25_15
|
||||
v1.0.78
|
||||
1.被动283修改
|
||||
v1.0.77
|
||||
1.战斗结束返回服务器队伍数据接口修改
|
||||
v1.0.76
|
||||
1.新增412被动 56被动修改
|
||||
master_zh_online_special同步数据表2021_12_28_09_54_11
|
||||
master_zh_online_special同步数据表2021_12_21_18_34_24
|
||||
v1.0.75
|
||||
1、鲸吞魂印修改
|
||||
2. 护盾效果修改
|
||||
v1.0.74
|
||||
1、修复RoleManager table.removebyvalue方法空报错
|
||||
v1.0.73
|
||||
1、第五期神魂技能
|
||||
2.第二期变身卡
|
||||
master_zh_online_special同步数据表2021_12_14_14_27_05
|
||||
master_zh_online_special同步数据表2021_12_08_13_13_42
|
||||
v1.0.72
|
||||
1、被动257修改
|
||||
2.不灭修改
|
||||
v1.0.71
|
||||
1、被动257修改
|
||||
master_zh_online_special同步数据表2021_12_07_18_07_35
|
||||
v1.0.70
|
||||
1、第四期神魂技能
|
||||
master_zh_online_special同步数据表2021_11_30_17_36_04
|
||||
v1.0.69
|
||||
1、第一期变身卡技能
|
||||
v1.0.68
|
||||
1、第三期神魂技能
|
||||
2. 新法宝技能
|
||||
master_zh_online_special同步数据表2021_11_23_15_58_01
|
||||
v1.0.67
|
||||
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_online_special同步数据表2021_11_16_14_56_55
|
||||
v1.0.66
|
||||
1 第二期神魂技能
|
||||
master_zh_online_special同步数据表2021_11_09_11_57_57
|
||||
master_zh_online_special同步数据表2021_11_09_11_57_46
|
||||
master_zh_online_special同步数据表2021_11_02_14_08_41
|
||||
v1.0.65
|
||||
1 被动180修改
|
||||
2. 灵兽检测逻辑初始化修改
|
||||
master_zh_online_special同步数据表2021_10_26_16_05_44
|
||||
v1.0.64
|
||||
1 添加主角技能
|
||||
2. 被动119修改
|
||||
master_zh_online_special同步数据表2021_10_19_16_13_17
|
||||
v1.0.63
|
||||
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_online_special同步数据表2021_10_12_15_59_00
|
||||
master_zh_online_special同步数据表2021_10_12_15_58_52
|
||||
master_zh_online_special同步数据表2021_10_12_10_26_03
|
||||
master_zh_online_special同步数据表2021_10_11_19_54_13
|
||||
master_zh_online_special同步数据表2021_10_11_19_53_59
|
||||
v1.0.62
|
||||
1、被动116 258 281 312 344 250,312,353 351 137修改
|
||||
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、353 351 137 被动修改
|
||||
2. 添加获取没有出发不灭的目标
|
||||
master_zh_test同步数据表2021_09_27_18_41_38
|
||||
v1.0.63
|
||||
1、353被动修改
|
||||
v1.0.62
|
||||
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.同步客户端逻辑
|
||||
master_zh_online_special同步数据表2021_09_28_18_03_42
|
||||
master_zh_online_special同步数据表2021_09_28_14_34_53
|
||||
master_zh_online_special同步数据表2021_09_18_21_22_03
|
||||
v1.0.60
|
||||
1、技能是否能释放 添加是否有技能目标判断
|
||||
2.被动196 200 188 修改
|
||||
master_zh_online_special同步数据表2021_09_16_20_56_10
|
||||
master_zh_online_special同步数据表2021_09_16_19_56_58
|
||||
master_zh_online_special同步数据表2021_09_15_16_43_43
|
||||
master_zh_online_special同步数据表2021_09_15_15_58_04
|
||||
master_zh_online_special同步数据表2021_09_15_15_55_26
|
||||
master_zh_online_special同步数据表2021_09_14_15_45_21
|
||||
master_zh_online_special同步数据表2021_09_14_13_07_13
|
||||
|
||||
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、被动56修改
|
||||
master_zh_test同步数据表2021_09_11_18_04_19
|
||||
v1.0.59
|
||||
1、被动56修改 被动261 修改
|
||||
master_zh_online_special同步数据表2021_09_14_11_32_16
|
||||
master_zh_online_special同步数据表2021_09_14_11_26_22
|
||||
1、被动261 修改
|
||||
master_zh_test同步数据表2021_09_10_18_24_51
|
||||
|
||||
v1.0.58
|
||||
1、修复方法缺失报错
|
||||
v1.0.57
|
||||
1、尝试修复孙悟空大招不会增加伤害的问题
|
||||
2、添加用于debug的log
|
||||
master_zh_online_special同步数据表2021_09_07_10_58_24
|
||||
master_zh_test同步数据表2021_09_07_11_00_31
|
||||
v1.0.56
|
||||
1.选生命百分比最少目标逻辑修改 去掉有不灭单位
|
||||
2. 死亡不把怒气显示清空
|
||||
3.被动99 307 选目标逻辑修改
|
||||
master_zh_online_special同步数据表2021_09_03_15_16_49
|
||||
2. 死亡不把怒气显示清空
|
||||
3.被动99 307 选目标逻辑修改
|
||||
v1.0.55
|
||||
1. 被动263 269 274 332 112 145 修改
|
||||
2. 添加战斗日志
|
||||
|
||||
master_zh_online_special同步数据表2021_08_28_19_41_53
|
||||
1.被动263 269 274 332 112 145 修改
|
||||
2. 添加战斗日志
|
||||
v1.0.54
|
||||
1. 被动91 被动115 160修改
|
||||
2. Dot类buff清除逻辑修改
|
||||
master_zh_online_special同步数据表2021_08_24_14_58_11
|
||||
v1.0.53
|
||||
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_online_special同步数据表2021_08_03_10_38_57
|
||||
master_zh_test同步数据表2021_08_02_19_27_29
|
||||
v1.0.53
|
||||
1. 随机种子修改
|
||||
master_zh_test同步数据表2021_07_31_17_55_16
|
||||
master_zh_test同步数据表2021_07_31_17_54_20
|
||||
v1.0.52
|
||||
1. 死亡技能不受控制影响
|
||||
2.战斗随机种子修改
|
||||
master_zh_online_special同步数据表2021_07_28_08_34_36
|
||||
1. 死亡技能不会被控制
|
||||
2.追加技能是否触发特性修改
|
||||
master_zh_test同步数据表2021_07_26_11_10_56
|
||||
v1.0.51
|
||||
1. 被动292修改
|
||||
master_zh_online_special同步数据表2021_07_16_19_57_49
|
||||
1. 被动292 修改
|
||||
v1.0.50
|
||||
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. 同步客户端逻辑
|
||||
master_zh_online_special同步数据表2021_07_13_18_14_42
|
||||
master_zh_online_special同步数据表2021_07_06_17_33_58
|
||||
v1.0.48
|
||||
1. 新增紫府神印被动效果
|
||||
v1.0.47
|
||||
1. 新增英雄觉醒被动 及 困难副本被动 效果
|
||||
master_zh_online_special同步数据表2021_06_30_07_33_07
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ import com.ljsd.jieling.logic.fight.GameFightType;
|
|||
import com.ljsd.jieling.logic.fight.PVEFightEvent;
|
||||
import com.ljsd.jieling.logic.fight.result.FightResult;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.thrift.idl.CrossArenaManager;
|
||||
|
|
@ -50,8 +52,8 @@ public class ExplorerMapEventHandler extends BaseHandler<PlayerInfoProto.Explor
|
|||
return;
|
||||
}
|
||||
PlayerInfoProto.ExplorerMapEventResponse.Builder builder = PlayerInfoProto.ExplorerMapEventResponse.newBuilder();
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.ExplorerMapEventResponse.getNumber(), builder.build(), true);
|
||||
/* int id = proto.getId();
|
||||
// MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.ExplorerMapEventResponse.getNumber(), builder.build(), true);
|
||||
int id = proto.getId();
|
||||
Map<Integer, SExploreEvent> exploreEventConfig = STableManager.getConfig(SExploreEvent.class);
|
||||
if(!exploreEventConfig.containsKey(id)){
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.ExplorerMapEventResponse.getNumber(), builder.build(), true);
|
||||
|
|
@ -70,9 +72,9 @@ public class ExplorerMapEventHandler extends BaseHandler<PlayerInfoProto.Explor
|
|||
}
|
||||
}
|
||||
}
|
||||
*//* 1兽潮
|
||||
/* 1兽潮
|
||||
2心魔
|
||||
3宝箱*//*
|
||||
3宝箱*/
|
||||
if(exploreEventConfig.get(id).getType() == 1){
|
||||
PVEFightEvent pveFightEvent = new PVEFightEvent(user.getId(), TeamEnum.EXPLORE_EVENT_TEAM.getTeamId(), 20, "",
|
||||
GameFightType.ExploreShouChaoFight, exploreEventConfig.get(id).getMonsterGroup(), 3);
|
||||
|
|
@ -89,6 +91,10 @@ public class ExplorerMapEventHandler extends BaseHandler<PlayerInfoProto.Explor
|
|||
builder.setFightResult(fightResult.getResult());
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[]{exploreEventConfig.get(id).getRewardGroup()}, 1, 0, BIReason.EXPLORE_EVENT_MONSTER);
|
||||
builder.setDrop(drop);
|
||||
if((int) fightResult.getCheckResult()[0] == 1){
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_REPELMONSTER_NUM,
|
||||
1);
|
||||
}
|
||||
}else if(exploreEventConfig.get(id).getType() == 2){
|
||||
int defUid = user.getPlayerInfoManager().getExploreEventMatchDefUid();
|
||||
CSPlayer csPlayer = CrossServiceLogic.getPlayerByRedis(defUid);
|
||||
|
|
@ -117,12 +123,18 @@ public class ExplorerMapEventHandler extends BaseHandler<PlayerInfoProto.Explor
|
|||
builder.setFightResult( (int) fightResult.getCheckResult()[0]);
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[]{exploreEventConfig.get(id).getRewardGroup()}, 1, 0, BIReason.EXPLORE_EVENT_MONSTER);
|
||||
builder.setDrop(drop);
|
||||
if((int) fightResult.getCheckResult()[0] == 1){
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_REPELXINMO_NUM,
|
||||
1);
|
||||
}
|
||||
}else if(exploreEventConfig.get(id).getType() == 3){
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[]{exploreEventConfig.get(id).getRewardGroup()}, 1, 0, BIReason.EXPLORE_EVENT_BOX);
|
||||
builder.setDrop(drop);
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_PICKYM_NUM,
|
||||
1);
|
||||
}
|
||||
eventList.remove(index);
|
||||
user.getPlayerInfoManager().setExploreEvent(eventList);
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.ExplorerMapEventResponse.getNumber(), builder.build(), true);*/
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.ExplorerMapEventResponse.getNumber(), builder.build(), true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,10 +43,14 @@ public class ExplorerMapEventXMBeforeBattleHandler extends BaseHandler<PlayerIn
|
|||
List<ZSetOperations.TypedTuple<String>> lst = new ArrayList<ZSetOperations.TypedTuple<String>>(forceZetSort); //
|
||||
if(lst.size()>0){
|
||||
matchUid = Integer.parseInt(lst.get(0).getValue());
|
||||
}else{
|
||||
matchUid = uid; //自己镜像
|
||||
}
|
||||
}
|
||||
//TODO
|
||||
matchUid=10052935;
|
||||
//matchUid=10061221;
|
||||
//matchUid=10052631;
|
||||
user.getPlayerInfoManager().setExploreEventMatchDefUid(matchUid);
|
||||
List<Integer> team = new ArrayList<>();
|
||||
//new ArrayList<Integer>(TeamEnum.FORMATION_NORMAL.getTeamId())
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
package com.ljsd.jieling.handler.explorerMap;
|
||||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.event.ExploreEvent;
|
||||
import com.ljsd.jieling.logic.dao.ExplorerInfo;
|
||||
import com.ljsd.jieling.logic.dao.KeyVal;
|
||||
import com.ljsd.jieling.logic.dao.TeamEnum;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mission.main.ExploreMissionType;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import config.SExploreTask;
|
||||
import manager.STableManager;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
|
@ -16,6 +18,7 @@ import rpc.protocols.PlayerInfoProto;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class ExplorerMapInfoHandler extends BaseHandler<PlayerInfoProto.ExplorerMapInfoRequest> {
|
||||
@Override
|
||||
|
|
@ -30,6 +33,16 @@ public class ExplorerMapInfoHandler extends BaseHandler<PlayerInfoProto.Explorer
|
|||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
ExploreMissionType exploreMissionType = user.getUserMissionManager().getExploreMissionType();
|
||||
if (exploreMissionType.getDoingMissionIds().size() == 0 && exploreMissionType.getFinishMissionIds().size() == 0
|
||||
&& exploreMissionType.getRewardedMissionIds().size() == 0) {
|
||||
Set<Integer> arro = STableManager.getConfig(SExploreTask.class).keySet();
|
||||
exploreMissionType.getDoingMissionIds().clear();
|
||||
exploreMissionType.getFinishMissionIds().clear();
|
||||
exploreMissionType.getRewardedMissionIds().clear();
|
||||
exploreMissionType.getDoingMissionIds().addAll(arro);
|
||||
user.getUserMissionManager().updateString("exploreMissionType", exploreMissionType);
|
||||
}
|
||||
PlayerInfoProto.ExplorerMapInfoResponse.Builder builder = PlayerInfoProto.ExplorerMapInfoResponse.newBuilder();
|
||||
Map<Integer, ExplorerInfo> explorer = user.getPlayerInfoManager().getExplorer();
|
||||
for (int i = TeamEnum.EXPLORE_TEAM_ONE.getTeamId(); i <= TeamEnum.EXPLORE_TEAM_FIVE.getTeamId(); i++) {
|
||||
|
|
@ -48,7 +61,7 @@ public class ExplorerMapInfoHandler extends BaseHandler<PlayerInfoProto.Explorer
|
|||
}
|
||||
|
||||
List<KeyVal> event = user.getPlayerInfoManager().getExploreEvent();
|
||||
for(KeyVal keyVal:event){
|
||||
for (KeyVal keyVal : event) {
|
||||
builder.addRandEvent(CommonProto.CommKeyVal.newBuilder().setKey(keyVal.getKey()).setVal(keyVal.getVal()).
|
||||
setVal2(keyVal.getVa2()).build());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -496,6 +496,10 @@ public class UserMissionManager extends MongoBase {
|
|||
endlessMissionType.rewardMission((int)parm[0], missionTypeEnumListMap.get(GameMisionType.ENDLESS_MISSION));
|
||||
updateString("endlessMissionType",endlessMissionType);
|
||||
}
|
||||
case EXPLORE_REWARD:{
|
||||
exploreMissionType.rewardMission((int)parm[0], missionTypeEnumListMap.get(GameMisionType.EXPLORE));
|
||||
updateString("exploreMissionType",exploreMissionType);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,10 @@ public class ExplorerMapLogic {
|
|||
explorerInfo.setEnemyReliveTime(time + exploreConfig.getBattleInterval());
|
||||
}
|
||||
LOGGER.info("{}怪物死亡=》重生时间{}", user.getId(), explorerInfo.getEnemyReliveTime());
|
||||
//RankEnum.toRank(RankEnum.EXPLORE_RANK.getType()).addRank(user.getId(),"",1);
|
||||
RankEnum.toRank(RankEnum.EXPLORE_RANK.getType()).incrementRankScore(user.getId(),"",1);
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_ENEMY_NUM,
|
||||
1);
|
||||
|
||||
//user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_ENEMY_NUM);
|
||||
|
||||
}
|
||||
|
|
@ -287,13 +290,13 @@ public class ExplorerMapLogic {
|
|||
continue;
|
||||
}
|
||||
//整点刷出随机事件
|
||||
/*Calendar calendar = Calendar.getInstance();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int minute = calendar.get(Calendar.MINUTE);
|
||||
sendRandomEvent(user);
|
||||
//sendRandomEvent(user);
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
if(minute == 0){
|
||||
//sendRandomEvent(user);
|
||||
}*/
|
||||
sendRandomEvent(user);
|
||||
}
|
||||
Map<Integer, ExplorerInfo> explorer = user.getPlayerInfoManager().getExplorer();
|
||||
if (explorer == null || explorer.size() == 0) {
|
||||
continue;
|
||||
|
|
@ -424,7 +427,7 @@ public class ExplorerMapLogic {
|
|||
int randomEventId = random.nextInt(rankExplore.getEventList().length);
|
||||
int eventId = rankExplore.getEventList()[randomEventId];
|
||||
LOGGER.error("explore add eventId:"+eventId+" randomMapId: "+randomMapId);
|
||||
user.getPlayerInfoManager().addExploreEvent(new KeyVal(eventId,TimeUtils.nowInt()+exploreEventConfig.get(eventId).getTime(),randomMapId));
|
||||
user.getPlayerInfoManager().addExploreEvent(new KeyVal(eventId,TimeUtils.nowInt()+exploreEventConfig.get(eventId).getTime(),randomMapId+1));
|
||||
|
||||
}
|
||||
public static class Instance {
|
||||
|
|
|
|||
|
|
@ -148,5 +148,6 @@ public enum GameEvent {
|
|||
DONGHAIXUNXIAN_REWARD,//东海寻仙,任务奖励
|
||||
|
||||
EXPLORE,//探索
|
||||
EXPLORE_REWARD,//探索奖励
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -607,8 +607,16 @@ public class MissionLoigc {
|
|||
Set<Integer> finishMissionIds = dailyMissionIdsType.getFinishMissionIds();
|
||||
Map<Integer, SExploreTask> config = STableManager.getConfig(SExploreTask.class);
|
||||
int type = GameMisionType.EXPLORE.getType();
|
||||
if (doingMissionIds.size() == 0 && finishMissionIds.size() == 0) {
|
||||
Set<Integer> arro = STableManager.getConfig(SExploreTask.class).keySet();
|
||||
doingMissionIds.clear();
|
||||
finishMissionIds.clear();
|
||||
//exploreMissionType.getRewardedMissionIds().clear();
|
||||
doingMissionIds.addAll(arro);
|
||||
user.getUserMissionManager().updateString("exploreMissionType", dailyMissionIdsType);
|
||||
}
|
||||
for(SExploreTask exploreTask:config.values()){
|
||||
int state = 2;
|
||||
int state = 0;
|
||||
int missionId = exploreTask.getId();
|
||||
int progrss = exploreTask.getValues()[1][0];
|
||||
if(doingMissionIds.contains(missionId)){
|
||||
|
|
@ -825,6 +833,11 @@ public class MissionLoigc {
|
|||
Map<GameMisionType, List<MissionStateChangeInfo>> gameMisionTypeListMap = userMissionManager.onGameEvent(user, GameEvent.ENDLESS_MISSION_REWARD, missionId);
|
||||
missionStateChangeInfos = gameMisionTypeListMap.get(GameMisionType.ENDLESS_MISSION);
|
||||
}
|
||||
//探索任务
|
||||
if(type==GameMisionType.EXPLORE.getType()){
|
||||
Map<GameMisionType, List<MissionStateChangeInfo>> gameMisionTypeListMap = userMissionManager.onGameEvent(user, GameEvent.EXPLORE_REWARD, missionId);
|
||||
missionStateChangeInfos = gameMisionTypeListMap.get(GameMisionType.EXPLORE);
|
||||
}
|
||||
|
||||
|
||||
if(missionStateChangeInfos!=null && !missionStateChangeInfos.isEmpty()){
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class ExploreEnemyHistoryHighManager implements BaseDataManager{
|
|||
|
||||
MissionType type = (MissionType) parm[0];
|
||||
if (type.getMissionTypeValue() == missionType.getMissionTypeValue()){
|
||||
data.exploreKillerHistoryHigh_num++;
|
||||
data.exploreKillerHistoryHigh_num = (int)parm[1];
|
||||
}
|
||||
|
||||
return new CumulationData.Result(missionType);
|
||||
|
|
|
|||
|
|
@ -252,6 +252,7 @@ public class MissionEventDistributor {
|
|||
eventProcessor.put(GameEvent.JADE_DYNASTY_MISSION_REWARD,new RewardEventProcessor());
|
||||
eventProcessor.put(GameEvent.COW_FLY_SKY_REWEARD,new RewardEventProcessor());
|
||||
eventProcessor.put(GameEvent.ENDLESS_MISSION_REWARD,new RewardEventProcessor());
|
||||
eventProcessor.put(GameEvent.EXPLORE_REWARD,new RewardEventProcessor());
|
||||
|
||||
typeList = new ArrayList<>();
|
||||
typeList.add(MissionType.RING_FIREA_DVANCED);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.ljsd.jieling.logic.mission.data.DataManagerDistributor;
|
|||
import config.SExploreTask;
|
||||
import config.SJourneyWithWind;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
|
@ -50,7 +51,7 @@ public class ExploreMissionType extends AbstractMissionType {
|
|||
}else {
|
||||
//完成
|
||||
doingProgress = MissionLoigc.getDoingProgress(user, cumulationData, sTaskConfig.getType(), sTaskConfig.getValues()[0]);
|
||||
isFinish = doingProgress >= sTaskConfig.getValues()[1][0];
|
||||
isFinish = doingProgress <= sTaskConfig.getValues()[1][0];
|
||||
}
|
||||
|
||||
if (!isFinish) {
|
||||
|
|
@ -71,6 +72,18 @@ public class ExploreMissionType extends AbstractMissionType {
|
|||
}
|
||||
MissionStateChangeInfo finishInfo = new MissionStateChangeInfo(missionId,
|
||||
MissionState.FINISH, null);
|
||||
if(missionStateChangeInfos == null){
|
||||
missionStateChangeInfos = new ArrayList<MissionStateChangeInfo>();
|
||||
}
|
||||
|
||||
if(missionStateChangeInfos != null ){
|
||||
missionStateChangeInfos.removeIf(next -> next.getMissionId() == missionId);
|
||||
missionStateChangeInfos.add(finishInfo);
|
||||
doingMissionIds.remove(missionId);
|
||||
getFinishMissionIds().add(missionId);
|
||||
|
||||
}
|
||||
/*
|
||||
Iterator<MissionStateChangeInfo> iterator = missionStateChangeInfos.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
MissionStateChangeInfo next = iterator.next();
|
||||
|
|
@ -91,18 +104,8 @@ public class ExploreMissionType extends AbstractMissionType {
|
|||
}
|
||||
missionStateChangeInfos.add(finishInfo);
|
||||
doingMissionIds.remove(missionId);
|
||||
getFinishMissionIds().add(missionId);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
getFinishMissionIds().add(missionId);*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ import com.ljsd.jieling.logic.family.GuildFightLogic;
|
|||
import com.ljsd.jieling.logic.family.GuildLogic;
|
||||
import com.ljsd.jieling.logic.help.HelpHeroLogic;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
import com.ljsd.jieling.logic.question.QuestionLogic;
|
||||
import com.ljsd.jieling.logic.rank.CrossRankManager;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
|
|
@ -47,6 +49,7 @@ import com.ljsd.jieling.util.MessageUtil;
|
|||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -244,7 +247,20 @@ public class MinuteTask extends Thread {
|
|||
RedisUtil.getInstence().remove(RedisUtil.getInstence().getKey(RedisKey.CROSS_LINGMAISECRET_INFO,crossGroup + RedisKey.Delimiter_colon + 2,true));
|
||||
}
|
||||
//探索排行每日重置
|
||||
RankEnum.toRank(RankEnum.EXPLORE_RANK.getType()).removeAllRank("");
|
||||
String key = RedisUtil.getInstence().getKey(RedisKey.EXPLORE_RANK,"",true);
|
||||
Set<String> exploreRank = RedisUtil.getInstence().getReverseZset(key,0,-1);
|
||||
int i = 0;
|
||||
for(String eachEle:exploreRank){
|
||||
User user = UserManager.getUser(Integer.parseInt(eachEle));
|
||||
if(user == null){
|
||||
continue;
|
||||
}
|
||||
//LOGGER.error("------------------------------asdfa --------------:"+eachEle);
|
||||
i++;
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_ENEMYHISTORYHIGH_NUM,
|
||||
i);
|
||||
}
|
||||
RankEnum.toRank(RankEnum.EXPLORE_RANK.getType()).removeRank("");
|
||||
|
||||
// 公会信息处理
|
||||
Map<Integer, GuildInfo> guildInfoMap = GuilidManager.guildInfoMap;
|
||||
|
|
|
|||
Loading…
Reference in New Issue