diff --git a/lua/app/config/skill.lua b/lua/app/config/skill.lua index 583a3a31..4767fa40 100644 --- a/lua/app/config/skill.lua +++ b/lua/app/config/skill.lua @@ -2,9 +2,7 @@ local skill = { [11]={ ["effect_type"]=2, ["trigger"]=4, - ["trigger_value"]={ - 5000 - }, + ["trigger_value"]=5000, ["effect"]={ { ["type"]="dmg_addition_all_add", @@ -982,7 +980,7 @@ local skill = { ["effect"]={ { ["type"]="hurt_blue", - ["num"]=15000, + ["num"]=20000, ["ratio"]=10000, ["round"]=0 }, @@ -1030,7 +1028,7 @@ local skill = { ["effect"]={ { ["type"]="hurt_blue", - ["num"]=15000, + ["num"]=20000, ["ratio"]=10000, ["round"]=0 }, @@ -1231,7 +1229,7 @@ local skill = { ["shake_time"]=100, ["shake_type"]=1, ["name_act"]="attack01", - ["fx_self"]=100003 + ["fx_target"]=100003 }, [10005]={ ["effect_type"]=1, @@ -1249,7 +1247,7 @@ local skill = { ["shake_time"]=100, ["shake_type"]=1, ["name_act"]="attack02", - ["fx_self"]=100004 + ["fx_target"]=100004 }, [10006]={ ["effect_type"]=1, @@ -1267,7 +1265,7 @@ local skill = { ["shake_time"]=100, ["shake_type"]=1, ["name_act"]="attack03", - ["fx_self"]=100005 + ["fx_target"]=100005 }, [10007]={ ["effect_type"]=1, @@ -1821,8 +1819,8 @@ local skill = { }, ["obj"]=1, ["skill_position"]=2, - ["cd"]=3, - ["cd_start"]=3, + ["cd"]=1, + ["cd_start"]=1, ["name_act"]="skill01", ["fx_self"]=200011 }, diff --git a/lua/app/config/skill_rogue.lua b/lua/app/config/skill_rogue.lua index 8979678f..c5633c3f 100644 --- a/lua/app/config/skill_rogue.lua +++ b/lua/app/config/skill_rogue.lua @@ -59,7 +59,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=3, ["weight"]=3000, - ["qlt"]=2, + ["qlt"]=3, ["type"]=5, ["attr"]={ ["type"]="atkp_red_add", @@ -73,7 +73,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=2, ["weight"]=2000, - ["qlt"]=3, + ["qlt"]=4, ["type"]=5, ["attr"]={ ["type"]="atkp_red_add", @@ -101,7 +101,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=3, ["weight"]=3000, - ["qlt"]=2, + ["qlt"]=3, ["type"]=5, ["attr"]={ ["type"]="atkp_yellow_add", @@ -115,7 +115,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=2, ["weight"]=2000, - ["qlt"]=3, + ["qlt"]=4, ["type"]=5, ["attr"]={ ["type"]="atkp_yellow_add", @@ -143,7 +143,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=3, ["weight"]=3000, - ["qlt"]=2, + ["qlt"]=3, ["type"]=5, ["attr"]={ ["type"]="atkp_green_add", @@ -157,7 +157,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=2, ["weight"]=2000, - ["qlt"]=3, + ["qlt"]=4, ["type"]=5, ["attr"]={ ["type"]="atkp_green_add", @@ -185,7 +185,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=3, ["weight"]=3000, - ["qlt"]=2, + ["qlt"]=3, ["type"]=5, ["attr"]={ ["type"]="atkp_blue_add", @@ -199,7 +199,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=2, ["weight"]=2000, - ["qlt"]=3, + ["qlt"]=4, ["type"]=5, ["attr"]={ ["type"]="atkp_blue_add", @@ -227,7 +227,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=3, ["weight"]=3000, - ["qlt"]=2, + ["qlt"]=3, ["type"]=5, ["attr"]={ ["type"]="atkp_purple_add", @@ -241,7 +241,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=2, ["weight"]=2000, - ["qlt"]=3, + ["qlt"]=4, ["type"]=5, ["attr"]={ ["type"]="atkp_purple_add", @@ -255,7 +255,7 @@ local skill_rogue = { ["universal"]=1, ["limit_times"]=1, ["weight"]=3000, - ["qlt"]=2, + ["qlt"]=3, ["type"]=9, ["effect"]={ { @@ -349,50 +349,50 @@ local skill_rogue = { ["type"]=5, ["attr"]={ ["type"]="cured_add", - ["minnum"]=100, - ["maxnum"]=100 + ["minnum"]=500, + ["maxnum"]=500 }, ["obj"]=1, ["icon"]="11" }, [26]={ ["universal"]=1, - ["limit_times"]=2, + ["limit_times"]=3, ["weight"]=2000, ["qlt"]=3, ["type"]=5, ["attr"]={ ["type"]="block", - ["minnum"]=1000, - ["maxnum"]=1000 + ["minnum"]=500, + ["maxnum"]=500 }, ["obj"]=1, ["icon"]="12" }, [27]={ ["universal"]=1, - ["limit_times"]=2, + ["limit_times"]=3, ["weight"]=2000, ["qlt"]=3, ["type"]=5, ["attr"]={ ["type"]="crit_add", - ["minnum"]=1000, - ["maxnum"]=1000 + ["minnum"]=400, + ["maxnum"]=400 }, ["obj"]=1, ["icon"]="13" }, [28]={ ["universal"]=1, - ["limit_times"]=2, + ["limit_times"]=3, ["weight"]=2000, ["qlt"]=3, ["type"]=5, ["attr"]={ ["type"]="weakness_all_add", - ["minnum"]=1000, - ["maxnum"]=1000 + ["minnum"]=500, + ["maxnum"]=500 }, ["obj"]=1, ["icon"]="14" @@ -404,8 +404,8 @@ local skill_rogue = { ["type"]=9, ["attr"]={ ["type"]="healp", - ["minnum"]=100, - ["maxnum"]=100 + ["minnum"]=500, + ["maxnum"]=500 }, ["obj"]=1, ["icon"]="30" diff --git a/lua/app/config/strings/cn/skill.lua b/lua/app/config/strings/cn/skill.lua index 6fbb204b..bcfdf2c2 100644 --- a/lua/app/config/strings/cn/skill.lua +++ b/lua/app/config/strings/cn/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ ["desc"]="长枪突刺:将上下2格元素进行消除" }, - [220011]={ + [2200120]={ ["desc"]="拔刀斩:使用一次拔刀斩终结技,造成大量伤害" }, - [420011]={ + [4200120]={ ["desc"]="元素链接:随机额外消除2个元素" }, - [520011]={ + [5200120]={ ["desc"]="魔法罩:生成一个魔法罩持续1回合,可承受最大生命值10%伤害" }, - [120011]={ + [1200120]={ ["desc"]="舞步消散:将左右2格元素进行消除" }, - [330011]={ - ["desc"]="快速治愈:立即恢复20%生命值" + [3300120]={ + ["desc"]="快速治愈:立即恢复艾芙琳80%攻击力的生命值" }, - [230011]={ + [2300120]={ ["desc"]="巨剑连斩:每一次攻击的伤害将增加50%" }, - [430011]={ + [4300120]={ ["desc"]="霜冻剑舞:额外造成1次伤害并给敌人1回合冰霜效果(普攻次数-1)" } } diff --git a/lua/app/config/strings/cn/skill_rogue.lua b/lua/app/config/strings/cn/skill_rogue.lua index 7d9c92e0..d2b6cbdf 100644 --- a/lua/app/config/strings/cn/skill_rogue.lua +++ b/lua/app/config/strings/cn/skill_rogue.lua @@ -72,19 +72,19 @@ local skill_rogue = { ["desc"]="回合开始前生命值恢复1%" }, [25]={ - ["desc"]="生命值恢复效果提升1%" + ["desc"]="生命值恢复效果提升5%" }, [26]={ - ["desc"]="格挡概率增加10%" + ["desc"]="格挡概率增加5%" }, [27]={ - ["desc"]="暴击率+10%" + ["desc"]="暴击率+4%" }, [28]={ - ["desc"]="受到伤害降低10%" + ["desc"]="受到伤害降低5%" }, [29]={ - ["desc"]="角色血量恢复10%" + ["desc"]="角色血量恢复5%" }, [30]={ ["desc"]="将场上随机2个非红色元素变为红色" @@ -192,7 +192,7 @@ local skill_rogue = { ["desc"]="每有1个元素连接舞步消散则本回合格挡增加2%" }, [200600]={ - ["desc"]="快速治愈:莉莉丝可恢复20%生命值" + ["desc"]="快速治愈:艾芙琳可恢复80%攻击力的生命值" }, [200601]={ ["desc"]="快速治愈可与任何元素连接" @@ -207,13 +207,13 @@ local skill_rogue = { ["desc"]="巨剑连斩:每一次攻击的伤害将增加50%" }, [200701]={ - ["desc"]="疾风骤雨被连接时其上下左右4个元素变为金色元素" + ["desc"]="巨剑连斩被连接时其上下左右4个元素变为金色元素" }, [200702]={ - ["desc"]="跟疾风骤雨连接线上的元素伤害增加10%" + ["desc"]="跟巨剑连斩连接线上的元素伤害增加10%" }, [200703]={ - ["desc"]="疾风骤雨被连接时周围8格元素变为金色元素" + ["desc"]="巨剑连斩被连接时周围8格元素变为金色元素" }, [200800]={ ["desc"]="霜冻剑舞:白发凯瑟琳可额外造成1次伤害并给敌人1回合冰霜效果(普攻次数-1)" diff --git a/lua/app/config/strings/de/skill.lua b/lua/app/config/strings/de/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/de/skill.lua +++ b/lua/app/config/strings/de/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/en/skill.lua b/lua/app/config/strings/en/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/en/skill.lua +++ b/lua/app/config/strings/en/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/fr/skill.lua b/lua/app/config/strings/fr/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/fr/skill.lua +++ b/lua/app/config/strings/fr/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/id/skill.lua b/lua/app/config/strings/id/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/id/skill.lua +++ b/lua/app/config/strings/id/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/ja/skill.lua b/lua/app/config/strings/ja/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/ja/skill.lua +++ b/lua/app/config/strings/ja/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/ko/skill.lua b/lua/app/config/strings/ko/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/ko/skill.lua +++ b/lua/app/config/strings/ko/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/pt/skill.lua b/lua/app/config/strings/pt/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/pt/skill.lua +++ b/lua/app/config/strings/pt/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/ru/skill.lua b/lua/app/config/strings/ru/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/ru/skill.lua +++ b/lua/app/config/strings/ru/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/th/skill.lua b/lua/app/config/strings/th/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/th/skill.lua +++ b/lua/app/config/strings/th/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/vi/skill.lua b/lua/app/config/strings/vi/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/vi/skill.lua +++ b/lua/app/config/strings/vi/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/strings/zh/skill.lua b/lua/app/config/strings/zh/skill.lua index a347a13c..ab03298a 100644 --- a/lua/app/config/strings/zh/skill.lua +++ b/lua/app/config/strings/zh/skill.lua @@ -1,26 +1,26 @@ local skill = { - [320011]={ + [3200120]={ }, - [220011]={ + [2200120]={ }, - [420011]={ + [4200120]={ }, - [520011]={ + [5200120]={ }, - [120011]={ + [1200120]={ }, - [330011]={ + [3300120]={ }, - [230011]={ + [2300120]={ }, - [430011]={ + [4300120]={ } } diff --git a/lua/app/config/tutorial.lua b/lua/app/config/tutorial.lua index d33236db..5e2825c4 100644 --- a/lua/app/config/tutorial.lua +++ b/lua/app/config/tutorial.lua @@ -31,8 +31,8 @@ local tutorial = { }, ["show_mask"]=1, ["square_size"]={ - 500, - 250 + 50, + 25 } }, [10040]={ @@ -65,6 +65,11 @@ local tutorial = { } }, [10070]={ + ["next_id"]=10080, + ["type"]=4, + ["finish"]=3 + }, + [10080]={ ["type"]=6, ["finish"]=4, ["target_element"]={ @@ -77,7 +82,19 @@ local tutorial = { }, [20000]={ ["next_id"]=20010, - ["type"]=2 + ["type"]=2, + ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/chapter/left_arrow/btn", + ["arrow_direction"]=1, + ["arrow_offset"]={ + 0, + 0 + }, + ["show_mask"]=2, + ["circle_r"]=100, + ["circle_offset"]={ + 0, + 0 + } }, [20010]={ ["next_id"]=20020, @@ -118,8 +135,8 @@ local tutorial = { }, ["show_mask"]=1, ["square_size"]={ - 100, - 100 + 50, + 50 }, ["square_offset"]={ 0, @@ -137,8 +154,8 @@ local tutorial = { }, ["show_mask"]=1, ["square_size"]={ - 100, - 300 + 50, + 100 }, ["square_offset"]={ 0, @@ -156,8 +173,8 @@ local tutorial = { }, ["show_mask"]=1, ["square_size"]={ - 200, - 100 + 100, + 50 }, ["square_offset"]={ 0, @@ -172,8 +189,7 @@ local tutorial = { ["arrow_offset"]={ 0, 0 - }, - ["show_mask"]=1 + } }, [20080]={ ["next_id"]=20090, @@ -186,8 +202,8 @@ local tutorial = { }, ["show_mask"]=1, ["square_size"]={ - 100, - 300 + 50, + 100 }, ["square_offset"]={ 0, @@ -195,6 +211,7 @@ local tutorial = { } }, [20090]={ + ["next_id"]=20100, ["type"]=2, ["target_name"]="main_ui(Clone)/sub_ui_node/hero_ui/scrollrect/viewport/content/large_hero_cell/hero_bg/use_btn", ["arrow_direction"]=1, @@ -203,6 +220,40 @@ local tutorial = { 0 } }, + [20100]={ + ["next_id"]=20110, + ["type"]=2, + ["target_name"]="main_ui(Clone)/bottom_node/bottom_btn_cell_1", + ["arrow_direction"]=1, + ["arrow_offset"]={ + 0, + 0 + }, + ["show_mask"]=1, + ["square_size"]={ + 50, + 50 + }, + ["square_offset"]={ + 0, + 0 + } + }, + [20110]={ + ["type"]=2, + ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/chapter/right_arrow/btn", + ["arrow_direction"]=1, + ["arrow_offset"]={ + 0, + 0 + }, + ["show_mask"]=2, + ["circle_r"]=100, + ["circle_offset"]={ + 0, + 0 + } + }, [30000]={ ["next_id"]=30010, ["type"]=2, @@ -242,8 +293,8 @@ local tutorial = { }, ["show_mask"]=1, ["square_size"]={ - 100, - 300 + 50, + 100 }, ["square_offset"]={ 0, @@ -257,15 +308,6 @@ local tutorial = { ["arrow_offset"]={ 0, 0 - }, - ["show_mask"]=1, - ["square_size"]={ - 200, - 100 - }, - ["square_offset"]={ - 0, - 0 } }, [40000]={ @@ -323,8 +365,8 @@ local tutorial = { }, ["show_mask"]=1, ["square_size"]={ - 100, - 300 + 50, + 100 }, ["square_offset"]={ 0, @@ -342,8 +384,8 @@ local tutorial = { }, ["show_mask"]=1, ["square_size"]={ - 200, - 100 + 100, + 50 }, ["square_offset"]={ 0, @@ -372,8 +414,8 @@ local tutorial = { }, ["show_mask"]=1, ["square_size"]={ - 100, - 300 + 50, + 100 }, ["square_offset"]={ 0, @@ -391,6 +433,6 @@ local tutorial = { } } local config = { -data=tutorial,count=32 +data=tutorial,count=35 } return config \ No newline at end of file diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index 36497517..33dd2d15 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -1068,6 +1068,7 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus) if num == 0 then return 0 end + atker.unitEntity:addDamageCount(num) local shieldHpBefore = self.unitEntity:getShieldHp() local hpRealReduce = self.unitEntity:takeDamageOrCure(num) if hpRealReduce < 0 and self.side == BattleConst.SIDE_DEF then -- 实际掉血了 diff --git a/lua/app/module/battle/controller/battle_controller_stage.lua b/lua/app/module/battle/controller/battle_controller_stage.lua index d9cc9121..a1ff5117 100644 --- a/lua/app/module/battle/controller/battle_controller_stage.lua +++ b/lua/app/module/battle/controller/battle_controller_stage.lua @@ -144,17 +144,18 @@ function BattleControllerStage:controllBattleEnd() battleType = GConst.BattleConst.BATTLE_TYPE.STAGE, wave = self.waveIndex, victory = self.victory, - atkReport = { - { - heroId = 12001, - dmg = 237800, - }, - { - heroId = 12001, - dmg = 23700, - } - } } + local atkReport = {} + local teamEntity = DataManager.BattleData:getAtkTeam() + local members = teamEntity:getAllMembers() + for k, v in ipairs(members) do + local report = { + heroId = v:getId(), + dmg = v:getDamageCount(), + } + table.insert(atkReport, report) + end + self.combatReport.atkReport = atkReport if not self.victory then self.combatReport.wave = self.combatReport.wave - 1 end diff --git a/lua/app/userdata/battle/team/battle_team_entity.lua b/lua/app/userdata/battle/team/battle_team_entity.lua index 7c03fedb..9c87f107 100644 --- a/lua/app/userdata/battle/team/battle_team_entity.lua +++ b/lua/app/userdata/battle/team/battle_team_entity.lua @@ -142,15 +142,15 @@ function BattleTeamEntity:getAtk(matchType) end function BattleTeamEntity:getDmgAddition(matchType) - return (self.attr.dmg_addition or 0) + (self.attr[MATCH_DMG_ADDITION_NAME[matchType]] or 0) + return (self.attr.dmg_addition_all or 0) + (self.attr[MATCH_DMG_ADDITION_NAME[matchType]] or 0) end function BattleTeamEntity:getDmgDec(matchType) - return (self.attr.dec_dmg or 0) + (self.attr[MATCH_DMG_DEC_NAME[matchType]] or 0) + return (self.attr.dec_dmg_all or 0) + (self.attr[MATCH_DMG_DEC_NAME[matchType]] or 0) end function BattleTeamEntity:getWeakness(matchType) - return (self.attr.weakness or 0) + (self.attr[MATCH_WEAKNESS_NAME[matchType]] or 0) + return (self.attr.weakness_all or 0) + (self.attr[MATCH_WEAKNESS_NAME[matchType]] or 0) end function BattleTeamEntity:getCrittime() diff --git a/lua/app/userdata/battle/team/battle_unit_entity.lua b/lua/app/userdata/battle/team/battle_unit_entity.lua index 461540e9..6a48b7fd 100644 --- a/lua/app/userdata/battle/team/battle_unit_entity.lua +++ b/lua/app/userdata/battle/team/battle_unit_entity.lua @@ -9,6 +9,8 @@ function BattleUnitEntity:init(unitData, side, team) self.unitData = unitData self.side = side self.team = team + self.damageCount = 0 -- 记录伤害 + self.healCount = 0 -- 记录治疗 self:initSkill() end @@ -40,6 +42,10 @@ function BattleUnitEntity:getIsBoss() return self.unitData.isBoss end +function BattleUnitEntity:getId() + return self.unitData.id +end + function BattleUnitEntity:addSkill(skillId) local skillInfo = ConfigManager:getConfig("skill")[skillId] if skillInfo == nil then @@ -181,6 +187,19 @@ function BattleUnitEntity:addActiveSkillRound(skillId, effect) end end +function BattleUnitEntity:getDamageCount() + return self.damageCount +end + +-- 伤害统计 +function BattleUnitEntity:addDamageCount(num) + if num > 0 then -- 加血统计 + self.healCount = self.healCount + num + else -- 伤害统计 + self.damageCount = self.damageCount - num + end +end + function BattleUnitEntity:takeDamageOrCure(num) return self.team:takeDamageOrCure(num) end