伤害统计

This commit is contained in:
chenxi 2023-04-21 22:14:57 +08:00
parent 7c2e50a338
commit af56d4b400
20 changed files with 245 additions and 184 deletions

View File

@ -2,9 +2,7 @@ local skill = {
[11]={ [11]={
["effect_type"]=2, ["effect_type"]=2,
["trigger"]=4, ["trigger"]=4,
["trigger_value"]={ ["trigger_value"]=5000,
5000
},
["effect"]={ ["effect"]={
{ {
["type"]="dmg_addition_all_add", ["type"]="dmg_addition_all_add",
@ -982,7 +980,7 @@ local skill = {
["effect"]={ ["effect"]={
{ {
["type"]="hurt_blue", ["type"]="hurt_blue",
["num"]=15000, ["num"]=20000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
@ -1030,7 +1028,7 @@ local skill = {
["effect"]={ ["effect"]={
{ {
["type"]="hurt_blue", ["type"]="hurt_blue",
["num"]=15000, ["num"]=20000,
["ratio"]=10000, ["ratio"]=10000,
["round"]=0 ["round"]=0
}, },
@ -1231,7 +1229,7 @@ local skill = {
["shake_time"]=100, ["shake_time"]=100,
["shake_type"]=1, ["shake_type"]=1,
["name_act"]="attack01", ["name_act"]="attack01",
["fx_self"]=100003 ["fx_target"]=100003
}, },
[10005]={ [10005]={
["effect_type"]=1, ["effect_type"]=1,
@ -1249,7 +1247,7 @@ local skill = {
["shake_time"]=100, ["shake_time"]=100,
["shake_type"]=1, ["shake_type"]=1,
["name_act"]="attack02", ["name_act"]="attack02",
["fx_self"]=100004 ["fx_target"]=100004
}, },
[10006]={ [10006]={
["effect_type"]=1, ["effect_type"]=1,
@ -1267,7 +1265,7 @@ local skill = {
["shake_time"]=100, ["shake_time"]=100,
["shake_type"]=1, ["shake_type"]=1,
["name_act"]="attack03", ["name_act"]="attack03",
["fx_self"]=100005 ["fx_target"]=100005
}, },
[10007]={ [10007]={
["effect_type"]=1, ["effect_type"]=1,
@ -1821,8 +1819,8 @@ local skill = {
}, },
["obj"]=1, ["obj"]=1,
["skill_position"]=2, ["skill_position"]=2,
["cd"]=3, ["cd"]=1,
["cd_start"]=3, ["cd_start"]=1,
["name_act"]="skill01", ["name_act"]="skill01",
["fx_self"]=200011 ["fx_self"]=200011
}, },

View File

@ -59,7 +59,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=3, ["limit_times"]=3,
["weight"]=3000, ["weight"]=3000,
["qlt"]=2, ["qlt"]=3,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_red_add", ["type"]="atkp_red_add",
@ -73,7 +73,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=2, ["limit_times"]=2,
["weight"]=2000, ["weight"]=2000,
["qlt"]=3, ["qlt"]=4,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_red_add", ["type"]="atkp_red_add",
@ -101,7 +101,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=3, ["limit_times"]=3,
["weight"]=3000, ["weight"]=3000,
["qlt"]=2, ["qlt"]=3,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_yellow_add", ["type"]="atkp_yellow_add",
@ -115,7 +115,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=2, ["limit_times"]=2,
["weight"]=2000, ["weight"]=2000,
["qlt"]=3, ["qlt"]=4,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_yellow_add", ["type"]="atkp_yellow_add",
@ -143,7 +143,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=3, ["limit_times"]=3,
["weight"]=3000, ["weight"]=3000,
["qlt"]=2, ["qlt"]=3,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_green_add", ["type"]="atkp_green_add",
@ -157,7 +157,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=2, ["limit_times"]=2,
["weight"]=2000, ["weight"]=2000,
["qlt"]=3, ["qlt"]=4,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_green_add", ["type"]="atkp_green_add",
@ -185,7 +185,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=3, ["limit_times"]=3,
["weight"]=3000, ["weight"]=3000,
["qlt"]=2, ["qlt"]=3,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_blue_add", ["type"]="atkp_blue_add",
@ -199,7 +199,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=2, ["limit_times"]=2,
["weight"]=2000, ["weight"]=2000,
["qlt"]=3, ["qlt"]=4,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_blue_add", ["type"]="atkp_blue_add",
@ -227,7 +227,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=3, ["limit_times"]=3,
["weight"]=3000, ["weight"]=3000,
["qlt"]=2, ["qlt"]=3,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_purple_add", ["type"]="atkp_purple_add",
@ -241,7 +241,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=2, ["limit_times"]=2,
["weight"]=2000, ["weight"]=2000,
["qlt"]=3, ["qlt"]=4,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="atkp_purple_add", ["type"]="atkp_purple_add",
@ -255,7 +255,7 @@ local skill_rogue = {
["universal"]=1, ["universal"]=1,
["limit_times"]=1, ["limit_times"]=1,
["weight"]=3000, ["weight"]=3000,
["qlt"]=2, ["qlt"]=3,
["type"]=9, ["type"]=9,
["effect"]={ ["effect"]={
{ {
@ -349,50 +349,50 @@ local skill_rogue = {
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="cured_add", ["type"]="cured_add",
["minnum"]=100, ["minnum"]=500,
["maxnum"]=100 ["maxnum"]=500
}, },
["obj"]=1, ["obj"]=1,
["icon"]="11" ["icon"]="11"
}, },
[26]={ [26]={
["universal"]=1, ["universal"]=1,
["limit_times"]=2, ["limit_times"]=3,
["weight"]=2000, ["weight"]=2000,
["qlt"]=3, ["qlt"]=3,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="block", ["type"]="block",
["minnum"]=1000, ["minnum"]=500,
["maxnum"]=1000 ["maxnum"]=500
}, },
["obj"]=1, ["obj"]=1,
["icon"]="12" ["icon"]="12"
}, },
[27]={ [27]={
["universal"]=1, ["universal"]=1,
["limit_times"]=2, ["limit_times"]=3,
["weight"]=2000, ["weight"]=2000,
["qlt"]=3, ["qlt"]=3,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="crit_add", ["type"]="crit_add",
["minnum"]=1000, ["minnum"]=400,
["maxnum"]=1000 ["maxnum"]=400
}, },
["obj"]=1, ["obj"]=1,
["icon"]="13" ["icon"]="13"
}, },
[28]={ [28]={
["universal"]=1, ["universal"]=1,
["limit_times"]=2, ["limit_times"]=3,
["weight"]=2000, ["weight"]=2000,
["qlt"]=3, ["qlt"]=3,
["type"]=5, ["type"]=5,
["attr"]={ ["attr"]={
["type"]="weakness_all_add", ["type"]="weakness_all_add",
["minnum"]=1000, ["minnum"]=500,
["maxnum"]=1000 ["maxnum"]=500
}, },
["obj"]=1, ["obj"]=1,
["icon"]="14" ["icon"]="14"
@ -404,8 +404,8 @@ local skill_rogue = {
["type"]=9, ["type"]=9,
["attr"]={ ["attr"]={
["type"]="healp", ["type"]="healp",
["minnum"]=100, ["minnum"]=500,
["maxnum"]=100 ["maxnum"]=500
}, },
["obj"]=1, ["obj"]=1,
["icon"]="30" ["icon"]="30"

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
["desc"]="长枪突刺将上下2格元素进行消除" ["desc"]="长枪突刺将上下2格元素进行消除"
}, },
[220011]={ [2200120]={
["desc"]="拔刀斩:使用一次拔刀斩终结技,造成大量伤害" ["desc"]="拔刀斩:使用一次拔刀斩终结技,造成大量伤害"
}, },
[420011]={ [4200120]={
["desc"]="元素链接随机额外消除2个元素" ["desc"]="元素链接随机额外消除2个元素"
}, },
[520011]={ [5200120]={
["desc"]="魔法罩生成一个魔法罩持续1回合可承受最大生命值10%伤害" ["desc"]="魔法罩生成一个魔法罩持续1回合可承受最大生命值10%伤害"
}, },
[120011]={ [1200120]={
["desc"]="舞步消散将左右2格元素进行消除" ["desc"]="舞步消散将左右2格元素进行消除"
}, },
[330011]={ [3300120]={
["desc"]="快速治愈:立即恢复20%生命值" ["desc"]="快速治愈:立即恢复艾芙琳80%攻击力的生命值"
}, },
[230011]={ [2300120]={
["desc"]="巨剑连斩每一次攻击的伤害将增加50%" ["desc"]="巨剑连斩每一次攻击的伤害将增加50%"
}, },
[430011]={ [4300120]={
["desc"]="霜冻剑舞额外造成1次伤害并给敌人1回合冰霜效果普攻次数-1" ["desc"]="霜冻剑舞额外造成1次伤害并给敌人1回合冰霜效果普攻次数-1"
} }
} }

View File

@ -72,19 +72,19 @@ local skill_rogue = {
["desc"]="回合开始前生命值恢复1%" ["desc"]="回合开始前生命值恢复1%"
}, },
[25]={ [25]={
["desc"]="生命值恢复效果提升1%" ["desc"]="生命值恢复效果提升5%"
}, },
[26]={ [26]={
["desc"]="格挡概率增加10%" ["desc"]="格挡概率增加5%"
}, },
[27]={ [27]={
["desc"]="暴击率+10%" ["desc"]="暴击率+4%"
}, },
[28]={ [28]={
["desc"]="受到伤害降低10%" ["desc"]="受到伤害降低5%"
}, },
[29]={ [29]={
["desc"]="角色血量恢复10%" ["desc"]="角色血量恢复5%"
}, },
[30]={ [30]={
["desc"]="将场上随机2个非红色元素变为红色" ["desc"]="将场上随机2个非红色元素变为红色"
@ -192,7 +192,7 @@ local skill_rogue = {
["desc"]="每有1个元素连接舞步消散则本回合格挡增加2%" ["desc"]="每有1个元素连接舞步消散则本回合格挡增加2%"
}, },
[200600]={ [200600]={
["desc"]="快速治愈:莉莉丝可恢复20%生命值" ["desc"]="快速治愈:艾芙琳可恢复80%攻击力的生命值"
}, },
[200601]={ [200601]={
["desc"]="快速治愈可与任何元素连接" ["desc"]="快速治愈可与任何元素连接"
@ -207,13 +207,13 @@ local skill_rogue = {
["desc"]="巨剑连斩每一次攻击的伤害将增加50%" ["desc"]="巨剑连斩每一次攻击的伤害将增加50%"
}, },
[200701]={ [200701]={
["desc"]="疾风骤雨被连接时其上下左右4个元素变为金色元素" ["desc"]="巨剑连斩被连接时其上下左右4个元素变为金色元素"
}, },
[200702]={ [200702]={
["desc"]="疾风骤雨连接线上的元素伤害增加10%" ["desc"]="巨剑连斩连接线上的元素伤害增加10%"
}, },
[200703]={ [200703]={
["desc"]="疾风骤雨被连接时周围8格元素变为金色元素" ["desc"]="巨剑连斩被连接时周围8格元素变为金色元素"
}, },
[200800]={ [200800]={
["desc"]="霜冻剑舞白发凯瑟琳可额外造成1次伤害并给敌人1回合冰霜效果普攻次数-1" ["desc"]="霜冻剑舞白发凯瑟琳可额外造成1次伤害并给敌人1回合冰霜效果普攻次数-1"

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -1,26 +1,26 @@
local skill = { local skill = {
[320011]={ [3200120]={
}, },
[220011]={ [2200120]={
}, },
[420011]={ [4200120]={
}, },
[520011]={ [5200120]={
}, },
[120011]={ [1200120]={
}, },
[330011]={ [3300120]={
}, },
[230011]={ [2300120]={
}, },
[430011]={ [4300120]={
} }
} }

View File

@ -31,8 +31,8 @@ local tutorial = {
}, },
["show_mask"]=1, ["show_mask"]=1,
["square_size"]={ ["square_size"]={
500, 50,
250 25
} }
}, },
[10040]={ [10040]={
@ -65,6 +65,11 @@ local tutorial = {
} }
}, },
[10070]={ [10070]={
["next_id"]=10080,
["type"]=4,
["finish"]=3
},
[10080]={
["type"]=6, ["type"]=6,
["finish"]=4, ["finish"]=4,
["target_element"]={ ["target_element"]={
@ -77,7 +82,19 @@ local tutorial = {
}, },
[20000]={ [20000]={
["next_id"]=20010, ["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]={ [20010]={
["next_id"]=20020, ["next_id"]=20020,
@ -118,8 +135,8 @@ local tutorial = {
}, },
["show_mask"]=1, ["show_mask"]=1,
["square_size"]={ ["square_size"]={
100, 50,
100 50
}, },
["square_offset"]={ ["square_offset"]={
0, 0,
@ -137,8 +154,8 @@ local tutorial = {
}, },
["show_mask"]=1, ["show_mask"]=1,
["square_size"]={ ["square_size"]={
100, 50,
300 100
}, },
["square_offset"]={ ["square_offset"]={
0, 0,
@ -156,8 +173,8 @@ local tutorial = {
}, },
["show_mask"]=1, ["show_mask"]=1,
["square_size"]={ ["square_size"]={
200, 100,
100 50
}, },
["square_offset"]={ ["square_offset"]={
0, 0,
@ -172,8 +189,7 @@ local tutorial = {
["arrow_offset"]={ ["arrow_offset"]={
0, 0,
0 0
}, }
["show_mask"]=1
}, },
[20080]={ [20080]={
["next_id"]=20090, ["next_id"]=20090,
@ -186,8 +202,8 @@ local tutorial = {
}, },
["show_mask"]=1, ["show_mask"]=1,
["square_size"]={ ["square_size"]={
100, 50,
300 100
}, },
["square_offset"]={ ["square_offset"]={
0, 0,
@ -195,6 +211,7 @@ local tutorial = {
} }
}, },
[20090]={ [20090]={
["next_id"]=20100,
["type"]=2, ["type"]=2,
["target_name"]="main_ui(Clone)/sub_ui_node/hero_ui/scrollrect/viewport/content/large_hero_cell/hero_bg/use_btn", ["target_name"]="main_ui(Clone)/sub_ui_node/hero_ui/scrollrect/viewport/content/large_hero_cell/hero_bg/use_btn",
["arrow_direction"]=1, ["arrow_direction"]=1,
@ -203,6 +220,40 @@ local tutorial = {
0 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]={ [30000]={
["next_id"]=30010, ["next_id"]=30010,
["type"]=2, ["type"]=2,
@ -242,8 +293,8 @@ local tutorial = {
}, },
["show_mask"]=1, ["show_mask"]=1,
["square_size"]={ ["square_size"]={
100, 50,
300 100
}, },
["square_offset"]={ ["square_offset"]={
0, 0,
@ -257,15 +308,6 @@ local tutorial = {
["arrow_offset"]={ ["arrow_offset"]={
0, 0,
0 0
},
["show_mask"]=1,
["square_size"]={
200,
100
},
["square_offset"]={
0,
0
} }
}, },
[40000]={ [40000]={
@ -323,8 +365,8 @@ local tutorial = {
}, },
["show_mask"]=1, ["show_mask"]=1,
["square_size"]={ ["square_size"]={
100, 50,
300 100
}, },
["square_offset"]={ ["square_offset"]={
0, 0,
@ -342,8 +384,8 @@ local tutorial = {
}, },
["show_mask"]=1, ["show_mask"]=1,
["square_size"]={ ["square_size"]={
200, 100,
100 50
}, },
["square_offset"]={ ["square_offset"]={
0, 0,
@ -372,8 +414,8 @@ local tutorial = {
}, },
["show_mask"]=1, ["show_mask"]=1,
["square_size"]={ ["square_size"]={
100, 50,
300 100
}, },
["square_offset"]={ ["square_offset"]={
0, 0,
@ -391,6 +433,6 @@ local tutorial = {
} }
} }
local config = { local config = {
data=tutorial,count=32 data=tutorial,count=35
} }
return config return config

View File

@ -1068,6 +1068,7 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus)
if num == 0 then if num == 0 then
return 0 return 0
end end
atker.unitEntity:addDamageCount(num)
local shieldHpBefore = self.unitEntity:getShieldHp() local shieldHpBefore = self.unitEntity:getShieldHp()
local hpRealReduce = self.unitEntity:takeDamageOrCure(num) local hpRealReduce = self.unitEntity:takeDamageOrCure(num)
if hpRealReduce < 0 and self.side == BattleConst.SIDE_DEF then -- 实际掉血了 if hpRealReduce < 0 and self.side == BattleConst.SIDE_DEF then -- 实际掉血了

View File

@ -144,17 +144,18 @@ function BattleControllerStage:controllBattleEnd()
battleType = GConst.BattleConst.BATTLE_TYPE.STAGE, battleType = GConst.BattleConst.BATTLE_TYPE.STAGE,
wave = self.waveIndex, wave = self.waveIndex,
victory = self.victory, 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 if not self.victory then
self.combatReport.wave = self.combatReport.wave - 1 self.combatReport.wave = self.combatReport.wave - 1
end end

View File

@ -142,15 +142,15 @@ function BattleTeamEntity:getAtk(matchType)
end end
function BattleTeamEntity:getDmgAddition(matchType) 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 end
function BattleTeamEntity:getDmgDec(matchType) 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 end
function BattleTeamEntity:getWeakness(matchType) 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 end
function BattleTeamEntity:getCrittime() function BattleTeamEntity:getCrittime()

View File

@ -9,6 +9,8 @@ function BattleUnitEntity:init(unitData, side, team)
self.unitData = unitData self.unitData = unitData
self.side = side self.side = side
self.team = team self.team = team
self.damageCount = 0 -- 记录伤害
self.healCount = 0 -- 记录治疗
self:initSkill() self:initSkill()
end end
@ -40,6 +42,10 @@ function BattleUnitEntity:getIsBoss()
return self.unitData.isBoss return self.unitData.isBoss
end end
function BattleUnitEntity:getId()
return self.unitData.id
end
function BattleUnitEntity:addSkill(skillId) function BattleUnitEntity:addSkill(skillId)
local skillInfo = ConfigManager:getConfig("skill")[skillId] local skillInfo = ConfigManager:getConfig("skill")[skillId]
if skillInfo == nil then if skillInfo == nil then
@ -181,6 +187,19 @@ function BattleUnitEntity:addActiveSkillRound(skillId, effect)
end end
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) function BattleUnitEntity:takeDamageOrCure(num)
return self.team:takeDamageOrCure(num) return self.team:takeDamageOrCure(num)
end end