Merge branch 'dev_20230725' of http://git.juzugame.com/b6-client/b6-lua into dev_20230725

This commit is contained in:
xiekaidong 2023-07-24 18:47:54 +08:00
commit e59b7f1ccb
6 changed files with 56 additions and 38 deletions

View File

@ -1638,7 +1638,7 @@ local item = {
[1013]={
["type"]=2,
["qlt"]=1,
["icon"]="1013",
["icon"]="1019",
["get_way_type"]=2,
["get_way"]={
2,
@ -1658,7 +1658,7 @@ local item = {
[1014]={
["type"]=2,
["qlt"]=2,
["icon"]="1014",
["icon"]="1020",
["get_way_type"]=2,
["get_way"]={
8,
@ -1681,7 +1681,7 @@ local item = {
[1015]={
["type"]=2,
["qlt"]=3,
["icon"]="1015",
["icon"]="1021",
["get_way_type"]=2,
["get_way"]={
14,
@ -1707,7 +1707,7 @@ local item = {
[1016]={
["type"]=2,
["qlt"]=4,
["icon"]="1016",
["icon"]="1022",
["get_way_type"]=2,
["get_way"]={
26,
@ -1733,7 +1733,7 @@ local item = {
[1017]={
["type"]=2,
["qlt"]=5,
["icon"]="1017",
["icon"]="1023",
["get_way_type"]=2,
["get_way"]={
38,
@ -1753,7 +1753,7 @@ local item = {
[1018]={
["type"]=2,
["qlt"]=5,
["icon"]="1018",
["icon"]="1024",
["get_way_type"]=2,
["get_way"]={
50,
@ -1767,7 +1767,7 @@ local item = {
[1019]={
["type"]=2,
["qlt"]=1,
["icon"]="1019",
["icon"]="1013",
["get_way_type"]=2,
["get_way"]={
3,
@ -1787,7 +1787,7 @@ local item = {
[1020]={
["type"]=2,
["qlt"]=2,
["icon"]="1020",
["icon"]="1014",
["get_way_type"]=2,
["get_way"]={
9,
@ -1810,7 +1810,7 @@ local item = {
[1021]={
["type"]=2,
["qlt"]=3,
["icon"]="1021",
["icon"]="1015",
["get_way_type"]=2,
["get_way"]={
15,
@ -1836,7 +1836,7 @@ local item = {
[1022]={
["type"]=2,
["qlt"]=4,
["icon"]="1022",
["icon"]="1016",
["get_way_type"]=2,
["get_way"]={
27,
@ -1862,7 +1862,7 @@ local item = {
[1023]={
["type"]=2,
["qlt"]=5,
["icon"]="1023",
["icon"]="1017",
["get_way_type"]=2,
["get_way"]={
39,
@ -1882,7 +1882,7 @@ local item = {
[1024]={
["type"]=2,
["qlt"]=5,
["icon"]="1024",
["icon"]="1018",
["get_way_type"]=2,
["get_way"]={
51,

View File

@ -673,7 +673,12 @@ local tutorial = {
0,
200
},
["target_name"]="hero_detail_ui(Clone)/common/btn_close"
["target_name"]="hero_detail_ui(Clone)/common/btn_close",
["arrow_direction"]=1,
["arrow_offset"]={
0,
0
}
},
[80050]={
["next_id"]=80060,
@ -711,6 +716,7 @@ local tutorial = {
}
},
[80070]={
["type"]=2,
["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/dungeon_comp/scrollrect/viewport/content/scroll_cell_2/btn_start",
["arrow_direction"]=2,
["arrow_offset"]={
@ -776,7 +782,12 @@ local tutorial = {
0,
200
},
["target_name"]="hero_detail_ui(Clone)/common/btn_close"
["target_name"]="hero_detail_ui(Clone)/common/btn_close",
["arrow_direction"]=1,
["arrow_offset"]={
0,
0
}
},
[90050]={
["next_id"]=90060,

View File

@ -44,7 +44,7 @@ function WeaponInfoComp:refresh()
self.txLevel:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_3) .. self.weaponEntity:getLevel().."/"..self.weaponEntity:getMaxLevel())
self.txAttr:setText(self.weaponEntity:getAttrDesc())
local height = self.txAttr:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredHeight
self.attrContent:setSizeDeltaY(height)
self.attrContent:setSizeDeltaY(height + 5)
self.attrContent:setAnchoredPosition(0, 0)
-- 基础属性

View File

@ -24,6 +24,7 @@ function DungeonArmorEntity:init(data)
DataManager.FormationData:initDungeonArmor(self.heroes)
DataManager:registerCrossDayFunc("DungeonArmorEntity", function()
self.fundAd = false
self.farmCount = table.clear(self.farmCount)
self:setDirty()
end)

View File

@ -1,5 +1,5 @@
local EquipEntity = class("EquipEntity", BaseData)
local DEFAULT_FACTOR = GConst.BattleConst.DEFAULT_FACTOR
local ATTR_FACTOR = 100
function EquipEntity:ctor(heroId, part, level)
self.level = level or 0
@ -40,7 +40,7 @@ end
-- 获取部位加成后生命值
function EquipEntity:getHp()
local result = self:getBaseHp()
result = result + self:getHeroEntity():getTotalBaseHp() * self:getHpPercent() // DEFAULT_FACTOR
result = result + self:getHeroEntity():getTotalBaseHp() * self:getHpPercent() // ATTR_FACTOR
return result
end
@ -55,7 +55,7 @@ end
-- 获取部位加成后攻击力
function EquipEntity:getAttack()
local result = self:getBaseAttack()
result = result + self:getHeroEntity():getTotalBaseAtk() * self:getAtkPercent() // DEFAULT_FACTOR
result = result + self:getHeroEntity():getTotalBaseAtk() * self:getAtkPercent() // ATTR_FACTOR
return result
end
@ -78,12 +78,12 @@ end
-- 获取攻击加成百分比
function EquipEntity:getAtkPercent()
local attrs = self:getStageAttr()
if not attrs then
if not attrs or #attrs == 0 then
return 0
end
for index, attr in ipairs(attrs) do
if table.containValue(GConst.MATCH_ATTACK_ADD_NAME, attr.type) then
return attr.num // DEFAULT_FACTOR
return attr.num // ATTR_FACTOR
end
end
return 0
@ -92,12 +92,12 @@ end
-- 获取生命值加成百分比
function EquipEntity:getHpPercent()
local attrs = self:getStageAttr()
if not attrs then
if not attrs or #attrs == 0 then
return 0
end
for index, attr in ipairs(attrs) do
if table.containValue(GConst.MATCH_HP_ADD_NAME, attr.type) then
return attr.num // DEFAULT_FACTOR
return attr.num // ATTR_FACTOR
end
end
return 0
@ -106,12 +106,12 @@ end
-- 获取暴击率百分比
function EquipEntity:getCritPercent()
local attrs = self:getStageAttr()
if not attrs then
if not attrs or #attrs == 0 then
return 0
end
for index, attr in ipairs(attrs) do
if table.containValue(GConst.MATCH_CRIT_NAME, attr.type) then
return attr.num // DEFAULT_FACTOR
return attr.num // ATTR_FACTOR
end
end
return 0
@ -120,12 +120,12 @@ end
--获取暴击伤害百分比
function EquipEntity:getCritHurtPercent()
local attrs = self:getStageAttr()
if not attrs then
if not attrs or #attrs == 0 then
return 0
end
for index, attr in ipairs(attrs) do
if table.containValue(GConst.MATCH_CRIT_TIME_NAME, attr.type) then
return attr.num // DEFAULT_FACTOR
return attr.num // ATTR_FACTOR
end
end
return 0
@ -134,12 +134,12 @@ end
-- 获取治疗百分比
function EquipEntity:getHealPercent()
local attrs = self:getStageAttr()
if not attrs then
if not attrs or #attrs == 0 then
return 0
end
for index, attr in ipairs(attrs) do
if table.containValue(GConst.MATCH_CURED_NAME, attr.type) then
return attr.num // DEFAULT_FACTOR
return attr.num // ATTR_FACTOR
end
end
return 0
@ -148,12 +148,12 @@ end
-- 获取普攻增伤百分比
function EquipEntity:getNormalHurtPercent()
local attrs = self:getStageAttr()
if not attrs then
if not attrs or #attrs == 0 then
return 0
end
for index, attr in ipairs(attrs) do
if table.containValue(GConst.MATCH_NORMAL_HURTP_NAME, attr.type) then
return attr.num // DEFAULT_FACTOR
return attr.num // ATTR_FACTOR
end
end
return 0
@ -162,12 +162,12 @@ end
-- 获取技能增伤百分比
function EquipEntity:getSkillHurtPercent()
local attrs = self:getStageAttr()
if not attrs then
if not attrs or #attrs == 0 then
return 0
end
for index, attr in ipairs(attrs) do
if table.containValue(GConst.MATCH_SKILL_HURTP_NAME, attr.type) then
return attr.num // DEFAULT_FACTOR
return attr.num // ATTR_FACTOR
end
end
return 0
@ -175,12 +175,14 @@ end
-- 获取部位阶段等级未达到最低阶段等级时阶段为0
function EquipEntity:getStage()
local stage = 0
for idx, level in pairs(self.cfg.features_level) do
if self.level < level then
return idx - 1
break
end
stage = idx - 1
end
return nil-- 超过最大阶段等级
return stage
end
-- 获取属性描述
@ -208,10 +210,14 @@ end
-- 获取部位已获得属性
function EquipEntity:getStageAttr()
local stage = self:getStage()
if stage and stage > 0 then
return self.cfg.features_attr[stage]
if self.curAttr == nil or #self.curAttr ~= stage then
self.curAttr = {}
for i = 1, stage do
table.insert(self.curAttr, self.cfg.features_attr[i])
end
return nil
end
return self.curAttr
end
-- 获取部位图标id

View File

@ -108,7 +108,7 @@ function HeroEntity:updateEquipAttr()
if EDITOR_MODE then
local printStr = ""
printStr = printStr .. "更新装备数值:"..self:getCfgId().."-".. partName .. "\n"
printStr = printStr .. "更新装备数值:"..self:getCfgId().."-".. partName .. "-" .. equipEntity:getLevel() .. "\n"
printStr = printStr .. "生命:".. hp .. "\n"
printStr = printStr .. "攻击力:".. atk .. "\n"
printStr = printStr .. "普攻增伤:".. normalHurt .. "\n"