Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
879cf506f5
|
|
@ -2517,6 +2517,217 @@ local effectList = {
|
|||
target:AddBuff(buff)
|
||||
end)
|
||||
end,
|
||||
--造成主角[a]*[b]攻击伤害
|
||||
--a[int 1:等级 2.战斗力],b[int]
|
||||
[132] = function(caster, target, args, interval, skill)
|
||||
local type = args[1]
|
||||
local pro = args[2]
|
||||
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local value=0
|
||||
if type==1 then
|
||||
value=caster.star
|
||||
elseif type==2 then
|
||||
value=caster.teamDamage
|
||||
end
|
||||
local damage=floor(value*pro)
|
||||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
end)
|
||||
end,
|
||||
--对目标造成玩家[a]*[b]的伤害,伤害的[c]%转化为生命,治疗生命百分比最[d]的英雄
|
||||
--a[int 1:等级 2.战斗力],b[int],c[float],d[int 1:低 0:高]
|
||||
[133] = function(caster, target, args, interval, skill)
|
||||
local type=args[1]
|
||||
local f1 = args[2]
|
||||
local f2 = args[3]
|
||||
local sort = args[4]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local value=0
|
||||
if type==1 then
|
||||
value=caster.star
|
||||
elseif type==2 then
|
||||
value=caster.teamDamage
|
||||
end
|
||||
local damage=floor(value*f1)
|
||||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
local hp=floor(damage*f2)
|
||||
local arr = RoleManager.NoOrder(function (r) return r.camp == caster.camp end,false,true)
|
||||
BattleUtil.SortByHpFactor(arr,sort)
|
||||
BattleUtil.CalTreat(caster, arr[1],hp,1,skill)
|
||||
|
||||
end)
|
||||
end,
|
||||
--对目标造成主角[a]*[b]的伤害,并有[c]%概率给目标上[d]类型[e]效果buff持续[f]回合,buff具体参数1 [g]
|
||||
--a[int 1:等级 2.战斗力],b[int],c[float],d[int],e[int],f[int],g[int]
|
||||
[134] = function(caster, target, args, interval, skill)
|
||||
local type=args[1]
|
||||
local v1 = args[2]
|
||||
local p1 = args[3]
|
||||
local t1 = args[4]
|
||||
local t2 = args[5]
|
||||
local r1 = args[6]
|
||||
local v2 = args[7]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local value=0
|
||||
if type==1 then
|
||||
value=caster.star
|
||||
elseif type==2 then
|
||||
value=caster.teamDamage
|
||||
end
|
||||
local damage=floor(value*v1)
|
||||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
if t1==BuffName.Control then
|
||||
BattleUtil.RandomControl(p1,t2,caster,target,r1,skill)
|
||||
elseif t1==BuffName.DOT then
|
||||
BattleUtil.RandomDot(p1,t2,caster,target,r1,1,value*v2,skill)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
--对目标造成主角[a]*[b]的伤害,如果目标处于[c]类型[d]效果,则[e]%概率给目标添加[f]类型[g]效果,持续[h]回合
|
||||
--a[int 1:等级 2.战斗力],b[int],c[int],d[int],e[float],f[int],g[int],h[int]
|
||||
[135] = function(caster, target, args, interval, skill)
|
||||
local type=args[1]
|
||||
local v1 = args[2]
|
||||
local t1 = args[3]
|
||||
local t2 = args[4]
|
||||
local pro = args[5]
|
||||
local t3 = args[6]
|
||||
local t4 = args[7]
|
||||
local r1 =args[8]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local value=0
|
||||
if type==1 then
|
||||
value=caster.star
|
||||
elseif type==2 then
|
||||
value=caster.teamDamage
|
||||
end
|
||||
local damage=floor(value*v1)
|
||||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
if BattleLogic.BuffMgr:HasBuff(target, t1, function (buff)
|
||||
if t1==BuffName.DOT then
|
||||
return buff.damageType==t2
|
||||
end
|
||||
end) then
|
||||
if t3==BuffName.Control then
|
||||
BattleUtil.RandomControl(pro,t4,caster,target,r1,skill)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end,
|
||||
--对目标造成主角[a]*[b]攻击伤害,目标每减少[c]个伤害增加[d]%
|
||||
--a[int 1:等级 2.战斗力],b[int],c[int],d[float]
|
||||
[136] = function(caster, target, args, interval, skill)
|
||||
local type = args[1]
|
||||
local pro = args[2]
|
||||
local i1 = args[3]
|
||||
local v1 = args[4]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local value=0
|
||||
if type==1 then
|
||||
value=caster.star
|
||||
elseif type==2 then
|
||||
value=caster.teamDamage
|
||||
end
|
||||
-- 改变值 = 技能最大目标数 - 当前目标数
|
||||
local maxNum = skill:GetMaxTargetNum()
|
||||
local curNum = #skill:GetDirectTargets()
|
||||
local lessNum = max(maxNum - curNum, 0)
|
||||
local level = math.floor(lessNum/i1)
|
||||
local extra = BattleUtil.ErrorCorrection(level * i1)
|
||||
local damage=floor(value*pro*(1+extra))
|
||||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
end)
|
||||
end,
|
||||
--对目标造成主角[a]*[b]攻击伤害,如果击杀目标,随机减少敌方[c]个神将[d]点怒气
|
||||
--a[int 1:等级 2.战斗力],b[int],c[int],d[float]
|
||||
[137] = function(caster, target, args, interval, skill)
|
||||
local type = args[1]
|
||||
local pro = args[2]
|
||||
local i1 = args[3]
|
||||
local v1 = args[4]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local value=0
|
||||
if type==1 then
|
||||
value=caster.star
|
||||
elseif type==2 then
|
||||
value=caster.teamDamage
|
||||
end
|
||||
local damage=floor(value*pro)
|
||||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
if target.isDead then
|
||||
local arr = RoleManager.Query(function (r) return r.camp == target.camp end)
|
||||
for i = 1, i1 do
|
||||
local count = Random.RangeInt(1,#arr)
|
||||
BattleUtil.CalRage(caster,arr[count],v1,CountTypeName.Sub)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end,
|
||||
--技能目标如果大于[a],改变[b]目标[c]点怒气
|
||||
--a[int],b[int],c[int]
|
||||
[138] = function(caster, target, args, interval, skill)
|
||||
local num = args[1]
|
||||
local ct = args[2]
|
||||
local v1 = args[3]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local curNum = #skill:GetDirectTargets()
|
||||
if curNum>num then
|
||||
BattleUtil.CalRage(caster,target,v1,ct)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
--对目标造成主角[a]*[b]的伤害,如果目标处于[c]类型[d]效果,则伤害改变[e][f]%
|
||||
--a[int 1:等级 2.战斗力],b[int],c[int],d[int],e[int],f[float]
|
||||
[139] = function(caster, target, args, interval, skill)
|
||||
local type=args[1]
|
||||
local v1 = args[2]
|
||||
local t1 = args[3]
|
||||
local t2 = args[4]
|
||||
local ct = args[5]
|
||||
local v2 = args[6]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local value=0
|
||||
if type==1 then
|
||||
value=caster.star
|
||||
elseif type==2 then
|
||||
value=caster.teamDamage
|
||||
end
|
||||
local add=0
|
||||
if BattleLogic.BuffMgr:HasBuff(target, t1, function (buff)
|
||||
if t1==BuffName.DOT then
|
||||
return buff.damageType==t2
|
||||
end
|
||||
end) then
|
||||
add=v2
|
||||
end
|
||||
local damage=floor(value*v1)
|
||||
damage=floor(BattleUtil.CountValue(damage,add,ct))
|
||||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
end)
|
||||
end,
|
||||
--造成主角[a]*[b]攻击伤害,概率[c]改变[d]目标[e]点怒气
|
||||
--a[int 1:等级 2.战斗力],b[int],c[float],d[int],e[int]
|
||||
[140] = function(caster, target, args, interval, skill)
|
||||
local type = args[1]
|
||||
local pro = args[2]
|
||||
local p1 = args[3]
|
||||
local ct = args[4]
|
||||
local v1 = args[5]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local value=0
|
||||
if type==1 then
|
||||
value=caster.star
|
||||
elseif type==2 then
|
||||
value=caster.teamDamage
|
||||
end
|
||||
local damage=floor(value*pro)
|
||||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
BattleUtil.RandomAction(p1, function ()
|
||||
BattleUtil.CalRage(caster,target,v1,ct)
|
||||
end)
|
||||
end)
|
||||
end,
|
||||
|
||||
}
|
||||
|
||||
return effectList
|
||||
|
|
@ -102,7 +102,17 @@ function EnemyView:onCreate(go, role, position, root, isBoss,enemyId)
|
|||
self.RoleLiveGO2:GetComponent("RectTransform").anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] + 400)
|
||||
self.RoleLiveGO2.transform.localScale = Vector3.one * self.enemy_liveScale --* 2
|
||||
self.RoleLiveGO2:SetActive(false)
|
||||
|
||||
local toward=HeroConfig[role.roleData.roleId].Toward
|
||||
if toward==2 then
|
||||
local mirrOffset=RoleConfig[roleId].mirrorimage_offset
|
||||
if mirrOffset and mirrOffset[1]~=0 and mirrOffset[2]~=0 then
|
||||
self.RoleLiveGO:GetComponent("RectTransform").anchoredPosition = Vector2.New(mirrOffset[1],mirrOffset[2])
|
||||
self.RoleLiveGO2:GetComponent("RectTransform").anchoredPosition = Vector2.New(mirrOffset[1],mirrOffset[2])
|
||||
end
|
||||
|
||||
self.RoleLiveGO:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0,180, 0))
|
||||
self.RoleLiveGO2:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0,180, 0))
|
||||
end
|
||||
-- 阴影
|
||||
self.shadow = Util.GetGameObject(self.liveRoot, "shadow")
|
||||
self.shadow:SetActive(true)
|
||||
|
|
|
|||
|
|
@ -108,8 +108,7 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
self.RoleLiveGOGraphic.AnimationState:SetAnimation(0, "idle", true)
|
||||
--self.RootPanel.PlayerPanel, "live_"..position
|
||||
self.RoleLiveGO:SetActive(true)
|
||||
|
||||
|
||||
|
||||
-- 卡牌立绘显示
|
||||
--self.liveRender = Util.GetGameObject(go, "Mask/icon"):GetComponent("RawImage")
|
||||
--self.liveRender.texture, self.aaa , _, self.RoleLiveParnet = CardRendererManager.GetSpineTexture(role.position, self.livePath, Vector3.one * self.play_liveScale, Vector3.New(self.offset[1], self.offset[2], 0), false) --self.spLoader:LoadSprite(heroData.painting)
|
||||
|
|
@ -120,9 +119,6 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
-- self.liveRender.transform.anchoredPosition = Vector3.zero--Vector2.New(self.offset[1], self.offset[2])
|
||||
-- self.liveRender.gameObject:SetActive(true)
|
||||
-- self.liveRender.material:SetInt("_IsMask", 1)
|
||||
|
||||
|
||||
|
||||
-- casting技能立绘
|
||||
self.RoleLiveGO2 = poolManager:LoadLive(self.livePath, go.transform.parent, Vector3.one, Vector3.zero)
|
||||
self.RoleLiveGO2.transform:SetParent(self.RootPanel.mySkillCastRoot.transform)
|
||||
|
|
@ -133,7 +129,17 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
self.RoleLiveGOTran2 = self.RoleLiveGO2:GetComponent("RectTransform")
|
||||
self.RoleLiveGOGraphic2.AnimationState:SetAnimation(0, "idle", true)
|
||||
self.RoleLiveGOTran2.sizeDelta = Vector2.New(1000, 1000)
|
||||
|
||||
local toward=HeroConfig[role.roleData.roleId].Toward
|
||||
if toward==1 then
|
||||
local mirrOffset=RoleConfig[roleId].mirrorimage_offset
|
||||
if mirrOffset and mirrOffset[1]~=0 and mirrOffset[2]~=0 then
|
||||
self.RoleLiveGO:GetComponent("RectTransform").anchoredPosition = Vector2.New(mirrOffset[1],mirrOffset[2])
|
||||
self.RoleLiveGO2:GetComponent("RectTransform").anchoredPosition = Vector2.New(mirrOffset[1],mirrOffset[2])
|
||||
end
|
||||
self.RoleLiveGO:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0,180, 0))
|
||||
self.RoleLiveGO2:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0,180, 0))
|
||||
end
|
||||
|
||||
--
|
||||
self.RoleIconGO = Util.GetGameObject(go, "func")
|
||||
self.RoleIconGO:SetActive(true)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ function SkillCaster:OnSkillCast(skill)
|
|||
BattleManager.PauseBattle()
|
||||
-- 调用上层接口
|
||||
if self.owner.OnSkillCastStart then
|
||||
self.owner:OnSkillCastStart()
|
||||
self.owner:OnSkillCastStart(skill)
|
||||
end
|
||||
|
||||
self.owner.RootPanel.SetRoleHighLight(self.owner, skill:GetDirectTargets(), function()
|
||||
|
|
@ -118,6 +118,10 @@ function SkillCaster:PlaySkillCastingEffect(combat, skill, func)
|
|||
if self.owner.role.type == BattleUnitType.Monster then
|
||||
self:CheckSkillForoleEffect(combat, skill)
|
||||
end
|
||||
|
||||
if self.owner.OnSkillCastStart then
|
||||
self.owner:OnSkillCastStart(skill)
|
||||
end
|
||||
-- 调用上层接口
|
||||
if self.owner.OnSkillCastingStart then
|
||||
self.owner:OnSkillCastingStart()
|
||||
|
|
|
|||
Loading…
Reference in New Issue