Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

luyao 2022-03-14 14:07:58 +08:00
commit 1cd4afea50
12 changed files with 195 additions and 35 deletions

View File

@ -1666,6 +1666,7 @@ FUNCTION_OPEN_TYPE = {
FIGHTLEVEL = 107,--山河社稷图
LikeAbility = 114,--好感度
PRACTICE = 108,--修行
Treasure = 109,--宝物
JumpServer_YuXu = 111, -- 玉虚论道
QIJIESHILIAN = 112,--七界试炼
FOURQUADRANT=113,--四象心法

View File

@ -2759,8 +2759,8 @@ GETCARCHALLENEGLISTRESPONSE_MYSCORE_FIELD.index = 2
GETCARCHALLENEGLISTRESPONSE_MYSCORE_FIELD.label = 1
GETCARCHALLENEGLISTRESPONSE_MYSCORE_FIELD.has_default_value = false
GETCARCHALLENEGLISTRESPONSE_MYSCORE_FIELD.default_value = 0
GETCARCHALLENEGLISTRESPONSE_MYSCORE_FIELD.type = 5
GETCARCHALLENEGLISTRESPONSE_MYSCORE_FIELD.cpp_type = 1
GETCARCHALLENEGLISTRESPONSE_MYSCORE_FIELD.type = 3
GETCARCHALLENEGLISTRESPONSE_MYSCORE_FIELD.cpp_type = 2
GETCARCHALLENEGLISTRESPONSE.name = "GetCarChallenegListResponse"
GETCARCHALLENEGLISTRESPONSE.full_name = ".rpc.protocols.GetCarChallenegListResponse"

View File

@ -277,20 +277,35 @@ function this.PokemonUnitAdapter(pokemonUnit,camp,_teamDamage)
property = {},
}
-- 技能
local skills = string.split(pokemonUnit.unitSkillIds, "#")
if pokemonUnit.position==100 then -- 特殊处理位置 100 是玩家技能数据
for i = 1, #skills do
if skills[i] and skills[i]~="" then
local newSkill=this.PlayerSkillAdapter(tonumber(skills[i]))
role.skill[i] = newSkill
LogError(pokemonUnit.unitSkillIds)
local skills = string.split(pokemonUnit.unitSkillIds, "|")
if skills then
if skills[1] then
local actives=string.split(skills[1], "#")
if pokemonUnit.position==100 then -- 特殊处理位置 100 是玩家技能数据
for i = 1, #actives do
if actives[i] and actives[i]~="" then
local newSkill=this.PlayerSkillAdapter(tonumber(actives[i]))
role.skill[i] = newSkill
end
end
else
for i = 1, #actives do
role.skill[i]= this.MonsterSkillAdapter(tonumber(actives[i]))
end
end
end
else
for i = 1, #skills do
role.skill[i]= this.MonsterSkillAdapter(tonumber(skills[i]))
end
end
if skills[2] then
local passs=string.split(skills[2], "#")
local passivityList = {}
for j = 1, #passs do
table.insert(passivityList, tonumber(passs[j]))
end
role.passivity = this.GetPassivityData(passivityList)
end
end
-- 属性
local propertys = string.split(pokemonUnit.property, "#")
for j = 1, #propertys do

View File

@ -11039,6 +11039,83 @@ local passivityList = {
time=time+1
end)
end,
--每次释放技能,有[a]%的概率,使目标被控制概率改变[b][c]%,持续[d]回合
--a[float],b[int],c[float],d[int]
[429]=function(role, args,id,judge)
local p1=args[1]
local ct=args[2]
local p2=args[3]
local r1=args[4]
local OnSkillCast=function(skill)
if not skill then
return
end
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local list = skill:GetDirectTargets()
if list then
for i = 1, #list do
BattleUtil.RandomAction(p1,function()
list[i]:AddBuff(Buff.Create(role, BuffName.BreakArmor,r1,4,ct,p2))
end)
end
end
end
role.Event:AddEvent(BattleEventName.SkillCastEnd,OnSkillCast,nil,nil,role)
end,
--释放技能时,有[a]%概率为目标增加[b]属性 改变[c][d]%的效果,持续[e]回合
--a[float],b[int 属性],c[int],d[float],e[int]
[430]=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 OnSkillCast = function(skill)
if not skill then
return
end
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local arr=skill:GetDirectTargets()
for i = 1, #arr do
BattleUtil.RandomAction(p1,function()
arr[i]:AddBuff(Buff.Create(role, BuffName.PropertyChange,r1, BattlePropList[pro], v1, ct))
end)
end
end
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCast,nil,nil,role)
end,
--释放技能时,我方随机[a]个人,增加[b]%[c]属性的御甲
--a[int],b[float],c[int 属性]
[431]=function(role, args,id,judge)
local v1 = args[1]
local v2 = args[2]
local pro = args[3]
local OnSkillCast = function(skill)
if not skill then
return
end
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)
end
end
end
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCast,nil,nil,role)
end,
}
return passivityList

View File

@ -2,7 +2,9 @@ BreakArmor = Buff:New()
--初始化Buff通过传入一些自定义参数控制成长相关的数值
function BreakArmor:SetData(...)
self.signType=...
self.signType,
self.signValue1,
self.signValue2=...
-- 刷新排序等级
self.sort = 4
end

View File

@ -1074,7 +1074,7 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
-- 计算克制伤害系数
local MieKangFactor = 1
if atkRole.type == BattleUnitType.Role and defRole.type == BattleUnitType.Role then
if BattleLogic.GetIsPvP() and atkRole.type == BattleUnitType.Role and defRole.type == BattleUnitType.Role then
MieKangFactor=MieKangFactor + atkRole:GetRoleData(BattleMieProp[defRole.element]) - defRole:GetRoleData(BattleKangProp[atkRole.element])
end
@ -1359,6 +1359,12 @@ function BattleUtil.RandomControl(rand, ctrl, caster, target, round,skill)
target.Event:DispatchEvent(BattleEventName.PassiveBeRandomControl, _CallBack, ctrl, target)
BattleLogic.Event:DispatchEvent(BattleEventName.PassiveBeRandomControl, _CallBack, ctrl,caster,target)
rand = BattleUtil.CountChangeList(rand, cl)
local list=BattleLogic.BuffMgr:GetBuff(target,function(buff)
return buff.type==BuffName.BreakArmor and buff.signType==4
end)
for key, value in pairs(list) do
rand=BattleUtil.CountValue(rand,value.signValue2,value.signValue1)
end
local buff = Buff.Create(caster, BuffName.Control, round, ctrl)
local isAdd=BattleUtil.RandomAction(rand, function()
target:AddBuff(buff)

View File

@ -39,6 +39,32 @@ function Monster:Init(data)
--LogError("monster skill id=="..data.skill[i])
self.skillGroupList[i] = MSkillManager.CreateMSkillGroup(self, i, data.skill[i])
end
if data.passivity and #data.passivity > 0 then
table.sort(data.passivity,function(a,b)
return a[1] < b[1]
end)
for i = 1, #data.passivity do
local v = data.passivity[i]
local passivityId = tonumber(v[1])
local judge=v[2]
local id = tonumber(v[3])
local args = {}
for j = 4, #v do
args[j-3] = v[j]
end
if BattleUtil.Passivity[id] then
BattleUtil.Passivity[id](self, args,passivityId,judge)
BattleLogManager.Log(
"Add Passive",
"id", tostring(id),
"camp", tostring(self.camp),
"pos", tostring(self.position),
"passivityId", tostring(passivityId),
"judge", tostring(judge)
)
end
end
end
end

View File

@ -2,20 +2,22 @@
CompoundPanel = Inherit(BasePanel)
local this = CompoundPanel
local TabBox = require("Modules/Common/TabBox")
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10385] },
local _TabData={ [1] = { default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002",select = "r_hero_xuanze_001", name = Language[10385] , funcType = FUNCTION_OPEN_TYPE.COMPOUND},
--[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "宝器锻造" },
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10386] },
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10387] },
[2] = { default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002",select = "r_hero_xuanze_001", name = Language[10387] , funcType = FUNCTION_OPEN_TYPE.hunyin},
[3] = { default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002",select = "r_hero_xuanze_001", name = Language[10386], funcType = FUNCTION_OPEN_TYPE.Treasure },
}
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1),
lock = UIColor.GRAY,
}
local curIndex = 1
this.contents = {
[1] = {view = require("Modules/Compound/view/CompoundPanel_Equip"), panelName = "CompoundPanel_Equip"},
--[2] = {view = require("Modules/Compound/view/CompoundPanel_Talisman"), panelName = "CompoundPanel_Talisman"},
[2] = {view = require("Modules/Compound/view/CompoundPanel_Treasure"), panelName = "CompoundPanel_Treasure"},
[3] = {view = require("Modules/Compound/view/CompoundPanel_SoulPrint"), panelName = "CompoundPanel_SoulPrint"},
[2] = {view = require("Modules/Compound/view/CompoundPanel_SoulPrint"), panelName = "CompoundPanel_SoulPrint"},
[3] = {view = require("Modules/Compound/view/CompoundPanel_Treasure"), panelName = "CompoundPanel_Treasure"},
}
--初始化组件(用于子类重写)
function CompoundPanel:InitComponent()
@ -90,6 +92,7 @@ function CompoundPanel:OnShow()
this.TabCtrl = TabBox.New()
this.TabCtrl:SetTabAdapter(this.TabAdapter)
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
this.TabCtrl:SetTabIsLockCheck(this.IsTabLock)
this.TabCtrl:Init(this.tabBox, _TabData, curIndex)
end
@ -102,13 +105,26 @@ function CompoundPanel:OnSortingOrderChange()
end
end
function this.IsTabLock(index)
if _TabData[index].funcType and _TabData[index].funcType > 0 then
if ActTimeCtrlManager.SingleFuncState(_TabData[index].funcType) then
return false
else
return true, "".._TabData[index].name..""..ActTimeCtrlManager.SystemOpenTip(_TabData[index].funcType)
end
else
return false
end
end
-- tab节点显示自定义
function this.TabAdapter(tab, index, status)
local tabLab = Util.GetGameObject(tab, "Text")
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(_TabData[index][status])
tabLab:GetComponent("Text").text = _TabData[index].name
tabLab:GetComponent("Text").color = _TabFontColor[status]
this.SetBottomBarIsActive(tab, index)
Util.GetGameObject(tab,"LockImage"):SetActive(status == "lock")
-- this.SetBottomBarIsActive(tab, index)
end
--特殊的开启条件
@ -116,14 +132,14 @@ function this.SetBottomBarIsActive(tab, index)
local ConfigData = ConfigManager.GetConfig(ConfigName.SpecialConfig)
if index == 2 then
local string = ConfigData[89].Value
tab:SetActive(PlayerManager.level >= tonumber(string))
end
if index == 3 then
local string = ConfigData[40].Value
local num = string.split(string.split(string,"|")[1],"#")[2]
tab:SetActive(PlayerManager.level >= tonumber(num))
end
if index == 3 then
local string = ConfigData[89].Value
tab:SetActive(PlayerManager.level >= tonumber(string))
end
end
--切换视图

View File

@ -495,18 +495,18 @@ local jumpDic = {
if data then index = data[2] end
local ConfigData = ConfigManager.GetConfig(ConfigName.SpecialConfig)
if index == 2 then
local string = ConfigData[40].Value
local num = string.split(string.split(string,"|")[1],"#")[2]
if PlayerManager.level < tonumber(num) then
PopupTipPanel.ShowTip(string.format(Language[10770],num))
local string = ConfigData[89].Value
if PlayerManager.level < tonumber(string) then
PopupTipPanel.ShowTip(string.format(Language[10770],string))
this.isOpen = false
return
end
end
if index == 3 then
local string = ConfigData[89].Value
if PlayerManager.level < tonumber(string) then
PopupTipPanel.ShowTip(string.format(Language[10770],string))
local string = ConfigData[40].Value
local num = string.split(string.split(string,"|")[1],"#")[2]
if PlayerManager.level < tonumber(num) then
PopupTipPanel.ShowTip(string.format(Language[10770],num))
this.isOpen = false
return
end

View File

@ -63,6 +63,9 @@ function this.CheckPlayerSkillRed(redType)
end
local id=redType-5000
local lv=this.playerSkillList[id]
if id~=100 and lv>=this.playerSkillList[100] then
return false
end
local openId=PlayerPrefs.GetInt(PlayerManager.uid.."playerSkillRed")
if openId==id then
return true

View File

@ -273,6 +273,7 @@ function Practice:SetSkillInfo()
Util.GetGameObject(item, "Text"):SetActive(false)
end
Util.AddClick(item,function()
LogError("i=="..i.." list[i]=="..list[i])
UIManager.OpenPanel(UIName.PracticeSkillInfoPanel,i,list[i])
end)
index=index+1

View File

@ -41,6 +41,9 @@ function PracticeSkillInfoPanel:BindEvent()
PracticeManager.SetPlayerSkill(skillId,skillLv)
end
end)
elseif btnState==5 then
PopupTipPanel.ShowTip("不能超过主动技能等级")
return
end
end)
@ -70,6 +73,7 @@ function PracticeSkillInfoPanel:RefreshShow(id,lv)
else
currLv=lv
end
local list=PracticeManager.GetSkillInfo()
LogError("level====="..lv)
skillLv=lv
skillId=id
@ -125,8 +129,17 @@ function PracticeSkillInfoPanel:RefreshShow(id,lv)
self.costImg.sprite=icon
if BagManager.GetItemCountById(currData.LvupCost[1][1])>=currData.LvupCost[1][2] then
self.costNum.color=UIColor.WRITE
btnState=3 --可以点击
self.redPoint:SetActive(true)
if skillId~=100 and list[skillId] and currLv>=list[100] then
btnState=5
self.hintInfo.gameObject:SetActive(true)
self.costImg.gameObject:SetActive(false)
self.hintInfo.text="不能超过主动技能等级"
Util.SetGray(self.btn_up,true)
else
btnState=3 --可以点击
Util.SetGray(self.btn_up,false)
end
else
self.costNum.color=UIColor.RED
btnState=4 --货币不足