diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index b659acfd..714662f6 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -464,7 +464,7 @@ function BIReport:postFightBegin(battleType, wave, chapterId, maxChapter, startT self:report(EVENT_NAME_FIGHT, args) end -function BIReport:postFightEnd(battleType, chapterId, wave, duration, totalTime, eliminateCount, chapterEliminateCount, type, deathType, startTimes, isFirstWin, isFianlStep, maxLinkCount) +function BIReport:postFightEnd(battleType, battleData, chapterId, wave, duration, totalTime, eliminateCount, chapterEliminateCount, type, deathType, startTimes, isFirstWin, isFianlStep, maxLinkCount) -- wave 进入关卡编号 -- LevelType 进入关卡类型 -- MaxLevel 已解锁最大关卡 @@ -473,7 +473,7 @@ function BIReport:postFightEnd(battleType, chapterId, wave, duration, totalTime, local skillStr = GConst.EMPTY_STRING local skillNum = 0 - local skillMap = DataManager.BattleData:getSelectSkillMap() + local skillMap = battleData:getSelectSkillMap() if skillMap then for skillId, info in pairs(skillMap) do skillStr = skillStr .. skillId .. "|" @@ -505,9 +505,9 @@ function BIReport:postFightEnd(battleType, chapterId, wave, duration, totalTime, self:report(EVENT_NAME_FIGHT, args) end -function BIReport:postShowFightSkillSelect(battleType, skillList, chapterId, totalTime, wave) +function BIReport:postShowFightSkillSelect(battleType, battleData, skillList, chapterId, totalTime, wave) local skillNum = 0 - local skillMap = DataManager.BattleData:getSelectSkillMap() + local skillMap = battleData:getSelectSkillMap() if skillMap then for skillId, info in pairs(skillMap) do skillNum = skillNum + (info.count or 0) @@ -533,9 +533,9 @@ function BIReport:postShowFightSkillSelect(battleType, skillList, chapterId, tot self:report(EVENT_NAME_FIGHT, args) end -function BIReport:postFightSkillSelect(battleType, skillList, chapterId, totalTime, wave) +function BIReport:postFightSkillSelect(battleType, battleData, skillList, chapterId, totalTime, wave) local skillNum = 0 - local skillMap = DataManager.BattleData:getSelectSkillMap() + local skillMap = battleData:getSelectSkillMap() if skillMap then for skillId, info in pairs(skillMap) do skillNum = skillNum + (info.count or 0) diff --git a/lua/app/config/act_gift.lua b/lua/app/config/act_gift.lua index 4dd90263..2e6fcea6 100644 --- a/lua/app/config/act_gift.lua +++ b/lua/app/config/act_gift.lua @@ -512,9 +512,214 @@ local act_gift = { ["recharge_id"]=14, ["time_type"]=3, ["value"]=2000 + }, + [30102]={ + ["type"]=3, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=34001, + ["id_for_nothing"]="VQxcA2Q=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["time_type"]=1, + ["limit_time"]=72, + ["limit"]=1 + }, + [90102]={ + ["type"]=9, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=6, + ["id_for_nothing"]="UA==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_time"]=24, + ["cd"]=48, + ["limit"]=1, + ["value"]=200 + }, + [90202]={ + ["type"]=9, + ["recharge_id"]=12, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=6, + ["id_for_nothing"]="UA==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_time"]=24, + ["cd"]=48, + ["limit"]=1, + ["value"]=260 + }, + [90302]={ + ["type"]=9, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=6, + ["id_for_nothing"]="UA==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_time"]=24, + ["cd"]=48, + ["limit"]=1, + ["value"]=400 + }, + [90402]={ + ["type"]=9, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=6, + ["id_for_nothing"]="UA==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_time"]=24, + ["cd"]=48, + ["limit"]=1, + ["value"]=800 } } local config = { -data=act_gift,count=22 +data=act_gift,count=27 } return config \ No newline at end of file diff --git a/lua/app/config/arena_board.lua b/lua/app/config/arena_board.lua index 771bc4ff..5a6f6c34 100644 --- a/lua/app/config/arena_board.lua +++ b/lua/app/config/arena_board.lua @@ -2,199 +2,283 @@ local arena_board = { [1]={ ["board"]={ { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 1, 0 }, { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, + 2, 0 }, { 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 1, 0 }, { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, + 2, 0 }, { 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 1, 0 }, { - 1, + 3, 0 }, { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 4 + 0 }, { 0, - 3 + 0 }, { 0, - 3 - }, - { - 1, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } @@ -202,7 +286,7 @@ local arena_board = { [2]={ ["board"]={ { - 1, + 3, 0 }, { @@ -211,66 +295,26 @@ local arena_board = { }, { 0, - 1 + 0 }, { 0, - 2 + 0 }, { 0, - 1 + 0 }, { 2, 0 }, { - 1, + 3, 0 }, { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 1 - }, - { - 2, - 0 - }, - { - 2, + 3, 0 }, { @@ -279,18 +323,14 @@ local arena_board = { }, { 0, - 1 - }, - { - 1, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { @@ -298,7 +338,71 @@ local arena_board = { 0 }, { - 2, + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -306,19 +410,7 @@ local arena_board = { 0 }, { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, + 0, 0 }, { @@ -326,7 +418,19 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -334,67 +438,131 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -402,11 +570,7 @@ local arena_board = { [3]={ ["board"]={ { - 1, - 0 - }, - { - 1, + 3, 0 }, { @@ -415,22 +579,30 @@ local arena_board = { }, { 0, - 2 + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 }, { 2, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { @@ -439,26 +611,6 @@ local arena_board = { }, { 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { @@ -467,30 +619,22 @@ local arena_board = { }, { 0, - 3 + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 }, { 0, - 2 + 0 }, { 0, - 3 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { @@ -499,31 +643,23 @@ local arena_board = { }, { 0, - 4 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 1 + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 }, { 2, @@ -531,70 +667,186 @@ local arena_board = { }, { 0, - 1 - }, - { - 1, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -602,35 +854,27 @@ local arena_board = { [4]={ ["board"]={ { - 1, - 0 - }, - { - 2, + 3, 0 }, { 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 4 - }, - { - 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -639,58 +883,10 @@ local arena_board = { }, { 0, - 1 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 2, - 0 - }, - { - 3, 0 }, { 0, - 5 - }, - { - 3, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 2, - 0 - }, - { - 3, 0 }, { @@ -699,54 +895,6 @@ local arena_board = { }, { 0, - 5 - }, - { - 2, - 0 - }, - { - 3, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 2, - 0 - }, - { - 3, - 0 - }, - { - 0, - 5 - }, - { - 3, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { @@ -755,46 +903,234 @@ local arena_board = { }, { 0, - 5 + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 }, { 2, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 14, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } @@ -802,65 +1138,141 @@ local arena_board = { [5]={ ["board"]={ { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 3 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 2 + 0 }, { 0, - 2 + 0 }, { 0, - 3 + 0 }, { 0, - 2 + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 }, { 0, - 2 + 0 }, { - 1, + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { 3, 0 }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -870,11 +1282,23 @@ local arena_board = { 0 }, { - 3, + 0, 0 }, { - 3, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -882,7 +1306,11 @@ local arena_board = { 0 }, { - 3, + 2, + 0 + }, + { + 0, 0 }, { @@ -890,47 +1318,43 @@ local arena_board = { 0 }, { - 3, - 0 - }, - { - 3, - 0 - }, - { - 14, - 0 - }, - { - 3, - 0 - }, - { - 3, + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, { 3, 0 }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 }, { - 3, + 0, 0 }, { - 1, - 0 - }, - { - 3, + 0, 0 }, { @@ -938,7 +1362,11 @@ local arena_board = { 0 }, { - 3, + 2, + 0 + }, + { + 0, 0 }, { @@ -946,23 +1374,7 @@ local arena_board = { 0 }, { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 3, + 0, 0 }, { @@ -970,95 +1382,51 @@ local arena_board = { 0 }, { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, + 0, 0 }, { 3, 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 } } }, [6]={ ["board"]={ { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 5 - }, - { - 0, - 2 - }, - { - 0, - 5 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 2 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { @@ -1067,26 +1435,46 @@ local arena_board = { }, { 0, - 5 + 0 }, { 2, - 3 + 0 }, { 0, - 5 - }, - { - 2, 0 }, { - 1, + 3, 0 }, { - 2, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 }, { @@ -1098,7 +1486,15 @@ local arena_board = { 0 }, { - 3, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -1109,10 +1505,118 @@ local arena_board = { 3, 0 }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, { 3, 0 @@ -1122,15 +1626,15 @@ local arena_board = { 0 }, { - 3, + 0, 0 }, { - 14, + 0, 0 }, { - 3, + 0, 0 }, { @@ -1142,19 +1646,47 @@ local arena_board = { 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { 3, 0 }, + { + 3, + 0 + }, + { + 0, + 0 + }, { 2, 0 }, { - 3, + 0, 0 }, { @@ -1162,105 +1694,17 @@ local arena_board = { 0 }, { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, + 0, 0 }, { 3, 0 - }, - { - 2, - 0 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 } } }, [7]={ ["board"]={ - { - 1, - 0 - }, - { - 3, - 0 - }, - { - 0, - 3 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 2 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 3, 0 @@ -1270,35 +1714,15 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { - 2, + 0, 0 }, { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 2, - 0 - }, - { - 14, + 0, 0 }, { @@ -1309,14 +1733,6 @@ local arena_board = { 3, 0 }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 3, 0 @@ -1326,53 +1742,25 @@ local arena_board = { 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { 2, 0 }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, { 3, 0 }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 3, 0 @@ -1390,11 +1778,211 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -1402,123 +1990,27 @@ local arena_board = { [8]={ ["board"]={ { - 1, + 3, 0 }, { - 1, + 2, 0 }, { 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 1, 0 }, { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 7, - 0 - }, - { - 7, - 0 - }, - { - 7, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, + 2, 0 }, { @@ -1526,7 +2018,27 @@ local arena_board = { 0 }, { - 14, + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -1534,19 +2046,15 @@ local arena_board = { 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, - 0 - }, - { - 1, + 0, 0 }, { @@ -1554,7 +2062,23 @@ local arena_board = { 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -1562,39 +2086,187 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -1602,59 +2274,27 @@ local arena_board = { [9]={ ["board"]={ { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 2 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 4 - }, - { - 1, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -1663,18 +2303,10 @@ local arena_board = { }, { 0, - 2 + 0 }, { 0, - 4 - }, - { - 0, - 4 - }, - { - 7, 0 }, { @@ -1682,7 +2314,19 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -1691,110 +2335,222 @@ local arena_board = { }, { 0, - 2 + 0 }, { 0, - 3 - }, - { - 2, 0 }, { - 2, + 0, 0 }, { - 14, + 0, 0 }, { - 1, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 7, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, + 0, 0 }, { 3, 0 }, - { - 2, - 0 - }, { 3, 0 }, { - 7, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, { - 7, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } @@ -1802,35 +2558,31 @@ local arena_board = { [10]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 1 - }, - { - 1, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 }, { @@ -1839,26 +2591,6 @@ local arena_board = { }, { 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 1 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { @@ -1867,38 +2599,98 @@ local arena_board = { }, { 0, - 2 - }, - { - 0, - 4 - }, - { - 0, - 1 + 0 }, { 2, 0 }, { - 1, - 0 - }, - { - 1, + 0, 0 }, { 3, 0 }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 }, { - 7, + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -1910,11 +2702,19 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -1926,7 +2726,11 @@ local arena_board = { 0 }, { - 14, + 2, + 0 + }, + { + 0, 0 }, { @@ -1938,11 +2742,23 @@ local arena_board = { 0 }, { - 1, + 2, 0 }, { - 1, + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -1954,7 +2770,15 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 }, { @@ -1966,35 +2790,51 @@ local arena_board = { 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 } } @@ -2002,19 +2842,11 @@ local arena_board = { [11]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 1 - }, - { - 2, - 0 - }, - { - 2, 0 }, { @@ -2023,70 +2855,22 @@ local arena_board = { }, { 0, - 2 - }, - { - 1, 0 }, { - 1, + 2, 0 }, { - 4, - 1 - }, - { - 4, - 1 - }, - { - 4, - 3 - }, - { - 4, - 2 - }, - { - 4, - 2 - }, - { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 4, - 4 - }, - { - 4, - 4 - }, - { - 4, - 3 - }, - { - 4, - 4 - }, - { - 4, - 4 - }, - { - 1, - 0 - }, - { - 1, + 3, 0 }, { @@ -2109,14 +2893,6 @@ local arena_board = { 0, 0 }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 3, 0 @@ -2125,36 +2901,20 @@ local arena_board = { 3, 0 }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 3, - 0 - }, { 2, 0 }, { - 14, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -2166,15 +2926,27 @@ local arena_board = { 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -2185,148 +2957,192 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } }, [12]={ ["board"]={ - { - 1, - 0 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 2 - }, - { - 4, - 2 - }, - { - 4, - 3 - }, - { - 4, - 4 - }, - { - 4, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 3, 0 }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 2, 0 }, { - 14, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -2334,67 +3150,259 @@ local arena_board = { 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -2402,7 +3410,7 @@ local arena_board = { [13]={ ["board"]={ { - 1, + 3, 0 }, { @@ -2411,26 +3419,30 @@ local arena_board = { }, { 0, - 2 + 0 }, { 0, - 3 + 0 }, { 0, - 2 + 0 }, { 2, 0 }, { - 1, + 3, 0 }, { - 1, + 3, + 0 + }, + { + 0, 0 }, { @@ -2439,110 +3451,66 @@ local arena_board = { }, { 0, - 3 + 0 + }, + { + 2, + 0 }, { 0, - 2 + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 }, { 0, - 3 + 0 + }, + { + 0, + 0 }, { 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { 2, - 1 + 0 }, { - 3, - 2 - }, - { - 3, - 3 - }, - { - 3, - 4 + 0, + 0 }, { 2, - 5 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 1 - }, - { - 4, - 2 - }, - { - 4, - 3 - }, - { - 4, - 4 - }, - { - 4, - 5 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { @@ -2557,6 +3525,58 @@ local arena_board = { 3, 0 }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, { 3, 0 @@ -2566,11 +3586,19 @@ local arena_board = { 0 }, { - 1, + 2, 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -2582,7 +3610,23 @@ local arena_board = { 0 }, { - 14, + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -2594,7 +3638,55 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -2602,7 +3694,27 @@ local arena_board = { [14]={ ["board"]={ { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -2611,126 +3723,18 @@ local arena_board = { }, { 0, - 1 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 1 - }, - { - 4, - 2 - }, - { - 4, - 1 - }, - { - 4, - 2 - }, - { - 4, - 3 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 3 - }, - { - 4, - 4 - }, - { - 4, - 5 - }, - { - 4, - 1 - }, - { - 4, - 2 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, 0 }, - { - 0, - 0 - }, - { - 14, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 2, 0 }, { - 3, - 0 - }, - { - 1, - 0 - }, - { - 3, + 0, 0 }, { @@ -2738,11 +3742,11 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { @@ -2750,15 +3754,23 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -2766,35 +3778,199 @@ local arena_board = { 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } @@ -2802,119 +3978,27 @@ local arena_board = { [15]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 5, - 3 - }, - { - 2, - 0 - }, - { - 5, - 4 - }, - { - 2, - 0 - }, - { - 5, - 3 - }, - { - 2, 0 }, { 0, - 3 - }, - { - 2, 0 }, { - 5, - 4 - }, - { - 2, + 0, 0 }, { - 5, - 4 - }, - { - 2, - 0 - }, - { - 5, - 4 - }, - { - 2, - 0 - }, - { - 2, + 0, 0 }, { @@ -2926,13 +4010,53 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -2942,7 +4066,31 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, 0 }, { @@ -2966,11 +4114,11 @@ local arena_board = { 0 }, { - 1, + 2, 0 }, { - 1, + 3, 0 }, { @@ -2982,7 +4130,7 @@ local arena_board = { 0 }, { - 14, + 0, 0 }, { @@ -2994,7 +4142,119 @@ local arena_board = { 0 }, { - 1, + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 } } @@ -3002,115 +4262,11 @@ local arena_board = { [16]={ ["board"]={ { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 3 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 4 - }, - { - 4, - 2 - }, - { - 4, - 4 - }, - { - 4, - 2 - }, - { - 4, - 2 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 1, 0 }, { @@ -3118,27 +4274,7 @@ local arena_board = { 0 }, { - 5, - 2 - }, - { - 5, - 4 - }, - { - 5, - 3 - }, - { - 5, - 3 - }, - { - 5, - 3 - }, - { - 2, + 0, 0 }, { @@ -3146,29 +4282,61 @@ local arena_board = { 0 }, { - 5, - 4 - }, - { - 5, - 2 - }, - { - 14, + 0, 0 }, { - 5, - 2 + 3, + 0 }, { - 5, - 4 + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -3181,6 +4349,26 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 3, 0 @@ -3189,6 +4377,86 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, { 3, 0 @@ -3196,269 +4464,393 @@ local arena_board = { { 2, 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 } } }, [17]={ ["board"]={ { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 1 - }, - { - 5, - 1 - }, - { - 5, - 1 - }, - { - 5, - 3 - }, - { - 5, - 3 - }, - { - 5, - 3 - }, - { - 5, - 1 + 3, + 0 }, { 2, 0 }, { - 5, - 2 - }, - { - 3, + 0, 0 }, { - 5, - 3 - }, - { - 5, - 5 - }, - { - 3, + 0, 0 }, { - 5, - 1 + 0, + 0 }, { 2, 0 }, { - 5, - 2 - }, - { - 5, - 3 - }, - { - 5, - 3 - }, - { - 5, - 5 - }, - { - 5, - 5 - }, - { - 5, - 1 - }, - { - 5, - 4 - }, - { - 5, - 4 - }, - { - 5, - 4 - }, - { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 5, - 4 - }, - { - 14, + 0, 0 }, { - 5, - 4 - }, - { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 5, - 4 + 0, + 0 }, { - 5, - 4 + 0, + 0 }, { - 5, - 4 + 0, + 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } }, [18]={ ["board"]={ - { - 1, - 0 - }, { 3, 0 }, { - 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 3, + 2, 0 }, { 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 2, 0 }, { @@ -3470,8 +4862,24 @@ local arena_board = { 0 }, { - 4, - 2 + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 }, { 3, @@ -3482,11 +4890,15 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 2, 0 }, { @@ -3498,8 +4910,44 @@ local arena_board = { 0 }, { - 5, - 1 + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 }, { 0, @@ -3510,91 +4958,155 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 5, - 2 - }, - { - 5, - 2 - }, - { - 14, - 3 - }, - { - 5, - 3 - }, - { - 5, - 3 - }, - { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -3602,59 +5114,83 @@ local arena_board = { [19]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 3 + 0 }, { 0, - 2 + 0 }, { 0, - 2 + 0 }, { 0, - 2 + 0 + }, + { + 3, + 0 }, { 0, - 4 + 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -3666,29 +5202,29 @@ local arena_board = { 0 }, { - 3, + 0, 0 }, { - 4, - 1 + 2, + 0 }, { - 3, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { 3, 0 }, - { - 3, - 0 - }, - { - 1, - 0 - }, { 0, 0 @@ -3710,11 +5246,63 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -3726,11 +5314,23 @@ local arena_board = { 0 }, { - 4, - 1 + 0, + 0 }, { - 3, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -3738,99 +5338,119 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 5, - 5 - }, - { - 5, - 5 - }, - { - 5, - 1 - }, - { - 5, - 3 - }, - { - 5, - 3 - }, - { - 1, + 2, 0 }, { - 5, - 1 - }, - { - 5, - 1 - }, - { - 5, - 3 - }, - { - 14, + 0, 0 }, { - 5, - 1 + 2, + 0 }, { - 5, - 3 + 0, + 0 }, { - 5, - 1 + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 } } }, [20]={ ["board"]={ { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 5 - }, - { - 0, - 4 - }, - { - 0, - 5 - }, - { - 1, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 }, { @@ -3839,26 +5459,22 @@ local arena_board = { }, { 0, - 4 + 0 }, { 0, - 5 + 0 + }, + { + 2, + 0 }, { 0, - 4 - }, - { - 3, 0 }, { - 1, - 0 - }, - { - 3, + 0, 0 }, { @@ -3866,25 +5482,57 @@ local arena_board = { 0 }, { - 5, - 3 + 2, + 0 }, { - 5, - 3 - }, - { - 5, - 3 + 0, + 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -3894,263 +5542,199 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { - 14, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { 2, 0 }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, - { - 2, - 0 - }, - { - 5, - 2 - }, - { - 5, - 2 - }, - { - 5, - 2 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, { 3, 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { 2, 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 5, - 1 - }, - { - 5, - 1 - }, - { - 5, - 1 - }, - { - 1, - 0 - }, - { - 1, - 0 } } }, [21]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 4 + 0 }, { - 0, - 5 - }, - { - 1, + 2, 0 }, { 0, - 5 - }, - { - 0, - 4 - }, - { - 1, 0 }, { - 1, + 2, 0 }, { 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 5 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 1, 0 }, { - 1, + 3, + 0 + }, + { + 3, 0 }, { 0, - 3 + 0 }, { 0, - 5 + 0 }, { 0, - 4 + 0 }, { 0, - 2 + 0 }, { 0, - 1 - }, - { - 1, 0 }, { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 14, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, + 3, 0 }, { @@ -4162,19 +5746,15 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { - 2, + 0, 0 }, { - 2, - 0 - }, - { - 2, + 0, 0 }, { @@ -4186,197 +5766,229 @@ local arena_board = { 0 }, { - 2, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 } } }, [22]={ ["board"]={ - { - 1, - 0 - }, - { - 5, - 2 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 1 - }, - { - 1, - 0 - }, - { - 5, - 1 - }, - { - 2, - 0 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, { 3, 0 }, - { - 5, - 1 - }, { 2, 0 }, { - 5, - 2 - }, - { - 2, + 0, 0 }, { - 3, + 0, 0 }, { - 1, - 0 - }, - { - 3, - 0 - }, - { - 5, - 1 - }, - { - 2, - 0 - }, - { - 5, - 2 - }, - { - 2, + 0, 0 }, { 2, 0 }, - { - 1, - 0 - }, - { - 3, - 0 - }, - { - 5, - 4 - }, - { - 2, - 0 - }, - { - 5, - 5 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 3, - 0 - }, - { - 5, - 4 - }, - { - 14, - 0 - }, - { - 5, - 5 - }, - { - 2, - 0 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 3, 0 @@ -4385,16 +5997,252 @@ local arena_board = { 3, 0 }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, { 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -4402,108 +6250,52 @@ local arena_board = { [23]={ ["board"]={ { - 1, + 3, 0 }, { - 1, + 2, 0 }, { 0, - 2 + 0 }, { 0, - 5 - }, - { - 1, 0 }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 2 - }, { 0, - 2 - }, - { - 0, - 5 - }, - { - 4, - 4 - }, - { - 1, 0 }, { - 1, + 2, 0 }, { 3, 0 }, - { - 4, - 3 - }, - { - 0, - 2 - }, - { - 0, - 5 - }, - { - 4, - 4 - }, - { - 0, - 0 - }, - { - 1, - 0 - }, { 3, 0 }, { - 4, - 3 + 0, + 0 }, { - 4, - 1 + 2, + 0 }, { - 4, - 1 + 0, + 0 }, { - 4, - 5 + 2, + 0 }, { 0, @@ -4526,7 +6318,7 @@ local arena_board = { 0 }, { - 0, + 2, 0 }, { @@ -4542,7 +6334,27 @@ local arena_board = { 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -4553,6 +6365,26 @@ local arena_board = { 3, 0 }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, { 3, 0 @@ -4562,39 +6394,139 @@ local arena_board = { 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 14, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -4602,69 +6534,85 @@ local arena_board = { [24]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 2 + 0 }, { 0, - 2 + 0 }, { 0, - 3 + 0 }, { 0, - 2 + 0 + }, + { + 3, + 0 }, { 0, - 3 + 0 }, { - 1, + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, { 2, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 3, 0 @@ -4673,12 +6621,92 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -4686,29 +6714,9 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, - { - 4, - 3 - }, - { - 4, - 2 - }, - { - 4, - 1 - }, - { - 4, - 1 - }, - { - 4, - 1 - }, { 2, 0 @@ -4726,15 +6734,15 @@ local arena_board = { 0 }, { - 3, + 0, 0 }, { - 3, + 0, 0 }, { - 3, + 0, 0 }, { @@ -4750,15 +6758,31 @@ local arena_board = { 0 }, { - 3, + 0, 0 }, { - 3, + 0, 0 }, { - 3, + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -4770,11 +6794,7 @@ local arena_board = { 0 }, { - 1, - 0 - }, - { - 1, + 0, 0 }, { @@ -4782,7 +6802,7 @@ local arena_board = { 0 }, { - 14, + 0, 0 }, { @@ -4790,11 +6810,7 @@ local arena_board = { 0 }, { - 1, - 0 - }, - { - 1, + 3, 0 } } @@ -4802,59 +6818,27 @@ local arena_board = { [25]={ ["board"]={ { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -4865,6 +6849,54 @@ local arena_board = { 2, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -4873,50 +6905,26 @@ local arena_board = { 2, 0 }, + { + 0, + 0 + }, { 2, 0 }, { - 5, - 4 - }, - { - 1, + 0, 0 }, { - 1, + 2, 0 }, - { - 1, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 5, - 3 - }, { 0, 0 }, - { - 1, - 0 - }, { 3, 0 @@ -4925,56 +6933,80 @@ local arena_board = { 3, 0 }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 5, - 4 - }, { 0, 0 }, { - 1, + 0, 0 }, - { - 14, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 5, - 3 - }, { 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -4985,88 +7017,112 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, { - 5, - 4 + 3, + 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 } } }, [26]={ ["board"]={ - { - 1, - 0 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 5 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 1 - }, - { - 0, - 2 - }, { 3, 0 }, { 0, - 3 - }, - { - 0, - 5 - }, - { - 1, 0 }, { - 3, + 2, 0 }, { 0, - 2 + 0 }, { - 3, + 2, + 0 + }, + { + 0, 0 }, { @@ -5079,154 +7135,258 @@ local arena_board = { }, { 0, - 5 - }, - { - 3, 0 }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 14, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 4, - 2 - }, - { - 4, - 2 - }, - { - 4, - 4 - }, - { - 3, - 0 - }, - { - 4, - 4 - }, - { - 4, - 2 - }, - { - 4, - 2 - }, - { - 4, - 1 - }, { 0, 0 }, { - 4, - 4 - }, - { - 3, + 0, 0 }, - { - 4, - 4 - }, { 0, 0 }, { - 4, - 1 - }, - { - 4, - 1 - }, - { - 4, - 3 - }, - { - 4, - 3 + 0, + 0 }, { 3, 0 }, { - 4, - 3 + 3, + 0 }, { - 4, - 3 + 2, + 0 }, { - 4, - 1 + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 } } }, [27]={ ["board"]={ { - 2, - 0 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 2, + 3, 0 }, { @@ -5235,26 +7395,42 @@ local arena_board = { }, { 0, - 2 + 0 }, { 0, - 2 + 0 }, { 0, - 2 + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 }, { 0, - 2 + 0 }, { 0, - 2 + 0 }, { - 2, + 0, 0 }, { @@ -5262,55 +7438,7 @@ local arena_board = { 0 }, { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 4, - 4 - }, - { - 4, - 4 - }, - { - 1, - 0 - }, - { - 4, - 5 - }, - { - 4, - 5 - }, - { - 1, + 3, 0 }, { @@ -5326,7 +7454,7 @@ local arena_board = { 0 }, { - 14, + 0, 0 }, { @@ -5346,7 +7474,23 @@ local arena_board = { 0 }, { - 3, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -5358,7 +7502,23 @@ local arena_board = { 0 }, { - 3, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -5370,189 +7530,173 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } }, [28]={ ["board"]={ - { - 1, - 0 - }, - { - 4, - 2 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 4, - 2 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 3, 0 }, { - 0, - 3 + 2, + 0 }, { 0, - 4 + 0 }, { 0, - 3 + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 }, { 3, 0 }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 3 - }, - { - 3, - 0 - }, - { - 0, - 2 - }, - { - 3, - 0 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 0, - 3 - }, - { - 3, - 0 - }, - { - 0, - 1 - }, - { - 3, - 0 - }, - { - 0, - 5 - }, - { - 3, - 0 - }, - { - 0, - 3 - }, - { - 3, - 0 - }, - { - 4, - 1 - }, - { - 4, - 2 - }, - { - 4, - 3 - }, - { - 4, - 4 - }, - { - 4, - 5 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 0 - }, { 3, 0 @@ -5562,19 +7706,7 @@ local arena_board = { 0 }, { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, + 2, 0 }, { @@ -5582,7 +7714,7 @@ local arena_board = { 0 }, { - 14, + 2, 0 }, { @@ -5590,11 +7722,231 @@ local arena_board = { 0 }, { - 1, + 3, 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -5602,87 +7954,27 @@ local arena_board = { [29]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 2 - }, - { - 4, - 3 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 4 - }, - { - 4, - 2 + 0 }, { 0, - 3 - }, - { - 4, - 4 + 0 }, { 0, - 2 - }, - { - 1, 0 }, { @@ -5690,31 +7982,11 @@ local arena_board = { 0 }, { - 3, + 0, 0 }, { - 3, - 0 - }, - { - 4, - 1 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, + 0, 0 }, { @@ -5722,15 +7994,7 @@ local arena_board = { 0 }, { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, + 0, 0 }, { @@ -5738,11 +8002,11 @@ local arena_board = { 0 }, { - 3, + 0, 0 }, { - 2, + 0, 0 }, { @@ -5750,35 +8014,51 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { - 14, + 0, 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { 3, 0 }, + { + 3, + 0 + }, + { + 0, + 0 + }, { 2, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { @@ -5786,163 +8066,223 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } }, [30]={ ["board"]={ - { - 1, - 0 - }, - { - 0, - 5 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 1 - }, - { - 4, - 2 - }, - { - 4, - 3 - }, - { - 4, - 4 - }, - { - 4, - 5 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 1 - }, - { - 4, - 2 - }, - { - 4, - 3 - }, - { - 4, - 4 - }, - { - 4, - 5 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 3, 0 }, { - 1, + 0, 0 }, { - 3, + 0, 0 }, { - 1, + 0, 0 }, { - 3, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 }, { @@ -5954,7 +8294,59 @@ local arena_board = { 0 }, { - 14, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 }, { @@ -5966,11 +8358,23 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 }, { @@ -5978,15 +8382,51 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -5994,7 +8434,87 @@ local arena_board = { 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 } } @@ -6002,59 +8522,27 @@ local arena_board = { [31]={ ["board"]={ { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 1, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 4, - 3 + 2, + 0 }, { 0, - 3 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 4, - 3 - }, - { - 1, 0 }, { @@ -6066,16 +8554,220 @@ local arena_board = { 0 }, { - 4, - 2 + 0, + 0 }, { - 4, - 3 + 0, + 0 }, { - 4, - 4 + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 }, { 3, @@ -6097,14 +8789,6 @@ local arena_board = { 0, 0 }, - { - 0, - 0 - }, - { - 0, - 0 - }, { 2, 0 @@ -6113,212 +8797,20 @@ local arena_board = { 0, 0 }, - { - 0, - 0 - }, - { - 2, - 0 - }, { 3, 0 - }, - { - 2, - 0 - }, - { - 3, - 0 - }, - { - 2, - 0 - }, - { - 0, - 0 - }, - { - 1, - 0 - }, - { - 0, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 0, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 0 - }, - { - 14, - 0 - }, - { - 0, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 } } }, [32]={ ["board"]={ { - 1, + 3, 0 }, { - 1, - 0 - }, - { - 4, - 1 - }, - { - 0, - 2 - }, - { - 4, - 2 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 9, - 0 - }, - { - 4, - 1 - }, - { - 0, - 3 - }, - { - 4, - 4 - }, - { - 9, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 7, - 0 - }, - { - 4, - 2 - }, - { - 0, - 3 - }, - { - 4, - 4 - }, - { - 7, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 7, - 0 - }, - { - 4, - 2 - }, - { - 4, - 3 - }, - { - 4, - 2 - }, - { - 7, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 7, + 2, 0 }, { @@ -6334,19 +8826,19 @@ local arena_board = { 0 }, { - 7, + 2, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 7, + 2, 0 }, { @@ -6362,39 +8854,235 @@ local arena_board = { 0 }, { - 7, + 2, 0 }, { - 1, + 3, 0 }, { - 14, + 3, 0 }, { - 10, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 11, + 0, 0 }, { - 14, + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -6402,35 +9090,7 @@ local arena_board = { [33]={ ["board"]={ { - 1, - 0 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 1, + 3, 0 }, { @@ -6438,7 +9098,15 @@ local arena_board = { 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -6446,49 +9114,33 @@ local arena_board = { 0 }, { - 2, + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, { 2, 0 }, - { - 1, - 0 - }, { 0, 0 }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 14, - 0 - }, - { - 9, - 0 - }, { 3, 0 @@ -6497,30 +9149,6 @@ local arena_board = { 3, 0 }, - { - 3, - 0 - }, - { - 10, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 3, - 0 - }, - { - 14, - 0 - }, { 0, 0 @@ -6530,7 +9158,7 @@ local arena_board = { 0 }, { - 0, + 2, 0 }, { @@ -6538,11 +9166,7 @@ local arena_board = { 0 }, { - 1, - 0 - }, - { - 11, + 0, 0 }, { @@ -6553,6 +9177,26 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 @@ -6562,19 +9206,7 @@ local arena_board = { 0 }, { - 14, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, + 2, 0 }, { @@ -6589,64 +9221,212 @@ local arena_board = { 0, 0 }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, { 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } }, [34]={ ["board"]={ - { - 1, - 0 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 1, - 0 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 1, - 0 - }, - { - 0, - 1 - }, { 3, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, { 0, - 1 + 0 }, { - 3, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -6655,22 +9435,22 @@ local arena_board = { }, { 0, - 1 + 0 }, { 0, - 1 - }, - { - 3, 0 }, { - 3, + 0, 0 }, { - 7, + 0, + 0 + }, + { + 0, 0 }, { @@ -6683,26 +9463,22 @@ local arena_board = { }, { 0, - 1 + 0 + }, + { + 2, + 0 }, { 0, - 1 - }, - { - 3, 0 }, { - 7, + 2, 0 }, { - 14, - 0 - }, - { - 7, + 0, 0 }, { @@ -6711,22 +9487,58 @@ local arena_board = { }, { 0, - 1 - }, - { - 1, 0 }, { 0, - 1 - }, - { - 3, 0 }, { - 7, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -6735,23 +9547,27 @@ local arena_board = { }, { 0, - 1 - }, - { - 1, 0 }, { - 1, - 0 - }, - { - 1, + 2, 0 }, { 0, - 1 + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 }, { 3, @@ -6759,178 +9575,110 @@ local arena_board = { }, { 0, - 1 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 1 - }, - { - 1, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } }, [35]={ ["board"]={ - { - 1, - 0 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 3, 0 }, { 0, - 5 - }, - { - 0, - 1 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 3, - 0 - }, - { - 4, - 3 - }, - { - 3, 0 }, { 0, - 5 - }, - { - 0, - 1 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 3, - 0 - }, - { - 4, - 3 - }, - { - 4, - 2 - }, - { - 3, 0 }, { 0, - 5 - }, - { - 0, - 1 - }, - { - 0, - 4 - }, - { - 3, 0 }, { - 4, - 1 + 0, + 0 }, { - 4, - 2 - }, - { - 4, - 1 - }, - { - 3, + 0, 0 }, { @@ -6941,6 +9689,114 @@ local arena_board = { 2, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, { 3, 0 @@ -6950,7 +9806,7 @@ local arena_board = { 0 }, { - 14, + 0, 0 }, { @@ -6958,15 +9814,39 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -6977,84 +9857,112 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 } } }, [36]={ ["board"]={ - { - 1, - 0 - }, { 3, 0 }, { 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 3, 0 }, { - 1, - 0 - }, - { - 1, - 0 - }, - { - 3, + 2, 0 }, { 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 3, 0 }, { - 1, + 2, + 0 + }, + { + 0, 0 }, { @@ -7067,110 +9975,6 @@ local arena_board = { }, { 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 0 - }, - { - 14, - 0 - }, - { - 0, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { @@ -7182,7 +9986,23 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, 0 }, { @@ -7194,7 +10014,211 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } @@ -7202,63 +10226,55 @@ local arena_board = { [37]={ ["board"]={ { - 1, + 3, 0 }, { - 1, + 2, 0 }, { 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 5 + 0 }, { 0, - 5 + 0 }, { - 5, - 5 + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 }, { 0, - 5 + 0 }, { 0, - 5 - }, - { - 1, 0 }, { - 1, + 0, + 0 + }, + { + 2, 0 }, { @@ -7270,7 +10286,23 @@ local arena_board = { 0 }, { - 3, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -7282,19 +10314,23 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 5, - 1 + 0, + 0 }, { - 3, + 0, + 0 + }, + { + 0, 0 }, { @@ -7306,15 +10342,23 @@ local arena_board = { 0 }, { - 5, - 2 - }, - { - 1, + 0, 0 }, { - 1, + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -7326,7 +10370,23 @@ local arena_board = { 0 }, { - 14, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -7338,19 +10398,23 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 5, - 3 + 0, + 0 }, { - 3, + 0, + 0 + }, + { + 0, 0 }, { @@ -7362,19 +10426,23 @@ local arena_board = { 0 }, { - 5, - 5 - }, - { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -7382,19 +10450,59 @@ local arena_board = { 0 }, { - 5, - 2 + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 }, { 3, 0 }, { - 1, + 3, 0 }, { - 1, + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -7402,63 +10510,7 @@ local arena_board = { [38]={ ["board"]={ { - 1, - 0 - }, - { - 1, - 0 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 5, - 1 - }, - { - 0, - 5 - }, - { - 0, - 4 - }, - { - 0, - 1 - }, - { - 5, - 3 - }, - { - 1, - 0 - }, - { - 1, + 3, 0 }, { @@ -7467,54 +10519,14 @@ local arena_board = { }, { 0, - 5 - }, - { - 0, - 2 - }, - { - 0, - 5 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 5, - 5 - }, - { - 2, 0 }, { 0, - 2 - }, - { - 2, 0 }, { - 5, - 2 - }, - { - 1, - 0 - }, - { - 1, + 0, 0 }, { @@ -7525,9 +10537,89 @@ local arena_board = { 3, 0 }, + { + 3, + 0 + }, { 0, - 2 + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 }, { 3, @@ -7538,19 +10630,19 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 5, - 3 + 0, + 0 }, { - 3, + 2, 0 }, { @@ -7562,19 +10654,23 @@ local arena_board = { 0 }, { - 5, - 5 - }, - { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 }, { @@ -7582,7 +10678,27 @@ local arena_board = { 0 }, { - 14, + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -7590,11 +10706,87 @@ local arena_board = { 0 }, { - 1, + 3, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -7602,15 +10794,39 @@ local arena_board = { [39]={ ["board"]={ { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -7619,54 +10835,6 @@ local arena_board = { }, { 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 0, - 3 - }, - { - 13, - 1 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 13, - 1 - }, - { - 2, 0 }, { @@ -7675,26 +10843,46 @@ local arena_board = { }, { 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 1, 0 }, { - 13, - 2 + 0, + 0 }, { - 2, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -7703,26 +10891,82 @@ local arena_board = { }, { 0, - 1 + 0 + }, + { + 2, + 0 }, { 0, - 1 + 0 + }, + { + 3, + 0 }, { 0, - 1 - }, - { - 14, 0 }, { - 13, - 3 + 0, + 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -7730,7 +10974,7 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { @@ -7738,19 +10982,47 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { - 1, + 3, 0 }, { - 13, - 4 + 3, + 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -7758,7 +11030,7 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { @@ -7766,155 +11038,67 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 13, - 5 - }, - { - 13, - 1 - }, - { - 13, - 2 - }, - { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } }, [40]={ ["board"]={ - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 3 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 0, - 5 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 1 - }, - { - 0, - 3 - }, - { - 3, - 0 - }, { 3, 0 }, { 0, - 2 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 3, - 0 - }, - { - 14, 0 }, { 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 1, 0 }, { 0, - 3 - }, - { - 3, 0 }, { - 3, + 0, 0 }, { - 3, + 0, 0 }, { @@ -7926,13 +11110,25 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 @@ -7942,59 +11138,223 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 13, - 1 - }, - { - 13, - 2 - }, - { - 13, - 3 - }, - { - 13, - 4 - }, - { - 13, - 5 - }, - { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 13, - 5 + 0, + 0 }, { - 13, - 4 + 0, + 0 }, { - 13, - 3 + 2, + 0 }, { - 13, - 2 + 2, + 0 }, { - 13, - 1 + 0, + 0 }, { - 1, + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 } } @@ -8002,31 +11362,11 @@ local arena_board = { [41]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 1, 0 }, { @@ -8035,26 +11375,50 @@ local arena_board = { }, { 0, - 3 + 0 + }, + { + 2, + 0 }, { 0, - 1 + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 }, { 0, - 1 + 0 }, { 0, - 1 + 0 }, { 0, - 3 + 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, 0 }, { @@ -8062,7 +11426,15 @@ local arena_board = { 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -8070,7 +11442,47 @@ local arena_board = { 0 }, { - 2, + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -8078,7 +11490,27 @@ local arena_board = { 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -8086,7 +11518,47 @@ local arena_board = { 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, 0 }, { @@ -8094,19 +11566,15 @@ local arena_board = { 0 }, { - 13, - 1 - }, - { - 2, + 0, 0 }, { - 13, - 2 + 0, + 0 }, { - 2, + 0, 0 }, { @@ -8114,15 +11582,43 @@ local arena_board = { 0 }, { - 2, + 3, 0 }, { - 13, - 3 + 3, + 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -8130,51 +11626,7 @@ local arena_board = { 0 }, { - 2, - 0 - }, - { - 13, - 3 - }, - { - 2, - 0 - }, - { - 13, - 2 - }, - { - 2, - 0 - }, - { - 13, - 4 - }, - { - 2, - 0 - }, - { - 13, - 5 - }, - { - 2, - 0 - }, - { - 13, - 4 - }, - { - 1, - 0 - }, - { - 14, + 0, 0 }, { @@ -8182,19 +11634,11 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { - 2, - 0 - }, - { - 14, - 0 - }, - { - 1, + 3, 0 } } @@ -8202,63 +11646,27 @@ local arena_board = { [42]={ ["board"]={ { - 1, + 3, + 0 + }, + { + 2, 0 }, { 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 1, 0 }, { - 1, + 0, + 0 + }, + { + 2, 0 }, { @@ -8270,55 +11678,23 @@ local arena_board = { 0 }, { - 3, + 2, 0 }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 13, - 5 - }, { 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 13, - 5 - }, - { - 1, 0 }, { - 1, + 0, 0 }, { - 14, + 0, + 0 + }, + { + 2, 0 }, { @@ -8329,72 +11705,224 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, { - 14, + 3, 0 }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 13, - 2 - }, { 0, - 2 + 0 }, { 0, - 2 + 0 }, { 0, - 2 - }, - { - 13, - 2 - }, - { - 1, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -8402,65 +11930,25 @@ local arena_board = { [43]={ ["board"]={ { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 3 - }, - { - 0, - 4 + 3, + 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -8473,6 +11961,86 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, { 3, 0 @@ -8482,31 +12050,43 @@ local arena_board = { 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { 2, 0 }, + { + 3, + 0 + }, + { + 3, + 0 + }, { 2, 0 }, { 0, - 2 + 0 }, { 0, - 2 + 0 }, { 0, - 1 - }, - { - 2, 0 }, { @@ -8514,7 +12094,15 @@ local arena_board = { 0 }, { - 2, + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -8523,18 +12111,6 @@ local arena_board = { }, { 0, - 4 - }, - { - 14, - 0 - }, - { - 0, - 1 - }, - { - 2, 0 }, { @@ -8542,59 +12118,95 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, 0 }, { 0, - 5 - }, - { - 13, - 5 - }, - { - 13, - 5 - }, - { - 13, - 5 + 0 }, { 0, - 5 - }, - { - 1, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 1, + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -8602,7 +12214,39 @@ local arena_board = { [44]={ ["board"]={ { - 2, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -8611,26 +12255,6 @@ local arena_board = { }, { 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, 0 }, { @@ -8639,26 +12263,46 @@ local arena_board = { }, { 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 2, 0 }, { - 2, + 0, 0 }, { - 2, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -8667,26 +12311,6 @@ local arena_board = { }, { 0, - 4 - }, - { - 0, - 5 - }, - { - 0, - 1 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, 0 }, { @@ -8695,18 +12319,74 @@ local arena_board = { }, { 0, - 1 + 0 + }, + { + 3, + 0 }, { 0, - 3 + 0 }, { 0, - 4 + 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -8714,7 +12394,7 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { @@ -8722,19 +12402,47 @@ local arena_board = { 0 }, { - 13, - 1 + 0, + 0 }, { - 13, - 3 + 3, + 0 }, { - 13, - 3 + 3, + 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -8742,7 +12450,7 @@ local arena_board = { 0 }, { - 14, + 0, 0 }, { @@ -8750,51 +12458,39 @@ local arena_board = { 0 }, { - 13, - 5 - }, - { - 13, - 5 - }, - { - 13, - 3 - }, - { - 2, + 0, 0 }, { - 14, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 0, 0 }, { - 13, - 5 - }, - { - 13, - 3 - }, - { - 13, - 5 - }, - { - 1, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } @@ -8802,39 +12498,27 @@ local arena_board = { [45]={ ["board"]={ { - 2, + 3, 0 }, { 0, - 3 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 2, 0 }, { - 2, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -8847,34 +12531,50 @@ local arena_board = { }, { 0, - 3 + 0 + }, + { + 2, + 0 }, { 0, - 3 + 0 + }, + { + 2, + 0 }, { 0, - 2 - }, - { - 14, 0 }, { - 13, - 1 + 3, + 0 }, { - 13, - 4 + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 }, { 2, 0 }, { - 2, + 0, + 0 + }, + { + 0, 0 }, { @@ -8886,13 +12586,81 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -8902,13 +12670,53 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -8918,7 +12726,7 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { @@ -8926,7 +12734,7 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { @@ -8934,80 +12742,52 @@ local arena_board = { 0 }, { - 13, - 4 + 0, + 0 }, { - 13, - 1 + 3, + 0 }, { - 2, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { 2, 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 14, - 0 - }, - { - 13, - 4 - }, - { - 13, - 1 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 } } }, [46]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 5 + 0 }, { 2, @@ -9015,7 +12795,7 @@ local arena_board = { }, { 0, - 1 + 0 }, { 2, @@ -9023,19 +12803,43 @@ local arena_board = { }, { 0, - 5 - }, - { - 1, 0 }, { - 1, + 3, + 0 + }, + { + 3, 0 }, { 0, - 2 + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 }, { 2, @@ -9043,7 +12847,63 @@ local arena_board = { }, { 0, - 1 + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 }, { 2, @@ -9051,19 +12911,27 @@ local arena_board = { }, { 0, - 2 - }, - { - 1, - 0 - }, - { - 1, 0 }, { 0, - 5 + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 }, { 2, @@ -9071,7 +12939,47 @@ local arena_board = { }, { 0, - 1 + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 }, { 2, @@ -9079,14 +12987,14 @@ local arena_board = { }, { 0, - 5 - }, - { - 1, 0 }, { - 1, + 0, + 0 + }, + { + 0, 0 }, { @@ -9094,7 +13002,43 @@ local arena_board = { 0 }, { - 2, + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -9102,7 +13046,7 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { @@ -9110,91 +13054,11 @@ local arena_board = { 0 }, { - 1, + 0, 0 }, { - 1, - 0 - }, - { - 2, - 0 - }, - { - 13, - 4 - }, - { - 13, - 4 - }, - { - 13, - 5 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 2, - 0 - }, - { - 13, - 4 - }, - { - 13, - 4 - }, - { - 13, - 5 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 14, - 0 - }, - { - 13, - 1 - }, - { - 13, - 1 - }, - { - 13, - 2 - }, - { - 14, - 0 - }, - { - 1, + 3, 0 } } @@ -9202,91 +13066,27 @@ local arena_board = { [47]={ ["board"]={ { - 0, - 2 + 3, + 0 + }, + { + 2, + 0 }, { 0, - 4 + 0 }, { 0, - 4 + 0 }, { 0, - 1 + 0 }, { - 0, - 4 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 1 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 1, + 2, 0 }, { @@ -9297,92 +13097,16 @@ local arena_board = { 3, 0 }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 21, - 2 - }, { 2, 0 }, - { - 21, - 4 - }, - { - 2, - 0 - }, - { - 21, - 2 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, { 0, 0 }, { - 14, + 0, 0 }, { @@ -9390,11 +13114,235 @@ local arena_board = { 0 }, { - 1, + 2, 0 }, { - 1, + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -9402,59 +13350,7 @@ local arena_board = { [48]={ ["board"]={ { - 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 2, - 0 - }, - { - 0, - 3 - }, - { - 2, - 0 - }, - { - 0, - 1 - }, - { - 2, - 0 - }, - { - 0, - 4 - }, - { - 2, + 3, 0 }, { @@ -9463,26 +13359,30 @@ local arena_board = { }, { 0, - 3 + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 }, { 2, 0 }, { - 0, - 1 + 3, + 0 }, { - 2, + 3, 0 }, { 0, - 4 - }, - { - 2, 0 }, { @@ -9491,7 +13391,7 @@ local arena_board = { }, { 0, - 3 + 0 }, { 2, @@ -9499,7 +13399,23 @@ local arena_board = { }, { 0, - 1 + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 }, { 2, @@ -9507,10 +13423,22 @@ local arena_board = { }, { 0, - 4 + 0 }, { - 2, + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -9518,27 +13446,7 @@ local arena_board = { 0 }, { - 21, - 5 - }, - { - 2, - 0 - }, - { - 21, - 5 - }, - { - 2, - 0 - }, - { - 21, - 5 - }, - { - 2, + 0, 0 }, { @@ -9546,7 +13454,15 @@ local arena_board = { 0 }, { - 14, + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, 0 }, { @@ -9554,15 +13470,15 @@ local arena_board = { 0 }, { - 21, - 5 - }, - { - 2, + 0, 0 }, { - 14, + 0, + 0 + }, + { + 0, 0 }, { @@ -9570,31 +13486,147 @@ local arena_board = { 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -9602,35 +13634,39 @@ local arena_board = { [49]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 5 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 1, 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -9639,54 +13675,54 @@ local arena_board = { }, { 0, - 4 - }, - { - 0, - 5 - }, - { - 0, - 3 - }, - { - 2, 0 }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 21, - 3 - }, { 2, 0 }, { 0, - 5 - }, - { - 2, 0 }, { - 21, - 4 - }, - { - 1, + 0, 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -9694,31 +13730,7 @@ local arena_board = { 0 }, { - 21, - 4 - }, - { - 2, - 0 - }, - { - 21, - 3 - }, - { - 2, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 14, + 0, 0 }, { @@ -9726,7 +13738,75 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, 0 }, { @@ -9734,15 +13814,7 @@ local arena_board = { 0 }, { - 14, - 0 - }, - { - 1, - 0 - }, - { - 1, + 0, 0 }, { @@ -9750,27 +13822,47 @@ local arena_board = { 0 }, { - 21, - 4 - }, - { - 21, - 5 - }, - { - 21, - 3 - }, - { - 2, + 0, 0 }, { - 1, + 3, 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -9778,15 +13870,7 @@ local arena_board = { 0 }, { - 2, - 0 - }, - { - 21, - 5 - }, - { - 2, + 0, 0 }, { @@ -9794,7 +13878,39 @@ local arena_board = { 0 }, { - 1, + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } @@ -9802,35 +13918,39 @@ local arena_board = { [50]={ ["board"]={ { - 0, - 4 + 3, + 0 }, { 0, - 4 + 0 }, { 0, - 4 + 0 }, { 0, - 2 + 0 }, { 0, - 1 + 0 }, { 0, - 1 + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 }, { 0, - 1 - }, - { - 9, 0 }, { @@ -9838,7 +13958,7 @@ local arena_board = { 0 }, { - 9, + 0, 0 }, { @@ -9846,7 +13966,23 @@ local arena_board = { 0 }, { - 9, + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -9854,7 +13990,11 @@ local arena_board = { 0 }, { - 9, + 0, + 0 + }, + { + 0, 0 }, { @@ -9866,7 +14006,7 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { @@ -9874,13 +14014,45 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -9890,27 +14062,23 @@ local arena_board = { 0 }, { - 21, - 2 - }, - { - 3, + 0, 0 }, { - 21, - 2 - }, - { - 3, + 0, 0 }, { - 21, - 2 + 0, + 0 }, { - 3, + 0, + 0 + }, + { + 0, 0 }, { @@ -9922,7 +14090,7 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { @@ -9930,7 +14098,7 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { @@ -9938,45 +14106,37 @@ local arena_board = { 0 }, { - 2, - 0 - }, - { - 14, - 0 - }, - { - 21, - 2 - }, - { - 3, - 0 - }, - { - 21, - 2 - }, - { - 3, - 0 - }, - { - 21, - 2 - }, - { - 14, + 0, 0 }, { 3, 0 }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 2, 0 @@ -9986,73 +14146,61 @@ local arena_board = { 0 }, { - 2, + 0, 0 }, { 2, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 } } }, [51]={ ["board"]={ - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 1 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 3, - 0 - }, - { - 9, - 0 - }, - { - 3, - 0 - }, - { - 9, - 0 - }, - { - 3, - 0 - }, - { - 9, - 0 - }, { 3, 0 @@ -10061,122 +14209,6 @@ local arena_board = { 0, 0 }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 0, - 0 - }, - { - 21, - 1 - }, - { - 0, - 0 - }, - { - 21, - 1 - }, - { - 0, - 0 - }, - { - 21, - 1 - }, - { - 0, - 0 - }, - { - 21, - 1 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 2, - 0 - }, - { - 14, - 0 - }, { 2, 0 @@ -10190,47 +14222,271 @@ local arena_board = { 0 }, { - 14, + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, 0 }, { 2, 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 } } }, [52]={ ["board"]={ { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 1, + 3, 0 }, { @@ -10239,34 +14495,46 @@ local arena_board = { }, { 0, - 2 + 0 }, { 0, - 3 + 0 }, { 0, - 2 + 0 }, { 2, 0 }, { - 9, - 4 - }, - { - 21, - 3 + 3, + 0 }, { 3, 0 }, { - 3, + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 }, { @@ -10278,71 +14546,23 @@ local arena_board = { 0 }, { - 3, - 4 - }, - { - 21, - 4 - }, - { - 11, + 0, 0 }, { - 21, - 3 - }, - { - 21, - 3 - }, - { - 9, + 0, 0 }, { - 1, + 0, 0 }, { - 21, - 3 - }, - { - 21, - 3 - }, - { - 1, + 0, 0 }, { - 3, - 0 - }, - { - 14, - 0 - }, - { - 21, - 2 - }, - { - 3, - 0 - }, - { - 3, - 0 - }, - { - 21, - 3 - }, - { - 1, + 0, 0 }, { @@ -10354,199 +14574,223 @@ local arena_board = { 0 }, { - 21, - 2 + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 }, { 3, 0 }, { - 14, + 3, 0 }, { - 21, - 3 - }, - { - 1, + 0, 0 }, { - 21, - 1 + 2, + 0 }, { - 21, - 1 + 0, + 0 }, { - 21, - 2 + 2, + 0 }, { - 21, - 1 + 0, + 0 }, { - 21, - 1 + 3, + 0 }, { - 10, + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } }, [53]={ ["board"]={ - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 21, - 3 - }, - { - 21, - 5 - }, { 3, 0 }, { - 3, - 0 - }, - { - 14, + 2, 0 }, { 0, - 1 - }, - { - 0, - 4 - }, - { - 21, - 3 - }, - { - 21, - 5 - }, - { - 3, 0 }, { - 9, + 0, 0 }, - { - 21, - 3 - }, { 0, - 1 - }, - { - 0, - 3 - }, - { - 21, - 2 - }, - { - 21, - 5 - }, - { - 9, 0 }, { - 21, - 2 - }, - { - 21, - 3 - }, - { - 0, - 4 - }, - { - 0, - 1 - }, - { - 21, - 2 - }, - { - 8, - 0 - }, - { - 21, - 1 - }, - { - 21, - 2 - }, - { - 21, - 3 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 8, - 0 - }, - { - 3, - 0 - }, - { - 21, - 1 - }, - { - 21, - 2 - }, - { - 21, - 3 - }, - { - 1, - 0 - }, - { - 1, + 2, 0 }, { @@ -10558,23 +14802,23 @@ local arena_board = { 0 }, { - 21, - 1 - }, - { - 21, - 2 - }, - { - 8, + 0, 0 }, { - 1, + 2, 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, 0 }, { @@ -10586,15 +14830,223 @@ local arena_board = { 0 }, { - 21, - 1 - }, - { - 14, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -10602,63 +15054,83 @@ local arena_board = { [54]={ ["board"]={ { - 1, + 3, 0 }, { 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 9, 0 }, { 0, - 1 + 0 }, { 0, - 2 + 0 }, { 0, - 2 + 0 }, { 0, - 2 + 0 + }, + { + 3, + 0 }, { 0, - 2 + 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, 0 }, { @@ -10669,6 +15141,110 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, { 3, 0 @@ -10677,28 +15253,48 @@ local arena_board = { 3, 0 }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, { 3, 0 }, { - 1, + 0, 0 }, - { - 21, - 3 - }, - { - 21, - 3 - }, { 0, 0 }, { - 1, + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 }, { @@ -10710,17 +15306,9 @@ local arena_board = { 0 }, { - 1, + 3, 0 }, - { - 1, - 0 - }, - { - 21, - 3 - }, { 0, 0 @@ -10742,59 +15330,7 @@ local arena_board = { 0 }, { - 1, - 0 - }, - { - 11, - 0 - }, - { - 21, - 1 - }, - { - 21, - 3 - }, - { - 21, - 3 - }, - { - 21, - 2 - }, - { - 14, - 0 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 21, - 1 - }, - { - 21, - 1 - }, - { - 21, - 2 - }, - { - 21, - 2 - }, - { - 1, + 3, 0 } } @@ -10802,199 +15338,283 @@ local arena_board = { [55]={ ["board"]={ { - 18, + 3, 0 }, { 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 18, - 0 - }, - { - 18, - 0 - }, - { - 18, 0 }, { 0, - 1 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 18, - 0 - }, - { - 19, - 0 - }, - { - 18, - 0 - }, - { - 19, - 0 - }, - { - 18, - 0 - }, - { - 19, - 0 - }, - { - 10, - 0 - }, - { - 18, - 0 - }, - { - 18, - 0 - }, - { - 18, - 0 - }, - { - 18, - 0 - }, - { - 18, - 0 - }, - { - 18, - 0 - }, - { - 1, 0 }, { 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 3 - }, - { - 0, - 4 - }, - { - 1, 0 }, { 0, - 2 - }, - { - 22, - 2 + 0 }, { 0, - 2 + 0 }, { - 22, - 3 + 2, + 0 + }, + { + 2, + 0 }, { 0, - 3 - }, - { - 1, 0 }, { - 1, + 2, 0 }, { - 22, - 2 - }, - { - 14, + 0, 0 }, { - 22, - 3 - }, - { - 14, + 2, 0 }, { - 22, - 3 - }, - { - 1, + 0, 0 }, { - 1, + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, 0 } } @@ -11002,199 +15622,283 @@ local arena_board = { [56]={ ["board"]={ { - 0, - 2 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 0, - 3 - }, - { - 0, - 1 - }, - { - 0, - 1 - }, - { - 0, - 2 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 4, - 3 - }, - { - 4, - 3 - }, - { - 4, - 1 - }, - { - 4, - 2 - }, - { - 4, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 2 - }, - { - 4, - 2 - }, - { - 4, - 5 - }, - { - 4, - 5 - }, - { - 4, - 5 - }, - { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 1 + 0 + }, + { + 2, + 0 }, { 0, - 1 + 0 + }, + { + 2, + 0 }, { 0, - 3 + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 }, { 0, - 4 + 0 }, { 0, - 4 - }, - { - 1, 0 }, { - 1, + 0, 0 }, { - 22, - 3 - }, - { - 22, - 3 - }, - { - 22, - 2 - }, - { - 22, - 2 - }, - { - 22, - 1 - }, - { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 1, + 3, 0 }, { - 22, - 5 - }, - { - 22, - 4 - }, - { - 22, - 4 - }, - { - 1, + 3, 0 }, { - 1, + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } @@ -11202,91 +15906,63 @@ local arena_board = { [57]={ ["board"]={ { - 19, + 3, 0 }, { - 19, + 2, 0 }, { 0, - 4 - }, - { - 0, - 2 - }, - { - 0, - 1 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, 0 }, { 0, - 2 + 0 }, { 0, - 5 + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 }, { 0, - 2 - }, - { - 19, 0 }, { - 19, + 0, 0 }, { - 19, + 0, 0 }, { - 19, + 2, 0 }, { - 4, - 4 - }, - { - 4, - 2 - }, - { - 4, - 5 - }, - { - 19, + 3, 0 }, { - 19, - 0 - }, - { - 1, + 3, 0 }, { @@ -11310,91 +15986,203 @@ local arena_board = { 0 }, { - 1, + 3, 0 }, { - 1, + 3, 0 }, { - 22, - 3 - }, - { - 22, - 3 - }, - { - 22, - 3 - }, - { - 22, - 2 - }, - { - 22, - 5 - }, - { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 22, - 2 - }, - { - 22, - 1 - }, - { - 22, - 5 - }, - { - 22, - 2 - }, - { - 22, - 1 - }, - { - 1, + 0, 0 }, { - 1, + 0, 0 }, { - 14, + 0, 0 }, { - 22, - 1 - }, - { - 22, - 5 - }, - { - 22, - 2 - }, - { - 14, + 3, 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -11402,97 +16190,13 @@ local arena_board = { [58]={ ["board"]={ { - 1, + 3, 0 }, { - 0, - 4 - }, - { - 0, - 1 - }, - { - 0, - 4 - }, - { - 0, - 5 - }, - { - 0, - 5 - }, - { - 1, + 2, 0 }, - { - 1, - 0 - }, - { - 19, - 0 - }, - { - 4, - 4 - }, - { - 4, - 1 - }, - { - 4, - 4 - }, - { - 4, - 4 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 4, - 5 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 22, - 1 - }, - { - 22, - 1 - }, { 0, 0 @@ -11506,20 +16210,104 @@ local arena_board = { 0 }, { - 19, + 2, 0 }, { - 19, + 3, 0 }, { - 14, + 3, 0 }, { - 22, - 1 + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 }, { 0, @@ -11534,67 +16322,151 @@ local arena_board = { 0 }, { - 19, + 2, 0 }, { - 19, + 3, 0 }, { - 22, - 1 - }, - { - 22, - 1 - }, - { - 22, - 2 - }, - { - 22, - 2 - }, - { - 22, - 2 - }, - { - 19, + 3, 0 }, { - 1, + 2, 0 }, { - 14, + 0, 0 }, { - 22, - 1 - }, - { - 22, - 1 - }, - { - 22, - 1 - }, - { - 22, - 1 - }, - { - 19, + 0, 0 }, { - 1, + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, 0 } } @@ -11602,91 +16474,7 @@ local arena_board = { [59]={ ["board"]={ { - 19, - 0 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 0, - 3 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 0, - 3 - }, - { - 0, - 2 - }, - { - 0, - 2 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 1, - 0 - }, - { - 4, - 3 - }, - { - 4, - 4 - }, - { - 4, - 3 - }, - { - 4, - 1 - }, - { - 4, - 1 - }, - { - 1, - 0 - }, - { - 1, + 3, 0 }, { @@ -11710,91 +16498,259 @@ local arena_board = { 0 }, { - 1, - 0 - }, - { - 1, - 0 - }, - { - 4, - 2 - }, - { - 4, - 2 - }, - { - 4, - 1 - }, - { - 4, - 2 - }, - { - 4, - 2 - }, - { - 1, - 0 - }, - { - 1, + 3, 0 }, { 0, - 1 - }, - { - 0, - 3 - }, - { - 14, 0 }, { 0, - 4 + 0 + }, + { + 2, + 0 }, { 0, - 5 - }, - { - 1, 0 }, { - 1, + 2, 0 }, { - 1, + 0, 0 }, { - 22, - 1 - }, - { - 22, - 3 - }, - { - 22, - 5 - }, - { - 1, + 0, 0 }, { - 1, + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 3, 0 } } @@ -11802,115 +16758,7 @@ local arena_board = { [60]={ ["board"]={ { - 1, - 0 - }, - { - 1, - 5 - }, - { - 0, - 2 - }, - { - 0, - 5 - }, - { - 0, - 4 - }, - { - 0, - 2 - }, - { - 19, - 0 - }, - { - 1, - 0 - }, - { - 19, - 0 - }, - { - 19, - 5 - }, - { - 0, - 2 - }, - { - 0, - 5 - }, - { - 0, - 4 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 19, - 0 - }, - { - 0, - 4 - }, - { - 1, - 0 - }, - { - 4, - 3 - }, - { - 4, - 3 - }, - { - 4, - 3 - }, - { - 4, - 2 - }, - { - 4, - 2 - }, - { - 1, - 0 - }, - { - 1, + 3, 0 }, { @@ -11925,56 +16773,20 @@ local arena_board = { 0, 0 }, - { - 4, - 2 - }, { 0, 0 }, - { - 22, - 4 - }, - { - 1, - 0 - }, - { - 1, - 0 - }, - { - 14, - 0 - }, { 0, 0 }, { - 4, - 1 - }, - { - 0, + 2, 0 }, { - 22, - 4 - }, - { - 22, - 4 - }, - { - 1, - 0 - }, - { - 1, + 2, 0 }, { @@ -11982,7 +16794,7 @@ local arena_board = { 0 }, { - 14, + 2, 0 }, { @@ -11990,12 +16802,240 @@ local arena_board = { 0 }, { - 22, - 4 + 2, + 0 }, { - 22, - 4 + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 } } } diff --git a/lua/app/config/arena_rank.lua b/lua/app/config/arena_rank.lua index f7247712..0f0942fb 100644 --- a/lua/app/config/arena_rank.lua +++ b/lua/app/config/arena_rank.lua @@ -1,5 +1,6 @@ local arena_rank = { [101]={ + ["rank_show"]=3, ["season"]=1, ["score"]=900, ["reset_rank"]=201, @@ -61,6 +62,58 @@ local arena_rank = { ["num_for_nothing"]="Vw0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 1, 2, @@ -68,12 +121,28 @@ local arena_rank = { 4, 5 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="1", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_1" }, [102]={ + ["rank_show"]=2, ["season"]=1, ["score"]=1000, ["reset_rank"]=201, @@ -143,6 +212,58 @@ local arena_rank = { ["num_for_nothing"]="VAg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 6, 7, @@ -150,12 +271,28 @@ local arena_rank = { 9, 10 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="2", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_2" }, [103]={ + ["rank_show"]=1, ["season"]=1, ["score"]=1100, ["reset_rank"]=201, @@ -225,6 +362,58 @@ local arena_rank = { ["num_for_nothing"]="VA0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 11, 12, @@ -232,12 +421,28 @@ local arena_rank = { 14, 15 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="3", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_3" }, [104]={ + ["rank_show"]=4, ["season"]=1, ["score"]=1200, ["reset_rank"]=204, @@ -315,6 +520,58 @@ local arena_rank = { ["num_for_nothing"]="VQg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 16, 17, @@ -322,12 +579,28 @@ local arena_rank = { 19, 20 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="4", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_4" }, [105]={ + ["rank_show"]=3, ["season"]=1, ["score"]=1300, ["reset_rank"]=204, @@ -405,6 +678,58 @@ local arena_rank = { ["num_for_nothing"]="VQ0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 21, 22, @@ -412,12 +737,28 @@ local arena_rank = { 24, 25 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="5", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_5" }, [106]={ + ["rank_show"]=2, ["season"]=1, ["score"]=1400, ["reset_rank"]=204, @@ -495,6 +836,58 @@ local arena_rank = { ["num_for_nothing"]="Ugg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 26, 27, @@ -502,12 +895,28 @@ local arena_rank = { 29, 30 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="6", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_6" }, [107]={ + ["rank_show"]=1, ["season"]=1, ["score"]=1600, ["reset_rank"]=204, @@ -585,6 +994,58 @@ local arena_rank = { ["num_for_nothing"]="Ug0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 31, 32, @@ -592,12 +1053,28 @@ local arena_rank = { 34, 35 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="7", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_7" }, [108]={ + ["rank_show"]=5, ["season"]=1, ["score"]=1800, ["reset_rank"]=208, @@ -675,6 +1152,58 @@ local arena_rank = { ["num_for_nothing"]="Uwg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 36, 37, @@ -682,12 +1211,28 @@ local arena_rank = { 39, 40 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="8", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_8" }, [109]={ + ["rank_show"]=4, ["season"]=1, ["score"]=2000, ["reset_rank"]=208, @@ -765,6 +1310,58 @@ local arena_rank = { ["num_for_nothing"]="Uw0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 41, 42, @@ -772,12 +1369,28 @@ local arena_rank = { 44, 45 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="9", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_9" }, [110]={ + ["rank_show"]=3, ["season"]=1, ["score"]=2300, ["reset_rank"]=208, @@ -855,6 +1468,58 @@ local arena_rank = { ["num_for_nothing"]="UAg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 46, 47, @@ -862,12 +1527,28 @@ local arena_rank = { 49, 50 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="10", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_10" }, [111]={ + ["rank_show"]=2, ["season"]=1, ["score"]=2600, ["reset_rank"]=208, @@ -945,6 +1626,58 @@ local arena_rank = { ["num_for_nothing"]="UA0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 51, 52, @@ -952,12 +1685,28 @@ local arena_rank = { 54, 55 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="11", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_11" }, [112]={ + ["rank_show"]=1, ["season"]=1, ["score"]=2900, ["reset_rank"]=208, @@ -1035,6 +1784,58 @@ local arena_rank = { ["num_for_nothing"]="UQg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 56, 57, @@ -1042,12 +1843,28 @@ local arena_rank = { 59, 60 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="12", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_12" }, [201]={ + ["rank_show"]=3, ["season"]=2, ["score"]=900, ["min_point"]=4, @@ -1107,6 +1924,58 @@ local arena_rank = { ["num_for_nothing"]="Vw0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 1, 2, @@ -1114,12 +1983,28 @@ local arena_rank = { 4, 5 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="1", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_1" }, [202]={ + ["rank_show"]=2, ["season"]=2, ["score"]=1000, ["min_point"]=4, @@ -1187,6 +2072,58 @@ local arena_rank = { ["num_for_nothing"]="VAg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 6, 7, @@ -1194,12 +2131,28 @@ local arena_rank = { 9, 10 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="2", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_2" }, [203]={ + ["rank_show"]=1, ["season"]=2, ["score"]=1100, ["min_point"]=4, @@ -1267,6 +2220,58 @@ local arena_rank = { ["num_for_nothing"]="VA0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 11, 12, @@ -1274,12 +2279,28 @@ local arena_rank = { 14, 15 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="3", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_3" }, [204]={ + ["rank_show"]=4, ["season"]=2, ["score"]=1200, ["min_point"]=4, @@ -1355,6 +2376,58 @@ local arena_rank = { ["num_for_nothing"]="VQg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 16, 17, @@ -1362,12 +2435,28 @@ local arena_rank = { 19, 20 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="4", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_4" }, [205]={ + ["rank_show"]=3, ["season"]=2, ["score"]=1300, ["min_point"]=4, @@ -1443,6 +2532,58 @@ local arena_rank = { ["num_for_nothing"]="VQ0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 21, 22, @@ -1450,12 +2591,28 @@ local arena_rank = { 24, 25 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="5", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_5" }, [206]={ + ["rank_show"]=2, ["season"]=2, ["score"]=1400, ["min_point"]=4, @@ -1531,6 +2688,58 @@ local arena_rank = { ["num_for_nothing"]="Ugg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 26, 27, @@ -1538,12 +2747,28 @@ local arena_rank = { 29, 30 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="6", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_6" }, [207]={ + ["rank_show"]=1, ["season"]=2, ["score"]=1600, ["min_point"]=4, @@ -1619,6 +2844,58 @@ local arena_rank = { ["num_for_nothing"]="Ug0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 31, 32, @@ -1626,12 +2903,28 @@ local arena_rank = { 34, 35 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="7", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_7" }, [208]={ + ["rank_show"]=5, ["season"]=2, ["score"]=1800, ["min_point"]=4, @@ -1707,6 +3000,58 @@ local arena_rank = { ["num_for_nothing"]="Uwg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 36, 37, @@ -1714,12 +3059,28 @@ local arena_rank = { 39, 40 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="8", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_8" }, [209]={ + ["rank_show"]=4, ["season"]=2, ["score"]=2000, ["min_point"]=4, @@ -1795,6 +3156,58 @@ local arena_rank = { ["num_for_nothing"]="Uw0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 41, 42, @@ -1802,12 +3215,28 @@ local arena_rank = { 44, 45 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="9", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_9" }, [210]={ + ["rank_show"]=3, ["season"]=2, ["score"]=2300, ["min_point"]=4, @@ -1883,6 +3312,58 @@ local arena_rank = { ["num_for_nothing"]="UAg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 46, 47, @@ -1890,12 +3371,28 @@ local arena_rank = { 49, 50 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="10", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_10" }, [211]={ + ["rank_show"]=2, ["season"]=2, ["score"]=2600, ["min_point"]=4, @@ -1971,6 +3468,58 @@ local arena_rank = { ["num_for_nothing"]="UA0=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 51, 52, @@ -1978,12 +3527,28 @@ local arena_rank = { 54, 55 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="11", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_11" }, [212]={ + ["rank_show"]=1, ["season"]=2, ["score"]=2900, ["min_point"]=4, @@ -2059,6 +3624,58 @@ local arena_rank = { ["num_for_nothing"]="UQg=" } }, + ["win_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["lose_adbox"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, ["rand_board"]={ 56, 57, @@ -2066,10 +3683,25 @@ local arena_rank = { 59, 60 }, + ["effect"]={ + { + ["type"]="hpp_add", + ["num"]=30000, + ["ratio"]=10000, + ["round"]=0 + }, + { + ["type"]="dmg_dec_all_add", + ["num"]=8000, + ["ratio"]=10000, + ["round"]=0 + } + }, ["rank_icon"]="12", ["scene"]="bg_1", ["block_icon"]="battle_hinder_2", - ["chess_board"]="chessboard_1" + ["chess_board"]="chessboard_1", + ["name_txt"]="ARENA_RANKNAME_12" } } local config = { diff --git a/lua/app/config/const.lua b/lua/app/config/const.lua index d0f17b90..07eaf996 100644 --- a/lua/app/config/const.lua +++ b/lua/app/config/const.lua @@ -313,9 +313,21 @@ local const = { }, ["arena_bounty_senior_rise"]={ ["value"]=10 + }, + ["arena_matching_limit_number"]={ + ["value"]=5 + }, + ["arena_win_adbox"]={ + ["value"]=3 + }, + ["arena_lose_adbox"]={ + ["value"]=3 + }, + ["arena_max_round"]={ + ["value"]=30 } } local config = { -data=const,count=63 +data=const,count=67 } return config \ No newline at end of file diff --git a/lua/app/config/func_open.lua b/lua/app/config/func_open.lua index 5b145f42..3910d3f7 100644 --- a/lua/app/config/func_open.lua +++ b/lua/app/config/func_open.lua @@ -70,9 +70,13 @@ local func_open = { ["arena_open"]={ ["stage"]=10, ["pop_ups"]=1 + }, + ["act_arena_gift"]={ + ["stage"]=10, + ["pop_ups"]=1 } } local config = { -data=func_open,count=18 +data=func_open,count=19 } return config \ No newline at end of file diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index 72321066..5d2ba462 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -258,6 +258,49 @@ local LocalizationGlobalConst = NOTICE_TITLE = "NOTICE_TITLE", MAINTENANCE_NOTICE_DEFAULT = "MAINTENANCE_NOTICE_DEFAULT", CANNOT_RENAME_DESC_5 = "CANNOT_RENAME_DESC_5", + ARENA_DESC_1 = "ARENA_DESC_1", + ARENA_DESC_2 = "ARENA_DESC_2", + ARENA_DESC_3 = "ARENA_DESC_3", + ARENA_DESC_4 = "ARENA_DESC_4", + ARENA_DESC_5 = "ARENA_DESC_5", + ARENA_DESC_6 = "ARENA_DESC_6", + ARENA_DESC_7 = "ARENA_DESC_7", + ARENA_DESC_8 = "ARENA_DESC_8", + ARENA_DESC_9 = "ARENA_DESC_9", + ARENA_DESC_10 = "ARENA_DESC_10", + ARENA_DESC_11 = "ARENA_DESC_11", + ARENA_DESC_12 = "ARENA_DESC_12", + ARENA_DESC_13 = "ARENA_DESC_13", + ARENA_DESC_14 = "ARENA_DESC_14", + ARENA_DESC_15 = "ARENA_DESC_15", + ARENA_DESC_16 = "ARENA_DESC_16", + ARENA_DESC_17 = "ARENA_DESC_17", + ARENA_DESC_18 = "ARENA_DESC_18", + ARENA_DESC_19 = "ARENA_DESC_19", + ARENA_DESC_20 = "ARENA_DESC_20", + ARENA_DESC_21 = "ARENA_DESC_21", + ARENA_DESC_22 = "ARENA_DESC_22", + ARENA_DESC_23 = "ARENA_DESC_23", + ARENA_DESC_24 = "ARENA_DESC_24", + ARENA_RANKNAME_1 = "ARENA_RANKNAME_1", + ARENA_RANKNAME_2 = "ARENA_RANKNAME_2", + ARENA_RANKNAME_3 = "ARENA_RANKNAME_3", + ARENA_RANKNAME_4 = "ARENA_RANKNAME_4", + ARENA_RANKNAME_5 = "ARENA_RANKNAME_5", + ARENA_RANKNAME_6 = "ARENA_RANKNAME_6", + ARENA_RANKNAME_7 = "ARENA_RANKNAME_7", + ARENA_RANKNAME_8 = "ARENA_RANKNAME_8", + ARENA_RANKNAME_9 = "ARENA_RANKNAME_9", + ARENA_RANKNAME_10 = "ARENA_RANKNAME_10", + ARENA_RANKNAME_11 = "ARENA_RANKNAME_11", + ARENA_RANKNAME_12 = "ARENA_RANKNAME_12", + SHOP_DESC_38 = "SHOP_DESC_38", + SHOP_DESC_39 = "SHOP_DESC_39", + ARENA_BATTLE_DESC_1 = "ARENA_BATTLE_DESC_1", + ARENA_BATTLE_DESC_2 = "ARENA_BATTLE_DESC_2", + ARENA_BATTLE_DESC_3 = "ARENA_BATTLE_DESC_3", + ARENA_BATTLE_DESC_4 = "ARENA_BATTLE_DESC_4", + ARENA_BATTLE_DESC_5 = "ARENA_BATTLE_DESC_5", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/skill.lua b/lua/app/config/skill.lua index 239378b5..e0bd2376 100644 --- a/lua/app/config/skill.lua +++ b/lua/app/config/skill.lua @@ -126,7 +126,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300018 + ["fx_self"]=300018, + ["fx_self_mirror"]=400068 }, [1200111]={ ["position"]=1, @@ -151,7 +152,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300019 + ["fx_self"]=300019, + ["fx_self_mirror"]=400069 }, [1200112]={ ["position"]=1, @@ -176,7 +178,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300020 + ["fx_self"]=300020, + ["fx_self_mirror"]=400070 }, [1200113]={ ["position"]=1, @@ -201,7 +204,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300021 + ["fx_self"]=300021, + ["fx_self_mirror"]=400071 }, [1200120]={ ["energy"]=10, @@ -245,7 +249,8 @@ local skill = { 1167, 3000, 300 - } + }, + ["fx_self_mirror"]=400072 }, [1200121]={ ["position"]=1, @@ -361,7 +366,8 @@ local skill = { 1000011 }, ["name_act"]="attack01", - ["fx_self"]=300055 + ["fx_self"]=300055, + ["fx_self_mirror"]=400005 }, [1300111]={ ["position"]=1, @@ -386,7 +392,8 @@ local skill = { 1000012 }, ["name_act"]="attack02", - ["fx_self"]=300056 + ["fx_self"]=300056, + ["fx_self_mirror"]=400006 }, [1300112]={ ["position"]=1, @@ -411,7 +418,8 @@ local skill = { 1000013 }, ["name_act"]="attack03", - ["fx_self"]=300057 + ["fx_self"]=300057, + ["fx_self_mirror"]=400007 }, [1300113]={ ["position"]=1, @@ -436,7 +444,8 @@ local skill = { 1000014 }, ["name_act"]="attack04", - ["fx_self"]=300058 + ["fx_self"]=300058, + ["fx_self_mirror"]=400008 }, [1300120]={ ["energy"]=10, @@ -489,7 +498,8 @@ local skill = { 1900, 3000, 400 - } + }, + ["fx_self_mirror"]=400009 }, [1300121]={ ["position"]=1, @@ -588,7 +598,8 @@ local skill = { 1900, 3000, 400 - } + }, + ["fx_self_mirror"]=400009 }, [1300124]={ ["position"]=1, @@ -669,7 +680,8 @@ local skill = { 1000011 }, ["name_act"]="attack01", - ["fx_self"]=300035 + ["fx_self"]=300035, + ["fx_self_mirror"]=400020 }, [1300211]={ ["position"]=1, @@ -694,7 +706,8 @@ local skill = { 1000012 }, ["name_act"]="attack02", - ["fx_self"]=300036 + ["fx_self"]=300036, + ["fx_self_mirror"]=400021 }, [1300212]={ ["position"]=1, @@ -719,7 +732,8 @@ local skill = { 1000013 }, ["name_act"]="attack03", - ["fx_self"]=300037 + ["fx_self"]=300037, + ["fx_self_mirror"]=400022 }, [1300213]={ ["position"]=1, @@ -744,7 +758,8 @@ local skill = { 1000014 }, ["name_act"]="attack04", - ["fx_self"]=300038 + ["fx_self"]=300038, + ["fx_self_mirror"]=400023 }, [1300220]={ ["energy"]=10, @@ -830,7 +845,8 @@ local skill = { 1500, 3000, 400 - } + }, + ["fx_self_mirror"]=400024 }, [1300221]={ ["position"]=1, @@ -948,7 +964,8 @@ local skill = { 1500, 3000, 400 - } + }, + ["fx_self_mirror"]=400024 }, [1400110]={ ["position"]=1, @@ -973,7 +990,8 @@ local skill = { 1000011 }, ["name_act"]="attack01", - ["fx_self"]=300045 + ["fx_self"]=300045, + ["fx_self_mirror"]=400078 }, [1400111]={ ["position"]=1, @@ -998,7 +1016,8 @@ local skill = { 1000012 }, ["name_act"]="attack02", - ["fx_self"]=300046 + ["fx_self"]=300046, + ["fx_self_mirror"]=400079 }, [1400112]={ ["position"]=1, @@ -1023,7 +1042,8 @@ local skill = { 1000013 }, ["name_act"]="attack03", - ["fx_self"]=300047 + ["fx_self"]=300047, + ["fx_self_mirror"]=400080 }, [1400113]={ ["position"]=1, @@ -1048,7 +1068,8 @@ local skill = { 1000014 }, ["name_act"]="attack04", - ["fx_self"]=300048 + ["fx_self"]=300048, + ["fx_self_mirror"]=400081 }, [1400120]={ ["energy"]=10, @@ -1131,7 +1152,8 @@ local skill = { 1166, 3000, 200 - } + }, + ["fx_self_mirror"]=400082 }, [1400121]={ ["position"]=1, @@ -1238,7 +1260,8 @@ local skill = { 1000023 }, ["name_act"]="attack01", - ["fx_self"]=300100 + ["fx_self"]=300100, + ["fx_self_mirror"]=400100 }, [1400211]={ ["position"]=1, @@ -1263,7 +1286,8 @@ local skill = { 1000024 }, ["name_act"]="attack02", - ["fx_self"]=300101 + ["fx_self"]=300101, + ["fx_self_mirror"]=400101 }, [1400212]={ ["position"]=1, @@ -1288,7 +1312,8 @@ local skill = { 1000021 }, ["name_act"]="attack03", - ["fx_self"]=300102 + ["fx_self"]=300102, + ["fx_self_mirror"]=400102 }, [1400213]={ ["position"]=1, @@ -1313,7 +1338,8 @@ local skill = { 1000022 }, ["name_act"]="attack04", - ["fx_self"]=300103 + ["fx_self"]=300103, + ["fx_self_mirror"]=400103 }, [1400220]={ ["energy"]=10, @@ -1347,7 +1373,8 @@ local skill = { 1466, 3000, 400 - } + }, + ["fx_self_mirror"]=400104 }, [1400221]={ ["position"]=1, @@ -1437,7 +1464,8 @@ local skill = { 1466, 3000, 400 - } + }, + ["fx_self_mirror"]=400104 }, [1400224]={ ["position"]=1, @@ -1507,7 +1535,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300005 + ["fx_self"]=300005, + ["fx_self_mirror"]=400054 }, [2200111]={ ["position"]=2, @@ -1532,7 +1561,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300006 + ["fx_self"]=300006, + ["fx_self_mirror"]=400055 }, [2200112]={ ["position"]=2, @@ -1557,7 +1587,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300007 + ["fx_self"]=300007, + ["fx_self_mirror"]=400056 }, [2200113]={ ["position"]=2, @@ -1582,7 +1613,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300008 + ["fx_self"]=300008, + ["fx_self_mirror"]=400057 }, [2200120]={ ["energy"]=10, @@ -1615,7 +1647,8 @@ local skill = { 800, 3000, 400 - } + }, + ["fx_self_mirror"]=400058 }, [2200121]={ ["position"]=2, @@ -1713,7 +1746,8 @@ local skill = { 800, 3000, 400 - } + }, + ["fx_self_mirror"]=400058 }, [2300110]={ ["position"]=2, @@ -1738,7 +1772,8 @@ local skill = { 1000011 }, ["name_act"]="attack01", - ["fx_self"]=300040 + ["fx_self"]=300040, + ["fx_self_mirror"]=400010 }, [2300111]={ ["position"]=2, @@ -1763,7 +1798,8 @@ local skill = { 1000012 }, ["name_act"]="attack02", - ["fx_self"]=300041 + ["fx_self"]=300041, + ["fx_self_mirror"]=400011 }, [2300112]={ ["position"]=2, @@ -1788,7 +1824,8 @@ local skill = { 1000013 }, ["name_act"]="attack03", - ["fx_self"]=300042 + ["fx_self"]=300042, + ["fx_self_mirror"]=400012 }, [2300113]={ ["position"]=2, @@ -1813,7 +1850,8 @@ local skill = { 1000014 }, ["name_act"]="attack04", - ["fx_self"]=300043 + ["fx_self"]=300043, + ["fx_self_mirror"]=400013 }, [2300120]={ ["energy"]=10, @@ -1872,7 +1910,8 @@ local skill = { 1400, 3000, 400 - } + }, + ["fx_self_mirror"]=400014 }, [2300121]={ ["position"]=2, @@ -1945,7 +1984,8 @@ local skill = { 1400, 3000, 400 - } + }, + ["fx_self_mirror"]=400014 }, [2300123]={ ["position"]=2, @@ -2060,7 +2100,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300050 + ["fx_self"]=300050, + ["fx_self_mirror"]=400000 }, [2300211]={ ["position"]=2, @@ -2085,7 +2126,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300051 + ["fx_self"]=300051, + ["fx_self_mirror"]=400001 }, [2300212]={ ["position"]=2, @@ -2110,7 +2152,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300052 + ["fx_self"]=300052, + ["fx_self_mirror"]=400002 }, [2300213]={ ["position"]=2, @@ -2135,7 +2178,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300053 + ["fx_self"]=300053, + ["fx_self_mirror"]=400003 }, [2300220]={ ["energy"]=10, @@ -2199,7 +2243,8 @@ local skill = { 800, 3000, 400 - } + }, + ["fx_self_mirror"]=400004 }, [2300221]={ ["position"]=2, @@ -2283,7 +2328,8 @@ local skill = { 1000011 }, ["name_act"]="attack01", - ["fx_self"]=300028 + ["fx_self"]=300028, + ["fx_self_mirror"]=400073 }, [2400111]={ ["position"]=2, @@ -2308,7 +2354,8 @@ local skill = { 1000012 }, ["name_act"]="attack02", - ["fx_self"]=300029 + ["fx_self"]=300029, + ["fx_self_mirror"]=400074 }, [2400112]={ ["position"]=2, @@ -2333,7 +2380,8 @@ local skill = { 1000013 }, ["name_act"]="attack03", - ["fx_self"]=300030 + ["fx_self"]=300030, + ["fx_self_mirror"]=400075 }, [2400113]={ ["position"]=2, @@ -2358,7 +2406,8 @@ local skill = { 1000014 }, ["name_act"]="attack04", - ["fx_self"]=300031 + ["fx_self"]=300031, + ["fx_self_mirror"]=400076 }, [2400120]={ ["energy"]=10, @@ -2395,7 +2444,8 @@ local skill = { 2033, 3000, 400 - } + }, + ["fx_self_mirror"]=400077 }, [2400121]={ ["position"]=2, @@ -2538,7 +2588,8 @@ local skill = { 2033, 3000, 400 - } + }, + ["fx_self_mirror"]=400077 }, [2400124]={ ["energy"]=10, @@ -2581,7 +2632,8 @@ local skill = { 2033, 3000, 400 - } + }, + ["fx_self_mirror"]=400077 }, [2400125]={ ["position"]=2, @@ -2620,7 +2672,8 @@ local skill = { 2300114 }, ["name_act"]="attack01", - ["fx_self"]=300095 + ["fx_self"]=300095, + ["fx_self_mirror"]=400095 }, [2400211]={ ["position"]=2, @@ -2645,7 +2698,8 @@ local skill = { 4200111 }, ["name_act"]="attack02", - ["fx_self"]=300096 + ["fx_self"]=300096, + ["fx_self_mirror"]=400096 }, [2400212]={ ["position"]=2, @@ -2670,7 +2724,8 @@ local skill = { 4200112 }, ["name_act"]="attack03", - ["fx_self"]=300097 + ["fx_self"]=300097, + ["fx_self_mirror"]=400097 }, [2400213]={ ["position"]=2, @@ -2695,7 +2750,8 @@ local skill = { 4200113 }, ["name_act"]="attack04", - ["fx_self"]=300098 + ["fx_self"]=300098, + ["fx_self_mirror"]=400098 }, [2400220]={ ["energy"]=10, @@ -2732,7 +2788,8 @@ local skill = { 633, 3000, 400 - } + }, + ["fx_self_mirror"]=400099 }, [2400221]={ ["position"]=2, @@ -2771,6 +2828,14 @@ local skill = { ["round"]=2 } }, + ["pvp_effect"]={ + { + ["type"]="shield_rebound_200", + ["num"]=333, + ["ratio"]=10000, + ["round"]=2 + } + }, ["obj"]=1 }, [2400224]={ @@ -2799,6 +2864,14 @@ local skill = { ["round"]=2 } }, + ["pvp_effect"]={ + { + ["type"]="shield_rebound_400", + ["num"]=333, + ["ratio"]=10000, + ["round"]=2 + } + }, ["obj"]=1 }, [3200110]={ @@ -2824,7 +2897,8 @@ local skill = { 1000011 }, ["name_act"]="attack01", - ["fx_self"]=300000 + ["fx_self"]=300000, + ["fx_self_mirror"]=400049 }, [3200111]={ ["position"]=3, @@ -2849,7 +2923,8 @@ local skill = { 1000012 }, ["name_act"]="attack02", - ["fx_self"]=300001 + ["fx_self"]=300001, + ["fx_self_mirror"]=400050 }, [3200112]={ ["position"]=3, @@ -2874,7 +2949,8 @@ local skill = { 1000013 }, ["name_act"]="attack03", - ["fx_self"]=300002 + ["fx_self"]=300002, + ["fx_self_mirror"]=400051 }, [3200113]={ ["position"]=3, @@ -2899,7 +2975,8 @@ local skill = { 1000014 }, ["name_act"]="attack04", - ["fx_self"]=300003 + ["fx_self"]=300003, + ["fx_self_mirror"]=400052 }, [3200120]={ ["energy"]=10, @@ -2936,7 +3013,8 @@ local skill = { 966, 5000, 400 - } + }, + ["fx_self_mirror"]=400053 }, [3200121]={ ["position"]=3, @@ -3035,7 +3113,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_target"]=300023 + ["fx_target"]=300023, + ["fx_target_mirror"]=400015 }, [3300111]={ ["position"]=3, @@ -3060,7 +3139,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_target"]=300024 + ["fx_target"]=300024, + ["fx_target_mirror"]=400016 }, [3300112]={ ["position"]=3, @@ -3085,7 +3165,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_target"]=300025 + ["fx_target"]=300025, + ["fx_target_mirror"]=400017 }, [3300113]={ ["position"]=3, @@ -3110,7 +3191,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_target"]=300026 + ["fx_target"]=300026, + ["fx_target_mirror"]=400018 }, [3300120]={ ["energy"]=10, @@ -3137,7 +3219,8 @@ local skill = { 3300120 }, ["name_act"]="skill01", - ["fx_self"]=300027 + ["fx_self"]=300027, + ["fx_self_mirror"]=400019 }, [3300121]={ ["position"]=3, @@ -3231,7 +3314,8 @@ local skill = { 3300120 }, ["name_act"]="skill01", - ["fx_self"]=300027 + ["fx_self"]=300027, + ["fx_self_mirror"]=400019 }, [3300210]={ ["position"]=3, @@ -3256,7 +3340,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300070 + ["fx_self"]=300070, + ["fx_self_mirror"]=400035 }, [3300211]={ ["position"]=3, @@ -3281,7 +3366,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300071 + ["fx_self"]=300071, + ["fx_self_mirror"]=400036 }, [3300212]={ ["position"]=3, @@ -3306,7 +3392,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300072 + ["fx_self"]=300072, + ["fx_self_mirror"]=400037 }, [3300213]={ ["position"]=3, @@ -3331,7 +3418,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300073 + ["fx_self"]=300073, + ["fx_self_mirror"]=400038 }, [3300220]={ ["energy"]=10, @@ -3391,7 +3479,8 @@ local skill = { 1500, 3000, 400 - } + }, + ["fx_self_mirror"]=400039 }, [3300221]={ ["effect_type"]=2, @@ -3487,7 +3576,8 @@ local skill = { 1500, 3000, 400 - } + }, + ["fx_self_mirror"]=400039 }, [3300223]={ ["energy"]=10, @@ -3570,7 +3660,8 @@ local skill = { 1500, 3000, 400 - } + }, + ["fx_self_mirror"]=400039 }, [3400110]={ ["position"]=3, @@ -3595,7 +3686,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300091 + ["fx_self"]=300091, + ["fx_self_mirror"]=400093 }, [3400111]={ ["position"]=3, @@ -3620,7 +3712,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300091 + ["fx_self"]=300091, + ["fx_self_mirror"]=400093 }, [3400112]={ ["position"]=3, @@ -3645,7 +3738,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300091 + ["fx_self"]=300091, + ["fx_self_mirror"]=400093 }, [3400113]={ ["position"]=3, @@ -3670,7 +3764,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300091 + ["fx_self"]=300091, + ["fx_self_mirror"]=400093 }, [3400120]={ ["energy"]=10, @@ -3730,7 +3825,8 @@ local skill = { 1600, 3000, 200 - } + }, + ["fx_self_mirror"]=400094 }, [3400121]={ ["position"]=3, @@ -3857,7 +3953,8 @@ local skill = { 1600, 3000, 200 - } + }, + ["fx_self_mirror"]=400094 }, [3400210]={ ["position"]=3, @@ -3882,7 +3979,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300105 + ["fx_self"]=300105, + ["fx_self_mirror"]=400105 }, [3400211]={ ["position"]=3, @@ -3907,7 +4005,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300106 + ["fx_self"]=300106, + ["fx_self_mirror"]=400106 }, [3400212]={ ["position"]=3, @@ -3932,7 +4031,8 @@ local skill = { 10049 }, ["name_act"]="attack03", - ["fx_self"]=300107 + ["fx_self"]=300107, + ["fx_self_mirror"]=400107 }, [3400213]={ ["position"]=3, @@ -3957,7 +4057,8 @@ local skill = { 10048 }, ["name_act"]="attack04", - ["fx_self"]=300108 + ["fx_self"]=300108, + ["fx_self_mirror"]=400108 }, [3400220]={ ["energy"]=10, @@ -4017,7 +4118,8 @@ local skill = { 1000, 3000, 400 - } + }, + ["fx_self_mirror"]=400109 }, [3400221]={ ["position"]=3, @@ -4140,7 +4242,8 @@ local skill = { 1000, 3000, 400 - } + }, + ["fx_self_mirror"]=400109 }, [4200110]={ ["position"]=4, @@ -4165,7 +4268,8 @@ local skill = { 4200111 }, ["name_act"]="attack01", - ["fx_target"]=300010 + ["fx_target"]=300010, + ["fx_target_mirror"]=400059 }, [4200111]={ ["position"]=4, @@ -4190,7 +4294,8 @@ local skill = { 4200112 }, ["name_act"]="attack02", - ["fx_target"]=300011 + ["fx_target"]=300011, + ["fx_target_mirror"]=400060 }, [4200112]={ ["position"]=4, @@ -4215,7 +4320,8 @@ local skill = { 4200113 }, ["name_act"]="attack03", - ["fx_target"]=300012 + ["fx_target"]=300012, + ["fx_target_mirror"]=400061 }, [4200113]={ ["position"]=4, @@ -4240,7 +4346,8 @@ local skill = { 4200114 }, ["name_act"]="attack04", - ["fx_target"]=300013 + ["fx_target"]=300013, + ["fx_target_mirror"]=400062 }, [4200120]={ ["energy"]=10, @@ -4280,7 +4387,8 @@ local skill = { 1066, 3000, 400 - } + }, + ["fx_target_mirror"]=400063 }, [4200121]={ ["position"]=4, @@ -4381,7 +4489,8 @@ local skill = { 1000021 }, ["name_act"]="attack01", - ["fx_self"]=300080 + ["fx_self"]=300080, + ["fx_self_mirror"]=400040 }, [4300111]={ ["position"]=4, @@ -4406,7 +4515,8 @@ local skill = { 1000022 }, ["name_act"]="attack02", - ["fx_self"]=300081 + ["fx_self"]=300081, + ["fx_self_mirror"]=400041 }, [4300112]={ ["position"]=4, @@ -4431,7 +4541,8 @@ local skill = { 1000023 }, ["name_act"]="attack03", - ["fx_self"]=300082 + ["fx_self"]=300082, + ["fx_self_mirror"]=400042 }, [4300113]={ ["position"]=4, @@ -4456,7 +4567,8 @@ local skill = { 1000024 }, ["name_act"]="attack04", - ["fx_self"]=300083 + ["fx_self"]=300083, + ["fx_self_mirror"]=400043 }, [4300120]={ ["energy"]=10, @@ -4499,7 +4611,8 @@ local skill = { 200, 3000, 400 - } + }, + ["fx_self_mirror"]=400044 }, [4300121]={ ["position"]=4, @@ -4560,6 +4673,14 @@ local skill = { ["effect_type"]=2, ["trigger"]=6, ["effect"]={ + { + ["type"]="shield_ice", + ["num"]=3000, + ["ratio"]=10000, + ["round"]=2 + } + }, + ["pvp_effect"]={ { ["type"]="shield_ice", ["num"]=1000, @@ -4580,8 +4701,16 @@ local skill = { ["effect"]={ { ["type"]="shield_ice_rebound_400", - ["num"]=10000, - ["ratio"]=5000, + ["num"]=3000, + ["ratio"]=10000, + ["round"]=2 + } + }, + ["pvp_effect"]={ + { + ["type"]="shield_ice_rebound_400", + ["num"]=1000, + ["ratio"]=10000, ["round"]=2 } }, @@ -4642,7 +4771,8 @@ local skill = { 200, 3000, 400 - } + }, + ["fx_self_mirror"]=400044 }, [4300210]={ ["position"]=4, @@ -4667,7 +4797,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300075 + ["fx_self"]=300075, + ["fx_self_mirror"]=400083 }, [4300211]={ ["position"]=4, @@ -4692,7 +4823,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300076 + ["fx_self"]=300076, + ["fx_self_mirror"]=400084 }, [4300212]={ ["position"]=4, @@ -4717,7 +4849,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300077 + ["fx_self"]=300077, + ["fx_self_mirror"]=400085 }, [4300213]={ ["position"]=4, @@ -4742,7 +4875,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300078 + ["fx_self"]=300078, + ["fx_self_mirror"]=400086 }, [4300220]={ ["energy"]=10, @@ -4803,7 +4937,8 @@ local skill = { 1833, 3000, 400 - } + }, + ["fx_self_mirror"]=400087 }, [4300221]={ ["position"]=4, @@ -4918,7 +5053,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300033 + ["fx_self"]=300033, + ["fx_self_mirror"]=400045 }, [4400111]={ ["position"]=4, @@ -4943,7 +5079,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300033 + ["fx_self"]=300033, + ["fx_self_mirror"]=400045 }, [4400112]={ ["position"]=4, @@ -4968,7 +5105,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300093 + ["fx_self"]=300093, + ["fx_self_mirror"]=400046 }, [4400113]={ ["position"]=4, @@ -4993,7 +5131,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300094 + ["fx_self"]=300094, + ["fx_self_mirror"]=400047 }, [4400120]={ ["energy"]=10, @@ -5039,7 +5178,8 @@ local skill = { 633, 3000, 400 - } + }, + ["fx_target_mirror"]=400048 }, [4400121]={ ["position"]=4, @@ -5124,7 +5264,8 @@ local skill = { 10005 }, ["name_act"]="attack01", - ["fx_self"]=300110 + ["fx_self"]=300110, + ["fx_self_mirror"]=400110 }, [4400211]={ ["position"]=4, @@ -5149,7 +5290,8 @@ local skill = { 10006 }, ["name_act"]="attack02", - ["fx_self"]=300110 + ["fx_self"]=300110, + ["fx_self_mirror"]=400110 }, [4400212]={ ["position"]=4, @@ -5174,7 +5316,8 @@ local skill = { 10023 }, ["name_act"]="attack03", - ["fx_self"]=300110 + ["fx_self"]=300110, + ["fx_self_mirror"]=400110 }, [4400213]={ ["position"]=4, @@ -5199,7 +5342,8 @@ local skill = { 10048 }, ["name_act"]="attack04", - ["fx_self"]=300110 + ["fx_self"]=300110, + ["fx_self_mirror"]=400110 }, [4400220]={ ["energy"]=10, @@ -5263,7 +5407,8 @@ local skill = { 1333, 3000, 400 - } + }, + ["fx_self_mirror"]=400111 }, [4400221]={ ["energy"]=10, @@ -5337,7 +5482,8 @@ local skill = { 1333, 3000, 400 - } + }, + ["fx_self_mirror"]=400111 }, [4400222]={ ["position"]=4, @@ -5390,7 +5536,8 @@ local skill = { 1000021 }, ["name_act"]="attack01", - ["fx_self"]=300015 + ["fx_self"]=300015, + ["fx_self_mirror"]=400064 }, [5200111]={ ["position"]=5, @@ -5415,7 +5562,8 @@ local skill = { 1000022 }, ["name_act"]="attack02", - ["fx_self"]=300015 + ["fx_self"]=300015, + ["fx_self_mirror"]=400064 }, [5200112]={ ["position"]=5, @@ -5440,7 +5588,8 @@ local skill = { 1000023 }, ["name_act"]="attack03", - ["fx_self"]=300016 + ["fx_self"]=300016, + ["fx_self_mirror"]=400065 }, [5200113]={ ["position"]=5, @@ -5465,7 +5614,8 @@ local skill = { 1000024 }, ["name_act"]="attack04", - ["fx_self"]=300090 + ["fx_self"]=300090, + ["fx_self_mirror"]=400066 }, [5200120]={ ["energy"]=10, @@ -5487,6 +5637,14 @@ local skill = { ["round"]=1 } }, + ["pvp_effect"]={ + { + ["type"]="shield", + ["num"]=333, + ["ratio"]=10000, + ["round"]=1 + } + }, ["obj"]=1, ["skill_position"]={ 2, @@ -5496,7 +5654,8 @@ local skill = { 5200120 }, ["name_act"]="skill01", - ["fx_self"]=300017 + ["fx_self"]=300017, + ["fx_self_mirror"]=400067 }, [5200121]={ ["energy"]=10, @@ -5518,6 +5677,14 @@ local skill = { ["round"]=1 } }, + ["pvp_effect"]={ + { + ["type"]="shield_rebound_200", + ["num"]=333, + ["ratio"]=10000, + ["round"]=1 + } + }, ["obj"]=1, ["skill_position"]={ 2, @@ -5527,7 +5694,8 @@ local skill = { 5200120 }, ["name_act"]="skill01", - ["fx_self"]=300017 + ["fx_self"]=300017, + ["fx_self_mirror"]=400067 }, [5200122]={ ["energy"]=10, @@ -5549,6 +5717,14 @@ local skill = { ["round"]=1 } }, + ["pvp_effect"]={ + { + ["type"]="shield_rebound_400", + ["num"]=333, + ["ratio"]=10000, + ["round"]=1 + } + }, ["obj"]=1, ["skill_position"]={ 2, @@ -5558,7 +5734,8 @@ local skill = { 5200120 }, ["name_act"]="skill01", - ["fx_self"]=300017 + ["fx_self"]=300017, + ["fx_self_mirror"]=400067 }, [5200123]={ ["position"]=5, @@ -5597,7 +5774,8 @@ local skill = { 1000021 }, ["name_act"]="attack01", - ["fx_self"]=300060 + ["fx_self"]=300060, + ["fx_self_mirror"]=400025 }, [5300111]={ ["position"]=5, @@ -5622,7 +5800,8 @@ local skill = { 1000022 }, ["name_act"]="attack02", - ["fx_self"]=300061 + ["fx_self"]=300061, + ["fx_self_mirror"]=400026 }, [5300112]={ ["position"]=5, @@ -5647,7 +5826,8 @@ local skill = { 1000023 }, ["name_act"]="attack03", - ["fx_self"]=300062 + ["fx_self"]=300062, + ["fx_self_mirror"]=400027 }, [5300113]={ ["position"]=5, @@ -5672,7 +5852,8 @@ local skill = { 1000024 }, ["name_act"]="attack04", - ["fx_self"]=300063 + ["fx_self"]=300063, + ["fx_self_mirror"]=400028 }, [5300120]={ ["energy"]=10, @@ -5734,7 +5915,8 @@ local skill = { 2066, 3000, 400 - } + }, + ["fx_self_mirror"]=400029 }, [5300121]={ ["position"]=5, @@ -5837,7 +6019,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300065 + ["fx_self"]=300065, + ["fx_self_mirror"]=400030 }, [5300211]={ ["position"]=5, @@ -5862,7 +6045,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300066 + ["fx_self"]=300066, + ["fx_self_mirror"]=400031 }, [5300212]={ ["position"]=5, @@ -5887,7 +6071,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300067 + ["fx_self"]=300067, + ["fx_self_mirror"]=400032 }, [5300213]={ ["position"]=5, @@ -5912,7 +6097,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300068 + ["fx_self"]=300068, + ["fx_self_mirror"]=400033 }, [5300220]={ ["energy"]=10, @@ -5965,7 +6151,8 @@ local skill = { 1133, 3000, 400 - } + }, + ["fx_self_mirror"]=400034 }, [5300221]={ ["position"]=5, @@ -6119,7 +6306,8 @@ local skill = { 1133, 3000, 400 - } + }, + ["fx_self_mirror"]=400034 }, [5400110]={ ["position"]=5, @@ -6144,7 +6332,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300085 + ["fx_self"]=300085, + ["fx_self_mirror"]=400088 }, [5400111]={ ["position"]=5, @@ -6169,7 +6358,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300086 + ["fx_self"]=300086, + ["fx_self_mirror"]=400089 }, [5400112]={ ["position"]=5, @@ -6194,7 +6384,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300087 + ["fx_self"]=300087, + ["fx_self_mirror"]=400090 }, [5400113]={ ["position"]=5, @@ -6219,7 +6410,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300088 + ["fx_self"]=300088, + ["fx_self_mirror"]=400091 }, [5400120]={ ["energy"]=10, @@ -6270,7 +6462,8 @@ local skill = { 1800, 3000, 400 - } + }, + ["fx_self_mirror"]=400092 }, [5400121]={ ["position"]=5, @@ -6343,7 +6536,8 @@ local skill = { 1800, 3000, 400 - } + }, + ["fx_self_mirror"]=400092 }, [5400124]={ ["position"]=5, @@ -6393,7 +6587,8 @@ local skill = { 1000001 }, ["name_act"]="attack01", - ["fx_self"]=300112 + ["fx_self"]=300112, + ["fx_self_mirror"]=400112 }, [5400211]={ ["position"]=5, @@ -6418,7 +6613,8 @@ local skill = { 1000002 }, ["name_act"]="attack02", - ["fx_self"]=300113 + ["fx_self"]=300113, + ["fx_self_mirror"]=400113 }, [5400212]={ ["position"]=5, @@ -6443,7 +6639,8 @@ local skill = { 1000003 }, ["name_act"]="attack03", - ["fx_self"]=300114 + ["fx_self"]=300114, + ["fx_self_mirror"]=400114 }, [5400213]={ ["position"]=5, @@ -6468,7 +6665,8 @@ local skill = { 1000004 }, ["name_act"]="attack04", - ["fx_self"]=300115 + ["fx_self"]=300115, + ["fx_self_mirror"]=400115 }, [5400220]={ ["energy"]=10, @@ -6539,7 +6737,8 @@ local skill = { 3166, 3000, 400 - } + }, + ["fx_self_mirror"]=400116 }, [5400221]={ ["position"]=5, diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index a592ca08..1b35d86b 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -258,6 +258,49 @@ local localization_global = ["NOTICE_TITLE"] = "公告", ["MAINTENANCE_NOTICE_DEFAULT"] = "服务器正在加紧链接中,目前元素较多,请稍后重试进入。", ["CANNOT_RENAME_DESC_5"] = "与当前昵称一致,无需更改", + ["ARENA_DESC_1"] = "竞技场", + ["ARENA_DESC_2"] = "匹配", + ["ARENA_DESC_3"] = "第{0}赛季", + ["ARENA_DESC_4"] = "军团竞技场", + ["ARENA_DESC_5"] = "排行榜", + ["ARENA_DESC_6"] = "竞技场战令", + ["ARENA_DESC_7"] = "战报", + ["ARENA_DESC_8"] = "暂时没有战报", + ["ARENA_DESC_9"] = "防守阵容", + ["ARENA_DESC_10"] = "进攻阵容", + ["ARENA_DESC_11"] = "结算奖励", + ["ARENA_DESC_12"] = "S{0}赛季结算时抵达相应段位可在下一赛季时来此领取奖励。", + ["ARENA_DESC_13"] = "你在S{0}赛季时的段位", + ["ARENA_DESC_14"] = "战况", + ["ARENA_DESC_15"] = "对手", + ["ARENA_DESC_16"] = "积分", + ["ARENA_DESC_17"] = "防守胜利", + ["ARENA_DESC_18"] = "防守失败", + ["ARENA_DESC_19"] = "进攻胜利", + ["ARENA_DESC_20"] = "进攻失败", + ["ARENA_DESC_21"] = "S{0}赛季", + ["ARENA_DESC_22"] = "寻找对手", + ["ARENA_DESC_23"] = "重新匹配", + ["ARENA_DESC_24"] = "保存并退出", + ["ARENA_RANKNAME_1"] = "青铜骑士Ⅲ", + ["ARENA_RANKNAME_2"] = "青铜骑士Ⅱ", + ["ARENA_RANKNAME_3"] = "青铜骑士Ⅰ", + ["ARENA_RANKNAME_4"] = "白银骑士Ⅳ", + ["ARENA_RANKNAME_5"] = "白银骑士Ⅲ", + ["ARENA_RANKNAME_6"] = "白银骑士Ⅱ", + ["ARENA_RANKNAME_7"] = "白银骑士Ⅰ", + ["ARENA_RANKNAME_8"] = "黄金龙骑Ⅴ", + ["ARENA_RANKNAME_9"] = "黄金龙骑Ⅳ", + ["ARENA_RANKNAME_10"] = "黄金龙骑Ⅲ", + ["ARENA_RANKNAME_11"] = "黄金龙骑Ⅱ", + ["ARENA_RANKNAME_12"] = "黄金龙骑Ⅰ", + ["SHOP_DESC_38"] = "入门礼包", + ["SHOP_DESC_39"] = "超值S级英雄,仅此一次!", + ["ARENA_BATTLE_DESC_1"] = "我方回合", + ["ARENA_BATTLE_DESC_2"] = "对方回合", + ["ARENA_BATTLE_DESC_3"] = "眩晕中", + ["ARENA_BATTLE_DESC_4"] = "冻结中", + ["ARENA_BATTLE_DESC_5"] = "昏睡中", } return localization_global \ No newline at end of file diff --git a/lua/app/config/tutorial.lua b/lua/app/config/tutorial.lua index de7e9c13..34ea05ee 100644 --- a/lua/app/config/tutorial.lua +++ b/lua/app/config/tutorial.lua @@ -455,7 +455,7 @@ local tutorial = { [50000]={ ["next_id"]=50010, ["type"]=2, - ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/left_btn", + ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/left/daily_challenge", ["arrow_direction"]=2, ["arrow_offset"]={ 0, @@ -489,7 +489,7 @@ local tutorial = { 0, 180 }, - ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/right_btn", + ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/right/dungeon", ["arrow_direction"]=1, ["arrow_offset"]={ 0, diff --git a/lua/app/game.lua b/lua/app/game.lua index 61c87283..592831de 100644 --- a/lua/app/game.lua +++ b/lua/app/game.lua @@ -390,13 +390,17 @@ if NOT_PUBLISH then end if Input.GetKeyDown(KeyCode.G) and Input.GetKey(KeyCode.LeftControl) then - if DataManager.BattleData.gridEntities then + local battleController = ModuleManager.BattleManager.battleController + if not battleController then + return + end + if battleController.battleData.gridEntities then local map = {} - for posId, entity in pairs(DataManager.BattleData.gridEntities) do + for posId, entity in pairs(battleController.battleData.gridEntities) do map[tostring(posId)] = entity:getSnapshoptInfo() end Logger.logHighlight("——————————战斗棋盘快照如下————————") - Logger.logHighlight("——————————当前战斗回合步骤————————" .. ModuleManager.BattleManager.battleController.roundStep) + Logger.logHighlight("——————————当前战斗回合步骤————————" .. battleController.roundStep) Logger.logHighlight(json.encode(map)) end end diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 74165e26..13e7b1c0 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -85,6 +85,10 @@ BattleConst.BATTLE_TYPE = { ARENA = "5", } +BattleConst.IS_PVP_BATTLE = { + [BattleConst.BATTLE_TYPE.ARENA] = true, +} + BattleConst.TYPEOF_LUA_COMP = { BATTLE_HERO_COMPONENT = "app/module/battle/component/battle_hero_comp", BATTLE_MONSTER_COMPONENT = "app/module/battle/component/battle_monster_comp", @@ -275,6 +279,12 @@ local BUFF_NAME = { DMG_ADDITION_BLUE_ADD = "dmg_addition_blue_add", DMG_ADDITION_PURPLE_ADD = "dmg_addition_purple_add", DMG_ADDITION_ALL_ADD = "dmg_addition_all_add", + DMG_DEC_RED_ADD = "dmg_dec_red_add", + DMG_DEC_YELLOW_ADD = "dmg_dec_yellow_add", + DMG_DEC_GREEN_ADD = "dmg_dec_green_add", + DMG_DEC_BLUE_ADD = "dmg_dec_blue_add", + DMG_DEC_PURPLE_ADD = "dmg_dec_purple_add", + DMG_DEC_ALL_ADD = "dmg_dec_all_add", STUN = "stun", SHIELD = "shield", NORMAL_ATTACK_DEC = "normal_attack_dec", @@ -393,6 +403,12 @@ BattleConst.BUFF_NAME_TO_ATTR = { [BUFF_NAME.DMG_ADDITION_BLUE_ADD] = {ATTR_NAME.DMG_ADDITION_BLUE, false}, [BUFF_NAME.DMG_ADDITION_PURPLE_ADD] = {ATTR_NAME.DMG_ADDITION_PURPLE, false}, [BUFF_NAME.DMG_ADDITION_ALL_ADD] = {ATTR_NAME.DMG_ADDITION_ALL, false}, + [BUFF_NAME.DMG_DEC_RED_ADD] = {ATTR_NAME.DMG_DEC_RED, false}, + [BUFF_NAME.DMG_DEC_YELLOW_ADD] = {ATTR_NAME.DMG_DEC_YELLOW, false}, + [BUFF_NAME.DMG_DEC_GREEN_ADD] = {ATTR_NAME.DMG_DEC_GREEN, false}, + [BUFF_NAME.DMG_DEC_BLUE_ADD] = {ATTR_NAME.DMG_DEC_BLUE, false}, + [BUFF_NAME.DMG_DEC_PURPLE_ADD] = {ATTR_NAME.DMG_DEC_PURPLE, false}, + [BUFF_NAME.DMG_DEC_ALL_ADD] = {ATTR_NAME.DMG_DEC_ALL, false}, [BUFF_NAME.BLOCK] = {ATTR_NAME.BLOCK, false}, [BUFF_NAME.CRIT_ADD] = {ATTR_NAME.CRIT, false}, [BUFF_NAME.CRIT_TIME_ADD] = {ATTR_NAME.CRIT_TIME, false}, @@ -542,13 +558,34 @@ BattleConst.GRID_OUT_LINE_POS_ID = { [65] = {[74] = true, [75] = true, [76] = true, [64] = true, [66] = true, [54] = true, [55] = true, [56] = true}, [66] = {[75] = true, [76] = true, [77] = true, [65] = true, [67] = true, [55] = true, [56] = true, [57] = true}, [67] = {[76] = true, [77] = true, [66] = true, [56] = true, [57] = true}, - [71] = {[72] = true, [61] = true, [62] = true}, - [72] = {[71] = true, [73] = true, [61] = true, [62] = true, [63] = true}, - [73] = {[72] = true, [74] = true, [62] = true, [63] = true, [64] = true}, - [74] = {[73] = true, [75] = true, [63] = true, [64] = true, [65] = true}, - [75] = {[74] = true, [76] = true, [64] = true, [65] = true, [66] = true}, - [76] = {[75] = true, [77] = true, [65] = true, [66] = true, [67] = true}, - [77] = {[76] = true, [66] = true, [67] = true}, + [71] = {[81] = true, [82] = true, [72] = true, [61] = true, [62] = true}, + [72] = {[81] = true, [82] = true, [83] = true, [71] = true, [73] = true, [61] = true, [62] = true, [63] = true}, + [73] = {[82] = true, [83] = true, [84] = true, [72] = true, [74] = true, [62] = true, [63] = true, [64] = true}, + [74] = {[83] = true, [84] = true, [85] = true, [73] = true, [75] = true, [63] = true, [64] = true, [65] = true}, + [75] = {[84] = true, [85] = true, [86] = true, [74] = true, [76] = true, [64] = true, [65] = true, [66] = true}, + [76] = {[85] = true, [86] = true, [87] = true, [75] = true, [77] = true, [65] = true, [66] = true, [67] = true}, + [77] = {[86] = true, [87] = true, [76] = true, [66] = true, [67] = true}, + [81] = {[91] = true, [92] = true, [82] = true, [71] = true, [72] = true}, + [82] = {[91] = true, [92] = true, [93] = true, [81] = true, [83] = true, [71] = true, [72] = true, [73] = true}, + [83] = {[92] = true, [93] = true, [94] = true, [82] = true, [84] = true, [72] = true, [73] = true, [74] = true}, + [84] = {[93] = true, [94] = true, [95] = true, [83] = true, [85] = true, [73] = true, [74] = true, [75] = true}, + [85] = {[94] = true, [95] = true, [96] = true, [84] = true, [86] = true, [74] = true, [75] = true, [76] = true}, + [86] = {[95] = true, [96] = true, [97] = true, [85] = true, [87] = true, [75] = true, [76] = true, [77] = true}, + [87] = {[96] = true, [97] = true, [86] = true, [76] = true, [77] = true}, + [91] = {[101] = true, [102] = true, [92] = true, [81] = true, [82] = true}, + [92] = {[101] = true, [102] = true, [103] = true, [91] = true, [93] = true, [81] = true, [82] = true, [83] = true}, + [93] = {[102] = true, [103] = true, [104] = true, [92] = true, [94] = true, [82] = true, [83] = true, [84] = true}, + [94] = {[103] = true, [104] = true, [105] = true, [93] = true, [95] = true, [83] = true, [84] = true, [85] = true}, + [95] = {[104] = true, [105] = true, [106] = true, [94] = true, [96] = true, [84] = true, [85] = true, [86] = true}, + [96] = {[105] = true, [106] = true, [107] = true, [95] = true, [97] = true, [85] = true, [86] = true, [87] = true}, + [97] = {[106] = true, [107] = true, [96] = true, [86] = true, [87] = true}, + [101] = {[102] = true, [91] = true, [92] = true}, + [102] = {[101] = true, [103] = true, [91] = true, [92] = true, [93] = true}, + [103] = {[102] = true, [104] = true, [92] = true, [93] = true, [94] = true}, + [104] = {[103] = true, [105] = true, [93] = true, [94] = true, [95] = true}, + [105] = {[104] = true, [106] = true, [94] = true, [95] = true, [96] = true}, + [106] = {[105] = true, [107] = true, [95] = true, [96] = true, [97] = true}, + [107] = {[106] = true, [96] = true, [97] = true}, } BattleConst.UP_DOWN_LEFT_RIGHT = { @@ -601,6 +638,27 @@ BattleConst.UP_DOWN_LEFT_RIGHT = { [75] = {65, 74, 76}, [76] = {66, 75, 77}, [77] = {67, 76, }, + [81] = {71, 82}, + [82] = {72, 81, 83}, + [83] = {73, 82, 84}, + [84] = {74, 83, 85}, + [85] = {75, 84, 86}, + [86] = {76, 85, 87}, + [87] = {77, 86, }, + [91] = {81, 92}, + [92] = {82, 91, 93}, + [93] = {83, 92, 94}, + [94] = {84, 93, 95}, + [95] = {85, 94, 96}, + [96] = {86, 95, 97}, + [97] = {87, 96, }, + [101] = {91, 102}, + [102] = {92, 101, 103}, + [103] = {93, 102, 104}, + [104] = {94, 103, 105}, + [105] = {95, 104, 106}, + [106] = {96, 105, 107}, + [107] = {97, 106, }, } @@ -655,6 +713,101 @@ BattleConst.UP_LINE_FILL_LIST = { [75] = {65, 64, 66}, [76] = {66, 65, 67}, [77] = {67, 66}, + [81] = {71, 72}, + [82] = {72, 71, 73}, + [83] = {73, 72, 74}, + [84] = {74, 73, 75}, + [85] = {75, 74, 76}, + [86] = {76, 75, 77}, + [87] = {77, 76}, + [91] = {81, 82}, + [92] = {82, 81, 83}, + [93] = {83, 82, 84}, + [94] = {84, 83, 85}, + [95] = {85, 84, 86}, + [96] = {86, 85, 87}, + [97] = {87, 86}, + [101] = {91, 92}, + [102] = {92, 91, 93}, + [103] = {93, 92, 94}, + [104] = {94, 93, 95}, + [105] = {95, 94, 96}, + [106] = {96, 95, 97}, + [107] = {97, 96}, +} + +---- 下一排填充的顺序 +BattleConst.DOWN_LINE_FILL_LIST = { + [11] = {21, 22}, + [12] = {22, 23, 21}, + [13] = {23, 24, 22}, + [14] = {24, 25, 23}, + [15] = {25, 26, 24}, + [16] = {26, 27, 25}, + [17] = {27, 26}, + [21] = {31, 32}, + [22] = {32, 33, 31}, + [23] = {33, 34, 32}, + [24] = {34, 35, 33}, + [25] = {35, 36, 34}, + [26] = {36, 37, 35}, + [27] = {37, 36}, + [31] = {41, 42}, + [32] = {42, 43, 41}, + [33] = {43, 44, 42}, + [34] = {44, 45, 43}, + [35] = {45, 46, 44}, + [36] = {46, 47, 45}, + [37] = {47, 46}, + [41] = {51, 52}, + [42] = {52, 53, 51}, + [43] = {53, 54, 52}, + [44] = {54, 55, 53}, + [45] = {55, 56, 54}, + [46] = {56, 57, 55}, + [47] = {57, 56}, + [51] = {61, 62}, + [52] = {62, 63, 61}, + [53] = {63, 64, 62}, + [54] = {64, 65, 63}, + [55] = {65, 66, 64}, + [56] = {66, 67, 65}, + [57] = {67, 66}, + [61] = {71, 72}, + [62] = {72, 73, 71}, + [63] = {73, 74, 72}, + [64] = {74, 75, 73}, + [65] = {75, 76, 74}, + [66] = {76, 77, 75}, + [67] = {77, 76}, + [71] = {81, 82}, + [72] = {82, 83, 81}, + [73] = {83, 84, 82}, + [74] = {84, 85, 83}, + [75] = {85, 86, 84}, + [76] = {86, 87, 85}, + [77] = {87, 86}, + [81] = {91, 92}, + [82] = {92, 93, 91}, + [83] = {93, 94, 92}, + [84] = {94, 95, 93}, + [85] = {95, 96, 94}, + [86] = {96, 97, 95}, + [87] = {97, 96}, + [91] = {101, 102}, + [92] = {102, 103, 101}, + [93] = {103, 104, 102}, + [94] = {104, 105, 103}, + [95] = {105, 106, 104}, + [96] = {106, 107, 105}, + [97] = {107, 106}, + [101] = {}, + [102] = {}, + [103] = {}, + [104] = {}, + [105] = {}, + [106] = {}, + [107] = {}, } BattleConst.BOARD_RANGE_TYPE = { diff --git a/lua/app/module/battle/battle_manager.lua b/lua/app/module/battle/battle_manager.lua index 555b42a1..75fa3d50 100644 --- a/lua/app/module/battle/battle_manager.lua +++ b/lua/app/module/battle/battle_manager.lua @@ -11,6 +11,7 @@ local BATTLE_CONTROLLER = { [BattleConst.BATTLE_TYPE.DAILY_CHALLENGE] = "app/module/battle/controller/battle_controller_daily_challenge", [BattleConst.BATTLE_TYPE.DUNGEON_GOLD] = "app/module/battle/controller/battle_controller_dungeon_gold", [BattleConst.BATTLE_TYPE.DUNGEON_SHARDS] = "app/module/battle/controller/battle_controller_dungeon_shards", + [BattleConst.BATTLE_TYPE.ARENA] = "app/module/battle/controller/battle_controller_arena" } function BattleManager:showPauseUI(battleType) @@ -38,7 +39,9 @@ end function BattleManager:rspSkillRefresh(result) if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.BattleData:addRefreshSkillCount(result.reqData.ad) + if self.battleController then + self.battleController.battleData:addRefreshSkillCount(result.reqData.ad) + end EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.SKILL_REFRESH_SUCC) end end @@ -118,11 +121,9 @@ function BattleManager:clear() GFunc.killDOTween(GConst.DOTWEEN_IDS.BATTLE) self.battleController:clear() self.battleController = nil - DataManager.BattleData:clear() self.bindUnitAttributeData = nil end - ----------------------- start 一些公共相关的方法 ----------------------------- function BattleManager:getPosInfo(posId, rowCount) rowCount = rowCount or BattleConst.ROW_COUNT @@ -134,9 +135,16 @@ function BattleManager:getPosInfo(posId, rowCount) local r = self:getPosRC(posId).r local c = self:getPosRC(posId).c - local offsetC = c - (rowCount + 1) / 2 - local offsetR = BattleConst.HALF_ROW_COUNT - r + local offset = self:posNeedOffset(rowCount) + local offsetC = c - BattleConst.HALF_COLUMN_COUNT + local halfR = (rowCount + 1) / 2 + local offsetR = (rowCount + 1) / 2 - r local info = {x = offsetC * BattleConst.GRID_STEP_H, y = offsetR * BattleConst.GRID_STEP_H} + if r > halfR then + info.y = info.y - offset + else + info.y = info.y + offset + end GConst.BattleConst.GRID_POS[rowCount][posId] = info posInfo = GConst.BattleConst.GRID_POS[rowCount][posId] @@ -144,6 +152,13 @@ function BattleManager:getPosInfo(posId, rowCount) return posInfo end +function BattleManager:posNeedOffset(rowCount) + if rowCount == GConst.BattleConst.PVP_ROW_COUNT then + return 23 + end + return 0 +end + function BattleManager:getElementIcon(elementType) local icon = GConst.BattleConst.ELEMENT_ICON[elementType] if not icon then @@ -174,6 +189,10 @@ function BattleManager:getFirstLineLastRowPosId(row, column) return self:getPosId(1 - row, column) end +function BattleManager:getLastLineLastRowPosId(row, column, maxRow) + return self:getPosId(maxRow + row, column) +end + function BattleManager:getAroundPosIdsByList(posId, boardrange, cludePosIdsMap) local posIdInfos = {} local randomExclusion = {} diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index cf093660..498edf29 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -66,6 +66,14 @@ function BattleUnitComp:getIsLethargy() return self.unitEntity:getIsLethargy() end +function BattleUnitComp:getIsStun() + return self.unitEntity:getIsStun() +end + +function BattleUnitComp:getIsFrozen() + return self.unitEntity:getIsFrozen() +end + function BattleUnitComp:getActiveSkillLimit() return self.unitEntity:getActiveSkillLimit() end @@ -483,9 +491,9 @@ function BattleUnitComp:changeState(state) -- 进入目标状态 if state == UNIT_STATE.IDLE then -- idle为默认状态,其状态下判定特殊状态 - if self.unitEntity:getIsFrozen() then -- 有冰冻buff + if self:getIsFrozen() then -- 有冰冻buff state = UNIT_STATE.FROZEN - elseif self.unitEntity:getIsLethargy() or self.unitEntity:getIsStun() then + elseif self:getIsLethargy() or self:getIsStun() then state = UNIT_STATE.VERITGO end end @@ -1489,7 +1497,7 @@ function BattleUnitComp:takeEffect(buff, target, conditionResult) end end - if self.unitEntity:getIsFrozen() and buff:isIncreaseGain() then -- 冻结状态,缓存增益buff + if self:getIsFrozen() and buff:isIncreaseGain() then -- 冻结状态,缓存增益buff if buff:getRound() > 0 then local buffEffect = BattleHelper:getBuffEffect() buffEffect.buff = buff @@ -1683,7 +1691,7 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus, d if self.unitEntity:getBeSucked() > 0 then -- 吸血 atker:takeDamageOrCure(self, -num*self.unitEntity:getBeSucked() // DEFAULT_FACTOR, EFFECT_TYPE.HEAL, 0, BattleConst.SPECIAL_DAMAGE_OR_CURE_TYPE.BE_SUCKED) end - if self.unitEntity:getIsLethargy() then -- 移除昏睡 + if self:getIsLethargy() then -- 移除昏睡 self:removeBuffByName(BattleConst.BUFF_NAME.LETHARGY) end if self.unitEntity:getThorns() > 0 then -- 反伤 @@ -1802,7 +1810,7 @@ function BattleUnitComp:addBattleExp(atker, hpRealReduce) self.battleController:addBattleExp(addExp) else local exp = self.unitEntity:getExp() - if exp > 0 then + if exp and exp > 0 then local expTime = atker.unitEntity:getExpTime() local addExp = math.floor(exp/self.unitEntity:getMaxHp()*-hpRealReduce) if expTime > 0 then diff --git a/lua/app/module/battle/controller/battle_base_controller.lua b/lua/app/module/battle/controller/battle_base_controller.lua index ad613b97..58db9664 100644 --- a/lua/app/module/battle/controller/battle_base_controller.lua +++ b/lua/app/module/battle/controller/battle_base_controller.lua @@ -8,13 +8,54 @@ local BATTLE_BOARD_SKILL_HANDLE = require "app/module/battle/skill/battle_board_ local BATTLE_ROGUE_SKILL_HANDLE = require "app/module/battle/skill/battle_rogue_skill_handle" local BATTLE_GRID_EFFECT_HANDLE = require "app/module/battle/skill/battle_grid_effect_handle" local BATTLE_INSTRUCTIONS_HELPER = require "app/module/battle/helper/battle_instructions_helper" +local BattleBoardTouchHelper = require "app/module/battle/helper/battle_board_touch_helper" local BattleBuffHandle = require "app/module/battle/helper/battle_buff_handle" local BattleBaseController = class("BattleBaseController") local BattleConst = GConst.BattleConst -local ELIMINATION_TOUCH_EVENT = GConst.ELIMINATION_TOUCH_EVENT local BUFF_NAME_TO_ATTR = BattleConst.BUFF_NAME_TO_ATTR local GRID_BREAK_CONDITION = BattleConst.GRID_BREAK_CONDITION +local SIDE_ATK = BattleConst.SIDE_ATK +local SIDE_DEF = BattleConst.SIDE_DEF +function BattleBaseController:getPosInfo(posId) + return ModuleManager.BattleManager:getPosInfo(posId, self:getRowCount()) +end + +function BattleBaseController:getRowCount() + return self.battleData:getRowCount() +end + +function BattleBaseController:getSkillEntityBySkillId(skillId) + return self.battleData:getSkillEntityBySkillId(skillId, self.curActionSide) +end + +function BattleBaseController:getSkillEntityByElement(elementType) + return self.battleData:getSkillEntityByElement(elementType, self.curActionSide) +end + +function BattleBaseController:isUnlockedSkillElementType(elementType) + return self.battleData:isUnlockedSkillElementType(elementType, self.curActionSide) +end + +function BattleBaseController:getSkillCount(skillId) + return self.battleData:getSkillCount(skillId, self.curActionSide) +end + +function BattleBaseController:getSkillPool() + return self.battleData:getSkillPool(self.curActionSide) +end + +function BattleBaseController:getSkillEntities(side) + side = side or self.curActionSide + return self.battleData:getSkillEntities(side) +end + +function BattleBaseController:addSkillEnergy(elementMap, side) + side = side or self.curActionSide + self.battleData:addSkillEnergy(elementMap, side) +end + +-- *************各个子模块的战斗需要重写的方法 START************* function BattleBaseController:getBoardConfig() return {} end @@ -52,6 +93,14 @@ function BattleBaseController:getChessBoardBgName() return chapterInfo.chess_board end +function BattleBaseController:getScene() + local chapterInfo = self:getChapterConfig()[self.chapterId] + if not chapterInfo then + return "bg_1" + end + return chapterInfo.scene +end + function BattleBaseController:refreshWave() if not self.battleUI then return @@ -69,12 +118,12 @@ end -- 怪物攻击力加成 function BattleBaseController:getMonsterAtkAddition() - return BattleConst.DEFAULT_FACTOR + return 0 end -- 怪物血量加成 function BattleBaseController:getMonsterHpAddition() - return BattleConst.DEFAULT_FACTOR + return 0 end -- 需要额外加载的资源 @@ -108,7 +157,7 @@ function BattleBaseController:generateNextMonster() return self:enterNextWave() end local isBoss = self.defTeam:getIsBoss() - local unitEntity = self.battleData:addMonster(monsterId, true) + local unitEntity = self.battleData:addMonster(monsterId, true, self) local modelId = unitEntity:getModelId() BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) self.defTeam:removeAllUnits() @@ -220,8 +269,8 @@ function BattleBaseController:onLinkChange() if index < count then local nextPosId = sequence[index + 1].posId self.battleUI:getSfxLine(index, function(obj) - local curPos = ModuleManager.BattleManager:getPosInfo(info.posId) - local nextPos = ModuleManager.BattleManager:getPosInfo(nextPosId) + local curPos = self:getPosInfo(info.posId) + local nextPos = self:getPosInfo(nextPosId) local pos, z = ModuleManager.BattleManager:getPosCenterAndDir(curPos, nextPos) obj:setLocalScale(25, 25, 25) obj:setLocalPosition(pos.x, pos.y, 0) @@ -248,13 +297,13 @@ function BattleBaseController:onLinkChange() end end - if not self.atkTeam:getMainUnit().unitEntity:getActiveSkillLimit() then + if not self:getCurActionUnitComp():getActiveSkillLimit() then local aniSequence, influenceElementType, lineCount, elementTypeMap, linkElementType = self:calculateCurElimination(true) - self.battleUI:refreshSkill(elementTypeMap, count > 0) + self.battleUI:refreshSkill(elementTypeMap, count > 0, self.curActionSide) end if mainElementType then - self.atkTeam:changeMainUnit(mainElementType) + self:getSideTeam(self.curActionSide):changeMainUnit(mainElementType) end end @@ -314,6 +363,12 @@ function BattleBaseController:getSealElementType() return self.sealElementType end +function BattleBaseController:getAtkMinRow() + return 0 +end + +-- *************各个子模块的战斗需要重写的方法 end************* + function BattleBaseController:handleBuffs(side) for _, buffInfo in ipairs(self:getBuffs()) do local buffEntity = buffInfo.buffEntity @@ -373,6 +428,7 @@ function BattleBaseController:init(params) self.needWaitingBoardOver = nil self.curWaveMonsterDead = false + self.curActionSide = SIDE_ATK self.chapterId = self:getChapterId() self.waveIndex = 0 self.maxWaveIndex = self:getMaxWave() @@ -414,10 +470,18 @@ function BattleBaseController:initBattleTeam() self.defTeam:init(BattleConst.SIDE_DEF, self) end +function BattleBaseController:setCurActionSide(side) + self.curActionSide = side or SIDE_ATK +end + function BattleBaseController:setIsPauseHpProgress(value) self.battleUI:setIsPauseHpProgress(value) end +function BattleBaseController:getIsPvpBattle() + return BattleConst.IS_PVP_BATTLE[self.battleType] == true +end + function BattleBaseController:moveBattlefield(time) self.battleUI:moveBattlefield(time) end @@ -472,7 +536,7 @@ function BattleBaseController:prepareFight() end end UIManager:closeAllUI() - self.battleUI = UIManager:showUI(self:getBattleUIPath(), {battleControllerPVP = self}) + self.battleUI = UIManager:showUI(self:getBattleUIPath(), {battleController = self}) self.battleUI:addLoadUICompleteListener(function() BattleHelper:setEffectTextCache(self.battleUI:getBattleNumberRed(), self.battleUI:getBattleNumberGreen(), @@ -482,8 +546,11 @@ function BattleBaseController:prepareFight() self:initAtkUnits(onPreloadFinished) self:initDefUnits(onPreloadFinished) self.battleUI:refreshChessBoard(self:getChessBoardBgName()) + self.battleUI:loadBg(self:getScene()) end) BattleHelper:setBaseOrder(self.battleUI:getUIOrder()) + BattleHelper:setBattleData(self.battleData) + BattleBoardTouchHelper:init(self) self:loadOtherRes(onPreloadFinished) end @@ -520,8 +587,7 @@ end function BattleBaseController:initDefUnits(callback) local config = self:getChapterConfig()[self.chapterId] - self.battleUI:loadBg(config.scene) - local unitEntity = self.battleData:addMonster(config.monster[1]) + local unitEntity = self.battleData:addMonster(config.monster[1], nil, self) local modelId = unitEntity:getModelId() BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) local monsterComp = spineObject:addLuaComponent(BattleConst.TYPEOF_LUA_COMP.BATTLE_MONSTER_COMPONENT) @@ -556,6 +622,48 @@ function BattleBaseController:getOtherSideTeam(side) end end +function BattleBaseController:getSideTeam(side) + if side == BattleConst.SIDE_ATK then + return self.atkTeam + else + return self.defTeam + end +end + +function BattleBaseController:getCurActionTeam(side) + side = side or self.curActionSide + local isAtkAction = side == SIDE_ATK + local team = isAtkAction and self.atkTeam or self.defTeam + return team +end + +function BattleBaseController:getCurActionSide() + return self.curActionSide +end + +function BattleBaseController:getCurActionUnitComp() + return self:getCurActionTeam():getMainUnit() +end + +function BattleBaseController:getCurActionBoardRowRange() + local isAtkAction = self.curActionSide == SIDE_ATK + if isAtkAction then + return self:getAtkMinRow() + 1, self:getRowCount() + else + return 1, self:getAtkMinRow() + end +end + +function BattleBaseController:getPosIdInCurActionBoardRowRange(posId) + local min, max = self:getCurActionBoardRowRange() + local r = ModuleManager.BattleManager:getPosRC(posId).r + if r < min or r > max then + return false + end + + return true +end + function BattleBaseController:onLoadComplete() UIManager:closeLoading() self:handleBuffs() @@ -671,10 +779,13 @@ function BattleBaseController:enterNextWave() end function BattleBaseController:enterRoundBegin() + self:setCurActionSide(SIDE_ATK) self.needWaitingBoardOver = nil self.waveRoundCount[self.waveIndex] = (self.waveRoundCount[self.waveIndex] or 0) + 1 - self:takeGridEffect() - self:enterEliminationBegin() + self.battleUI:enterShowBoardAni(function() + self:takeGridEffect() + self:enterEliminationBegin() + end) table.clear(self.lastRoundBreakedGridType) end @@ -719,7 +830,6 @@ end function BattleBaseController:enterEliminationBegin() self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_BEGIN - self:onEliminationBegin() self:enterRefreshBoard(true) end @@ -758,19 +868,13 @@ end function BattleBaseController:enterBattleStep() self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_TEAM_ACTION - if not self.battleTeamActionList then - self.battleTeamActionList = {} - else - for i = #self.battleTeamActionList, 1, -1 do - self.battleTeamActionList[i] = nil - end - end + self.battleTeamActionList = table.clearOrCreate(self.battleTeamActionList) local atkAction = function() self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ATK_STEP self:exeInstructions(function() self:enterNextTeamAction() - end) + end, self.curActionSide) end local defAction = function() @@ -909,198 +1013,7 @@ end ---- end回合步骤 function BattleBaseController:onTouchEvent(eventType, posId, isVirtual) - if self.roundStep ~= BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION then - return - end - local entity = self.battleData:getGridEntity(posId) - if not entity or not entity:canLink() then - return - end - - if eventType == ELIMINATION_TOUCH_EVENT.DOWN then - self:onLinkStart(entity, posId, isVirtual) - elseif eventType == ELIMINATION_TOUCH_EVENT.ENTER then - if self.battleData:getIsVirtual() and not isVirtual then - return - end - - self:onLinkEnter(entity, posId, isVirtual) - elseif eventType == ELIMINATION_TOUCH_EVENT.EXIT then - - else -- 取消和抬起 - self:onLinkCancelOrUp(entity, posId, isVirtual) - end -end - -function BattleBaseController:onLinkStart(entity, posId, isVirtual) - if DataManager.TutorialData:getIsInTutorial() then - local elementList = DataManager.TutorialData:getTargetElement() - if elementList then - local find = false - for _, curPosId in ipairs(elementList) do - if curPosId == posId then - find = true - break - end - end - if not find then - return - end - end - end - - if not isVirtual then - self.battleUI:showTutorialFinger() - end - if #self.battleData:getGridSequence() > 0 then - self:clearGridSequence() - end - self.battleData:insertGridSequence(posId, self:snapshotBoard(), isVirtual) - local skillEntity = self.battleData:getSkillEntityBySkillId(entity:getSkillId()) - local maskElementType = entity:getElementType(skillEntity) - self.battleUI:showBoardMask(maskElementType, skillEntity and entity:getPosId()) - self:findSkillInfluenceGrids() - self:onLinkChange() - - if not isVirtual then - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_BO_1) - if skillEntity then - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_SKILL) - end - end -end - -function BattleBaseController:onLinkEnter(entity, posId, isVirtual) - local sequence = self.battleData:getGridSequence() - local sequenceCount = #sequence - local info = sequence[sequenceCount] - local lastPosId = info and info.posId - if not lastPosId then - return - end - local outLineMap = BattleConst.GRID_OUT_LINE_POS_ID[lastPosId] - if not outLineMap or not outLineMap[posId] then - return - end - - if self.battleData:alreadyInsertSequence(posId) then - local info = sequence[#sequence - 1] - local beforePosId = info and info.posId - if beforePosId == posId then -- 进入的是倒数第二个,则移除倒数第一个 - local snapshot = self.battleData:removeGridSequence(lastPosId) - if snapshot then -- 如果有快照,则恢复一次 - for posId, info in pairs(snapshot) do - self.battleData:setInfoBySnapshop(posId, info) - end - end - - local lastEntity = self.battleData:getGridEntity(beforePosId) - local lastSkillEntity = self.battleData:getSkillEntityBySkillId(lastEntity:getSkillId()) - local maskElementType = lastEntity:getElementType(lastSkillEntity) - - local _, skillPosId = self.battleData:getSequenceHadSkill() - self.battleUI:showBoardMask(maskElementType, skillPosId) - - self:findSkillInfluenceGrids() - self:onLinkChange() - end - return - end - - local skillId = entity:getSkillId() - local skillEntity = self.battleData:getSkillEntityBySkillId(skillId) - local elementType = entity:getElementType(skillEntity) - - local lastEntity = self.battleData:getGridEntity(lastPosId) - local lastSkillId = lastEntity:getSkillId() - local lastSkillEntity = self.battleData:getSkillEntityBySkillId(lastSkillId) - local lastElementType = lastEntity:getElementType(lastSkillEntity) - - local hadSkillId, skillPosId = self.battleData:getSequenceHadSkill() - if skillEntity and hadSkillId then - return - end - - if not elementType or not lastElementType then - else - if lastElementType ~= elementType then - return - end - end - - local maskElementType = elementType or lastElementType - if not skillPosId then - if skillId then - skillPosId = posId - end - end - self.battleUI:showBoardMask(maskElementType, skillPosId) - - self.battleData:insertGridSequence(posId, self:snapshotBoard(), isVirtual) - if lastEntity:getNeedChangePos() and not entity:getNeedChangePos() then -- 需要移动到队列末尾 - local lastSkillId = lastEntity:getSkillId() - local skillId = entity:getSkillId() - self:setGridSkillId(lastPosId, skillId) - self:setGridSkillId(posId, lastSkillId) - end - - local newElementType = elementType or lastElementType - if newElementType then - entity:setElementType(newElementType) - lastEntity:setElementType(newElementType) - end - - entity:addLinkSkillCount() - - self:findSkillInfluenceGrids() - self:onLinkChange() - - if not isVirtual then - if sequenceCount + 1 == self:getMinEliminationCount() then - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_READY) - end - AudioManager:playEffect(AudioManager:getBoEffectID(sequenceCount + 1)) - if skillEntity then - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_SKILL) - end - end -end - - -function BattleBaseController:onLinkCancelOrUp(entity, posId, isVirtual) - if isVirtual then - return - end - - local tutorialElementList - if DataManager.TutorialData:getIsInTutorial() then - tutorialElementList = DataManager.TutorialData:getTargetElement() - end - - self.battleUI:showBoardMask(nil) - local sequence = self.battleData:getGridSequence() - local count = #sequence - if count < self:getMinEliminationCount() then - self:clearGridSequence() - - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_CANCEL) - if tutorialElementList then - self.battleUI:showTutorialFinger(tutorialElementList) - end - return - end - - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_OVER) - - if tutorialElementList then - local posIdmap = {} - for _, info in ipairs(sequence) do - posIdmap[info.posId] = true - end - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ELIMINATION_OVER, posIdmap) - else - self:onLinkOver() - end + BattleBoardTouchHelper:onTouchEvent(eventType, posId, isVirtual) end function BattleBaseController:clearGridSequence() @@ -1131,25 +1044,31 @@ function BattleBaseController:onLinkOver() return end + local isAtkAction = self.curActionSide == SIDE_ATK local skillId = self.battleData:getSequenceHadSkill() local skillEntity if skillId then - skillEntity = self.battleData:getSkillEntityBySkillId(skillId) - self:addTaskProgress(BattleConst.BATTLE_TASK_FIELD.BOARD_SKILL_RELEASE_COUNT, 1) + skillEntity = self:getSkillEntityBySkillId(skillId) + if isAtkAction then + self:addTaskProgress(BattleConst.BATTLE_TASK_FIELD.BOARD_SKILL_RELEASE_COUNT, 1) + end end local aniSequence, influenceElementTypeMap, lineCount, elementTypeMap, linkElementType, effectGridMap = self:calculateCurElimination() - if not self.atkTeam:getMainUnit().unitEntity:getActiveSkillLimit() then - self.battleData:addSkillEnergy(elementTypeMap) + if not self:getCurActionUnitComp():getActiveSkillLimit() then + self:addSkillEnergy(elementTypeMap) end self.battleData:clearGridSequence() self.battleUI:disableUITouch() self.battleUI:eliminationAni(aniSequence, effectGridMap, function() self:enterRefreshBoard(nil, function() - self:generateInstructions(skillEntity, linkElementType, lineCount, influenceElementTypeMap, elementTypeMap) + self.battleUI:enterHideBoardAni(function() + self:generateInstructions(skillEntity, linkElementType, lineCount, influenceElementTypeMap, elementTypeMap) + self:enterBattleStep() + end) end) - end) + end, self.curActionSide) self.eliminateCount = self.eliminateCount + 1 self.eliminateTotalCount = self.eliminateTotalCount + 1 @@ -1163,7 +1082,7 @@ function BattleBaseController:calculateCurElimination(onlyCheck) local skillId = self.battleData:getSequenceHadSkill() local skillEntity if skillId then - skillEntity = self.battleData:getSkillEntityBySkillId(skillId) + skillEntity = self:getSkillEntityBySkillId(skillId) end self.breakedMap = table.clearOrCreate(self.breakedMap) self.boomGridIds = table.clearOrCreate(self.boomGridIds) @@ -1253,7 +1172,9 @@ function BattleBaseController:dealGridBreak(posId, condition, time, breakedMap, if condition == GRID_BREAK_CONDITION.LINE then local outline = BattleConst.UP_DOWN_LEFT_RIGHT[posId] for _, id in ipairs(outline) do - self:dealGridBreak(id, GRID_BREAK_CONDITION.AROUND, time, breakedMap, sequenceMap, aniSequence, gridMap, onlyCheck) + if self.battleData:getGridEntity(id) then + self:dealGridBreak(id, GRID_BREAK_CONDITION.AROUND, time, breakedMap, sequenceMap, aniSequence, gridMap, onlyCheck) + end end end if entity:getEffectType() then @@ -1357,20 +1278,34 @@ function BattleBaseController:tryShowSelectSkillComp(needDelay, onlyCommonSkill) self.battleUI:showSelectSkillComp(skillList, onlyCommonSkill) end - BIReport:postShowFightSkillSelect(self.battleType, skillList, self.chapterId, self.totalDurationTime, self.waveIndex) + BIReport:postShowFightSkillSelect(self.battleType, self.battleData, skillList, self.chapterId, self.totalDurationTime, self.waveIndex) end function BattleBaseController:fillBoard(isRoundBeginCheck) + local reverse = self.curActionSide == SIDE_DEF self.fillBoardPathMap = table.clearOrCreate(self.fillBoardPathMap) self.fillColumnCount = table.clearOrCreate(self.fillColumnCount) self.fillGridMap = table.clearOrCreate(self.fillGridMap) - for c = 1, BattleConst.COLUMN_COUNT do - for r = BattleConst.ROW_COUNT, 1, -1 do - local posId = ModuleManager.BattleManager:getPosId(r, c) - local entity = self.battleData:getGridEntity(posId) - if entity:getIsIdle() then - self:fillThisPos(posId, self.fillColumnCount, self.fillGridMap) + + if reverse then + for c = 1, BattleConst.COLUMN_COUNT do + for r = 1, self:getRowCount() do + local posId = ModuleManager.BattleManager:getPosId(r, c) + local entity = self.battleData:getGridEntity(posId) + if entity and entity:getIsIdle() then + self:fillThisPos(posId, self.fillColumnCount, self.fillGridMap, reverse) + end + end + end + else + for c = 1, BattleConst.COLUMN_COUNT do + for r = self:getRowCount(), 1, -1 do + local posId = ModuleManager.BattleManager:getPosId(r, c) + local entity = self.battleData:getGridEntity(posId) + if entity and entity:getIsIdle() then + self:fillThisPos(posId, self.fillColumnCount, self.fillGridMap, reverse) + end end end end @@ -1393,14 +1328,10 @@ function BattleBaseController:fillBoard(isRoundBeginCheck) end end - for c = 1, BattleConst.COLUMN_COUNT do - for r = BattleConst.ROW_COUNT, 1, -1 do - local posId = ModuleManager.BattleManager:getPosId(r, c) - local entity = self.battleData:getGridEntity(posId) - if #entity:getPath() > 0 then - self.fillBoardPathMap[posId] = entity:getPath() - entity:clearPath() - end + for posId, entity in pairs(self.battleData:getGridEnties()) do + if #entity:getPath() > 0 then + self.fillBoardPathMap[posId] = entity:getPath() + entity:clearPath() end end @@ -1431,21 +1362,26 @@ function BattleBaseController:onFillBoardOver(isRoundBeginCheck) end end - if self.onFillBoardOverCallback then - self.onFillBoardOverCallback() - end - if isRoundBeginCheck then EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BOARD_FILL_OVER) self:popBoardCacheSkill(function() self:generateSkill(function() self:enterElimination(true) + if self.onFillBoardOverCallback then + local callback = self.onFillBoardOverCallback + self.onFillBoardOverCallback = nil + callback() + end end) end) else self:generateSkill(function() self.battleUI:refreshSkill() - self:enterBattleStep() + if self.onFillBoardOverCallback then + local callback = self.onFillBoardOverCallback + self.onFillBoardOverCallback = nil + callback() + end end) end end @@ -1454,8 +1390,8 @@ function BattleBaseController:generateInstructions(skillEntity, elementType, lin self.instructions = BATTLE_INSTRUCTIONS_HELPER.generateInstructions(skillEntity, elementType, lineCount, influenceElementTypeMap, elementTypeMap, self) end - -function BattleBaseController:exeInstructions(callback) +function BattleBaseController:exeInstructions(callback, side) + side = side or self:getCurActionSide() if not self.instructions or #self.instructions <= 0 then callback() return @@ -1463,12 +1399,12 @@ function BattleBaseController:exeInstructions(callback) local instruction = table.remove(self.instructions) local func = BattleBaseController._doInstruction[instruction.name] if func then - func(self, instruction, function() + func(self, side, instruction, function() self.battleData:resetTimeSpeed() - self:exeInstructions(callback) + self:exeInstructions(callback, side) end) else - self:exeInstructions(callback) + self:exeInstructions(callback, side) end end @@ -1576,7 +1512,7 @@ end function BattleBaseController:generateSkill(callback) self.generateSkillMap = table.clearOrCreate(self.generateSkillMap) self.generateExcludeMap = table.clearOrCreate(self.generateExcludeMap) - for _, skillEntity in pairs(self.battleData:getSkillEntities()) do + for _, skillEntity in pairs(self:getSkillEntities()) do if skillEntity:getEnergyEnough() then local list = self:getSkillElementList(skillEntity:getPosition(), 1, true, self.generateExcludeMap) if list[1] then @@ -1605,14 +1541,14 @@ function BattleBaseController:generateSkill(callback) if callback then callback() end - end) + end, self.curActionSide) end function BattleBaseController:setGridSkillId(posId, skillId, noDirty) local entity = self.battleData:getGridEntity(posId) if entity then - entity:setSkilId(skillId, noDirty) - local skillEntity = self.battleData:getSkillEntityBySkillId(skillId) + entity:setSkilId(skillId, noDirty, self.curActionSide) + local skillEntity = self:getSkillEntityBySkillId(skillId) if skillEntity and entity:getElementType() ~= skillEntity:getPosition() then entity:setElementType(skillEntity:getPosition(), noDirty) end @@ -1727,6 +1663,14 @@ function BattleBaseController:lockElement(lcokElementType, isUnlock) end end +function BattleBaseController:getSkillElementListRow() + self.skillElementListRow = table.clearOrCreate(self.skillElementListRow) + local min, max = self:getCurActionBoardRowRange() + for row = min, max do + table.insert(self.skillElementListRow, row) + end + return self.skillElementListRow +end function BattleBaseController:getSkillElementList(elementType, count, useAlternate, excludeMap) self.getSkillElementListResult = table.clearOrCreate(self.getSkillElementListResult) @@ -1739,7 +1683,7 @@ function BattleBaseController:getSkillElementList(elementType, count, useAlterna self.getSkillElementListAlternateList = table.clearOrCreate(self.getSkillElementListAlternateList) local addCount = 0 - for row = 1, BattleConst.ROW_COUNT do + for _, row in ipairs(self:getSkillElementListRow()) do for column = 1, BattleConst.COLUMN_COUNT do local posId = ModuleManager.BattleManager:getPosId(row, column) local entity = gridEntities[posId] @@ -1791,13 +1735,18 @@ end ---- 从一个点直接遍历所有相关的路径 -function BattleBaseController:fillThisPos(posId, columnCount, gridMap) +function BattleBaseController:fillThisPos(posId, columnCount, gridMap, reverse) local entity = self.battleData:getGridEntity(posId) if not entity or not entity:getIsIdle() then return end - local list = BattleConst.UP_LINE_FILL_LIST[posId] + local list + if reverse then + list = BattleConst.DOWN_LINE_FILL_LIST[posId] + else + list = BattleConst.UP_LINE_FILL_LIST[posId] + end if not list[1] then -- 第一排 local rc = ModuleManager.BattleManager:getPosRC(posId) local c = rc.c @@ -1814,12 +1763,17 @@ function BattleBaseController:fillThisPos(posId, columnCount, gridMap) local newStartPosId for i = columnCount[c], 1, -1 do - newStartPosId = ModuleManager.BattleManager:getFirstLineLastRowPosId(i, c) - local curPos = ModuleManager.BattleManager:getPosInfo(newStartPosId) + if reverse then + newStartPosId = ModuleManager.BattleManager:getLastLineLastRowPosId(i, c, self:getRowCount()) + else + newStartPosId = ModuleManager.BattleManager:getFirstLineLastRowPosId(i, c) + end + + local curPos = self:getPosInfo(newStartPosId) fallEntity:addPath({x = curPos.x, y = curPos.y}) end - local curPos = ModuleManager.BattleManager:getPosInfo(posId) + local curPos = self:getPosInfo(posId) fallEntity:addPath({x = curPos.x, y = curPos.y}) self.battleData:exchangeGridEntities(posId, fallPosId) @@ -1835,20 +1789,20 @@ function BattleBaseController:fillThisPos(posId, columnCount, gridMap) end if not fallEntity:isCantFallType() then if fallEntity:getIsIdle() then - self:fillThisPos(fallPosId, columnCount, gridMap) + self:fillThisPos(fallPosId, columnCount, gridMap, reverse) end fallEntity = self.battleData:getGridEntity(fallPosId) if not fallEntity:getIsIdle() then if not fallEntity:getPath()[1] then - local curPos = ModuleManager.BattleManager:getPosInfo(fallPosId) + local curPos = self:getPosInfo(fallPosId) fallEntity:addPath({x = curPos.x, y = curPos.y}) end - local curPos = ModuleManager.BattleManager:getPosInfo(posId) + local curPos = self:getPosInfo(posId) fallEntity:addPath({x = curPos.x, y = curPos.y}) self.battleData:exchangeGridEntities(posId, fallPosId) - self:fillThisPos(fallPosId, columnCount, gridMap) + self:fillThisPos(fallPosId, columnCount, gridMap, reverse) return end end @@ -1870,7 +1824,7 @@ function BattleBaseController:getRandomGridInfo() self.getRandomGridInfoIndexs = table.clearOrCreate(self.getRandomGridInfoIndexs) self.getRandomGridInfoTypeList = table.clearOrCreate(self.getRandomGridInfoTypeList) for typeName, typeNum in pairs(BattleConst.ELEMENT_TYPE) do - if not self:getSealElementType()[typeNum] and self.battleData:getSkillEntityByElement(typeNum) then + if not self:getSealElementType()[typeNum] and self:getSkillEntityByElement(typeNum) then local weight = ((map[typeNum] or 0) + 1) * BattleConst.ELEMENT_WIGHT if weight > BattleConst.MAX_ELEMENT_WIGHT then weight = BattleConst.MAX_ELEMENT_WIGHT @@ -1908,7 +1862,7 @@ function BattleBaseController:findSkillInfluenceGrids() local entity = self.battleData:getGridEntity(info.posId) local skillId = entity:getSkillId() if skillId then - local skillEntity = self.battleData:getSkillEntityBySkillId(skillId) + local skillEntity = self:getSkillEntityBySkillId(skillId) if skillEntity then BATTLE_BOARD_SKILL_HANDLE.activeBoardSkill(info.posId, skillEntity, self.battleData:getGridEnties(), self.skillInfluenceGridsSequenceEntities, self) end @@ -1928,13 +1882,13 @@ function BattleBaseController:getRandomSkillList(getCount, onlyCommonSkill, excl self.randomSkillNewSkillPool = table.clearOrCreate(self.randomSkillNewSkillPool) self.randomSkillSkillWeight = table.clearOrCreate(self.randomSkillSkillWeight) local cfg = ConfigManager:getConfig("skill_rogue") - local skillPool = self.battleData:getSkillPool() + local skillPool = self:getSkillPool() local count = 0 if not onlyCommonSkill then for elementType, list in pairs(skillPool) do -- 先遍历一下未解锁的技能 - if not self.battleData:isUnlockedSkillElementType(elementType) then - local skillEntity = self.battleData:getSkillEntityByElement(elementType) + if not self:isUnlockedSkillElementType(elementType) then + local skillEntity = self:getSkillEntityByElement(elementType) if skillEntity then local skillId = skillEntity:getUnlockId() if skillId and not self.randomSkillMap[skillId] then @@ -1967,12 +1921,12 @@ function BattleBaseController:getRandomSkillList(getCount, onlyCommonSkill, excl end for elementType, list in pairs(skillPool) do - if self.battleData:isUnlockedSkillElementType(elementType) then + if self:isUnlockedSkillElementType(elementType) then for _, skillId in ipairs(list) do local skillCfg = cfg[skillId] - if skillCfg and (not skillCfg.limit_times or self.battleData:getSkillCount(skillId) < skillCfg.limit_times) then + if skillCfg and (not skillCfg.limit_times or self:getSkillCount(skillId) < skillCfg.limit_times) then - if not self.randomSkillMap[skillId] and (not skillCfg.unlock or self.battleData:getSkillCount(skillCfg.unlock) > 0) then + if not self.randomSkillMap[skillId] and (not skillCfg.unlock or self:getSkillCount(skillCfg.unlock) > 0) then table.insert(self.randomSkillNewSkillPool, skillId) table.insert(self.randomSkillSkillWeight, skillCfg.weight) count = count + 1 @@ -1996,7 +1950,7 @@ function BattleBaseController:getRandomSkillList(getCount, onlyCommonSkill, excl for skillId, info in pairs(cfg) do if not self:getNotInvolvedSkills()[skillId] then if info.universal then - if not info.limit_times or self.battleData:getSkillCount(skillId) < info.limit_times then + if not info.limit_times or self:getSkillCount(skillId) < info.limit_times then if not self.randomSkillMap[skillId] then table.insert(self.randomSkillNewSkillPool, skillId) table.insert(self.randomSkillSkillWeight, info.weight) @@ -2022,19 +1976,24 @@ function BattleBaseController:getRandomSkillList(getCount, onlyCommonSkill, excl return result end -function BattleBaseController:onSelectSkill(skillId, value, pos) - self.battleData:addSkillCount(skillId, value) - BATTLE_ROGUE_SKILL_HANDLE.takeEffect(skillId, self.battleData, self, value) +function BattleBaseController:dealSelectSkill(skillId, value, side) + side = side or self:getCurActionSide() + self.battleData:addSkillCount(skillId, value, side) + BATTLE_ROGUE_SKILL_HANDLE.takeEffect(skillId, self.battleData, self, value, side) - local skillEntities = self.battleData:getSkillEntities() + local skillEntities = self:getSkillEntities(side) for _, entity in pairs(skillEntities) do entity:gotUpSKill(skillId) end +end - BIReport:postFightSkillSelect(self.battleType, {skillId}, self.chapterId, self.totalDurationTime, self.waveIndex) +function BattleBaseController:onSelectSkill(skillId, value, pos, side) + side = side or self:getCurActionSide() + self:dealSelectSkill(skillId, value, side) + + BIReport:postFightSkillSelect(self.battleType, self.battleData, {skillId}, self.chapterId, self.totalDurationTime, self.waveIndex) local elementType = ModuleManager.HeroManager:getSkillRoguePosition(skillId) - if elementType then if self.battleUI then self.battleUI:gotOneSkillAni(skillId, elementType, function() @@ -2124,19 +2083,19 @@ function BattleBaseController:killRowOrColumn(infoList) end end -function BattleBaseController:addHeroAttr(attrName, value) +function BattleBaseController:addHeroAttr(attrName, value, side) if not self.battleData or not self.battleData.atkTeam then return end local attr = BUFF_NAME_TO_ATTR[attrName] if attr then - self.battleData.atkTeam:addAttr(attr[1], value, attr[2]) + self.battleData:getTeamBySide(side):addAttr(attr[1], value, attr[2]) else local func = BattleBuffHandle.addAttribute[attrName] if func then local unitComp - for matchType, comp in pairs(self.atkTeam:getUnitComp()) do + for matchType, comp in pairs(self:getCurActionTeam(side):getUnitComp()) do unitComp = comp break end @@ -2185,7 +2144,7 @@ function BattleBaseController:shuffleBoard(callback) else self.resetList = table.clearOrCreate(self.resetList) for posId, entity in pairs(self.battleData:getGridEnties()) do - if entity:isCanFallStatus() then + if self:getPosIdInCurActionBoardRowRange(posId) and entity:isCanFallStatus() then table.insert(self.resetList, entity) end end @@ -2234,9 +2193,9 @@ function BattleBaseController:getShuffleBoardInfo() end local anySkillCount = 0 for posId, entity in pairs(self.battleData:getGridEnties()) do - if entity:isCanFallStatus() then + if self:getPosIdInCurActionBoardRowRange(posId) and entity:isCanFallStatus() then if entity:getSkillId() then - local skillEntity = self.battleData:getSkillEntityBySkillId(entity:getSkillId()) + local skillEntity = self:getSkillEntityBySkillId(entity:getSkillId()) local elementType = skillEntity:getPosition() if skillEntity:getIgnoreElementType() then table.insert(self.shuffleBoardAnySkillList, entity) @@ -2373,7 +2332,8 @@ end function BattleBaseController:findAttention() local find = false - for r = 1, GConst.BattleConst.ROW_COUNT do + local min, max = self:getCurActionBoardRowRange() + for r = min, max do for c = 1, GConst.BattleConst.COLUMN_COUNT do local posId = ModuleManager.BattleManager:getPosId(r, c) local gridEntity = self.battleData:getGridEntity(posId) @@ -2509,7 +2469,7 @@ function BattleBaseController:resetGrids(posList) local elementCount = 0 for typeName, typeNum in pairs(BattleConst.ELEMENT_TYPE) do - if not lockElementMap[typeNum] and not self:getSealElementType()[typeNum] and self.battleData:getSkillEntityByElement(typeNum) then + if not lockElementMap[typeNum] and not self:getSealElementType()[typeNum] and self:getSkillEntityByElement(typeNum) then table.insert(self.canRandomElmentList, typeNum) elementCount = elementCount + 1 end @@ -2591,7 +2551,7 @@ function BattleBaseController:findLinkLine(posId, posIdMap, hadSkill, mainElemen local maxPosIdMap local maxGotSkill for aroundposId, _ in pairs(list) do - if not posIdMap[aroundposId] then + if self:getPosIdInCurActionBoardRowRange(aroundposId) and not posIdMap[aroundposId] then local gridEntity = self.battleData:getGridEntity(aroundposId) if gridEntity then if gridEntity:canLink() and not gridEntity:getSkillId() then @@ -2608,9 +2568,9 @@ function BattleBaseController:findLinkLine(posId, posIdMap, hadSkill, mainElemen maxGotSkill = gotSkill end end - elseif gridEntity:getSkillId() and not hadSkill and mainElementType then + elseif gridEntity:canLink() and gridEntity:getSkillId() and not hadSkill and mainElementType then local skillId = gridEntity:getSkillId() - local skillEntity = self.battleData:getSkillEntityBySkillId(skillId) + local skillEntity = self:getSkillEntityBySkillId(skillId) if skillEntity then if skillEntity:getIgnoreElementType() or skillEntity:getPosition() == mainElementType then local tempIdMap = GFunc.getTable(posIdMap) @@ -2646,7 +2606,7 @@ function BattleBaseController:findLinkLine(posId, posIdMap, hadSkill, mainElemen end function BattleBaseController:generateMonsterById(monsterId, callback) - local unitEntity = self.battleData:addMonster(monsterId, true) + local unitEntity = self.battleData:addMonster(monsterId, true, self) local modelId = unitEntity:getModelId() BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) self.defTeam:removeAllUnits() @@ -2752,6 +2712,7 @@ function BattleBaseController:clear() BattlePassive:clear() BattlePool:clear() self:unBindAll() + self.battleData:clear() self.battleData:resetTimeSpeed() ModuleManager.BattleManager:unscheduleAll() end @@ -2826,24 +2787,30 @@ function BattleBaseController:shakeScreen(shakeType, duration) self.battleUI:shakeScreen(shakeType, duration) end -local function _addCurRoundAttr(self, instruction, callback) +local function _addCurRoundAttr(self, side, instruction, callback) if instruction.effectList then - local defComp = self:getOtherSideMainUnit(BattleConst.SIDE_ATK) - local mainComp = self:getOtherSideMainUnit(BattleConst.SIDE_DEF) + local defComp = self.defTeam:getMainUnit() + local atkComp = self.atkTeam:getMainUnit() + local isAtkSide = side == SIDE_ATK + local actionComp = isAtkSide and atkComp or defComp for _, effect in ipairs(instruction.effectList) do local target if effect:getTargetSide() == BattleConst.SIDE_DEF then - target = defComp + target = isAtkSide and defComp or atkComp elseif effect:getTargetSide() == BattleConst.SIDE_ATK then - target = mainComp + target = isAtkSide and atkComp or defComp else local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTargetSide()] if matchType then - target = self.atkTeam:getUnitComp()[matchType] + if isAtkSide then + target = self.atkTeam:getUnitComp()[matchType] + else + target = self.defTeam:getUnitComp()[matchType] + end end end if target then - mainComp:takeEffect(effect, target) + actionComp:takeEffect(effect, target) end end end @@ -2851,16 +2818,28 @@ local function _addCurRoundAttr(self, instruction, callback) callback() end -local function _assisting(self, instruction, callback) - self.atkTeam:useAssistingSkill(instruction.assistingList, #self.instructions == 0, callback) +local function _assisting(self, side, instruction, callback) + local actionTeam = self.atkTeam + if side == SIDE_DEF then + actionTeam = self.defTeam + end + actionTeam:useAssistingSkill(instruction.assistingList, #self.instructions == 0, callback) end -local function _generalAttack(self, instruction, callback) - self.atkTeam:useNormalSkill(instruction.skillMatch, instruction.count, #self.instructions == 0, BattleConst.EFFECT_TYPE.DIRECT, BattleConst.ATTACK_ACTION_STATE.NORMAL, callback) +local function _generalAttack(self, side, instruction, callback) + local actionTeam = self.atkTeam + if side == SIDE_DEF then + actionTeam = self.defTeam + end + actionTeam:useNormalSkill(instruction.skillMatch, instruction.count, #self.instructions == 0, BattleConst.EFFECT_TYPE.DIRECT, BattleConst.ATTACK_ACTION_STATE.NORMAL, callback) end -local function _playSkill(self, instruction, callback) - self.atkTeam:useSkill(instruction.skillMatch, instruction.count, #self.instructions == 0, BattleConst.EFFECT_TYPE.DIRECT, BattleConst.ATTACK_ACTION_STATE.NORMAL, callback) +local function _playSkill(self, side, instruction, callback) + local actionTeam = self.atkTeam + if side == SIDE_DEF then + actionTeam = self.defTeam + end + actionTeam:useSkill(instruction.skillMatch, instruction.count, #self.instructions == 0, BattleConst.EFFECT_TYPE.DIRECT, BattleConst.ATTACK_ACTION_STATE.NORMAL, callback) end BattleBaseController._doInstruction = { diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index ceb0ec03..c71bfeb3 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -1,22 +1,6 @@ -local BattleHelper = require "app/module/battle/helper/battle_helper" -local BattleScheduler = require "app/module/battle/helper/battle_scheduler" -local BattleTeam = require "app/module/battle/team/battle_team" -local BattlePassive = require "app/module/battle/helper/battle_passive" -local BattlePool = require "app/module/battle/helper/battle_pool" -local BattleBuffEntity = require "app/userdata/battle/skill/battle_buff_entity" - -local BattleController = class("BattleController") - -local BATTLE_BOARD_SKILL_HANDLE = require "app/module/battle/skill/battle_board_skill_handle" -local BATTLE_ROGUE_SKILL_HANDLE = require "app/module/battle/skill/battle_rogue_skill_handle" -local BATTLE_GRID_EFFECT_HANDLE = require "app/module/battle/skill/battle_grid_effect_handle" -local BATTLE_INSTRUCTIONS_HELPER = require "app/module/battle/helper/battle_instructions_helper" -local BattleBuffHandle = require "app/module/battle/helper/battle_buff_handle" - -local ELIMINATION_TOUCH_EVENT = GConst.ELIMINATION_TOUCH_EVENT +local BattleBaseController = require "app/module/battle/controller/battle_base_controller" +local BattleController = class("BattleController", BattleBaseController) local BattleConst = GConst.BattleConst -local BUFF_NAME_TO_ATTR = BattleConst.BUFF_NAME_TO_ATTR -local GRID_BREAK_CONDITION = BattleConst.GRID_BREAK_CONDITION -- *************各个子模块的战斗需要重写的方法 START************* function BattleController:getBoardConfig() @@ -31,105 +15,6 @@ function BattleController:getChapterId() return 0 end -function BattleController:getInitBoard() - if not self.boradList then - self.boradList = {} - self.fixedRandomGrid = {} - self.mysteryBoxIndexMap = {} - - local config = self:getChapterConfig()[self.chapterId] - local boardCfg = self:getBoardConfig() - for _, boardId in ipairs(config.board) do - local cfg = boardCfg[boardId] - if cfg then - table.insert(self.boradList, {board = GFunc.getTable(cfg.board), mysteryBoard = GFunc.getTable(cfg.mystery_box_board)}) - table.insert(self.fixedRandomGrid, GFunc.getTable(cfg.control_element)) - end - end - end - - return self.boradList, self.fixedRandomGrid, self.mysteryBoxIndexMap -end - -function BattleController:getNotInvolvedSkills() - if not self.notInvolvedSkills then - self.notInvolvedSkills = {} - local config = self:getChapterConfig()[self.chapterId] - if config.not_involved_skill then - for _, skillId in ipairs(config.not_involved_skill) do - self.notInvolvedSkills[skillId] = true - end - end - end - - return self.notInvolvedSkills -end - -function BattleController:getFixedRogueSkill() - if not self.fixedRogueSkill then - self.fixedRogueSkill = {} - end - - return self.fixedRogueSkill -end - -function BattleController:getSealElementType() - if not self.sealElementType then - self.sealElementType = {} - local config = self:getChapterConfig()[self.chapterId] - if config.seal_element then - for _, elementType in ipairs(config.seal_element) do - self.sealElementType[elementType] = true - end - end - end - - return self.sealElementType -end - -function BattleController:getBuffs() - return {} -end - -function BattleController:handleBuffs(side) - for _, buffInfo in ipairs(self:getBuffs()) do - local buffEntity = buffInfo.buffEntity - local buffTargetSide = buffEntity:getTargetSide() - local target - if buffTargetSide == BattleConst.SIDE_DEF then - target = self.defTeam:getMainUnit() - elseif buffTargetSide == BattleConst.SIDE_ATK then - target = self.atkTeam:getMainUnit() - elseif buffTargetSide == BattleConst.SIDE_ATK_ALL then - if not side or side == buffTargetSide then - for matchtype, comp in pairs(self.atkTeam:getUnitComp()) do - local buffEntity = BattleBuffEntity:create() - buffEntity:init(buffInfo.effect, comp.unitEntity) - buffEntity:setTargetSide(buffTargetSide) - comp:takeEffect(buffEntity, comp) - end - end - else - local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[buffTargetSide] - if matchType then - target = self.atkTeam:getUnitComp()[matchType] - end - end - - if target then - if side then - if buffTargetSide == side then - buffEntity:setOwner(target) - target:takeEffect(buffEntity, target) - end - else - buffEntity:setOwner(target) - target:takeEffect(buffEntity, target) - end - end - end -end - -- 战斗对应的ui function BattleController:getBattleUIPath() return "app/ui/battle/battle_ui" @@ -145,12 +30,12 @@ end -- 怪物攻击力加成 function BattleController:getMonsterAtkAddition() - return BattleConst.DEFAULT_FACTOR + return 0 end -- 怪物血量加成 function BattleController:getMonsterHpAddition() - return BattleConst.DEFAULT_FACTOR + return 0 end -- 需要额外加载的资源 @@ -158,196 +43,6 @@ function BattleController:loadOtherRes(callback) return callback() end --- 一共有多少波 -function BattleController:getMaxWave() - local config = self:getChapterConfig()[self.chapterId] - if not config or not config.monster then - return 0 - end - return #config.monster -end - -function BattleController:getMinEliminationCount() - if not self.minEliminationCount then - self.minEliminationCount = GFunc.getConstIntValue("element_combo") - end - return self.minEliminationCount -end - -function BattleController:initDefUnits(callback) - local config = self:getChapterConfig()[self.chapterId] - self.battleUI:loadBg(config.scene) - local unitEntity = DataManager.BattleData:addMonster(config.monster[1]) - local modelId = unitEntity:getModelId() - BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) - local monsterComp = spineObject:addLuaComponent(GConst.BattleConst.TYPEOF_LUA_COMP.BATTLE_MONSTER_COMPONENT) - monsterComp:initWithEntity(modelId, unitEntity, self) - self.defTeam:addUnit(monsterComp, true) - self.battleUI:refreshDefHp(unitEntity:getHp(), unitEntity:getHpPercent()) - callback() - end) -end - -function BattleController:generateNextMonster() - local config = self:getChapterConfig()[self.chapterId] - local monsterId = config.monster[self.waveIndex + 1] - if monsterId == nil then - return self:enterNextWave() - end - local isBoss = self.defTeam:getIsBoss() - local unitEntity = DataManager.BattleData:addMonster(monsterId, true) - local modelId = unitEntity:getModelId() - BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) - self.defTeam:removeAllUnits() - local monsterComp = spineObject:addLuaComponent(GConst.BattleConst.TYPEOF_LUA_COMP.BATTLE_MONSTER_COMPONENT) - monsterComp:initWithEntity(modelId, unitEntity, self) - self.defTeam:addUnit(monsterComp, true) - self:handleBuffs(GConst.BattleConst.SIDE_DEF) - self.battleUI:refreshDefHp(unitEntity:getHp(), unitEntity:getHpPercent()) - local bornTime = monsterComp:getAnimationDuration(GConst.BattleConst.SPINE_ANIMATION_NAME.BORN) - if isBoss then -- 如果是boss就跑过去 - local count = 0 - local function onFinish() - count = count + 1 - if count == 2 then - self.atkTeam:stopRunAction() - self:onRoundEnd(true) - end - end - self.atkTeam:playRunAction() - self.atkTeam:recoverHpOnWaveOver(onFinish) - - isBoss = self.defTeam:getIsBoss() - if isBoss then - local monsterInfo = ConfigManager:getConfig("monster")[monsterId] - self.battleUI:showBossEnterAni(bornTime, ModuleManager.HeroManager:getMonsterName(monsterInfo.monster_base), monsterComp, function() - monsterComp:playEnterBattlefield(true, onFinish) - end) - else - monsterComp:playEnterBattlefield(true, onFinish) - end - else - local count = 0 - local function onFinish() - count = count + 1 - if count == 2 then - self:onRoundEnd(true) - end - end - self.atkTeam:recoverHpOnWaveOver(onFinish) - - isBoss = self.defTeam:getIsBoss() - if isBoss then - local monsterInfo = ConfigManager:getConfig("monster")[monsterId] - self.battleUI:showBossEnterAni(bornTime, ModuleManager.HeroManager:getMonsterName(monsterInfo.monster_base), monsterComp, function() - monsterComp:playEnterBattlefield(false, onFinish) - end) - else - monsterComp:playEnterBattlefield(false, onFinish) - end - end - end) -end - -function BattleController:findNextDefUnit() - self:generateNextMonster() -end - -function BattleController:onDefDead(callback) - self.defTeam:getMainUnit():playDead(function() - local monsterId = self.defTeam:getMainUnit().unitEntity:getDeathSummon() - if monsterId > 0 then - self:generateMonsterById(monsterId, function() - if callback then - callback() - end - self:handleBuffs(BattleConst.SIDE_DEF) - end) - else - if callback then - callback() - end - end - end) -end - -function BattleController:tick(dt) -end - -function BattleController:onLinkChange() - self.battleUI:hideAllSfxLine() - self.linkChangeNeedFalsePosMap = table.clearOrCreate(self.linkChangeNeedFalsePosMap) - for posId, entity in pairs(self.battleData:getGridEnties()) do - if entity:getCell() then - self.linkChangeNeedFalsePosMap[posId] = entity:getCell() - end - end - - local sequence = self.battleData:getGridSequence() - local mainElementType - - for index, info in ipairs(sequence) do - local entity = self.battleData:getGridEntity(info.posId) - if not mainElementType then - local skillId = entity:getSkillId() - if not skillId then - mainElementType = entity:getElementType() - break - end - end - end - - local count = #sequence - - for index, info in ipairs(sequence) do - local entity = self.battleData:getGridEntity(info.posId) - if entity:getCell() then - entity:getCell():showHighLight(true, mainElementType, self.battleUI) - end - if self.linkChangeNeedFalsePosMap[info.posId] then - self.linkChangeNeedFalsePosMap[info.posId] = nil - end - if index < count then - local nextPosId = sequence[index + 1].posId - self.battleUI:getSfxLine(index, function(obj) - local curPos = ModuleManager.BattleManager:getPosInfo(info.posId) - local nextPos = ModuleManager.BattleManager:getPosInfo(nextPosId) - local pos, z = ModuleManager.BattleManager:getPosCenterAndDir(curPos, nextPos) - obj:setLocalScale(25, 25, 25) - obj:setLocalPosition(pos.x, pos.y, 0) - obj:setEulerAngles(0, 0, z) - end) - end - if index == count then - if entity:getCell() then - entity:getCell():showAni() - end - end - end - - for posId, cell in pairs(self.linkChangeNeedFalsePosMap) do - cell:showHighLight(false) - end - - for posId, info in pairs(self.battleData:getSkillInfluenceGrids()) do - local entity = self.battleData:getGridEntity(posId) - if info.direction ~= BattleConst.BOARD_RANGE_TYPE.RANDOM then - if entity:getCell() then - entity:getCell():showCircle(true) - end - end - end - - if not self.atkTeam:getMainUnit().unitEntity:getActiveSkillLimit() then - local aniSequence, influenceElementType, lineCount, elementTypeMap, linkElementType = self:calculateCurElimination(true) - self.battleUI:refreshSkill(elementTypeMap, count > 0) - end - - if mainElementType then - self.atkTeam:changeMainUnit(mainElementType) - end -end - function BattleController:postWaveOver(atkDead, isQuit) end @@ -356,2526 +51,9 @@ function BattleController:postFightStart() end -function BattleController:onEliminationBegin() - -end - ----- 障碍格子图片 -function BattleController:getBlockIcon() - local chapterInfo = self:getChapterConfig()[self.chapterId] - if not chapterInfo then - return "battle_hinder_4" - end - return chapterInfo.block_icon -end - -function BattleController:getChessBoardBgName() - local chapterInfo = self:getChapterConfig()[self.chapterId] - if not chapterInfo then - return "chessboard_1" - end - return chapterInfo.chess_board -end - -function BattleController:refreshWave() - if not self.battleUI then - return - end - self.battleUI:refreshWave(self.waveIndex) -end - -- *************各个子模块的战斗需要重写的方法 END************* - function BattleController:ctor() self.battleData = DataManager.BattleData end -function BattleController:init(params) - params = params or {} - self.battleType = params.battleType or GConst.BattleConst.BATTLE_TYPE.STAGE - self.waveDurationTime = 0 - self.totalDurationTime = 0 - self.eliminateCount = 0 - self.eliminateTotalCount = 0 - self.maxLinkCount = 0 - self.realTime = 0 - self.taskProgress = {} - self.waveRoundCount = {} - self.lastRoundBreakedGridType = {} - self.waitingFillCount = 0 - self.needWaitingBoardOver = nil - self.curWaveMonsterDead = false - - self.chapterId = self:getChapterId() - self.waveIndex = 0 - self.maxWaveIndex = self:getMaxWave() - self.victory = false - self.roundStep = BattleConst.BATTLE_ROUND_STEP.WAIT_BEGIN - self.effectTexts = {} - self.instructions = {} - self.gotMysteryBoxIndexs = {} - self.showMysteryBoxIndexs = {} - self.delayEffectTextList = {} - self.delayEffectTextCount = 0 - self.time = 0 - self.battleData:init(params) - BattleScheduler:init() - BattlePool:init() - BattleHelper:init() - BattlePassive:init() - self:setTimeScale(DataManager.BattleData:getTimeScale()) - self:bindData() - self:initBattleTeam() - self:initOther() - self:prepareFight() -end - -function BattleController:bindData() - DataManager.BattleData:bind("timeSpeed", ModuleManager.BattleManager, function() - self:setTimeScale(DataManager.BattleData:getTimeScale()) - end, false) -end - -function BattleController:unBindAll() - DataManager.BattleData:unBind("timeSpeed", ModuleManager.BattleManager) -end - -function BattleController:initBattleTeam() - self.atkTeam = BattleTeam:create() - self.atkTeam:init(BattleConst.SIDE_ATK, self) - self.defTeam = BattleTeam:create() - self.defTeam:init(BattleConst.SIDE_DEF, self) -end - -function BattleController:setIsPauseHpProgress(value) - self.battleUI:setIsPauseHpProgress(value) -end - -function BattleController:moveBattlefield(time) - self.battleUI:moveBattlefield(time) -end - -function BattleController:refreshBuff(side, buffList) - self.battleUI:refreshBuff(side, buffList) -end - -function BattleController:clearBuff(side) - self.battleUI:clearBuff(side) -end - -function BattleController:showBuffTips(side, autoClose) - if side == BattleConst.SIDE_ATK then - local buffList = self.atkTeam:getBuffList() - if #buffList <= 0 then - return - end - self.battleUI:showLeftBuffTips(buffList, autoClose) - else - local buffList = self.defTeam:getBuffList() - if #buffList <= 0 then - return - end - self.battleUI:showRightBuffTips(buffList, autoClose) - end -end - -function BattleController:showCombo(count) - self.battleUI:showCombo(count) -end - -function BattleController:hideCombo() - self.battleUI:hideCombo() -end - -function BattleController:showCounterAttack(count, side) - self.battleUI:showCounterAttack(count, side) -end - -function BattleController:hideCounterAttack() - self.battleUI:hideCounterAttack() -end - -function BattleController:prepareFight() - local count = 0 - local totalCount = 3 - local function onPreloadFinished() - count = count + 1 - if count == totalCount then - self:onLoadComplete() - end - end - UIManager:closeAllUI() - self.battleUI = UIManager:showUI(self:getBattleUIPath(), {battleController = self}) - self.battleUI:addLoadUICompleteListener(function() - BattleHelper:setEffectTextCache(self.battleUI:getBattleNumberRed(), - self.battleUI:getBattleNumberGreen(), - self.battleUI:getBattleNumberBlue(), - self.battleUI:getBattleNumberWhite(), - self.battleUI:getBattleNumberSpecial()) - self:initAtkUnits(onPreloadFinished) - self:initDefUnits(onPreloadFinished) - self.battleUI:refreshChessBoard(self:getChessBoardBgName()) - end) - BattleHelper:setBaseOrder(self.battleUI:getUIOrder()) - self:loadOtherRes(onPreloadFinished) -end - -function BattleController:initAtkUnits(callback) - local atkTeamEntity = self.battleData:getAtkTeam() - local count = 0 - local totalCount = atkTeamEntity:getMembersCount() - local function onloadFinished() - count = count + 1 - if count == totalCount then - self.battleUI:refreshAtkHp(atkTeamEntity:getHp(), atkTeamEntity:getHpPercent()) - callback() - end - end - local members = atkTeamEntity:getAllMembers() - for k, v in pairs(members) do - local modelId = v:getModelId() - BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) - local heroComp = spineObject:addLuaComponent(BattleConst.TYPEOF_LUA_COMP.BATTLE_HERO_COMPONENT) - heroComp:initWithEntity(modelId, v, self) - if v:getIsMainUnit() then - self.atkTeam:addUnit(heroComp, true) - else - self.atkTeam:addUnit(heroComp) - heroComp:hideOutsideScreen() - end - onloadFinished() - end) - end - if totalCount == 0 then - callback() - end -end - -function BattleController:refreshHp(side, num, percent) - if side == BattleConst.SIDE_ATK then - self.battleUI:refreshAtkHp(num, percent) - else - self.battleUI:refreshDefHp(num, percent) - end -end - -function BattleController:getOtherSideMainUnit(side) - if side == BattleConst.SIDE_ATK then - return self.defTeam:getMainUnit() - else - return self.atkTeam:getMainUnit() - end -end - -function BattleController:getOtherSideTeam(side) - if side == BattleConst.SIDE_ATK then - return self.defTeam - else - return self.atkTeam - end -end - -function BattleController:onLoadComplete() - UIManager:closeLoading() - self:handleBuffs() - self:battleStart() -end - -function BattleController:battleStart() - self.atkTeam:prepare() - self.defTeam:prepare() - self.isBattleStart = true - self.tickSid = BattleScheduler:scheduleGlobal(function(dt, originDt) - self:_tick(dt, originDt) - end, 0) - self:enterNextWave() -end - -function BattleController:addTimeSpeed() - if self.skillSlowDownDuration then - return - end - DataManager.BattleData:addTimeSpeed() -end - -function BattleController:resetTimeSpeed(isDeadReset) - if isDeadReset then - if self.skillSlowDownDuration then - return - end - end - - DataManager.BattleData:resetTimeSpeed() - if self.skillSlowDownDuration then - self.skillSlowDownDuration = nil - end -end - -function BattleController:setSkillSlowDown(timeScale, duration) - self.skillSlowDownDuration = duration - DataManager.BattleData:setSkillTimeSpeed(timeScale) -end - -function BattleController:setTimeScale(timeScale) - GFunc.setDOTweenTimeScale(GConst.DOTWEEN_IDS.BATTLE, timeScale) - BattleScheduler:setTimeScale(timeScale) - BattleHelper:setTimeScale(timeScale) -end - -function BattleController:_findNextDefUnit() - if self.isBossWave then -- 如果上一波是boss波次,则重新生成棋盘 - self:putBoardCacheSkill(function() - self.atkTeam:onRoundEnd() - self:findNextDefUnit() - self:generateBoard() - end) - else - self.atkTeam:onRoundEnd() - self:findNextDefUnit() - end -end - ----- start 回合步骤 - -function BattleController:enterNextWave() - if self.waveIndex ~= 0 and self.curWaveMonsterDead then - if self.isBossWave then - self:addTaskProgress(BattleConst.BATTLE_TASK_FIELD.KILL_BOSS, 1) - else - self:addTaskProgress(BattleConst.BATTLE_TASK_FIELD.KILL_NORMAL_MONSTER, 1) - end - self:setTaskProgress(BattleConst.BATTLE_TASK_FIELD.PASS_WAVE, self.waveIndex) - end - - if self.waveIndex >= self.maxWaveIndex then - self.victory = self.curWaveMonsterDead - self:postWaveOver(not self.curWaveMonsterDead) - self:battleEnd() - return - end - - local atkTeam = self.battleData:getAtkTeam() - if not atkTeam or atkTeam:getIsDead() then - self.victory = false - self:postWaveOver(true) - self:battleEnd() - return - end - - if self.waveIndex ~= 0 then -- 第一波 - self:postWaveOver(false) - end - - self.curWaveMonsterDead = false - self.waveIndex = self.waveIndex + 1 - self:refreshWave(self.waveIndex) - if self.waveIndex == 1 then -- 第一波 - self.needWaitingBoardOver = true - self:generateBoard(true) - else - -- 上报关卡结束 - self.defTeam:prepare() - end - - self.waveDurationTime = 0 - self.eliminateCount = 0 - - self.isBossWave = self.defTeam:getMainUnit().unitEntity:getIsBoss() - self:postFightStart() - if not self.needWaitingBoardOver then - self:enterRoundBegin() - end - if not self.isBossWave then - self.battleUI:hideBuffTips() - end -end - -function BattleController:enterRoundBegin() - self.needWaitingBoardOver = nil - self.waveRoundCount[self.waveIndex] = (self.waveRoundCount[self.waveIndex] or 0) + 1 - -- self:takeGridEffect() - self:enterEliminationBegin() - table.clear(self.lastRoundBreakedGridType) -end - -function BattleController:takeGridEffect() - local gridEntities = self.battleData:getGridEnties() - local effectGrid = {} - for posId, entity in pairs(gridEntities) do - if entity:getEffectType() then - table.insert(effectGrid, entity) - end - end - - effectGrid = table.shuffle(effectGrid) - local availableEffectTypeMap - for _, entity in ipairs(effectGrid) do - local effectType = entity:getEffectType() - if effectType ~= BattleConst.GRID_EFFECT_TYPE.CROSS_MOVE_NOT_BREAK and (not availableEffectTypeMap or not availableEffectTypeMap[effectType]) then - local succ = BATTLE_GRID_EFFECT_HANDLE.gridEffectOn(entity:getPosId(), gridEntities, BattleConst.GRID_EFFECT_TRIGGER_TYPE.ON_ROUND_BEGIN, self) - if succ and (effectType == BattleConst.GRID_EFFECT_TYPE.CROSS_SPREAD or - effectType == BattleConst.GRID_EFFECT_TYPE.CROSS_SPREAD_NOT_BREAK) then - if not availableEffectTypeMap then - availableEffectTypeMap = {} - end - availableEffectTypeMap[effectType] = true - end - end - end - - for _, entity in ipairs(effectGrid) do -- gridEffect == 6的最后处理 - local effectType = entity:getEffectType() - if effectType == BattleConst.GRID_EFFECT_TYPE.CROSS_MOVE_NOT_BREAK and (not availableEffectTypeMap or not availableEffectTypeMap[effectType]) then - local succ = BATTLE_GRID_EFFECT_HANDLE.gridEffectOn(entity:getPosId(), gridEntities, BattleConst.GRID_EFFECT_TRIGGER_TYPE.ON_ROUND_BEGIN, self) - if succ then - if not availableEffectTypeMap then - availableEffectTypeMap = {} - end - availableEffectTypeMap[effectType] = true - end - end - end -end - -function BattleController:enterEliminationBegin() - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_BEGIN - self:onEliminationBegin() - self:enterRefreshBoard(true) -end - -function BattleController:enterElimination(needDelay) - if self.showSelectSkillSid then - ModuleManager.BattleManager:unscheduleGlobal(self.showSelectSkillSid) - self.showSelectSkillSid = nil - end - - if self.battleData:useAddlvCount() then - self:tryShowSelectSkillComp(needDelay) - return - end - - self.battleUI:hideAllBoardSfxs() - - -- 检查棋盘 - local find, pathList = self:findAttention() - if not find then -- 如果没找到,就要打乱棋盘 - self:shuffleBoard(function() - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION - end) - else - self.attentionList = pathList - -- ModuleManager.BattleManager:performWithDelayGlobal(function() - -- for _, posId in ipairs(pathList) do - -- local entity = self.battleData:getGridEntity(posId) - -- if entity and entity:getCell() then - -- entity:getCell():showAni() - -- end - -- end - -- end, 2) - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION - end -end - -function BattleController:enterBattleStep() - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_TEAM_ACTION - if not self.battleTeamActionList then - self.battleTeamActionList = {} - else - for i = #self.battleTeamActionList, 1, -1 do - self.battleTeamActionList[i] = nil - end - end - - local atkAction = function() - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ATK_STEP - self:exeInstructions(function() - self:enterNextTeamAction() - end) - end - - local defAction = function() - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_DEF_STEP - self.defTeam:mainUnitUseAllSkills(BattleConst.ATTACK_ACTION_STATE.NORMAL, function() - self:enterNextTeamAction() - end) - end - - if self.battleData:getAtkTeam():getFirstHand() < self.battleData:getDefTeam():getFirstHand() then - self:addTeamActionList(defAction, 1) - self:addTeamActionList(atkAction, 2) - else - self:addTeamActionList(atkAction, 1) - self:addTeamActionList(defAction, 2) - end - - self:enterNextTeamAction() -end - -function BattleController:addTeamActionList(func, index) - if not self.battleTeamActionList then - self.battleTeamActionList = {} - end - - index = index or 1 - table.insert(self.battleTeamActionList, index, func) -end - -function BattleController:enterNextTeamAction() - self.atkTeam:onActionOver() - self.defTeam:onActionOver() - - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_TEAM_ACTION_OVER - self:hideCombo() - self:hideCounterAttack() - - if self:checkTeamIsDead(function() self:enterRoundEnd() end) then - return - end - - if not self.battleTeamActionList or not self.battleTeamActionList[1] then - self:enterRoundEnd() - return - end - - local action = table.remove(self.battleTeamActionList, 1) - action() -end - -function BattleController:checkTeamIsDead(callback) - local defTeam = self.battleData:getDefTeam() - if not defTeam or defTeam:getIsDead() then -- 怪物死了, 直接进入刷新逻辑 - self.curWaveMonsterDead = true - self:onDefDead(function() - self.defTeam:removeAllBuff() - if self.battleData:getDefTeam():getIsDead() then - if self.waveIndex >= self.maxWaveIndex then - if callback() then - callback() - end - else - self:_findNextDefUnit() - end - else - if callback() then - callback() - end - end - end) - return true - end - - local atkTeam = self.battleData:getAtkTeam() - if not atkTeam or atkTeam:getIsDead() then -- 英雄死了, 直接结算 - self:enterNextWave() - return true - end - - return false -end - -function BattleController:getIsAtkStep() - return self.roundStep == BattleConst.BATTLE_ROUND_STEP.ON_ATK_STEP -end - -function BattleController:enterRefreshBoard(isRoundBeginCheck, callback) - if not isRoundBeginCheck then - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_REFRESH_BOARD - end - self.onFillBoardOverCallback = callback - self.isRoundBeginCheck = isRoundBeginCheck - if self.isRoundBeginCheck and self.waitingFillCount > 0 then - self.isWaitingFill = true - return - end - - self:fillBoard(self.isRoundBeginCheck) -end - -function BattleController:enterRoundEnd() - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_END - local defTeam = self.battleData:getDefTeam() - if not defTeam or defTeam:getIsDead() then -- 怪物死了, 直接进入刷新逻辑 - self.curWaveMonsterDead = true - self.atkTeam:onRoundEnd() - self:enterNextWave() - return - end - - local atkTeam = self.battleData:getAtkTeam() - if not atkTeam or atkTeam:getIsDead() then -- 英雄死了, 直接结算 - self.defTeam:onRoundEnd() - self:enterNextWave() - return - end - - self.atkTeam:onRoundEnd() - self.defTeam:onRoundEnd() - - if self:checkTeamIsDead(function() self:enterNextWave() end) then - return - end - - self:onRoundEnd() -end - -function BattleController:onRoundEnd(toNextWave) - if toNextWave then - self:enterNextWave() - else - self:enterRoundBegin() - end -end - ----- end回合步骤 - -function BattleController:onTouchEvent(eventType, posId, isVirtual) - if self.roundStep ~= BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION then - return - end - local entity = self.battleData:getGridEntity(posId) - if not entity or not entity:canLink() then - return - end - - if eventType == ELIMINATION_TOUCH_EVENT.DOWN then - self:onLinkStart(entity, posId, isVirtual) - elseif eventType == ELIMINATION_TOUCH_EVENT.ENTER then - if self.battleData:getIsVirtual() and not isVirtual then - return - end - - self:onLinkEnter(entity, posId, isVirtual) - elseif eventType == ELIMINATION_TOUCH_EVENT.EXIT then - - else -- 取消和抬起 - self:onLinkCancelOrUp(entity, posId, isVirtual) - end -end - -function BattleController:onLinkStart(entity, posId, isVirtual) - if DataManager.TutorialData:getIsInTutorial() then - local elementList = DataManager.TutorialData:getTargetElement() - if elementList then - local find = false - for _, curPosId in ipairs(elementList) do - if curPosId == posId then - find = true - break - end - end - if not find then - return - end - end - end - - if not isVirtual then - self.battleUI:showTutorialFinger() - end - if #self.battleData:getGridSequence() > 0 then - self:clearGridSequence() - end - self.battleData:insertGridSequence(posId, self:snapshotBoard(), isVirtual) - local skillEntity = self.battleData:getSkillEntityBySkillId(entity:getSkillId()) - local maskElementType = entity:getElementType(skillEntity) - self.battleUI:showBoardMask(maskElementType, skillEntity and entity:getPosId()) - self:findSkillInfluenceGrids() - self:onLinkChange() - - if not isVirtual then - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_BO_1) - if skillEntity then - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_SKILL) - end - end -end - -function BattleController:onLinkEnter(entity, posId, isVirtual) - local sequence = self.battleData:getGridSequence() - local sequenceCount = #sequence - local info = sequence[sequenceCount] - local lastPosId = info and info.posId - if not lastPosId then - return - end - local outLineMap = BattleConst.GRID_OUT_LINE_POS_ID[lastPosId] - if not outLineMap or not outLineMap[posId] then - return - end - - if self.battleData:alreadyInsertSequence(posId) then - local info = sequence[#sequence - 1] - local beforePosId = info and info.posId - if beforePosId == posId then -- 进入的是倒数第二个,则移除倒数第一个 - local snapshot = self.battleData:removeGridSequence(lastPosId) - if snapshot then -- 如果有快照,则恢复一次 - for posId, info in pairs(snapshot) do - self.battleData:setInfoBySnapshop(posId, info) - end - end - - local lastEntity = self.battleData:getGridEntity(beforePosId) - local lastSkillEntity = self.battleData:getSkillEntityBySkillId(lastEntity:getSkillId()) - local maskElementType = lastEntity:getElementType(lastSkillEntity) - - local _, skillPosId = self.battleData:getSequenceHadSkill() - self.battleUI:showBoardMask(maskElementType, skillPosId) - - self:findSkillInfluenceGrids() - self:onLinkChange() - end - return - end - - local skillId = entity:getSkillId() - local skillEntity = self.battleData:getSkillEntityBySkillId(skillId) - local elementType = entity:getElementType(skillEntity) - - local lastEntity = self.battleData:getGridEntity(lastPosId) - local lastSkillId = lastEntity:getSkillId() - local lastSkillEntity = self.battleData:getSkillEntityBySkillId(lastSkillId) - local lastElementType = lastEntity:getElementType(lastSkillEntity) - - local hadSkillId, skillPosId = self.battleData:getSequenceHadSkill() - if skillEntity and hadSkillId then - return - end - - if not elementType or not lastElementType then - else - if lastElementType ~= elementType then - return - end - end - - local maskElementType = elementType or lastElementType - if not skillPosId then - if skillId then - skillPosId = posId - end - end - self.battleUI:showBoardMask(maskElementType, skillPosId) - - self.battleData:insertGridSequence(posId, self:snapshotBoard(), isVirtual) - if lastEntity:getNeedChangePos() and not entity:getNeedChangePos() then -- 需要移动到队列末尾 - local lastSkillId = lastEntity:getSkillId() - local skillId = entity:getSkillId() - self:setGridSkillId(lastPosId, skillId) - self:setGridSkillId(posId, lastSkillId) - end - - local newElementType = elementType or lastElementType - if newElementType then - entity:setElementType(newElementType) - lastEntity:setElementType(newElementType) - end - - entity:addLinkSkillCount() - - self:findSkillInfluenceGrids() - self:onLinkChange() - - if not isVirtual then - if sequenceCount + 1 == self:getMinEliminationCount() then - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_READY) - end - AudioManager:playEffect(AudioManager:getBoEffectID(sequenceCount + 1)) - if skillEntity then - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_SKILL) - end - end -end - -function BattleController:onLinkCancelOrUp(entity, posId, isVirtual) - if isVirtual then - return - end - - local tutorialElementList - if DataManager.TutorialData:getIsInTutorial() then - tutorialElementList = DataManager.TutorialData:getTargetElement() - end - - self.battleUI:showBoardMask(nil) - local sequence = self.battleData:getGridSequence() - local count = #sequence - if count < self:getMinEliminationCount() then - self:clearGridSequence() - - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_CANCEL) - if tutorialElementList then - self.battleUI:showTutorialFinger(tutorialElementList) - end - return - end - - AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_OVER) - - if tutorialElementList then - local posIdmap = {} - for _, info in ipairs(sequence) do - posIdmap[info.posId] = true - end - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ELIMINATION_OVER, posIdmap) - else - self:onLinkOver() - end -end - -function BattleController:clearGridSequence() - local sequence = self.battleData:getGridSequence() - local count = #sequence - if count <= 0 then - self.battleData:clearGridSequence() - self:onLinkChange() - return - end - - local snapshot = self.battleData:getFirstSequenceSnapshot() - if snapshot then -- 如果有快照,则恢复一次 - for posId, info in pairs(snapshot) do - self.battleData:setInfoBySnapshop(posId, info) - end - end - - self.battleData:clearGridSequence() - self:onLinkChange() -end - -function BattleController:onLinkOver() - self.battleUI:hideAllSfxLine() - local sequence = self.battleData:getGridSequence() - local count = #sequence - if count < self:getMinEliminationCount() then - return - end - - local skillId = self.battleData:getSequenceHadSkill() - local skillEntity - if skillId then - skillEntity = self.battleData:getSkillEntityBySkillId(skillId) - self:addTaskProgress(BattleConst.BATTLE_TASK_FIELD.BOARD_SKILL_RELEASE_COUNT, 1) - end - - local aniSequence, influenceElementTypeMap, lineCount, elementTypeMap, linkElementType, effectGridMap = self:calculateCurElimination() - - if not self.atkTeam:getMainUnit().unitEntity:getActiveSkillLimit() then - self.battleData:addSkillEnergy(elementTypeMap) - end - self.battleData:clearGridSequence() - self.battleUI:disableUITouch() - self.battleUI:eliminationAni(aniSequence, effectGridMap, function() - self:enterRefreshBoard(nil, function() - self:generateInstructions(skillEntity, linkElementType, lineCount, influenceElementTypeMap, elementTypeMap) - end) - end) - - self.eliminateCount = self.eliminateCount + 1 - self.eliminateTotalCount = self.eliminateTotalCount + 1 - if count > self.maxLinkCount then - self.maxLinkCount = count - end -end - -function BattleController:calculateCurElimination(onlyCheck) - local sequence = self.battleData:getGridSequence() - local skillId = self.battleData:getSequenceHadSkill() - local skillEntity - if skillId then - skillEntity = self.battleData:getSkillEntityBySkillId(skillId) - end - self.breakedMap = table.clearOrCreate(self.breakedMap) - self.boomGridIds = table.clearOrCreate(self.boomGridIds) - self.sequenceMap = table.clearOrCreate(self.sequenceMap) - self.aniSequence = table.clearOrCreate(self.aniSequence) - for idx, info in ipairs(sequence) do - self.sequenceMap[info.posId] = idx - end - - local time = 0 - local skillTime = BattleConst.SKILL_ELIMINATION_TIME - for idx, info in ipairs(sequence) do - local posId = info.posId - self:dealGridBreak(posId, GRID_BREAK_CONDITION.LINE, time, self.breakedMap, self.sequenceMap, self.aniSequence, self.boomGridIds, onlyCheck) - time = time + BattleConst.ELIMINATION_INTERVAL - end - - local randomPosList, influenceElementTypeMap - for i, info in ipairs(self.aniSequence) do - if info.isSkill and skillEntity then - randomPosList, influenceElementTypeMap = self:dealSkillElement(info.timeIdx + skillTime, self.breakedMap, self.sequenceMap, self.aniSequence, self.boomGridIds, onlyCheck) - local aniUnit = self.aniSequence[i] - if not BattleConst.NO_EFFECT_GRID_SKILL_TYPE[skillEntity:getSkillType()] then - aniUnit.rangeList = skillEntity:getBoardRange() - aniUnit.randomPosList = randomPosList - end - break - end - end - - self.elementTypeMap = table.clearOrCreate(self.elementTypeMap) - self.effectGridMap = table.clearOrCreate(self.effectGridMap) - local linkElementType - local lineCount = 0 - local gridEntities = self.battleData:getGridEnties() - for _, info in ipairs(self.aniSequence) do - local entity = gridEntities[info.posId] - local elementType = entity:getElementType() - if not info.noAni and info.isIdle then - if not info.isSkill then - if not entity:isElmentTypeInvalid() then - self.elementTypeMap[elementType] = (self.elementTypeMap[elementType] or 0) + 1 - end - if self.boomGridIds[info.posId] and self.boomGridIds[info.posId][GRID_BREAK_CONDITION.LINE] then - lineCount = lineCount + 1 - linkElementType = elementType - end - end - end - if entity:getEffectType() and info.isIdle then - self.effectGridMap[info.posId] = true - end - end - - return self.aniSequence, influenceElementTypeMap, lineCount, self.elementTypeMap, linkElementType, self.effectGridMap -end - -function BattleController:dealGridBreak(posId, condition, time, breakedMap, sequenceMap, aniSequence, gridMap, onlyCheck) - self:setGridBreakCondition(gridMap, posId, condition) - if breakedMap[posId] or (sequenceMap[posId] and condition ~= GRID_BREAK_CONDITION.LINE) then - return - end - - local gridEntities = self.battleData:getGridEnties() - local entity = gridEntities[posId] - local breaked, isIdle = entity:tryBreakGrid(condition, true) - local aniUnit = self:getEliminattionAniInfo(posId, time) - aniUnit.noAni = entity:isElmentTypeInvalid() - aniUnit.isIdle = isIdle - if entity:getSkillId() then - aniUnit.isSkill = true - end - - if breaked or entity:canBreakByThisCondition(condition) then - breakedMap[posId] = true - - aniUnit.breakSfxName = entity:getBreakSfx() - aniUnit.callback = function() - self.lastRoundBreakedGridType[entity:getGridType()] = true - entity:tryBreakGrid(condition) - end - - table.insert(aniSequence, aniUnit) - end - - if isIdle then - if condition == GRID_BREAK_CONDITION.LINE then - local outline = BattleConst.UP_DOWN_LEFT_RIGHT[posId] - for _, id in ipairs(outline) do - self:dealGridBreak(id, GRID_BREAK_CONDITION.AROUND, time, breakedMap, sequenceMap, aniSequence, gridMap, onlyCheck) - end - end - if entity:getEffectType() then - local succ, list = BATTLE_GRID_EFFECT_HANDLE.gridEffectOn(posId, gridEntities, BattleConst.GRID_EFFECT_TRIGGER_TYPE.ON_GRID_BREAK, self, onlyCheck) - if list then - aniUnit.aniPosList = table.clearOrCreate(aniUnit.aniPosList) - aniUnit.overCallback = aniUnit.callback - aniUnit.callback = nil - for index, id in ipairs(list) do - if id ~= posId then - local timeIdx = time + BattleConst.GRID_BREAK_EFFECT_INTERVAL * (index - 1) -- 因为第一个是自己,所以-1 - self:dealGridBreak(id, GRID_BREAK_CONDITION.SKILL, timeIdx, breakedMap, sequenceMap, aniSequence, gridMap, onlyCheck) - table.insert(aniUnit.aniPosList, id) - end - end - - ---- 技能效果特效 - aniUnit.effectSfxName = entity:getEffectSfx() - aniUnit.effectSfxFlow = entity:getEffectSfxFlow() - aniUnit.effectSfxDir = entity:getEffectParams()[1] - end - end - aniUnit.bftcTime = entity:getBftcTime() - if entity:getBreakFlyToCharacter() then - aniUnit.breakFlyToCharacter = true - aniUnit.noAni = false - aniUnit.overCallback = aniUnit.callback - aniUnit.callback = nil - if entity:getBreakFlyToCharacterIcon() then - aniUnit.callback = function() - local cell = entity:getCell() - if not cell then - return - end - cell:setGridTypeIcon(entity:getBreakFlyToCharacterIcon()) - end - end - end - end - - return isIdle -end - -function BattleController:dealSkillElement(time, breakedMap, sequenceMap, aniSequence, boomGridIds, onlyCheck) - local randomPosList - local influenceElementTypeMap = {} - for posId, info in pairs(self.battleData:getSkillInfluenceGrids()) do - local entity = self.battleData:getGridEntity(posId) - if not entity:getIsIdle() then - if entity:isEmptyIdle() then - if info.direction == BattleConst.BOARD_RANGE_TYPE.RANDOM then - if not randomPosList then - randomPosList = {} - end - table.insert(randomPosList, posId) - end - influenceElementTypeMap[entity:getElementType()] = (influenceElementTypeMap[entity:getElementType()] or 0) + 1 - end - self:dealGridBreak(posId, GRID_BREAK_CONDITION.SKILL, time, breakedMap, sequenceMap, aniSequence, boomGridIds, onlyCheck) - end - end - - return randomPosList, influenceElementTypeMap -end - -function BattleController:getEliminattionAniInfo(posId, timeIdx) - return { - posId = posId, - noAni = nil, - aniPosList = nil, - breakSfxName = nil, - timeIdx = timeIdx, - conditions = nil, - isSkill = false, - isIdle = false, - callback = nil, - overCallback = nil, - bftcTime = 0, - effectSfxName = nil, - effectSfxFlow = nil, - effectSfxDir = nil, - } -end - -function BattleController:setGridBreakCondition(gridMap, posId, condition) - if not gridMap[posId] then - gridMap[posId] = {} - gridMap[posId][condition] = true - end - gridMap[posId][condition] = true -end - -function BattleController:tryShowSelectSkillComp(needDelay, onlyCommonSkill) - local skillList = self:getRandomSkillList(nil, onlyCommonSkill) - if needDelay then - self.showSelectSkillSid = ModuleManager.BattleManager:performWithDelayGlobal(function() - self.battleUI:showSelectSkillComp(skillList, onlyCommonSkill) - self.showSelectSkillSid = nil - end, 0.3) - else - self.battleUI:showSelectSkillComp(skillList, onlyCommonSkill) - end - - BIReport:postShowFightSkillSelect(self.battleType, skillList, self.chapterId, self.totalDurationTime, self.waveIndex) -end - -function BattleController:fillBoard(isRoundBeginCheck) - self.fillBoardPathMap = table.clearOrCreate(self.fillBoardPathMap) - self.fillColumnCount = table.clearOrCreate(self.fillColumnCount) - self.fillGridMap = table.clearOrCreate(self.fillGridMap) - for c = 1, BattleConst.COLUMN_COUNT do - for r = BattleConst.ROW_COUNT, 1, -1 do - local posId = ModuleManager.BattleManager:getPosId(r, c) - local entity = self.battleData:getGridEntity(posId) - if entity:getIsIdle() then - self:fillThisPos(posId, self.fillColumnCount, self.fillGridMap) - end - end - end - - while true do - local find = false - for c = 1, BattleConst.COLUMN_COUNT do - local list = self.fillGridMap[c] - if list and list[1] then -- 此列有需要填充的元素 - local entity = table.remove(list, 1) - if entity then - self.battleData:setGridInfo(entity:getPosId(), self:getRandomGridInfo()) - end - find = true - end - end - - if not find then - break - end - end - - for c = 1, BattleConst.COLUMN_COUNT do - for r = BattleConst.ROW_COUNT, 1, -1 do - local posId = ModuleManager.BattleManager:getPosId(r, c) - local entity = self.battleData:getGridEntity(posId) - if #entity:getPath() > 0 then - self.fillBoardPathMap[posId] = entity:getPath() - entity:clearPath() - end - end - end - - self.battleUI:fallGrid(self.fillBoardPathMap, isRoundBeginCheck, function() - self:onFillBoardOver(isRoundBeginCheck) - self.isRoundBeginCheck = nil - self.isWaitingFill = false - end) -end - -function BattleController:onFillBoardOver(isRoundBeginCheck) - self.battleUI:enableUITouch() - - if not isRoundBeginCheck then -- 检查一些表现 - if self.showMysteryBoxIndexs[1] then -- 检查宝箱 - local index = table.remove(self.showMysteryBoxIndexs, 1) - local boardList, _, mysteryBoxIndexMap = self:getInitBoard() - local rewards = mysteryBoxIndexMap[index] - ModuleManager.BattleManager:showBoxOpenUI(rewards, function() - self:onFillBoardOver() - end) - return - end - - if self.battleData:useCommonSelectSkillCount() then -- 检查神灯 - self:tryShowSelectSkillComp(false, true) - return - end - else - self:takeGridEffect() - end - - if self.onFillBoardOverCallback then - self.onFillBoardOverCallback() - end - - if isRoundBeginCheck then - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BOARD_FILL_OVER) - self:popBoardCacheSkill(function() - self:generateSkill(function() - self:enterElimination(true) - end) - end) - else - self:generateSkill(function() - self.battleUI:refreshSkill() - self:enterBattleStep() - end) - end -end - -function BattleController:generateInstructions(skillEntity, elementType, lineCount, influenceElementTypeMap, elementTypeMap) - self.instructions = BATTLE_INSTRUCTIONS_HELPER.generateInstructions(skillEntity, elementType, lineCount, influenceElementTypeMap, elementTypeMap, self) -end - -function BattleController:exeInstructions(callback) - if not self.instructions or #self.instructions <= 0 then - callback() - return - end - local instruction = table.remove(self.instructions) - local func = BattleController._doInstruction[instruction.name] - if func then - func(self, instruction, function() - DataManager.BattleData:resetTimeSpeed() - self:exeInstructions(callback) - end) - else - self:exeInstructions(callback) - end -end - -function BattleController:getIsLastInstruction() - if not self.instructions or not self.instructions[1] then - return true - end - - return false -end - -function BattleController:generateBoard(isFirst) - local boardList, _, mysteryBoxIndexMap = self:getInitBoard() - if self.curBoardIndex and self.curBoardIndex >= #boardList then - if isFirst then - self.needWaitingBoardOver = false - end - return - end - - if not self.battleUI then - if isFirst then - self.needWaitingBoardOver = false - end - return - end - - self.curBoardIndex = (self.curBoardIndex or 0) + 1 - if not boardList[self.curBoardIndex] then -- 容错 - if isFirst then - self.needWaitingBoardOver = false - end - return - end - local board = boardList[self.curBoardIndex].board - local mysteryBoard = boardList[self.curBoardIndex].mysteryBoard - if mysteryBoard and mysteryBoxIndexMap and mysteryBoxIndexMap[self.curBoardIndex] then - board = mysteryBoard - end - self.battleUI:switchBoard(function() - self.battleData:refreshBoard(board, self:getBlockIcon()) - self.battleUI:initGridCell(function() - if isFirst then - self.needWaitingBoardOver = false - end - end) - end, function() - end, isFirst) -end - -function BattleController:onGotMysteryBoxIndexs() - self.gotMysteryBoxIndexs[self.curBoardIndex] = true - table.insert(self.showMysteryBoxIndexs, self.curBoardIndex) -end - -function BattleController:putBoardCacheSkill(callback) - if not self.battleUI then - return - end - self.battleData:cacheBoardSkill() - local skillList, skillCount = self.battleData:getCacheBoardSkill() - self.battleUI:cacheSkillAni(skillList, false, callback) -end - -function BattleController:popBoardCacheSkill(callback) - local skillList, skillCount = self.battleData:getCacheBoardSkill() - self.battleData:clearCacheBoardSkill() - if self.battleUI and skillCount > 0 then - self.popSkillPosIdList = table.clearOrCreate(self.popSkillPosIdList) - for posId, entity in pairs(self.battleData:getGridEnties()) do - if entity:isEmptyIdle() and not entity:getIsIdle() then - table.insert(self.popSkillPosIdList, posId) - end - end - - self.popSkillPosIdList = table.shuffle(self.popSkillPosIdList) - self.popNewSkillId = table.clearOrCreate(self.popNewSkillId) - for index, info in ipairs(skillList) do - if self.popSkillPosIdList[1] then - self.popNewSkillId[index] = info - self.popNewSkillId[index].posId = table.remove(self.popSkillPosIdList) - self:setGridSkillId(self.popNewSkillId[index].posId, info.skillId, true) - else - break - end - end - - self.battleUI:cacheSkillAni(self.popNewSkillId, true, function() - for index, info in ipairs(self.popNewSkillId) do - self.battleData:setGridDirty(info.posId) - end - - if callback then - callback() - end - end) - else - if callback then - callback() - end - end -end - -function BattleController:generateSkill(callback) - self.generateSkillMap = table.clearOrCreate(self.generateSkillMap) - self.generateExcludeMap = table.clearOrCreate(self.generateExcludeMap) - for _, skillEntity in pairs(self.battleData:getSkillEntities()) do - if skillEntity:getEnergyEnough() then - local list = self:getSkillElementList(skillEntity:getPosition(), 1, true, self.generateExcludeMap) - if list[1] then - self.generateSkillMap[skillEntity:getPosition()] = - { - skillId = skillEntity:getSkillId(), - posId = list[1] - } - self.generateExcludeMap[list[1]] = true - end - end - end - - if not self.battleUI then - if callback then - callback() - end - return - end - - self.battleUI:generateSkillAni(self.generateSkillMap, function() - for elementType, info in pairs(self.generateSkillMap) do - self:setGridSkillId(info.posId, info.skillId) - end - - if callback then - callback() - end - end) -end - -function BattleController:setGridSkillId(posId, skillId, noDirty) - local entity = self.battleData:getGridEntity(posId) - if entity then - entity:setSkilId(skillId, noDirty) - local skillEntity = self.battleData:getSkillEntityBySkillId(skillId) - if skillEntity and entity:getElementType() ~= skillEntity:getPosition() then - entity:setElementType(skillEntity:getPosition(), noDirty) - end - end -end - -function BattleController:generateGridType(skillTypeParameter, monsterPos) - if not skillTypeParameter then - return - end - - self.generateGridTypeList = table.clearOrCreate(self.generateGridTypeList) - local count = 0 - for posId, entity in pairs(self.battleData:getGridEnties()) do - if entity:isEmptyIdle() then - table.insert(self.generateGridTypeList, entity) - count = count + 1 - end - end - self.generateGridTypeList = table.shuffle(self.generateGridTypeList) - if count > 0 then - self.generateGridTypeMap = table.clearOrCreate(self.generateGridTypeMap) - local minCount = math.min(skillTypeParameter[2], count) - for i = minCount, 1, -1 do - local entity = table.remove(self.generateGridTypeList, math.random(1, i)) - self.generateGridTypeMap[entity:getPosId()] = { - gridType = skillTypeParameter[1], - elementType = entity:getElementType() - } - end - - self.battleUI:showMonsterSkillAni(self.generateGridTypeMap, monsterPos, function() - for posId, info in pairs(self.generateGridTypeMap) do - self.battleData:setGridInfo(posId, info) - end - end) - end -end - -function BattleController:lockElement(lcokElementType, isUnlock) - if not self.lockElementElementTypeMap then - self.lockElementElementTypeMap = table.clearOrCreate(self.lockElementElementTypeMap) - else - for k, v in pairs(self.lockElementElementTypeMap) do - self.lockElementElementTypeMap[k] = table.clearOrCreate(self.lockElementElementTypeMap[k]) - end - end - if not self.lockElementMap then - self.lockElementMap = table.clearOrCreate(self.lockElementMap) - else - for k, v in pairs(self.lockElementMap) do - self.lockElementMap[k] = table.clearOrCreate(self.lockElementMap[k]) - end - end - self.lockElementList = table.clearOrCreate(self.lockElementList) - local locked = false - for posId, entity in pairs(self.battleData:getGridEnties()) do - local elementType = entity:getElementType() - if not isUnlock then - if entity:isEmptyIdle() then - local elementTypeMapUnit = self.lockElementElementTypeMap[elementType] - if not elementTypeMapUnit or not elementTypeMapUnit[1] then - self.lockElementElementTypeMap[elementType] = table.clearOrCreate(self.lockElementElementTypeMap[elementType]) - elementTypeMapUnit = self.lockElementElementTypeMap[elementType] - if not isUnlock then - table.insert(self.lockElementList, elementType) - end - end - - table.insert(elementTypeMapUnit, posId) - end - if entity:isLock() then - locked = true - end - else - if entity:isLock() then - if not self.lockElementMap[elementType] then - self.lockElementMap[elementType] = table.clearOrCreate(self.lockElementMap[elementType]) - end - table.insert(self.lockElementMap[elementType], posId) - end - end - end - - if isUnlock then - for elementType, list in pairs(self.lockElementMap) do - self.battleData:cacheLockElement(elementType, nil) - for _, posId in ipairs(list) do - self.battleData:setGridType(posId, BattleConst.GRID_TYPE.EMPTY) - end - end - else - if locked then -- 锁定过就不新锁了 - return - end - local elementType = lcokElementType - if elementType == BattleConst.ELEMENT_TYPE.NONE then - if not self.lockElementList[1] then - return - end - elementType = self.lockElementList[math.random(1, #self.lockElementList)] - end - self.battleData:cacheLockElement(elementType, true) - local list = self.lockElementElementTypeMap[elementType] - if list then - for _, posId in ipairs(list) do - self.battleData:setGridType(posId, BattleConst.GRID_TYPE.LOCK) - end - end - end -end - -function BattleController:getSkillElementList(elementType, count, useAlternate, excludeMap) - self.getSkillElementListResult = table.clearOrCreate(self.getSkillElementListResult) - local gridEntities = self.battleData:getGridEnties() - if not gridEntities then - return self.getSkillElementListResult - end - - self.getSkillElementListSameElementList = table.clearOrCreate(self.getSkillElementListSameElementList) - self.getSkillElementListAlternateList = table.clearOrCreate(self.getSkillElementListAlternateList) - local addCount = 0 - - for row = 1, BattleConst.ROW_COUNT do - for column = 1, BattleConst.COLUMN_COUNT do - local posId = ModuleManager.BattleManager:getPosId(row, column) - local entity = gridEntities[posId] - if entity and entity:canChangeInfo() and not excludeMap[posId] then - if entity:getElementType() == elementType then - table.insert(self.getSkillElementListSameElementList, posId) - else - table.insert(self.getSkillElementListAlternateList, posId) - end - end - end - - local remainCount = count - addCount - if remainCount <= 0 then - return self.getSkillElementListResult - end - - for i = 1, remainCount do - if not self.getSkillElementListSameElementList[i] then - break - end - table.insert(self.getSkillElementListResult, table.remove(self.getSkillElementListSameElementList, math.random(1, #self.getSkillElementListSameElementList))) - addCount = addCount + 1 - if addCount >= count then - return self.getSkillElementListResult - end - end - - if addCount < count and useAlternate then - for i = 1, count - addCount do - if not self.getSkillElementListAlternateList[1] then - break - end - table.insert(self.getSkillElementListResult, table.remove(self.getSkillElementListAlternateList, math.random(1, #self.getSkillElementListAlternateList))) - addCount = addCount + 1 - if addCount >= count then - return self.getSkillElementListResult - end - end - end - - if addCount >= count then - return self.getSkillElementListResult - end - end - - return self.getSkillElementListResult -end - ----- 从一个点直接遍历所有相关的路径 -function BattleController:fillThisPos(posId, columnCount, gridMap) - local entity = self.battleData:getGridEntity(posId) - if not entity or not entity:getIsIdle() then - return - end - - local list = BattleConst.UP_LINE_FILL_LIST[posId] - if not list[1] then -- 第一排 - local rc = ModuleManager.BattleManager:getPosRC(posId) - local c = rc.c - if not columnCount[c] then - columnCount[c] = 0 - end - columnCount[c] = columnCount[c] + 1 - - local fallPosId = posId - local fallEntity = self.battleData:getGridEntity(fallPosId) - if not fallEntity then -- 异常情况,理论上不可能不存在 - return - end - - local newStartPosId - for i = columnCount[c], 1, -1 do - newStartPosId = ModuleManager.BattleManager:getFirstLineLastRowPosId(i, c) - local curPos = ModuleManager.BattleManager:getPosInfo(newStartPosId) - fallEntity:addPath({x = curPos.x, y = curPos.y}) - end - - local curPos = ModuleManager.BattleManager:getPosInfo(posId) - fallEntity:addPath({x = curPos.x, y = curPos.y}) - - self.battleData:exchangeGridEntities(posId, fallPosId) - if not gridMap[c] then - gridMap[c] = {} - end - table.insert(gridMap[c], fallEntity) - else - for index, fallPosId in ipairs(list) do - local fallEntity = self.battleData:getGridEntity(fallPosId) - if not fallEntity then -- 异常情况,理论上不可能不存在 - return - end - if not fallEntity:isCantFallType() then - if fallEntity:getIsIdle() then - self:fillThisPos(fallPosId, columnCount, gridMap) - end - fallEntity = self.battleData:getGridEntity(fallPosId) - if not fallEntity:getIsIdle() then - if not fallEntity:getPath()[1] then - local curPos = ModuleManager.BattleManager:getPosInfo(fallPosId) - fallEntity:addPath({x = curPos.x, y = curPos.y}) - end - - local curPos = ModuleManager.BattleManager:getPosInfo(posId) - fallEntity:addPath({x = curPos.x, y = curPos.y}) - - self.battleData:exchangeGridEntities(posId, fallPosId) - self:fillThisPos(fallPosId, columnCount, gridMap) - return - end - end - end - end -end - -function BattleController:getRandomGridInfo() - local list, fixedRandomGrid = self:getInitBoard() - local fixedRandomList = fixedRandomGrid[self.curBoardIndex] - - local gridType = 0 - local elementType - if fixedRandomList and fixedRandomList[1] then - elementType = table.remove(fixedRandomList, 1) - else - local map = self.battleData:getElementTypeMap() - self.getRandomGridInfoIndexs = table.clearOrCreate(self.getRandomGridInfoIndexs) - self.getRandomGridInfoTypeList = table.clearOrCreate(self.getRandomGridInfoTypeList) - for typeName, typeNum in pairs(BattleConst.ELEMENT_TYPE) do - if not self:getSealElementType()[typeNum] and self.battleData:getSkillEntityByElement(typeNum) then - local weight = ((map[typeNum] or 0) + 1) * BattleConst.ELEMENT_WIGHT - if weight > BattleConst.MAX_ELEMENT_WIGHT then - weight = BattleConst.MAX_ELEMENT_WIGHT - end - table.insert(self.getRandomGridInfoIndexs, weight) - table.insert(self.getRandomGridInfoTypeList, typeNum) - end - end - - local index = GFunc.getRandomIndex(self.getRandomGridInfoIndexs) - elementType = self.getRandomGridInfoTypeList[index] - end - - return {gridType = gridType, elementType = elementType} -end - -function BattleController:findSkillInfluenceGrids() - local girds = self.battleData:clearSkillInfluenceGrids() - for posId, _ in pairs(girds) do - local entity = self.battleData:getGridEntity(posId) - if entity:getCell() then - entity:getCell():showCircle(false) - end - end - - local sequence = self.battleData:getGridSequence() - self.skillInfluenceGridsSequenceEntities = table.clearOrCreate(self.skillInfluenceGridsSequenceEntities) - for _, info in ipairs(sequence) do - local entity = self.battleData:getGridEntity(info.posId) - table.insert(self.skillInfluenceGridsSequenceEntities, entity) - end - - for _, info in ipairs(sequence) do - local entity = self.battleData:getGridEntity(info.posId) - local skillId = entity:getSkillId() - if skillId then - local skillEntity = self.battleData:getSkillEntityBySkillId(skillId) - if skillEntity then - BATTLE_BOARD_SKILL_HANDLE.activeBoardSkill(info.posId, skillEntity, self.battleData:getGridEnties(), self.skillInfluenceGridsSequenceEntities, self) - end - end - end -end - -function BattleController:getRandomSkillList(getCount, onlyCommonSkill, excludeMap) - local fixedList = self:getFixedRogueSkill() - if fixedList[1] then - return table.remove(fixedList, 1) - end - - getCount = getCount or BattleConst.SKILL_SELECT_COUNT - self.randomSkillList = table.clearOrCreate(self.randomSkillList) - self.randomSkillMap = table.clearOrCreate(self.randomSkillMap) - self.randomSkillNewSkillPool = table.clearOrCreate(self.randomSkillNewSkillPool) - self.randomSkillSkillWeight = table.clearOrCreate(self.randomSkillSkillWeight) - local cfg = ConfigManager:getConfig("skill_rogue") - local skillPool = self.battleData:getSkillPool() - local count = 0 - - if not onlyCommonSkill then - for elementType, list in pairs(skillPool) do -- 先遍历一下未解锁的技能 - if not self.battleData:isUnlockedSkillElementType(elementType) then - local skillEntity = self.battleData:getSkillEntityByElement(elementType) - if skillEntity then - local skillId = skillEntity:getUnlockId() - if skillId and not self.randomSkillMap[skillId] then - local skillCfg = cfg[skillId] - table.insert(self.randomSkillNewSkillPool, skillId) - table.insert(self.randomSkillSkillWeight, skillCfg.weight) - count = count + 1 - self.randomSkillMap[skillId] = true - end - end - end - end - - if count >= 3 then -- 如果未解锁的技能大于等于3,则直接返回三个解锁技能 - for i = 1, 3 do - local index = GFunc.getRandomIndex(self.randomSkillSkillWeight) - local skillId = table.remove(self.randomSkillNewSkillPool, index) - table.remove(self.randomSkillSkillWeight, index) - count = count - 1 - table.insert(self.randomSkillList, skillId) - end - - return table.shuffle(self.randomSkillList) - end - - if excludeMap then - for skillId, _ in pairs(excludeMap) do - self.randomSkillMap[skillId] = true - end - end - - for elementType, list in pairs(skillPool) do - if self.battleData:isUnlockedSkillElementType(elementType) then - for _, skillId in ipairs(list) do - local skillCfg = cfg[skillId] - if skillCfg and (not skillCfg.limit_times or self.battleData:getSkillCount(skillId) < skillCfg.limit_times) then - - if not self.randomSkillMap[skillId] and (not skillCfg.unlock or self.battleData:getSkillCount(skillCfg.unlock) > 0) then - table.insert(self.randomSkillNewSkillPool, skillId) - table.insert(self.randomSkillSkillWeight, skillCfg.weight) - count = count + 1 - self.randomSkillMap[skillId] = true - end - end - end - end - end - - if count > 0 then - local index = GFunc.getRandomIndex(self.randomSkillSkillWeight) - local skillId = table.remove(self.randomSkillNewSkillPool, index) - table.remove(self.randomSkillSkillWeight, index) - count = count - 1 - table.insert(self.randomSkillList, skillId) - getCount = getCount - 1 - end - end - - for skillId, info in pairs(cfg) do - if not self:getNotInvolvedSkills()[skillId] then - if info.universal then - if not info.limit_times or self.battleData:getSkillCount(skillId) < info.limit_times then - if not self.randomSkillMap[skillId] then - table.insert(self.randomSkillNewSkillPool, skillId) - table.insert(self.randomSkillSkillWeight, info.weight) - count = count + 1 - end - end - end - end - end - - for i = 1, getCount do - local index = GFunc.getRandomIndex(self.randomSkillSkillWeight) - local skillId = table.remove(self.randomSkillNewSkillPool, index) - table.remove(self.randomSkillSkillWeight, index) - count = count - 1 - table.insert(self.randomSkillList, skillId) - if count <= 0 then - break - end - end - - local result = table.shuffle(self.randomSkillList) - return result -end - -function BattleController:onSelectSkill(skillId, value, pos) - self.battleData:addSkillCount(skillId, value) - BATTLE_ROGUE_SKILL_HANDLE.takeEffect(skillId, self.battleData, self, value, BattleConst.SIDE_ATK) - - local skillEntities = self.battleData:getSkillEntities() - for _, entity in pairs(skillEntities) do - entity:gotUpSKill(skillId) - end - - BIReport:postFightSkillSelect(self.battleType, {skillId}, self.chapterId, self.totalDurationTime, self.waveIndex) - - local elementType = ModuleManager.HeroManager:getSkillRoguePosition(skillId) - - if elementType then - if self.battleUI then - self.battleUI:gotOneSkillAni(skillId, elementType, function() - self:selectSKillNextToStep() - self.battleUI:refreshBoard() - self.battleUI:refreshSkill() - end, pos) - return - end - end - - self:selectSKillNextToStep() - - self.battleUI:showCommonSkillTips(skillId) -end - -function BattleController:selectSKillNextToStep() - if self.roundStep == BattleConst.BATTLE_ROUND_STEP.ON_REFRESH_BOARD then - self:onFillBoardOver() - else - self:enterElimination() - end -end - -function BattleController:changeElementType(count, elementType) - self.changeElementTypeMap = table.clearOrCreate(self.changeElementTypeMap) - self.changeElementTypeList = table.clearOrCreate(self.changeElementTypeList) - local listCount = 0 - for _, entity in pairs(self.battleData:getGridEnties()) do - if entity:canChangeInfo() and entity:getElementType() ~= elementType then - table.insert(self.changeElementTypeList, entity) - listCount = listCount + 1 - end - end - - count = math.min(count, listCount) - for i = 1, count do - if listCount <= 0 then - break - end - local index = math.random(1, listCount) - self.changeElementTypeList[index], self.changeElementTypeList[listCount] = self.changeElementTypeList[listCount], self.changeElementTypeList[index] - local entity = table.remove(self.changeElementTypeList) - listCount = listCount - 1 - self.changeElementTypeMap[entity] = elementType - end - - self:changeElementTypeByMap(self.changeElementTypeMap) -end - -function BattleController:changeElementTypeByMap(changeMap) - local index = 1 - for entity, elementType in pairs(changeMap) do - self.battleData:setGridInfo(entity:getPosId(), {gridType = entity:getGridType(), elementType = elementType}) - self.battleUI:playChangeElementSfx(entity:getPosId(), index) - index = index + 1 - end -end - -function BattleController:killGrids(posIdList) - if not posIdList[1] then - return - end - - for _, posId in ipairs(posIdList) do - local entity = DataManager.BattleData:getGridEntity(posId) - entity:setIsIdle(true) - end - - self.battleUI:removeGridOutOfScreen(posIdList) -end - -function BattleController:killRowOrColumn(infoList) - self.killRowOrColumnMap = table.clearOrCreate(self.killRowOrColumnMap) - for _, info in ipairs(infoList) do - if info.posList then - for i, posId in ipairs(info.posList) do - if not self.killRowOrColumnMap[posId] then - self.killRowOrColumnMap[posId] = true - local entity = DataManager.BattleData:getGridEntity(posId) - entity:setIsIdle(true) - end - end - self.battleUI:removeGridOutOfScreen(info.posList) - end - end -end - -function BattleController:addHeroAttr(attrName, value) - if not self.battleData or not self.battleData.atkTeam then - return - end - - local attr = BUFF_NAME_TO_ATTR[attrName] - if attr then - self.battleData.atkTeam:addAttr(attr[1], value, attr[2]) - else - local func = BattleBuffHandle.addAttribute[attrName] - if func then - local unitComp - for matchType, comp in pairs(self.atkTeam:getUnitComp()) do - unitComp = comp - break - end - if unitComp then - func(unitComp, value) - end - end - end -end - ----- 快照一次棋盘 -function BattleController:snapshotBoard() - local snapshot = {} - for _, entity in pairs(self.battleData:getGridEnties()) do - snapshot[entity:getPosId()] = entity:getSnapshoptInfo() - end - return snapshot -end - -function BattleController:showAttention() - if not self.attentionList then - return - end - - if self.attentionSid then - ModuleManager.BattleManager:unscheduleGlobal(self.attentionSid) - self.attentionSid = nil - end - - self.attentionSid = ModuleManager.BattleManager:performWithDelayGlobal(function() - for _, posId in ipairs(self.attentionList) do - local entity = self.battleData:getGridEntity(posId) - if entity and entity:getCell() then - entity:getCell():showAni() - end - end - end, 2) -end - -function BattleController:shuffleBoard(callback) - local changeInfo = self:getShuffleBoardInfo() - if changeInfo then - self.battleData:setGridEntitiesPosId(changeInfo) - self.battleUI:shuffleBoard(changeInfo, callback) - else - self.resetList = table.clearOrCreate(self.resetList) - for posId, entity in pairs(self.battleData:getGridEnties()) do - if entity:isCanFallStatus() then - table.insert(self.resetList, entity) - end - end - local resetInfo = self:resetGrids(self.resetList) - if not resetInfo then - if EDITOR_MODE then - Logger.logHighlight("----- 处于无法消除状态 -----") - end - if callback then - callback() - end - else - if self.resetGridSid then - ModuleManager.BattleManager:unscheduleGlobal(self.resetGridSid) - self.resetGridSid = nil - end - - self.resetGridSid = ModuleManager.BattleManager:performWithDelayGlobal(function() - local count = 1 - for posId, info in pairs(resetInfo) do - self.battleData:setInfoBySnapshop(posId, info) - self.battleUI:playChangeElementSfx(posId, count) - count = count + 1 - end - self.resetGridSid = nil - if callback then - callback() - end - end, 0.5) - end - end -end - -function BattleController:getShuffleBoardInfo() - self.shuffleBoardPosList = table.clearOrCreate(self.shuffleBoardPosList) - self.shuffleBoardAnySkillList = table.clearOrCreate(self.shuffleBoardAnySkillList) - self.shuffleBoardPosMap = table.clearOrCreate(self.shuffleBoardPosMap) - self.shuffleBoardCountMap = table.clearOrCreate(self.shuffleBoardCountMap) - self.shuffleBoardCantLinkMap = table.clearOrCreate(self.shuffleBoardCantLinkMap) - if not self.shuffleBoardList then - self.shuffleBoardList = table.clearOrCreate(self.shuffleBoardList) - else - for elementType, _ in pairs(self.shuffleBoardList) do - self.shuffleBoardList[elementType] = table.clearOrCreate(self.shuffleBoardList[elementType]) - end - end - local anySkillCount = 0 - for posId, entity in pairs(self.battleData:getGridEnties()) do - if entity:isCanFallStatus() then - if entity:getSkillId() then - local skillEntity = self.battleData:getSkillEntityBySkillId(entity:getSkillId()) - local elementType = skillEntity:getPosition() - if skillEntity:getIgnoreElementType() then - table.insert(self.shuffleBoardAnySkillList, entity) - anySkillCount = anySkillCount + 1 - else - if not self.shuffleBoardList[elementType] then - self.shuffleBoardList[elementType] = table.clearOrCreate(self.shuffleBoardList[elementType]) - end - table.insert(self.shuffleBoardList[elementType], entity) - self.shuffleBoardCountMap[elementType] = (self.shuffleBoardCountMap[elementType] or 0) + 1 - end - else - local elementType = entity:getElementType() - if not self.shuffleBoardList[elementType] then - self.shuffleBoardList[elementType] = table.clearOrCreate(self.shuffleBoardList[elementType]) - end - table.insert(self.shuffleBoardList[elementType], entity) - self.shuffleBoardCountMap[elementType] = (self.shuffleBoardCountMap[elementType] or 0) + 1 - if not entity:canLink() then - self.shuffleBoardCantLinkMap[elementType] = (self.shuffleBoardCantLinkMap[elementType] or 0) + 1 - end - end - table.insert(self.shuffleBoardPosList, posId) - self.shuffleBoardPosMap[posId] = true - end - end - - for elementType, list in pairs(self.shuffleBoardList) do - table.sort(self.shuffleBoardList[elementType], function(a, b) - if a:getSkillId() and not b:getSkillId() then - return false - elseif not a:getSkillId() and b:getSkillId() then - return true - else - return a:getPosId() < b:getPosId() - end - end) - end - - - local needCount = self:getMinEliminationCount() - local find = false - for elementType, list in pairs(self.shuffleBoardList) do - local count = self.shuffleBoardCountMap[elementType] or 0 - local cantLinkCount = self.shuffleBoardCantLinkMap[elementType] or 0 - local skillCount = 0 - if anySkillCount > 0 then - skillCount = 1 - end - if count + skillCount - cantLinkCount >= needCount then - local haveSkill = false - local listCount = 0 - self.shuffleBoardTempList = table.clearOrCreate(self.shuffleBoardTempList) - find = false - local add = false - for _, entity in ipairs(list) do - add = false - if haveSkill then - if not entity:getSkillId() then - add = entity:canLink() - end - else - if entity:getSkillId() then - haveSkill = true - end - add = entity:canLink() - end - if add then - table.insert(self.shuffleBoardTempList, entity) - listCount = listCount + 1 - - if listCount >= needCount then -- 可连接的 普通的元素+元素技能 - find = true - break - end - end - end - - if listCount >= needCount then -- 可连接的 普通的元素+元素技能 - find = true - break - elseif not haveSkill and skillCount > 0 then -- 可连接的 普通元素 + 任意元素技能 - table.insert(self.shuffleBoardTempList, self.shuffleBoardAnySkillList[1]) - listCount = listCount + 1 - if listCount >= needCount then - find = true - break - end - end - end - end - - if find then - return self:shufflePos(self.shuffleBoardTempList, self.shuffleBoardPosMap, needCount, self.shuffleBoardPosList) - end -end - -function BattleController:shufflePos(tempList, posMap, needCount, posList) - local gotPos, useMap, list = self:findCanLinkPosList(posMap, needCount) - - if gotPos and list[1] then - self.shufflePosInfo = table.clearOrCreate(self.shufflePosInfo) - self.shufflerPosUsedPos = table.clearOrCreate(self.shufflerPosUsedPos) - self.shufflerSetedPos = table.clearOrCreate(self.shufflerSetedPos) - for index, entity in ipairs(tempList) do - self.shufflePosInfo[entity:getPosId()] = list[index] - self.shufflerPosUsedPos[list[index]] = true - self.shufflerSetedPos[entity:getPosId()] = true - end - - self.shufflePosList1 = table.clearOrCreate(self.shufflePosList1) - self.shufflePosList2 = table.clearOrCreate(self.shufflePosList2) - for index = #posList, 1, -1 do - local posId = posList[index] - if not self.shufflerPosUsedPos[posId] then - table.insert(self.shufflePosList2, posId) - end - if not self.shufflerSetedPos[posId] then - table.insert(self.shufflePosList1, posId) - end - end - - self.shufflePosList2 = table.shuffle(self.shufflePosList2) - for index, posId in ipairs(self.shufflePosList1) do - if not self.shufflePosList2[index] then - break - end - self.shufflePosInfo[posId] = self.shufflePosList2[index] - end - - return self.shufflePosInfo - end -end - -function BattleController:findAttention() - local find = false - for r = 1, GConst.BattleConst.ROW_COUNT do - for c = 1, GConst.BattleConst.COLUMN_COUNT do - local posId = ModuleManager.BattleManager:getPosId(r, c) - local gridEntity = self.battleData:getGridEntity(posId) - local mainElementType = gridEntity:getElementType() - if gridEntity:canChangeInfo() then - self.findAttentionPathList = table.clearOrCreate(self.findAttentionPathList) - self.findAttentionPosIdMap = table.clearOrCreate(self.findAttentionPosIdMap) - self:findLinkLine(posId, self.findAttentionPosIdMap, false, mainElementType, self.findAttentionPathList) - if table.nums(self.findAttentionPathList) >= self:getMinEliminationCount() then - find = true - break - end - end - end - if find then - break - end - end - - return find, self.findAttentionPathList -end - -function BattleController:_dealResetGridsDataFunc(posList) - self.dealResetFunc1PosMap = table.clearOrCreate(self.dealResetFunc1PosMap) - self.dealResetFunc1LockElementMap = table.clearOrCreate(self.dealResetFunc1LockElementMap) - self.dealResetFunc1KeepSnapList = table.clearOrCreate(self.dealResetFunc1KeepSnapList) - self.dealResetFunc1KeepSnapSkillList = table.clearOrCreate(self.dealResetFunc1KeepSnapSkillList) - self.dealResetFunc1EmptySnapList = table.clearOrCreate(self.dealResetFunc1EmptySnapList) - local emptyCount = 0 - for _, entity in ipairs(posList) do - local posId = entity:getPosId() - self.dealResetFunc1PosMap[posId] = entity - if entity:isEmptyIdle() then - emptyCount = emptyCount + 1 - table.insert(self.dealResetFunc1EmptySnapList, entity:getSnapshoptInfo()) - elseif entity:isLock() and not entity:getSkillId() then - self.dealResetFunc1LockElementMap[entity:getElementType()] = true - emptyCount = emptyCount + 1 - local snapInfo = entity:getSnapshoptInfo() - snapInfo.gridType = BattleConst.GRID_TYPE.EMPTY - table.insert(self.dealResetFunc1EmptySnapList, snapInfo) - else - if entity:getSkillId() then - table.insert(self.dealResetFunc1KeepSnapSkillList, entity:getSnapshoptInfo()) - else - table.insert(self.dealResetFunc1KeepSnapList, entity:getSnapshoptInfo()) - end - end - end - - return self.dealResetFunc1PosMap, self.dealResetFunc1LockElementMap, emptyCount, self.dealResetFunc1KeepSnapList, self.dealResetFunc1KeepSnapSkillList, self.dealResetFunc1EmptySnapList -end - -function BattleController:_dealResetGridsDataFunc2(useMap, emptySnapList, mainElement, backupSkill, keepSnapList, posMap, canRandomElmentList, elementCount, lockElementMap) - self.dealResetFunc2ResetPosInfo = table.clearOrCreate(self.dealResetFunc2ResetPosInfo) - for posId, _ in pairs(useMap) do - local snapInfo - if emptySnapList[1] then - snapInfo = table.remove(emptySnapList) - snapInfo.elementType = mainElement - snapInfo.posId = posId - snapInfo.gridType = BattleConst.GRID_TYPE.EMPTY - else - snapInfo = backupSkill - end - self.dealResetFunc2ResetPosInfo[posId] = snapInfo - end - - for _, snap in ipairs(emptySnapList) do - table.insert(keepSnapList, snap) - end - - keepSnapList = table.shuffle(keepSnapList) - - for posId, entity in pairs(posMap) do - if not useMap[posId] then - local snapInfo - if keepSnapList[1] then - snapInfo = table.remove(keepSnapList) - snapInfo.posId = posId - if not snapInfo.skillId or snapInfo.skillId <= 0 then - if snapInfo.gridType == BattleConst.GRID_TYPE.EMPTY then - snapInfo.elementType = canRandomElmentList[math.random(1, elementCount)] - if lockElementMap[snapInfo.elementType] then - snapInfo.gridType = BattleConst.GRID_TYPE.LOCK - end - end - end - end - - if snapInfo then - self.dealResetFunc2ResetPosInfo[posId] = snapInfo - end - end - end - - return self.dealResetFunc2ResetPosInfo -end - -function BattleController:resetGrids(posList) - local needCount = self:getMinEliminationCount() - if not posList[needCount] then - return - end - - local posMap, lockElementMap, emptyCount, keepSnapList, keepSnapSkillList, emptySnapList = self:_dealResetGridsDataFunc(posList) - - local canUseSkillCount = 0 - if keepSnapSkillList[1] then -- 技能可以直接链接, 不判断元素技能了 - canUseSkillCount = 1 - end - - if emptyCount + canUseSkillCount < needCount then -- 格子不够 - return - end - - local backupSkill - if emptyCount < needCount then - backupSkill = table.remove(keepSnapSkillList) - end - - for _, snap in ipairs(keepSnapSkillList) do - table.insert(keepSnapList, snap) - end - - local gotPos, useMap = self:findCanLinkPosList(posMap, needCount) - if not gotPos then - return - end - - self.canRandomElmentList = table.clearOrCreate(self.canRandomElmentList) - - local elementCount = 0 - for typeName, typeNum in pairs(BattleConst.ELEMENT_TYPE) do - if not lockElementMap[typeNum] and not self:getSealElementType()[typeNum] and self.battleData:getSkillEntityByElement(typeNum) then - table.insert(self.canRandomElmentList, typeNum) - elementCount = elementCount + 1 - end - end - - if elementCount <= 0 then - return - end - - local mainElement = self.canRandomElmentList[math.random(1, elementCount)] - - for typeNum, _ in pairs(lockElementMap) do - table.insert(self.canRandomElmentList, typeNum) - elementCount = elementCount + 1 - end - - local resetPosInfo = self:_dealResetGridsDataFunc2(useMap, emptySnapList, mainElement, backupSkill, keepSnapList, posMap, self.canRandomElmentList, elementCount, lockElementMap) - - return resetPosInfo -end - -function BattleController:findCanLinkPosList(posMap, needCount) - self.findCanLinkList = table.clearOrCreate(self.findCanLinkList) - self.findCanUseMap = table.clearOrCreate(self.findCanUseMap) - local gotPos = false - for posId, _ in pairs(posMap) do - table.clear(self.findCanLinkList) - table.clear(self.findCanUseMap) - local count = 0 - local findPodId = posId - gotPos = false - while true do - local aounrdList = BattleConst.GRID_OUT_LINE_POS_ID[findPodId] - if not aounrdList then - break - end - local got = false - for id, status in pairs(aounrdList) do - if posMap[id] and not self.findCanUseMap[id] then - table.insert(self.findCanLinkList, id) - count = count + 1 - self.findCanUseMap[id] = true - findPodId = id - got = true - break - end - end - if not got then - break - end - if count >= needCount then - gotPos = true - break - end - end - - if gotPos then - break - end - end - - return gotPos, self.findCanUseMap, self.findCanLinkList -end - -function BattleController:findLinkLine(posId, posIdMap, hadSkill, mainElementType, lineList) - posIdMap[posId] = true - table.insert(lineList, posId) - local list = BattleConst.GRID_OUT_LINE_POS_ID[posId] - if not list then - return hadSkill - end - - if #lineList >= self:getMinEliminationCount() then - return hadSkill - end - - local lineCount = 0 - local maxLineList - local maxPosIdMap - local maxGotSkill - for aroundposId, _ in pairs(list) do - if not posIdMap[aroundposId] then - local gridEntity = self.battleData:getGridEntity(aroundposId) - if gridEntity then - if gridEntity:canLink() and not gridEntity:getSkillId() then - if not mainElementType or gridEntity:getElementType() == mainElementType then - mainElementType = mainElementType or gridEntity:getElementType() - local tempIdMap = GFunc.getTable(posIdMap) - local newList = GFunc.getTable(lineList) - local gotSkill = self:findLinkLine(aroundposId, tempIdMap, hadSkill, mainElementType, newList) - local count = #newList - if count > lineCount then - lineCount = count - maxLineList = newList - maxPosIdMap = tempIdMap - maxGotSkill = gotSkill - end - end - elseif gridEntity:canLink() and gridEntity:getSkillId() and not hadSkill and mainElementType then - local skillId = gridEntity:getSkillId() - local skillEntity = self.battleData:getSkillEntityBySkillId(skillId) - if skillEntity then - if skillEntity:getIgnoreElementType() or skillEntity:getPosition() == mainElementType then - local tempIdMap = GFunc.getTable(posIdMap) - local newList = GFunc.getTable(lineList) - local gotSkill = self:findLinkLine(aroundposId, tempIdMap, true, mainElementType, newList) - local count = #newList - if count > lineCount then - lineCount = count - maxLineList = newList - maxPosIdMap = tempIdMap - maxGotSkill = gotSkill - end - end - end - end - end - end - end - - if lineCount > 0 then - for index, id in ipairs(maxLineList) do - lineList[index] = id - end - - for _, id in pairs(maxPosIdMap) do - posIdMap[id] = true - end - - hadSkill = maxGotSkill - end - - return hadSkill -end - -function BattleController:generateMonsterById(monsterId, callback) - local unitEntity = DataManager.BattleData:addMonster(monsterId, true) - local modelId = unitEntity:getModelId() - BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) - self.defTeam:removeAllUnits() - local monsterComp = spineObject:addLuaComponent(GConst.BattleConst.TYPEOF_LUA_COMP.BATTLE_MONSTER_COMPONENT) - monsterComp:initWithEntity(modelId, unitEntity, self) - self.defTeam:addUnit(monsterComp, true) - self.battleUI:refreshDefHp(unitEntity:getHp(), unitEntity:getHpPercent()) - monsterComp:playEnterBattlefield(false, callback) - end) -end - -function BattleController:addBattleExp(exp) - if not self.battleData or not exp then - return - end - self.battleData:addExp(exp) -end - -function BattleController:addTaskProgress(fieldName, count) - if not count then - return - end - self.taskProgress[fieldName] = (self.taskProgress[fieldName] or 0) + count -end - -function BattleController:setTaskProgress(fieldName, count) - if not count then - return - end - self.taskProgress[fieldName] = count -end - -function BattleController:getTaskProgress() - return self.taskProgress -end - -function BattleController:addFillWaitingCount() - self.waitingFillCount = self.waitingFillCount + 1 -end - -function BattleController:reduceFillWaitingCount() - self.waitingFillCount = self.waitingFillCount - 1 -end - -function BattleController:_tick(dt, originDt) - self.realTime = self.realTime + dt - self.waveDurationTime = self.waveDurationTime + originDt - self.totalDurationTime = self.totalDurationTime + originDt - if self.isPause then - return - end - if self.needWaitingBoardOver == false then - self:enterRoundBegin() - end - if self.waitingFillCount <= 0 and self.isWaitingFill and self.isRoundBeginCheck then - self:fillBoard(self.isRoundBeginCheck) - end - self.time = self.time + dt - self.atkTeam:tick(dt) - self.defTeam:tick(dt) - local count = #self.effectTexts - for i = count, 1, -1 do - self.effectTexts[i]:tick(dt) - if self.effectTexts[i]:getDuration() < 0 then - BattleHelper:recycleEffectText(self.effectTexts[i]) - table.remove(self.effectTexts, i) - end - end - self:checkDelayEffectText(dt) - self:checkSkillSlowDown(dt) - self:tick(dt) -end - -function BattleController:battleEnd() - if self.battleEndSid then - ModuleManager.BattleManager:unscheduleGlobal(self.battleEndSid) - self.battleEndSid = nil - end - self.battleUI:disableUITouch() - self.battleEndSid = ModuleManager.BattleManager:performWithDelayGlobal(function() - if self.battleUI then - self.battleUI:enableUITouch() - end - self:controllBattleEnd() - if self.victory then - ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_BATTLE_VICTORY) - end - end, 1) -end - -function BattleController:clear() - if self.alreadyClear then - return - end - self.alreadyClear = true - if self.tickSid then - BattleScheduler:unscheduleGlobal(self.tickSid) - self.tickSid = nil - end - BattleScheduler:clear() - BattleHelper:clear() - BattlePassive:clear() - BattlePool:clear() - self:unBindAll() - DataManager.BattleData:resetTimeSpeed() - ModuleManager.BattleManager:unscheduleAll() -end - -function BattleController:endBattleAndExit() - ModuleManager.BattleManager:exitBattle() -end - -function BattleController:checkSkillSlowDown(dt) - if self.skillSlowDownDuration == nil then - return - end - self.skillSlowDownDuration = self.skillSlowDownDuration - dt - if self.skillSlowDownDuration >= 0 then - return - end - self.skillSlowDownDuration = nil - self:resetTimeSpeed() -end - -function BattleController:checkDelayEffectText(dt) - if self.delayEffectTextCount <= 0 then - return - end - for i = self.delayEffectTextCount, 1, -1 do - local delayEffectText = self.delayEffectTextList[i] - delayEffectText.time = delayEffectText.time - dt - if delayEffectText.time <= 0 then - local effectTextComp = BattleHelper:getEffectText(self.battleUI:getNumberNode(), delayEffectText.colorType) - effectTextComp:showEffectNumber(delayEffectText.effectType, delayEffectText.num, delayEffectText.x, delayEffectText.y, delayEffectText.showCombo) - table.insert(self.effectTexts, effectTextComp) - local tailDelayEffectText = self.delayEffectTextList[self.delayEffectTextCount] - delayEffectText.colorType = tailDelayEffectText.colorType - delayEffectText.effectType = tailDelayEffectText.effectType - delayEffectText.num = tailDelayEffectText.num - delayEffectText.x = tailDelayEffectText.x - delayEffectText.y = tailDelayEffectText.y - delayEffectText.time = tailDelayEffectText.time - delayEffectText.showCombo = tailDelayEffectText.showCombo - self.delayEffectTextCount = self.delayEffectTextCount - 1 - end - end -end - -function BattleController:showEffectNumber(colorType, effectType, num, x, y, delayTime, showCombo) - if delayTime > 0 then - self.delayEffectTextCount = self.delayEffectTextCount + 1 - local obj = self.delayEffectTextList[self.delayEffectTextCount] - if obj == nil then - obj = {} - self.delayEffectTextList[self.delayEffectTextCount] = obj - end - obj.colorType = colorType - obj.effectType = effectType - obj.num = num - obj.x = x - obj.y = y - obj.time = delayTime - obj.showCombo = showCombo - else - local effectTextComp = BattleHelper:getEffectText(self.battleUI:getNumberNode(), colorType) - effectTextComp:showEffectNumber(effectType, num, x, y, showCombo) - table.insert(self.effectTexts, effectTextComp) - end -end - -function BattleController:getFxNode() - return self.battleUI:getFxNode() -end - -function BattleController:shakeScreen(shakeType, duration) - self.battleUI:shakeScreen(shakeType, duration) -end - -local function _addCurRoundAttr(self, instruction, callback) - if instruction.effectList then - local defComp = self:getOtherSideMainUnit(BattleConst.SIDE_ATK) - local mainComp = self:getOtherSideMainUnit(BattleConst.SIDE_DEF) - for _, effect in ipairs(instruction.effectList) do - local target - if effect:getTargetSide() == BattleConst.SIDE_DEF then - target = defComp - elseif effect:getTargetSide() == BattleConst.SIDE_ATK then - target = mainComp - else - local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTargetSide()] - if matchType then - target = self.atkTeam:getUnitComp()[matchType] - end - end - if target then - mainComp:takeEffect(effect, target) - end - end - end - - callback() -end - -local function _assisting(self, instruction, callback) - self.atkTeam:useAssistingSkill(instruction.assistingList, #self.instructions == 0, callback) -end - -local function _generalAttack(self, instruction, callback) - self.atkTeam:useNormalSkill(instruction.skillMatch, instruction.count, #self.instructions == 0, BattleConst.EFFECT_TYPE.DIRECT, BattleConst.ATTACK_ACTION_STATE.NORMAL, callback) -end - -local function _playSkill(self, instruction, callback) - self.atkTeam:useSkill(instruction.skillMatch, instruction.count, #self.instructions == 0, BattleConst.EFFECT_TYPE.DIRECT, BattleConst.ATTACK_ACTION_STATE.NORMAL, callback) -end - -BattleController._doInstruction = { - [BattleConst.INSTRUCTION_NAME.ADD_CUR_ROUND_ATTR] = _addCurRoundAttr, - [BattleConst.INSTRUCTION_NAME.ASSISTING] = _assisting, - [BattleConst.INSTRUCTION_NAME.GENERAL_ATTACK] = _generalAttack, - [BattleConst.INSTRUCTION_NAME.PLAY_SKILL] = _playSkill, -} - return BattleController \ No newline at end of file diff --git a/lua/app/module/battle/controller/battle_controller_arena.lua b/lua/app/module/battle/controller/battle_controller_arena.lua new file mode 100644 index 00000000..5dde3b13 --- /dev/null +++ b/lua/app/module/battle/controller/battle_controller_arena.lua @@ -0,0 +1,123 @@ +local BattleControllerPVP = require "app/module/battle/controller/battle_controller_pvp" +local BattleControllerArena = class("BattleControllerArena", BattleControllerPVP) +local BattleBuffEntity = require "app/userdata/battle/skill/battle_buff_entity" + +function BattleControllerArena:getBoardConfig() + return ConfigManager:getConfig("arena_board") +end + +function BattleControllerArena:getChapterConfig() + return ConfigManager:getConfig("arena_rank") +end + +function BattleControllerArena:getChapterId() + return 101 -- 临时 +end + +function BattleControllerArena:getBuffs() + if not self.initBuffs then + self.initBuffs = {} + local buffList = {} + local config = self:getChapterConfig()[self.chapterId] + if config and config.effect then + for _, effect in ipairs(config.effect) do + local atkBuffInfo = { + buff = GFunc.getTable(effect), + obj = GConst.BattleConst.SIDE_ATK + } + local defBuffInfo = { + buff = GFunc.getTable(effect), + obj = GConst.BattleConst.SIDE_DEF + } + table.insert(buffList, atkBuffInfo) + table.insert(buffList, defBuffInfo) + end + end + for _, info in ipairs(buffList) do + local buffEntity = BattleBuffEntity:create() + buffEntity:init(info.buff) + buffEntity:setTargetSide(info.obj) + buffEntity:setIsCantRemove(true) + buffEntity:setNotShowIcon(true) + + table.insert(self.initBuffs, {buffEntity = buffEntity, effect = info.buff}) + end + end + + return self.initBuffs +end + + +-- 战斗结束 +function BattleControllerArena:controllBattleEnd() +end + +-- 一共有多少波 +function BattleControllerArena:getMaxWave() + return 1 +end + +function BattleControllerArena:getMaxRoundCount() + if not self.arenaMaxRound then + self.arenaMaxRound = GFunc.getConstIntValue("arena_max_round") + end + return self.arenaMaxRound +end + +function BattleControllerArena:findNextDefUnit() + self:enterRoundEnd(true) +end + +function BattleControllerArena:postWaveOver(atkDead, isQuit) + +end + +function BattleControllerArena:postFightStart() + +end + +function BattleControllerArena:getAtkMinRow() + return GConst.BattleConst.PVP_ROW_COUNT // 2 +end + +function BattleControllerArena:getInitBoard() + if not self.boradList then + self.boradList = {} + self.fixedRandomGrid = {} + self.mysteryBoxIndexMap = {} + + local config = self:getChapterConfig()[self.chapterId] + local boardCfg = self:getBoardConfig() + local boardId = config.rand_board[math.random(1, #config.rand_board)] + local cfg = boardCfg[boardId] + if cfg then + local board = GFunc.getTable(cfg.board) + for index, info in ipairs(board) do + if info[2] == GConst.BattleConst.ELEMENT_TYPE.NONE then + board[index][2] = math.random(1, GConst.BattleConst.ELEMENT_TYPE_COUNT) + end + end + table.insert(self.boradList, {board = board, mysteryBoard = GFunc.getTable(cfg.mystery_box_board)}) + table.insert(self.fixedRandomGrid, GFunc.getTable(cfg.control_element)) + end + end + + return self.boradList, self.fixedRandomGrid, self.mysteryBoxIndexMap +end + +function BattleControllerArena:onTouchEvent(eventType, posId, isVirtual) + local isAtkAction = self.curActionSide == GConst.BattleConst.SIDE_ATK + local r = ModuleManager.BattleManager:getPosRC(posId).r + if isAtkAction then + if r <= self:getAtkMinRow() then + return + end + else + if r > self:getAtkMinRow() then + return + end + end + BattleControllerPVP.onTouchEvent(self, eventType, posId, isVirtual) +end + +return BattleControllerArena \ No newline at end of file diff --git a/lua/app/module/battle/controller/battle_controller_arena.lua.meta b/lua/app/module/battle/controller/battle_controller_arena.lua.meta new file mode 100644 index 00000000..cdf3bf80 --- /dev/null +++ b/lua/app/module/battle/controller/battle_controller_arena.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f700ac6962067a74d91df10905ad40ff +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/battle/controller/battle_controller_daily_challenge.lua b/lua/app/module/battle/controller/battle_controller_daily_challenge.lua index 50630403..30896d55 100644 --- a/lua/app/module/battle/controller/battle_controller_daily_challenge.lua +++ b/lua/app/module/battle/controller/battle_controller_daily_challenge.lua @@ -89,7 +89,7 @@ function BattleControllerDailyChallenge:controllBattleEnd() victory = self.victory, } local atkReport = {} - local teamEntity = DataManager.BattleData:getAtkTeam() + local teamEntity = self.battleData:getAtkTeam() local members = teamEntity:getAllMembers() local heroInfo = {} for k, v in pairs(members) do @@ -137,7 +137,7 @@ function BattleControllerDailyChallenge:postWaveOver(atkDead, isQuit) local isFianlStep = self.waveIndex >= self.maxWaveIndex - BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) + BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE, self.battleData, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) end function BattleControllerDailyChallenge:postFightStart() diff --git a/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua b/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua index 3b1746da..2d3a1107 100644 --- a/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua +++ b/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua @@ -51,7 +51,7 @@ function BattleControllerDungeonGold:controllBattleEnd() remainRound = remainRound, } local atkReport = {} - local teamEntity = DataManager.BattleData:getAtkTeam() + local teamEntity = self.battleData:getAtkTeam() local members = teamEntity:getAllMembers() local totalDamage = 0 for k, v in pairs(members) do @@ -96,7 +96,7 @@ function BattleControllerDungeonGold:postWaveOver(atkDead, isQuit) local isFianlStep = self.waveIndex >= self.maxWaveIndex - BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DUNGEON_GOLD, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) + BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DUNGEON_GOLD, self.battleData, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) end function BattleControllerDungeonGold:postFightStart() diff --git a/lua/app/module/battle/controller/battle_controller_dungeon_shards.lua b/lua/app/module/battle/controller/battle_controller_dungeon_shards.lua index 058ef731..56dc2fb7 100644 --- a/lua/app/module/battle/controller/battle_controller_dungeon_shards.lua +++ b/lua/app/module/battle/controller/battle_controller_dungeon_shards.lua @@ -20,7 +20,7 @@ function BattleControllerDungeonShards:controllBattleEnd() victory = self.victory, } local atkReport = {} - local teamEntity = DataManager.BattleData:getAtkTeam() + local teamEntity = self.battleData:getAtkTeam() local members = teamEntity:getAllMembers() local totalDamage = 0 for k, v in pairs(members) do @@ -64,7 +64,7 @@ function BattleControllerDungeonShards:postWaveOver(atkDead, isQuit) local isFianlStep = self.waveIndex >= self.maxWaveIndex - BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DUNGEON_SHARDS, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) + BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DUNGEON_SHARDS, self.battleData, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) end function BattleControllerDungeonShards:postFightStart() diff --git a/lua/app/module/battle/controller/battle_controller_pvp.lua b/lua/app/module/battle/controller/battle_controller_pvp.lua index 6377cbd7..a138b0d7 100644 --- a/lua/app/module/battle/controller/battle_controller_pvp.lua +++ b/lua/app/module/battle/controller/battle_controller_pvp.lua @@ -2,6 +2,8 @@ local BattleHelper = require "app/module/battle/helper/battle_helper" local BattleBaseController = require "app/module/battle/controller/battle_base_controller" local BattleControllerPVP = class("BattleControllerPVP", BattleBaseController) local BattleConst = GConst.BattleConst +local SIDE_ATK = BattleConst.SIDE_ATK +local SIDE_DEF = BattleConst.SIDE_DEF -- *************各个子模块的战斗需要重写的方法 START************* function BattleControllerPVP:getBoardConfig() @@ -38,80 +40,6 @@ function BattleControllerPVP:findNextDefUnit() self:enterRoundEnd(true) end -function BattleControllerPVP:onLinkChange() - self.battleUI:hideAllSfxLine() - self.linkChangeNeedFalsePosMap = table.clearOrCreate(self.linkChangeNeedFalsePosMap) - for posId, entity in pairs(self.battleData:getGridEnties()) do - if entity:getCell() then - self.linkChangeNeedFalsePosMap[posId] = entity:getCell() - end - end - - local sequence = self.battleData:getGridSequence() - local mainElementType - - for index, info in ipairs(sequence) do - local entity = self.battleData:getGridEntity(info.posId) - if not mainElementType then - local skillId = entity:getSkillId() - if not skillId then - mainElementType = entity:getElementType() - break - end - end - end - - local count = #sequence - - for index, info in ipairs(sequence) do - local entity = self.battleData:getGridEntity(info.posId) - if entity:getCell() then - entity:getCell():showHighLight(true, mainElementType, self.battleUI) - end - if self.linkChangeNeedFalsePosMap[info.posId] then - self.linkChangeNeedFalsePosMap[info.posId] = nil - end - if index < count then - local nextPosId = sequence[index + 1].posId - self.battleUI:getSfxLine(index, function(obj) - local curPos = ModuleManager.BattleManager:getPosInfo(info.posId) - local nextPos = ModuleManager.BattleManager:getPosInfo(nextPosId) - local pos, z = ModuleManager.BattleManager:getPosCenterAndDir(curPos, nextPos) - obj:setLocalScale(25, 25, 25) - obj:setLocalPosition(pos.x, pos.y, 0) - obj:setEulerAngles(0, 0, z) - end) - end - if index == count then - if entity:getCell() then - entity:getCell():showAni() - end - end - end - - for posId, cell in pairs(self.linkChangeNeedFalsePosMap) do - cell:showHighLight(false) - end - - for posId, info in pairs(self.battleData:getSkillInfluenceGrids()) do - local entity = self.battleData:getGridEntity(posId) - if info.direction ~= BattleConst.BOARD_RANGE_TYPE.RANDOM then - if entity:getCell() then - entity:getCell():showCircle(true) - end - end - end - - if not self.atkTeam:getMainUnit().unitEntity:getActiveSkillLimit() then - local aniSequence, influenceElementType, lineCount, elementTypeMap, linkElementType = self:calculateCurElimination(true) - self.battleUI:refreshSkill(elementTypeMap, count > 0) - end - - if mainElementType then - self.atkTeam:changeMainUnit(mainElementType) - end -end - function BattleControllerPVP:postWaveOver(atkDead, isQuit) end @@ -120,15 +48,8 @@ function BattleControllerPVP:postFightStart() end -function BattleControllerPVP:onEliminationBegin() - -end - -function BattleControllerPVP:refreshWave() - if not self.battleUI then - return - end - self.battleUI:refreshWave(self.waveIndex) +function BattleControllerPVP:getMaxRoundCount() + return 1 end -- *************各个子模块的战斗需要重写的方法 END************* @@ -168,6 +89,209 @@ function BattleControllerPVP:initDefUnits(callback) end end +function BattleControllerPVP:onLoadComplete(...) + -- 处理技能 + local unlockAllSkill = function(side) + local skillPool = self.battleData:getSkillPool(side) + if skillPool then + for elementType, list in pairs(skillPool) do -- 先遍历一下未解锁的技能 + if not self.battleData:isUnlockedSkillElementType(elementType, side) then + local skillEntity = self.battleData:getSkillEntityByElement(elementType, side) + if skillEntity then + local skillId = skillEntity:getUnlockId() + if skillId then + self:dealSelectSkill(skillId, nil, side) + end + end + for _, skillId in ipairs(list) do + self:dealSelectSkill(skillId, nil, side) + end + end + end + self.battleUI:refreshSkill(nil, nil, side) + end + end + unlockAllSkill(SIDE_ATK) + unlockAllSkill(SIDE_DEF) + BattleBaseController.onLoadComplete(self, ...) +end + +function BattleControllerPVP:enterBattleStep() + self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_TEAM_ACTION + self.battleTeamActionList = table.clearOrCreate(self.battleTeamActionList) + + local action = function() + if self.curActionSide == SIDE_ATK then + self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ATK_STEP + else + self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_DEF_STEP + end + self:exeInstructions(function() + self:enterNextTeamAction() + end, self.curActionSide) + end + self:addTeamActionList(action, 1) + self:enterNextTeamAction() +end + +function BattleControllerPVP:enterNextTeamAction() + self.atkTeam:onActionOver() + self.defTeam:onActionOver() + + self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_TEAM_ACTION_OVER + self:hideCombo() + self:hideCounterAttack() + + if self:checkTeamIsDead(function() self:enterRoundEnd() end) then + return + end + + if not self.battleTeamActionList or not self.battleTeamActionList[1] then + if self.curActionSide == SIDE_DEF then -- 防守方行动结束 回合结束 + self:enterRoundEnd() + else + self:setCurActionSide(SIDE_DEF) + self.battleUI:enterShowBoardAni(function() + self:enterElimination() + end) + end + return + end + + local action = table.remove(self.battleTeamActionList, 1) + action() +end + +function BattleControllerPVP:getSkillElementListRow() + self.skillElementListRow = table.clearOrCreate(self.skillElementListRow) + local min, max = self:getCurActionBoardRowRange() + if self.curActionSide == SIDE_ATK then + for row = max, min, -1 do + table.insert(self.skillElementListRow, row) + end + else + for row = min, max do + table.insert(self.skillElementListRow, row) + end + end + + return self.skillElementListRow +end + +function BattleControllerPVP:onFillBoardOver(...) + BattleBaseController.onFillBoardOver(self, ...) + + --- 遍历 + local index = 1 + for posId, entity in pairs(self.battleData:getGridEnties()) do + if self:getPosIdInCurActionBoardRowRange(posId) and entity:getSkillId() then + if entity:getSkillSide() ~= self.curActionSide then + local skillMatchType = entity:getSkillMatchType() + if skillMatchType then + local skillEntity = self.battleData:getSkillEntityByElement(skillMatchType, self.curActionSide) + if skillEntity then + entity:setSkilId(skillEntity:getSkillId(), false, self.curActionSide) + self.battleUI:playChangeElementSfx(posId, index) + index = index + 1 + end + end + end + end + end +end + +function BattleControllerPVP:enterElimination(needDelay) + if self.showSelectSkillSid then + ModuleManager.BattleManager:unscheduleGlobal(self.showSelectSkillSid) + self.showSelectSkillSid = nil + end + + if self.battleData:useAddlvCount() then + self:tryShowSelectSkillComp(needDelay) + return + end + + self.battleUI:hideAllBoardSfxs() + + local curActionUnitComp = self:getCurActionUnitComp() + if curActionUnitComp:getIsLimit() then + if curActionUnitComp:getIsFrozen() then + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ARENA_BATTLE_DESC_4)) + elseif curActionUnitComp:getIsLethargy() then + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ARENA_BATTLE_DESC_5)) + elseif curActionUnitComp:getIsStun() then + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ARENA_BATTLE_DESC_3)) + end + self:enterNextTeamAction() + return + end + + -- 检查棋盘 + local find, pathList = self:findAttention() + if not find then -- 如果没找到,就要打乱棋盘 + self:shuffleBoard(function() + self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION + end) + else + self.attentionList = pathList + self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION + end +end + +function BattleControllerPVP:enterRoundBegin(...) + local nextWaveRound = (self.waveRoundCount[self.waveIndex] or 0) + 1 + if self:getMaxRoundCount() < nextWaveRound then -- 超过最大回合, 直接结算 + self.victory = false + self:postWaveOver(false) + self:battleEnd() + return + end + BattleBaseController.enterRoundBegin(self, ...) + self:refreshWave() +end + +function BattleControllerPVP:enterRoundEnd() + self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_END + local defTeam = self.battleData:getDefTeam() + if not defTeam or defTeam:getIsDead() then -- 怪物死了, 直接进入刷新逻辑 + self.curWaveMonsterDead = true + -- self.atkTeam:onRoundEnd() + self:enterNextWave() + return + end + + local atkTeam = self.battleData:getAtkTeam() + if not atkTeam or atkTeam:getIsDead() then -- 英雄死了, 直接结算 + -- self.defTeam:onRoundEnd() + self:enterNextWave() + return + end + + -- self.atkTeam:onRoundEnd() + -- self.defTeam:onRoundEnd() + + if self:checkTeamIsDead(function() self:enterNextWave() end) then + return + end + + self:onRoundEnd() +end + +function BattleControllerPVP:setCurActionSide(side) + self.curActionSide = side or SIDE_ATK + if self.curActionSide == SIDE_ATK then + self.atkTeam:onRoundEnd() + else + self.defTeam:onRoundEnd() + end +end + +function BattleControllerPVP:refreshWave() + if not self.battleUI then + return + end + self.battleUI:refreshWave(self.waveRoundCount[self.waveIndex] or 0) +end return BattleControllerPVP \ No newline at end of file diff --git a/lua/app/module/battle/controller/battle_controller_stage.lua b/lua/app/module/battle/controller/battle_controller_stage.lua index 928b61e3..b152c6ed 100644 --- a/lua/app/module/battle/controller/battle_controller_stage.lua +++ b/lua/app/module/battle/controller/battle_controller_stage.lua @@ -61,7 +61,7 @@ function BattleControllerStage:controllBattleEnd() victory = self.victory, } local atkReport = {} - local teamEntity = DataManager.BattleData:getAtkTeam() + local teamEntity = self.battleData:getAtkTeam() local members = teamEntity:getAllMembers() for k, v in pairs(members) do local report = { @@ -103,7 +103,7 @@ function BattleControllerStage:postWaveOver(atkDead, isQuit) local isFianlStep = self.waveIndex >= self.maxWaveIndex - BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.STAGE, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) + BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.STAGE, self.battleData, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount) end function BattleControllerStage:postFightStart() diff --git a/lua/app/module/battle/helper/battle_board_touch_helper.lua b/lua/app/module/battle/helper/battle_board_touch_helper.lua new file mode 100644 index 00000000..29774a91 --- /dev/null +++ b/lua/app/module/battle/helper/battle_board_touch_helper.lua @@ -0,0 +1,205 @@ +local BattleBoardTouchHelper = class("BattleBoardTouchHelper") +local BattleConst = GConst.BattleConst +local ELIMINATION_TOUCH_EVENT = GConst.ELIMINATION_TOUCH_EVENT + +function BattleBoardTouchHelper:init(battleController) + self.battleController = battleController + self.battleUI = battleController.battleUI + self.battleData = battleController.battleData +end + +function BattleBoardTouchHelper:onTouchEvent(eventType, posId, isVirtual) + if self.battleController.roundStep ~= BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION then + return + end + local entity = self.battleData:getGridEntity(posId) + if not entity or not entity:canLink() then + return + end + + if eventType == ELIMINATION_TOUCH_EVENT.DOWN then + self:onLinkStart(entity, posId, isVirtual) + elseif eventType == ELIMINATION_TOUCH_EVENT.ENTER then + if self.battleData:getIsVirtual() and not isVirtual then + return + end + + self:onLinkEnter(entity, posId, isVirtual) + elseif eventType == ELIMINATION_TOUCH_EVENT.EXIT then + + else -- 取消和抬起 + self:onLinkCancelOrUp(entity, posId, isVirtual) + end +end + +function BattleBoardTouchHelper:onLinkStart(entity, posId, isVirtual) + if DataManager.TutorialData:getIsInTutorial() then + local elementList = DataManager.TutorialData:getTargetElement() + if elementList then + local find = false + for _, curPosId in ipairs(elementList) do + if curPosId == posId then + find = true + break + end + end + if not find then + return + end + end + end + + if not isVirtual then + self.battleUI:showTutorialFinger() + end + if #self.battleData:getGridSequence() > 0 then + self.battleController:clearGridSequence() + end + self.battleData:insertGridSequence(posId, self.battleController:snapshotBoard(), isVirtual) + local skillEntity = self.battleController:getSkillEntityBySkillId(entity:getSkillId()) + local maskElementType = entity:getElementType(skillEntity) + self.battleUI:showBoardMask(maskElementType, skillEntity and entity:getPosId()) + self.battleController:findSkillInfluenceGrids() + self.battleController:onLinkChange() + + if not isVirtual then + AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_BO_1) + if skillEntity then + AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_SKILL) + end + end +end + +function BattleBoardTouchHelper:onLinkEnter(entity, posId, isVirtual) + local sequence = self.battleData:getGridSequence() + local sequenceCount = #sequence + local info = sequence[sequenceCount] + local lastPosId = info and info.posId + if not lastPosId then + return + end + local outLineMap = BattleConst.GRID_OUT_LINE_POS_ID[lastPosId] + if not outLineMap or not outLineMap[posId] then + return + end + + if self.battleData:alreadyInsertSequence(posId) then + local info = sequence[#sequence - 1] + local beforePosId = info and info.posId + if beforePosId == posId then -- 进入的是倒数第二个,则移除倒数第一个 + local snapshot = self.battleData:removeGridSequence(lastPosId) + if snapshot then -- 如果有快照,则恢复一次 + for posId, info in pairs(snapshot) do + self.battleData:setInfoBySnapshop(posId, info) + end + end + + local lastEntity = self.battleData:getGridEntity(beforePosId) + local lastSkillEntity = self.battleController:getSkillEntityBySkillId(lastEntity:getSkillId()) + local maskElementType = lastEntity:getElementType(lastSkillEntity) + + local _, skillPosId = self.battleData:getSequenceHadSkill() + self.battleUI:showBoardMask(maskElementType, skillPosId) + + self.battleController:findSkillInfluenceGrids() + self.battleController:onLinkChange() + end + return + end + + local skillId = entity:getSkillId() + local skillEntity = self.battleController:getSkillEntityBySkillId(skillId) + local elementType = entity:getElementType(skillEntity) + + local lastEntity = self.battleData:getGridEntity(lastPosId) + local lastSkillId = lastEntity:getSkillId() + local lastSkillEntity = self.battleController:getSkillEntityBySkillId(lastSkillId) + local lastElementType = lastEntity:getElementType(lastSkillEntity) + + local hadSkillId, skillPosId = self.battleData:getSequenceHadSkill() + if skillEntity and hadSkillId then + return + end + + if not elementType or not lastElementType then + else + if lastElementType ~= elementType then + return + end + end + + local maskElementType = elementType or lastElementType + if not skillPosId then + if skillId then + skillPosId = posId + end + end + self.battleUI:showBoardMask(maskElementType, skillPosId) + + self.battleData:insertGridSequence(posId, self.battleController:snapshotBoard(), isVirtual) + if lastEntity:getNeedChangePos() and not entity:getNeedChangePos() then -- 需要移动到队列末尾 + local lastSkillId = lastEntity:getSkillId() + local skillId = entity:getSkillId() + self.battleController:setGridSkillId(lastPosId, skillId) + self.battleController:setGridSkillId(posId, lastSkillId) + end + + local newElementType = elementType or lastElementType + if newElementType then + entity:setElementType(newElementType) + lastEntity:setElementType(newElementType) + end + + entity:addLinkSkillCount() + + self.battleController:findSkillInfluenceGrids() + self.battleController:onLinkChange() + + if not isVirtual then + if sequenceCount + 1 == self.battleController:getMinEliminationCount() then + AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_READY) + end + AudioManager:playEffect(AudioManager:getBoEffectID(sequenceCount + 1)) + if skillEntity then + AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_SKILL) + end + end +end + +function BattleBoardTouchHelper:onLinkCancelOrUp(entity, posId, isVirtual) + if isVirtual then + return + end + + local tutorialElementList + if DataManager.TutorialData:getIsInTutorial() then + tutorialElementList = DataManager.TutorialData:getTargetElement() + end + + self.battleUI:showBoardMask(nil) + local sequence = self.battleData:getGridSequence() + local count = #sequence + if count < self.battleController:getMinEliminationCount() then + self.battleController:clearGridSequence() + + AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_CANCEL) + if tutorialElementList then + self.battleUI:showTutorialFinger(tutorialElementList) + end + return + end + + AudioManager:playEffect(AudioManager.EFFECT_ID.LINK_OVER) + + if tutorialElementList then + local posIdmap = {} + for _, info in ipairs(sequence) do + posIdmap[info.posId] = true + end + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ELIMINATION_OVER, posIdmap) + else + self.battleController:onLinkOver() + end +end + +return BattleBoardTouchHelper \ No newline at end of file diff --git a/lua/app/module/battle/helper/battle_board_touch_helper.lua.meta b/lua/app/module/battle/helper/battle_board_touch_helper.lua.meta new file mode 100644 index 00000000..f70a08c8 --- /dev/null +++ b/lua/app/module/battle/helper/battle_board_touch_helper.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6d402be3730fc974bb074f1094b877d2 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/battle/helper/battle_buff_special.lua b/lua/app/module/battle/helper/battle_buff_special.lua index 095c70c8..5237ba9a 100644 --- a/lua/app/module/battle/helper/battle_buff_special.lua +++ b/lua/app/module/battle/helper/battle_buff_special.lua @@ -59,16 +59,18 @@ local function _undeadOff(buffSender, target, buff, buffEffect) end local function _imprisonOn(buffSender, buff, target, buffEffect) - if target.side == GConst.BattleConst.SIDE_ATK then - DataManager.BattleData:lockAllSkillGrid(true) + local battleController = ModuleManager.BattleManager.battleController + if battleController then + battleController.battleData:lockAllSkillGrid(true, target.side) end target.unitEntity:addActiveSkillLimit(buff:getName()) return 1 end local function _imprisonOff(buffSender, target, buff, buffEffect) - if target.side == GConst.BattleConst.SIDE_ATK then - DataManager.BattleData:lockAllSkillGrid(false) + local battleController = ModuleManager.BattleManager.battleController + if battleController then + battleController.battleData:lockAllSkillGrid(false, target.side) end target.unitEntity:removeActiveSkillLimit(buff:getName()) return 1 diff --git a/lua/app/module/battle/helper/battle_helper.lua b/lua/app/module/battle/helper/battle_helper.lua index 9a2128fd..8b3d8501 100644 --- a/lua/app/module/battle/helper/battle_helper.lua +++ b/lua/app/module/battle/helper/battle_helper.lua @@ -31,6 +31,14 @@ function BattleHelper:getBaseOrder() return self.baseOrder end +function BattleHelper:setBattleData(battleBaseData) + self.battleData = battleBaseData +end + +function BattleHelper:getBattleData() + return self.battleData +end + function BattleHelper:getFxConfig() if self.fxCfg == nil then self.fxCfg = ConfigManager:getConfig("fx") @@ -78,7 +86,7 @@ function BattleHelper:loadBattleHeroModel(id, parent, callback) if self.characterMap then self.characterMap[spineObject:getInstanceID()] = spineObject end - local timeScale = DataManager.BattleData:getTimeScale() + local timeScale = self:getBattleData():getTimeScale() spineObject:setTimeScale(timeScale) callback(spineObject) else @@ -86,7 +94,7 @@ function BattleHelper:loadBattleHeroModel(id, parent, callback) spineObject:setDefaultMix(0) if self.characterMap then self.characterMap[spineObject:getInstanceID()] = spineObject - local timeScale = DataManager.BattleData:getTimeScale() + local timeScale = self:getBattleData():getTimeScale() spineObject:setTimeScale(timeScale) callback(spineObject) end @@ -126,7 +134,7 @@ function BattleHelper:getEffectAsync(name, parent, callback) if self.effectMap then self.effectMap[effect:getInstanceID()] = effect end - local timeScale = DataManager.BattleData:getTimeScale() + local timeScale = self:getBattleData():getTimeScale() effect:setTimeScale(timeScale) effect:setActive(true) callback(effect) @@ -135,7 +143,7 @@ function BattleHelper:getEffectAsync(name, parent, callback) if self.effectMap then effect:initParticleSystemRendererList() self.effectMap[effect:getInstanceID()] = effect - local timeScale = DataManager.BattleData:getTimeScale() + local timeScale = self:getBattleData():getTimeScale() effect:setTimeScale(timeScale) callback(effect) end diff --git a/lua/app/module/battle/helper/battle_skill_condition_handle.lua b/lua/app/module/battle/helper/battle_skill_condition_handle.lua index 933e867b..a50ba171 100644 --- a/lua/app/module/battle/helper/battle_skill_condition_handle.lua +++ b/lua/app/module/battle/helper/battle_skill_condition_handle.lua @@ -57,18 +57,10 @@ function BattleSkillConditionHandle.judgeSkillEffectCondition(buffConditions, co local func = BattleSkillConditionHandle._judgeSkillEffectCondition[condition.type] if func then local target - if side == BattleConst.SIDE_ATK then - if condition.side == 1 then - target = battleController.atkTeam:getMainUnit() - else - target = battleController.defTeam:getMainUnit() - end + if condition.side == 1 then + target = battleController.getCurActionTeam(side):getMainUnit() else - if condition.side == 1 then - target = battleController.defTeam:getMainUnit() - else - target = battleController.atkTeam:getMainUnit() - end + target = battleController.getOtherSideTeam(side):getMainUnit() end if func(condition, conditionRel, target, battleController) then diff --git a/lua/app/module/battle/skill/battle_board_skill_handle.lua b/lua/app/module/battle/skill/battle_board_skill_handle.lua index 35287173..807fa499 100644 --- a/lua/app/module/battle/skill/battle_board_skill_handle.lua +++ b/lua/app/module/battle/skill/battle_board_skill_handle.lua @@ -23,7 +23,7 @@ local function _takeElimination(posId, skillEntity, gridEntities, sequenceEntiti cludePosIdsMap[info.posId] = info end - DataManager.BattleData:cacheSkillInfluenceGrids(cludePosIdsMap) + battleController.battleData:cacheSkillInfluenceGrids(cludePosIdsMap) end end @@ -80,7 +80,7 @@ local function _takeEliminationGridAndElement(posId, skillEntity, gridEntities, cludePosIdsMap[info.posId] = info end - DataManager.BattleData:cacheSkillInfluenceGrids(cludePosIdsMap) + battleController.battleData:cacheSkillInfluenceGrids(cludePosIdsMap) end end @@ -418,7 +418,7 @@ local function _takeAddSkillEnergy(atkUnitComp, skillEntity, battleController) if elementType == BattleConst.ELEMENT_TYPE.NONE then local boardSkills local count = 0 - for eType, entity in pairs(battleController.battleData:getSkillEntities()) do + for eType, entity in pairs(battleController:getSkillEntities()) do if entity:getUnlocked() then if not boardSkills then boardSkills = {} @@ -434,7 +434,7 @@ local function _takeAddSkillEnergy(atkUnitComp, skillEntity, battleController) end elementTypeMap = {[elementType] = addEnergy} - battleController.battleData:addSkillEnergy(elementTypeMap) + battleController:addSkillEnergy(elementTypeMap) battleController.battleUI:refreshSkill() end diff --git a/lua/app/module/battle/skill/battle_grid_effect_handle.lua b/lua/app/module/battle/skill/battle_grid_effect_handle.lua index 95c71bd8..31e1dfd9 100644 --- a/lua/app/module/battle/skill/battle_grid_effect_handle.lua +++ b/lua/app/module/battle/skill/battle_grid_effect_handle.lua @@ -29,7 +29,7 @@ local function _crossSpread(entity, gridEntities, battleController, onlyCheck) tempList = table.shuffle(GFunc.getTable(tempList)) for _, posId in ipairs(tempList) do local gridEntity = gridEntities[posId] - if gridEntity:isEmptyIdle() then + if gridEntity and gridEntity:isEmptyIdle() then if battleController.battleUI and entity:getEffectSfx() then battleController.battleUI:showGridEffectSfx(posId, entity:getEffectSfx(), function() battleController.battleData:setGridType(posId, entity:getGridType() or BattleConst.GRID_TYPE.JELLY) @@ -63,7 +63,7 @@ local function _crossSpreadNotBreak(entity, gridEntities, battleController, only tempList = table.shuffle(GFunc.getTable(tempList)) for _, posId in ipairs(tempList) do local gridEntity = gridEntities[posId] - if gridEntity:isEmptyIdle() then + if gridEntity and gridEntity:isEmptyIdle() then battleController.battleData:setGridType(posId, entity:getGridType() or BattleConst.GRID_TYPE.JELLY, true) if battleController.battleUI and entity:getEffectSfx() then battleController.battleUI:showGridEffectSfx(posId, entity:getEffectSfx(), function() @@ -124,7 +124,7 @@ local function _crossMoveNotBreak(entity, gridEntities, battleController, onlyCh tempList = table.shuffle(GFunc.getTable(tempList)) for _, posId in ipairs(tempList) do local gridEntity = gridEntities[posId] - if gridEntity:isEmptyIdle() and not map[posId] then + if gridEntity and gridEntity:isEmptyIdle() and not map[posId] then local direction = ModuleManager.BattleManager:getPosDirection(entity:getPosId(), posId) local cell = entity:getCell() if cell then diff --git a/lua/app/module/battle/skill/battle_rogue_skill_handle.lua b/lua/app/module/battle/skill/battle_rogue_skill_handle.lua index 4595e43b..6398c233 100644 --- a/lua/app/module/battle/skill/battle_rogue_skill_handle.lua +++ b/lua/app/module/battle/skill/battle_rogue_skill_handle.lua @@ -18,10 +18,11 @@ local _changeBaseSkill = function(skillId, skillInfo, battleBaseData, battleCont if skillEntity then local skillId = skillEntity:getSkillId() battleBaseData:changeSkillId(elementType, newSkillId, side) - if not battleBaseData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - local unitEntity = battleBaseData.atkTeam:getAllMembers()[elementType] + local unitEntity = actionTeam:getAllMembers()[elementType] if unitEntity then unitEntity:changeSkillId(skillId, newSkillId) for effectType, effect in pairs(skillEntity:getSkillRoundAdd()) do -- 技能回合数 @@ -39,54 +40,55 @@ local _changeBaseSkill = function(skillId, skillInfo, battleBaseData, battleCont end end -local _addEliminationRange = function(skillId, skillInfo, battleData, battleController, value, side) +local _addEliminationRange = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.boardrange then return end - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = battleBaseData:getSkillEntityByElement(elementType, side) if entity then entity:addBoardRange(skillInfo.boardrange) end end -local _canLinkAnyElement = function(skillId, skillInfo, battleData, battleController, value, side) +local _canLinkAnyElement = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType then return end - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = battleBaseData:getSkillEntityByElement(elementType, side) if entity then entity:setIgnoreElementType(true) end end -local _addLinkAtkp = function(skillId, skillInfo, battleData, battleController, value, side) +local _addLinkAtkp = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.effect then return end - if not battleData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - local unitEntity = battleData.atkTeam:getAllMembers()[elementType] + local unitEntity = actionTeam:getAllMembers()[elementType] if not unitEntity then return end for _, effect in ipairs(skillInfo.effect) do - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = actionTeam:getSkillEntityByElement(elementType, side) if entity then entity:addLinkEffect(effect, unitEntity, skillInfo.obj) end end end -local _changeElementType = function(skillId, skillInfo, battleData, battleController, value, side) +local _changeElementType = function(skillId, skillInfo, battleBaseData, battleController, value, side) if not skillInfo.boardrange or not skillInfo.parameter then return end @@ -100,7 +102,7 @@ local _changeElementType = function(skillId, skillInfo, battleData, battleContro battleController:changeElementType(count, elementType) end -local _addAttr = function(skillId, skillInfo, battleData, battleController, value, side) +local _addAttr = function(skillId, skillInfo, battleBaseData, battleController, value, side) if not skillInfo.attr then return end @@ -108,18 +110,18 @@ local _addAttr = function(skillId, skillInfo, battleData, battleController, valu if not value then value = math.random(skillInfo.attr.minnum, skillInfo.attr.maxnum) end - battleController:addHeroAttr(skillInfo.attr.type, value) + battleController:addHeroAttr(skillInfo.attr.type, value, side) end -local _unlockSkill = function(skillId, skillInfo, battleData, battleController, value, side) +local _unlockSkill = function(skillId, skillInfo, battleBaseData, battleController, value, side) if not skillInfo.skill_position then return end - battleData:unlockSkillEntity(skillInfo.skill_position, side) + battleBaseData:unlockSkillEntity(skillInfo.skill_position, side) end -local _addSkillEffectParams = function(skillId, skillInfo, battleData, battleController, value, side) +local _addSkillEffectParams = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.parameter then return @@ -131,7 +133,7 @@ local _addSkillEffectParams = function(skillId, skillInfo, battleData, battleCon end local effect - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = battleBaseData:getSkillEntityByElement(elementType, side) if entity and entity:getEffect() then local effectCfg = entity:getEffect()[index] if effectCfg then @@ -144,20 +146,21 @@ local _addSkillEffectParams = function(skillId, skillInfo, battleData, battleCon return end - local skillEntity = battleData:getSkillEntityByElement(elementType, side) + local skillEntity = battleBaseData:getSkillEntityByElement(elementType, side) if skillEntity then local skillId = skillEntity:getSkillId() skillEntity:addSkillEffecuNumAdd(effect) - if not battleData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - if battleData.atkTeam:getAllMembers()[elementType] then - battleData.atkTeam:getAllMembers()[elementType]:addSkillParams(skillId, effect) + if actionTeam:getAllMembers()[elementType] then + actionTeam:getAllMembers()[elementType]:addSkillParams(skillId, effect) end end end -local _addSkillRound = function(skillId, skillInfo, battleData, battleController, value, side) +local _addSkillRound = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.parameter then return @@ -170,7 +173,7 @@ local _addSkillRound = function(skillId, skillInfo, battleData, battleController end local effect - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = battleBaseData:getSkillEntityByElement(elementType, side) if entity and entity:getEffect() then local effectCfg = entity:getEffect()[index] if effectCfg then @@ -183,20 +186,21 @@ local _addSkillRound = function(skillId, skillInfo, battleData, battleController return end - local skillEntity = battleData:getSkillEntityByElement(elementType, side) + local skillEntity = battleBaseData:getSkillEntityByElement(elementType, side) if skillEntity then local skillId = skillEntity:getSkillId() skillEntity:addSkillRoundAdd(effect) - if not battleData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - if battleData.atkTeam:getAllMembers()[elementType] then - battleData.atkTeam:getAllMembers()[elementType]:addSkillRound(skillId, effect) + if actionTeam:getAllMembers()[elementType] then + actionTeam:getAllMembers()[elementType]:addSkillRound(skillId, effect) end end end -local _addSkillEffect = function(skillId, skillInfo, battleData, battleController, value, side) +local _addSkillEffect = function(skillId, skillInfo, battleBaseData, battleController, value, side) if not skillInfo.effect then return end @@ -206,16 +210,15 @@ local _addSkillEffect = function(skillId, skillInfo, battleData, battleControlle return end - local atkComp = battleController.atkTeam:getMainUnit() - local defComp = battleController.defTeam:getMainUnit() + local actionTeam = battleController:getCurActionTeam(side) for _, effect in ipairs(effects) do - local target = atkComp + local target if skillInfo.obj == BattleConst.SIDE_DEF then - target = defComp + target = battleController:getOtherSideTeam(side):getMainUnit() elseif skillInfo.obj == BattleConst.SIDE_ATK then - target = atkComp + target = actionTeam elseif skillInfo.obj == BattleConst.SIDE_ATK_ALL then - for matchtype, comp in pairs(battleController.atkTeam:getUnitComp()) do + for matchtype, comp in pairs(actionTeam) do local buffEntity = BattleBuffEntity:create() buffEntity:init(effect, comp.unitEntity) buffEntity:setTargetSide(skillInfo.obj) @@ -225,54 +228,59 @@ local _addSkillEffect = function(skillId, skillInfo, battleData, battleControlle else local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[skillInfo.obj] if matchType then - target = battleController.atkTeam:getUnitComp()[matchType] + target = actionTeam:getUnitComp()[matchType] end end + if not target then + return + end local buffEntity = BattleBuffEntity:create() - buffEntity:init(effect, atkComp.unitEntity) + buffEntity:init(effect, actionTeam:getUnitComp().unitEntity) buffEntity:setTargetSide(skillInfo.obj) - atkComp:takeEffect(buffEntity, target) + actionTeam:getUnitComp():takeEffect(buffEntity, target) end end -local _addSkillInInfluenceAtkp = function(skillId, skillInfo, battleData, battleController, value, side) +local _addSkillInInfluenceAtkp = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.effect then return end - if not battleData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - local unitEntity = battleData.atkTeam:getAllMembers()[elementType] + local unitEntity = actionTeam:getAllMembers()[elementType] if not unitEntity then return end - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = battleBaseData:getSkillEntityByElement(elementType, side) for _, effect in ipairs(skillInfo.effect) do entity:addInInfluenceEffect(effect, unitEntity, skillInfo.obj) end end -local _addSkillAttackBeforeEffect = function(skillId, skillInfo, battleData, battleController, value, side) +local _addSkillAttackBeforeEffect = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.effect then return end - if not battleData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - local unitEntity = battleData.atkTeam:getAllMembers()[elementType] + local unitEntity = actionTeam:getAllMembers()[elementType] if not unitEntity then return end - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = battleBaseData:getSkillEntityByElement(elementType, side) if entity then if skillInfo.cover_unlock then entity:removeSkillAttackBeforeEffect(skillInfo.cover_unlock) @@ -283,22 +291,23 @@ local _addSkillAttackBeforeEffect = function(skillId, skillInfo, battleData, bat end end -local _addSkillElementCountEffect = function(skillId, skillInfo, battleData, battleController, value, side) +local _addSkillElementCountEffect = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.effect then return end - if not battleData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - local unitEntity = battleData.atkTeam:getAllMembers()[elementType] + local unitEntity = actionTeam:getAllMembers()[elementType] if not unitEntity then return end - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = battleBaseData:getSkillEntityByElement(elementType, side) if entity then if skillInfo.cover_unlock then entity:removeElementCountEffect(skillInfo.cover_unlock) @@ -309,22 +318,23 @@ local _addSkillElementCountEffect = function(skillId, skillInfo, battleData, bat end end -local _addLinkCountMoreEffect = function(skillId, skillInfo, battleData, battleController, value, side) +local _addLinkCountMoreEffect = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.effect or not skillInfo.parameter then return end - if not battleData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - local unitEntity = battleData.atkTeam:getAllMembers()[elementType] + local unitEntity = actionTeam:getAllMembers()[elementType] if not unitEntity then return end - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = battleBaseData:getSkillEntityByElement(elementType, side) if entity then if skillInfo.cover_unlock then entity:removeLinkCountMoreEffects(skillInfo.cover_unlock) @@ -338,22 +348,23 @@ local _addLinkCountMoreEffect = function(skillId, skillInfo, battleData, battleC end end -local _addLinkCountPowerEffect = function(skillId, skillInfo, battleData, battleController, value, side) +local _addLinkCountPowerEffect = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.effect or not skillInfo.parameter then return end - if not battleData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - local unitEntity = battleData.atkTeam:getAllMembers()[elementType] + local unitEntity = actionTeam:getAllMembers()[elementType] if not unitEntity then return end - local entity = battleData:getSkillEntityByElement(elementType, side) + local entity = battleBaseData:getSkillEntityByElement(elementType, side) if entity then if skillInfo.cover_unlock then entity:removeLinkCountPowerEffects(skillInfo.cover_unlock) @@ -367,7 +378,7 @@ local _addLinkCountPowerEffect = function(skillId, skillInfo, battleData, battle end end -local _addSkillRatio = function(skillId, skillInfo, battleData, battleController, value, side) +local _addSkillRatio = function(skillId, skillInfo, battleBaseData, battleController, value, side) local elementType = skillInfo.skill_position if not elementType or not skillInfo.parameter then return @@ -380,7 +391,7 @@ local _addSkillRatio = function(skillId, skillInfo, battleData, battleController end local effect - local skillEntity = battleData:getSkillEntityByElement(elementType, side) + local skillEntity = battleBaseData:getSkillEntityByElement(elementType, side) if skillEntity and skillEntity:getEffect() then local effectCfg = skillEntity:getEffect()[index] if effectCfg then @@ -396,11 +407,12 @@ local _addSkillRatio = function(skillId, skillInfo, battleData, battleController if skillEntity then local skillId = skillEntity:getSkillId() skillEntity:addSkillRatioAdd(effect) - if not battleData.atkTeam then + local actionTeam = battleBaseData:getTeamBySide(side) + if not actionTeam then return end - if battleData.atkTeam:getAllMembers()[elementType] then - battleData.atkTeam:getAllMembers()[elementType]:addSkillRatio(skillId, effect) + if actionTeam:getAllMembers()[elementType] then + actionTeam:getAllMembers()[elementType]:addSkillRatio(skillId, effect) end end end diff --git a/lua/app/module/battle/team/battle_team.lua b/lua/app/module/battle/team/battle_team.lua index 0737a240..87e80a9e 100644 --- a/lua/app/module/battle/team/battle_team.lua +++ b/lua/app/module/battle/team/battle_team.lua @@ -628,11 +628,9 @@ function BattleTeam:onActionOver() local skillMatch if self.side == BattleConst.SIDE_ATK then self.battleController.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ATK_STEP - self.battleController.curTeam = self.battleController.atkTeam skillMatch = self:getMainUnit().unitEntity:getMatchType() else self.battleController.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_DEF_STEP - self.battleController.curTeam = self.battleController.defTeam end self:useNormalSkill(skillMatch, counterAttackCount, true, BattleConst.EFFECT_TYPE.DIRECT, BattleConst.ATTACK_ACTION_STATE.COUNTERATTACK, function() diff --git a/lua/app/module/tips/tips_manager.lua b/lua/app/module/tips/tips_manager.lua index 1ac6dac8..d923c250 100644 --- a/lua/app/module/tips/tips_manager.lua +++ b/lua/app/module/tips/tips_manager.lua @@ -121,9 +121,11 @@ function TipsManager:getRewardDesc(rewardId, rewardType) return GConst.EMPTY_STRING end -function TipsManager:showBattleBoardSkillTips(elementType, tarPrefabObj, alignType) +function TipsManager:showBattleBoardSkillTips(heroEntity, battleController, side, tarPrefabObj, alignType) local params = { - elementType = elementType, + heroEntity = heroEntity, + battleController = battleController, + side = side, aniType = UIManager.ANI_TYPE.NONE, } if tarPrefabObj then diff --git a/lua/app/ui/battle/battle_base_ui.lua b/lua/app/ui/battle/battle_base_ui.lua index 8cab7bd3..ab285a3e 100644 --- a/lua/app/ui/battle/battle_base_ui.lua +++ b/lua/app/ui/battle/battle_base_ui.lua @@ -27,6 +27,7 @@ function BattleBaseUI:initBaseInfo() -- local uiMap = self.root:genAllChildren() -- self.uiMap = uiMap -- self.gridNode = ? + -- self.boardCenterNode = ? -- self.boardNode = ? -- self.boardNode:setAnchoredPositionX(DEFAULT_X) -- self.boardMask2D = self.gridNode:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_RECT_MASK_2D) @@ -143,6 +144,7 @@ function BattleBaseUI:initSkillLineSfx() self.skillLightSfxs[24] = self.uiMap["battle_ui_pvp.board_root_node.ani_node.sfx_skill_b05_4"] self.skillLightSfxs[25] = self.uiMap["battle_ui_pvp.board_root_node.ani_node.sfx_skill_b05_5"] end + self:_initSkillLineSfx() end function BattleBaseUI:initGenerateSkillEffect() @@ -189,13 +191,43 @@ function BattleBaseUI:initBossEnterAni() -- self.bossEnterNode:setVisible(false) end +function BattleBaseUI:enterShowBoardAni(callback) + self:clearEnterShowBoardSeq() + + if callback then + callback() + end +end + +function BattleBaseUI:enterHideBoardAni(callback) + self:clearEnterShowBoardSeq() + + if callback then + callback() + end +end + +function BattleBaseUI:showTutorialFinger(posIdList) +end + +function BattleBaseUI:moveBattlefield(time) +end + --------------------------------end按需重写的方法-------------------------------- +function BattleBaseUI:getBGMId() + return AudioManager.BGM_ID.BATTLE +end + function BattleBaseUI:ctor(parmas) self.battleController = parmas.battleController self.battleData = self.battleController.battleData end +function BattleBaseUI:getPosInfo(posId) + return ModuleManager.BattleManager:getPosInfo(posId, self.battleData:getRowCount()) +end + function BattleBaseUI:onPressBackspace() if self.battleBuffTipsRoot then if self.battleBuffTipsRoot:getTransform().localScale.x > 0 then @@ -281,30 +313,32 @@ function BattleBaseUI:_initSkill(atkNode, atkCellPrefix, defNode, defCellPrefix) [SIDE_DEF] = {}, } - local initSKillCell = function(obj, elementType, sideSkillCells) + local initSKillCell = function(obj, elementType, sideSkillCells, side) sideSkillCells[elementType] = CellManager:addCellComp(obj, SKILL_NODE_CELL) - local skillEntity = DataManager.BattleData:getSkillEntities()[elementType] + local skillEntity = self.battleData:getSkillEntities(side)[elementType] if skillEntity then sideSkillCells[elementType]:refresh(skillEntity) end sideSkillCells[elementType]:getBaseObject():setActive(skillEntity ~= nil) - sideSkillCells[elementType]:addClickListener(function() - ModuleManager.TipsManager:showBattleBoardSkillTips(elementType, obj) - end) + if skillEntity then + sideSkillCells[elementType]:addClickListener(function() + ModuleManager.TipsManager:showBattleBoardSkillTips(self.battleData:getHeroEntity(elementType, side), self.battleController, side) + end) + end end for name, elementType in pairs(GConst.BattleConst.ELEMENT_TYPE) do if defCellPrefix then local obj = self.uiMap[defCellPrefix .. elementType] if obj then - initSKillCell(obj, elementType, self.skillNodeCells[SIDE_DEF]) + initSKillCell(obj, elementType, self.skillNodeCells[SIDE_DEF], SIDE_DEF) end end if atkCellPrefix then - local objDef = self.uiMap[atkCellPrefix .. elementType] - if objDef then - initSKillCell(objDef, elementType, self.skillNodeCells[SIDE_ATK]) + local obj = self.uiMap[atkCellPrefix .. elementType] + if obj then + initSKillCell(obj, elementType, self.skillNodeCells[SIDE_ATK], SIDE_ATK) end end end @@ -330,6 +364,9 @@ function BattleBaseUI:_initBuff(atkBuffPrefix, defBuffPrefix, battleBuffTipsRoot local obj = self.uiMap[defBuffPrefix .. i] if obj then self.tinyBuffCells[SIDE_DEF][i] = CellManager:addCellComp(obj, TINY_BUFF_CELL) + obj:addClickListener(function() + self.battleController:showBuffTips(SIDE_DEF) + end) end end @@ -337,6 +374,9 @@ function BattleBaseUI:_initBuff(atkBuffPrefix, defBuffPrefix, battleBuffTipsRoot local obj = self.uiMap[atkBuffPrefix .. i] if obj then self.tinyBuffCells[SIDE_ATK][i] = CellManager:addCellComp(obj, TINY_BUFF_CELL) + obj:addClickListener(function() + self.battleController:showBuffTips(SIDE_ATK) + end) end end end @@ -373,11 +413,12 @@ function BattleBaseUI:refreshBuff(side, buffList) local buffObj = nil local count = #buffList local buffCellCount = #self.tinyBuffCells[side] + local index = 1 for i = 1, count do buffObj = buffList[i] if buffObj and buffObj.buff:getIcon() and not buffObj.buff:getNotShowIcon() then - local cell = self.tinyBuffCells[side][i] + local cell = self.tinyBuffCells[side][index] if cell then cell:getBaseObject():setVisible(true) cell:refresh(buffObj.buff:getIcon(), buffObj.round) @@ -425,12 +466,6 @@ function BattleBaseUI:showRightBuffTips(buffList, autoClose) self:showBuffTips(buffList, autoClose) end -function BattleBaseUI:showTutorialFinger(posIdList) -end - -function BattleBaseUI:moveBattlefield(time) -end - function BattleBaseUI:getBattleNode() return self.battleNode end @@ -567,7 +602,7 @@ function BattleBaseUI:playSkillLineSfx(posId, boradRangeList, randomPosList) end end - local pos = ModuleManager.BattleManager:getPosInfo(posId) + local pos = self:getPosInfo(posId) for dir, range in pairs(directionAndRange) do local index = range * 10 + dir local obj = self.skillLineSfxs[index] @@ -585,7 +620,7 @@ function BattleBaseUI:playSkillLineSfx(posId, boradRangeList, randomPosList) self.skillLightSfxs.point:play() for i = 1, count do local tartgetPos = randomPosList[i] - tartgetPos = ModuleManager.BattleManager:getPosInfo(tartgetPos) + tartgetPos = self:getPosInfo(tartgetPos) local obj = self.skillLightSfxs[20 + i] if obj then obj:setAnchoredPosition(tartgetPos.x, tartgetPos.y) @@ -613,7 +648,7 @@ function BattleBaseUI:playChangeElementSfx(posId, index) self.root.changeElementSfxs = {} end - local pos = ModuleManager.BattleManager:getPosInfo(posId) + local pos = self:getPosInfo(posId) local info = self.root.changeElementSfxs[index] if info then local obj = info.obj @@ -994,7 +1029,7 @@ function BattleBaseUI:refreshSkill(elementMap, showSfx, side) end local skillCellMap = self.skillNodeCells[side] - for elementType, skillEntity in pairs(self.battleData:getSkillEntities()) do + for elementType, skillEntity in pairs(self.battleData:getSkillEntities(side)) do local skillCell = skillCellMap[elementType] if skillCell then skillCell:refresh(skillEntity, elementMap, showSfx) @@ -1173,7 +1208,7 @@ function BattleBaseUI:eliminationAni(aniSequence, effectGridMap, callback, side) local breakSfxNameIndexMap = {} for index, info in ipairs(aniSequence) do if not self.posIdMap[info.posId] then - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) + local pos = self:getPosInfo(info.posId) self.posIdMap[info.posId] = true local entity = self.battleData:getGridEntity(info.posId) @@ -1204,7 +1239,7 @@ function BattleBaseUI:eliminationAni(aniSequence, effectGridMap, callback, side) local posList = {} local count = 0 for _, posId in ipairs(info.aniPosList) do - table.insert(posList, ModuleManager.BattleManager:getPosInfo(posId)) + table.insert(posList, self:getPosInfo(posId)) count = count + 1 end anitime = count * GConst.BattleConst.GRID_BREAK_EFFECT_INTERVAL @@ -1231,7 +1266,7 @@ function BattleBaseUI:eliminationAni(aniSequence, effectGridMap, callback, side) if info.breakFlyToCharacter then targetPos = self.battleController.atkTeam:getMainUnit():getBaseObject():getTransform().position local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(targetPos) - targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) + targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardCenterNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) end self.eliminationAniSeq:Insert(time + 0.2, baseObject:getTransform():DOAnchorPos(targetPos, 0.3)) self.eliminationAniSeq:Insert(time + 0.2, baseObject:getTransform():DOScale(0.5, 0.3)) @@ -1286,7 +1321,7 @@ function BattleBaseUI:eliminationAni(aniSequence, effectGridMap, callback, side) callback() end - self:refreshSkill() + self:refreshSkill(nil, nil, side) self:resetParentAllSfxGridBreak() self.eliminationAniSeq = nil end) @@ -1298,7 +1333,7 @@ function BattleBaseUI:dealGridBreakSfx(time, info, breakSfxNameIndexMap) local breakIndex = breakSfxNameIndexMap[info.breakSfxName] self.eliminationAniSeq:InsertCallback(time, function() self:getSfxGridBreak(info.breakSfxName, breakIndex, function(obj) - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) + local pos = self:getPosInfo(info.posId) obj:setLocalPosition(pos.x, pos.y, 0) obj:play() end) @@ -1327,7 +1362,7 @@ function BattleBaseUI:dealGridEffectSfx(time, info, breakSfxNameIndexMap, entity obj:play() table.insert(self.flowEffects, obj) else - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) + local pos = self:getPosInfo(info.posId) obj:setLocalPosition(pos.x, pos.y, 0) obj:play() end @@ -1350,7 +1385,7 @@ end function BattleBaseUI:showGridEffectSfx(posId, sfxName, callback, customTime, zEuler) self:getSfxGridEffect(sfxName, function(info) info.isIdle = false - local pos = ModuleManager.BattleManager:getPosInfo(posId) + local pos = self:getPosInfo(posId) customTime = customTime or info.obj:getDuration() info.obj:setLocalPosition(pos.x, pos.y, 0) info.obj:setLocalEulerAngles(0, 0, zEuler) @@ -1382,7 +1417,7 @@ function BattleBaseUI:moveGridCells(gridEntityList, callback) for _, entity in pairs(gridEntityList) do local posId = entity:getPosId() local baseObject = entity:getCell():getBaseObject() - local pos = ModuleManager.BattleManager:getPosInfo(posId) + local pos = self:getPosInfo(posId) if entity:getEffectType() then baseObject:getTransform():SetAsLastSibling() end @@ -1422,7 +1457,7 @@ function BattleBaseUI:generateSkillAni(map, callback, side) local pos = self:getElementSkillPos(elementType, side) cell:getBaseObject():setAnchoredPosition(pos.x, pos.y) end) - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) + local pos = self:getPosInfo(info.posId) self.generateSkillAniSeq:Append(cell:getBaseObject():getTransform():DOAnchorPos(pos, 0.5)) if self.generateSkillSfxs and self.generateSkillSfxs[count] then self.generateSkillSfxs[count]:setAnchoredPosition(pos.x, pos.y) @@ -1512,7 +1547,7 @@ function BattleBaseUI:showMonsterSkillAni(map, monsterPos, callback) end local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(monsterPos) - monsterPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) + monsterPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardCenterNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) self.monsterSkillAniSeq = self.root:createBindTweenSequence() local count = 1 @@ -1526,7 +1561,7 @@ function BattleBaseUI:showMonsterSkillAni(map, monsterPos, callback) cell:refresh(entity) cell:getBaseObject():setAnchoredPosition(monsterPos.x, monsterPos.y) cell:getBaseObject():setLocalScale(0.3, 0.3, 0.3) - local pos = ModuleManager.BattleManager:getPosInfo(posId) + local pos = self:getPosInfo(posId) if count == 1 then self.monsterSkillAniSeq:Append(cell:getBaseObject():getTransform():DOAnchorPos(pos, 0.3)) else @@ -1551,7 +1586,7 @@ function BattleBaseUI:hideMonsterSkillGridCells() -- local obj = uiMap["battle_ui.bg_2.ani_node.grid_cell_m" .. elementType] -- if obj then -- local cell = CellManager:addCellComp(obj, GRID_CELL) - -- local entity = DataManager.BattleData:getNewGridEntity() + -- local entity = self.battleData:getNewGridEntity() -- entity:setCell(cell) -- table.insert(self.monsterSkillGridEntities, entity) -- end @@ -1605,7 +1640,7 @@ function BattleBaseUI:shuffleBoard(changeInfo, callback) local cell = entity:getCell() local posId = entity:getPosId() if cell then - local pos = ModuleManager.BattleManager:getPosInfo(posId) + local pos = self:getPosInfo(posId) self.shuffleBoardSeq:Insert(0, cell:getBaseObject():getTransform():DOAnchorPos(pos, 1)) end end @@ -1743,7 +1778,7 @@ function BattleBaseUI:doCacheAni(skillInfo, callback) local entity = self.root.skillAniGridEntities[index] if entity then entity:setSkilId(info.skillId) - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) + local pos = self:getPosInfo(info.posId) local cell = entity:getCell() if cell then cell:refresh(entity) @@ -1818,7 +1853,6 @@ function BattleBaseUI:doCachePopAni(skillInfo, callback) local entity = self.root.skillAniGridEntities[index] if entity then entity:setSkilId(info.skillId) - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) local cell = entity:getCell() if cell then cell:refresh(entity) @@ -1839,7 +1873,7 @@ function BattleBaseUI:doCachePopAni(skillInfo, callback) for index, info in ipairs(skillInfo) do local entity = self.root.skillAniGridEntities[index] if entity then - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) + local pos = self:getPosInfo(info.posId) local cell = entity:getCell() if cell then local obj = cell:getBaseObject() @@ -1884,7 +1918,7 @@ function BattleBaseUI:getElementSkillPos(elementType, side) else local targetPos = cell:getBaseObject():getTransform().position local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(targetPos) - targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) + targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardCenterNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) self.skillPoss[side][elementType] = targetPos end end @@ -2092,7 +2126,7 @@ function BattleBaseUI:showCommonSkillTips(skillId) end local value = 0 - local selectSkillMap = DataManager.BattleData:getSelectSkillMap() + local selectSkillMap = self.battleData:getSelectSkillMap(self.battleController:getCurActionSide()) if selectSkillMap[skillId] then value = selectSkillMap[skillId].value end @@ -2160,6 +2194,13 @@ function BattleBaseUI:showBossEnterAni(bornTime, bossName, monsterComp, callback end) end +function BattleBaseUI:clearEnterShowBoardSeq() + if self.enterShowBoardSeq then + self.enterShowBoardSeq:Kill() + self.enterShowBoardSeq = nil + end +end + function BattleBaseUI:clear() if self.alreadyClear then return @@ -2275,6 +2316,8 @@ function BattleBaseUI:clear() self.moveGridCellsSeq:Kill() self.moveGridCellsSeq = nil end + + self:clearEnterShowBoardSeq() end return BattleBaseUI \ No newline at end of file diff --git a/lua/app/ui/battle/battle_pause_ui.lua b/lua/app/ui/battle/battle_pause_ui.lua index b508c3fc..8bb9c7ca 100644 --- a/lua/app/ui/battle/battle_pause_ui.lua +++ b/lua/app/ui/battle/battle_pause_ui.lua @@ -28,7 +28,8 @@ end function BattlePauseUI:ctor(params) self.battleType = params.battleType - local map = DataManager.BattleData:getSelectSkillMap() + local battleController = ModuleManager.BattleManager.battleController + local map = battleController.battleData:getSelectSkillMap() self.skillList = {} for skillId, info in pairs(map) do local cfg = SKILL_ROGUE_CFG[skillId] diff --git a/lua/app/ui/battle/battle_skill_select_comp.lua b/lua/app/ui/battle/battle_skill_select_comp.lua index 2d6cb7fb..ad3c6f3d 100644 --- a/lua/app/ui/battle/battle_skill_select_comp.lua +++ b/lua/app/ui/battle/battle_skill_select_comp.lua @@ -77,10 +77,11 @@ function BattleSkillSelectComp:refreshBtns() uiMap["battle_select_skill_comp.skill_node.ad_btn.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_3)) uiMap["battle_select_skill_comp.skill_node.diamond_btn.tx"]:setText(GFunc.getRewardNum(GFunc.getConstReward("refresh_skill_cost"))) + local battleController = ModuleManager.BattleManager.battleController local cfgAdCount = GFunc.getConstIntValue("ad_refresh_skill") local cfgRefreshCount = GFunc.getConstIntValue("diamond_refresh_skill") + cfgAdCount - local adCount = DataManager.BattleData:getADRefreshSkillCount() - local refreshCount = DataManager.BattleData:getRefreshSkillCount() + local adCount = battleController.battleData:getADRefreshSkillCount() + local refreshCount =battleController.battleData:getRefreshSkillCount() local showAdBtn = cfgAdCount > adCount uiMap["battle_select_skill_comp.skill_node.ad_btn"]:setActive(showAdBtn) local showBtn = refreshCount < cfgRefreshCount diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index 5d20b6a3..33b7c02c 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -1,67 +1,20 @@ -local UIPrefabObject = require "app/bf/unity/uiprefab_object" -local BattleUI = class("BattleUI", BaseUI) +local BattleBaseUI = require "app/ui/battle/battle_base_ui" +local BattleUI = class("BattleUI", BattleBaseUI) local GRID_CELL = "app/ui/battle/cell/grid_cell" -local GRID_CELL_PATH = "assets/prefabs/ui/battle/cell/grid_cell.prefab" -local SKILL_NODE_CELL = "app/ui/battle/cell/skill_node_cell" local SELECT_SKILL_CELL = "app/ui/battle/cell/select_skill_cell" local BATTLE_SELECT_SKILL_COMP = "app/ui/battle/battle_skill_select_comp" local DEFAULT_X = 10000 -local BOARD_POS_UP = BF.Vector2(0, 47) -local BOARD_POS_DOWN = BF.Vector2(0, -740) -local BG_PATH = "assets/arts/textures/background/battle/%s.png" +local BOARD_POS_UP = BF.Vector2(0, 0) +local BOARD_POS_DOWN = BF.Vector2(0, 0) local CacheVector2 = CS.UnityEngine.Vector2(0, 0) - -local CACHE_SKILL_POS_1 = {x = 10, y = 360} -local CACHE_SKILL_POS_2 = {x = 10, y = 420} -local BATTLE_COMMON_PATH = "assets/arts/textures/background/battle_common/%s.png" -local BOARD_SFX_ORDER = GConst.UI_EFFECT_ORDER.LEVEL4 + 1 -local MAX_LASTSIBLING_TYPE = { - [8] = true, - [9] = true, - [10] = true, - [11] = true, -} - --- 响应安卓后退事件 -function BattleUI:onPressBackspace() - if self.battleBuffTipsRoot then - if self.battleBuffTipsRoot:getTransform().localScale.x > 0 then - self:hideBuffTips() - return - end - end - - ModuleManager.BattleManager:showPauseUI(self.battleController.battleType) -end - -function BattleUI:getPrefabPath() - return "assets/prefabs/ui/battle/battle_ui.prefab" -end - -function BattleUI:onClose() - self:clear() -end - -function BattleUI:getBGMId() - return AudioManager.BGM_ID.BATTLE -end - -function BattleUI:ctor(parmas) - self.battleController = parmas.battleController -end - -function BattleUI:onLoadRootComplete() - self:_display() - self:_addListeners() - self:_bind() -end - -function BattleUI:_display() +---------------------------------必须重写的方法---------------------------------- +function BattleUI:initBaseInfo() local uiMap = self.root:genAllChildren() self.uiMap = uiMap self.gridNode = uiMap["battle_ui.bg_2.board_node.grid_node"] self.boardNode = uiMap["battle_ui.bg_2.board_node"] + self.boardCenterNode = uiMap["battle_ui.bg_2.board_node.board_center_node"] self.boardNode:setAnchoredPositionX(DEFAULT_X) self.boardMask2D = self.gridNode:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_RECT_MASK_2D) self.boardMask = uiMap["battle_ui.bg_2.board_node.grid_node.board_mask"] @@ -72,49 +25,6 @@ function BattleUI:_display() self.boardCacheBox:setAnchoredPositionX(DEFAULT_X) self.battleRoot = uiMap["battle_ui.battle_root"] self.maxLayerNode = uiMap["battle_ui.battle_root.battle_node.max_layer_show_node"] - self:initBg() - self:initSkill() - self:initBuff() - self:initBattlefield() - self:initNumberNode() - self:initComboNode() - self:initHpNode() - self:initFxNode() - self:hideGenerateSkillGridCells() - self:initTutorialNode() - self:initUISfxs() - self:initSkillSelectCells() - self:hideAllSfxSmoke() - self:initSkillLineSfx() - self:initGenerateSkillEffect() - self:initSelectSkillNode() - self:initCommonSkillDescTips() - self:initBossEnterAni() - self:initCounterAttack() - self:refreshTaskBtn() -end - -function BattleUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["battle_ui.top_node.close_btn"]:addClickListener(function() - ModuleManager.BattleManager:showPauseUI(self.battleController.battleType) - end) - - self:addEventListener(EventManager.CUSTOM_EVENT.SHOW_ELIMINATION_TUTORAIL, function(posIdList) - self:showTutorialFinger(posIdList) - end) - - self:addEventListener(EventManager.CUSTOM_EVENT.SKILL_REFRESH_SUCC, function(posIdList) - if self.selectSkillComp then - self.selectSkillComp:getNewRandomSkill() - end - end) -end - -function BattleUI:_bind() - self:bind(DataManager.BattleData, "lvDirty", function() - self:refreshLv() - end, true) end function BattleUI:initBg() @@ -123,310 +33,27 @@ function BattleUI:initBg() local width = self.bg:fastGetSizeDelta() self.bg:setAnchoredPositionX(width/4) end - -function BattleUI:refreshChessBoard(boardBg) - self.boardNode:setTexture(string.format(BATTLE_COMMON_PATH, boardBg), function() - self.boardNode:setAnchoredPositionX(0) - end) -end - -function BattleUI:loadBg(bgName) - self.bg:setTexture(string.format(BG_PATH, bgName), function() - self.bg:setLocalScale(1, 1, 1) - end) -end - -function BattleUI:moveBattlefield(time) - local width = self.bg:fastGetSizeDelta() - self.bg:setAnchoredPositionX(width/4) - if self.bgMoveTween == nil then - self.bgMoveTween = self.bg:getTransform():DOAnchorPosX(-width/4, time) - self.bgMoveTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE) - self.bgMoveTween:SetAutoKill(false) - else - local x, y = self.bg:fastGetAnchoredPosition() - CacheVector2.x = -width/4 - CacheVector2.y = y - self.bgMoveTween:ChangeEndValue(CacheVector2, time, true) - self.bgMoveTween:Restart() - end -end - function BattleUI:initSkill() - if self.skillNodeCells then - return - end - self.skillNodeCells = {} - local uiMap = self.root:genAllChildren() - for name, elementType in pairs(GConst.BattleConst.ELEMENT_TYPE) do - local obj = uiMap["battle_ui.bg_2.skill_node.skill_node_cell_" .. elementType] - if obj then - self.skillNodeCells[elementType] = CellManager:addCellComp(obj, SKILL_NODE_CELL) - local skillEntity = DataManager.BattleData:getSkillEntities()[elementType] - if skillEntity then - self.skillNodeCells[elementType]:refresh(skillEntity) - end - self.skillNodeCells[elementType]:getBaseObject():setActive(skillEntity ~= nil) - self.skillNodeCells[elementType]:addClickListener(function() - ModuleManager.TipsManager:showBattleBoardSkillTips(elementType) - end) - end - end - - uiMap["battle_ui.bg_2.skill_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout() + local atkNode = uiMap["battle_ui.bg_2.skill_node"] + local atkCellPrefix = "battle_ui.bg_2.skill_node.skill_node_cell_" + self:_initSkill(atkNode, atkCellPrefix, nil, nil) end function BattleUI:initBuff() - -- buff icon - self.atkBuffIconList = { - self.uiMap["battle_ui.top_node.buff_l.buff_1"], - self.uiMap["battle_ui.top_node.buff_l.buff_2"], - self.uiMap["battle_ui.top_node.buff_l.buff_3"], - self.uiMap["battle_ui.top_node.buff_l.buff_4"], - } - for k, v in ipairs(self.atkBuffIconList) do - v:addClickListener(function() - self.battleController:showBuffTips(1) - end) - v:setLocalScale(0, 0, 0) - end - self.atkBuffTextList = { - self.uiMap["battle_ui.top_node.buff_l.text_1"], - self.uiMap["battle_ui.top_node.buff_l.text_2"], - self.uiMap["battle_ui.top_node.buff_l.text_3"], - self.uiMap["battle_ui.top_node.buff_l.text_4"], - } - for k, v in ipairs(self.atkBuffTextList) do - v:setText(GConst.EMPTY_STRING) - end - self.defBuffIconList = { - self.uiMap["battle_ui.top_node.buff_r.buff_1"], - self.uiMap["battle_ui.top_node.buff_r.buff_2"], - self.uiMap["battle_ui.top_node.buff_r.buff_3"], - self.uiMap["battle_ui.top_node.buff_r.buff_4"], - } - for k, v in ipairs(self.defBuffIconList) do - v:addClickListener(function() - self.battleController:showBuffTips(2) - end) - v:setLocalScale(0, 0, 0) - end - self.defBuffTextList = { - self.uiMap["battle_ui.top_node.buff_r.text_1"], - self.uiMap["battle_ui.top_node.buff_r.text_2"], - self.uiMap["battle_ui.top_node.buff_r.text_3"], - self.uiMap["battle_ui.top_node.buff_r.text_4"], - } - for k, v in ipairs(self.defBuffTextList) do - v:setText(GConst.EMPTY_STRING) - end - -- buff的tips - self.battleBuffTipsRoot = self.uiMap["battle_ui.battle_buff_tips"] - self.battleBuffTipsRoot:setLocalScale(0, 0, 0) + local atkBuffPrefix = "battle_ui.top_node.buff_l.tiny_buff_cell_" + local defBuffPrefix = "battle_ui.top_node.buff_r.tiny_buff_cell_" + local battleBuffTipsRoot = self.uiMap["battle_ui.battle_buff_tips"] local battleBuffTipsMask = self.uiMap["battle_ui.battle_buff_tips.mask"] - battleBuffTipsMask:addClickListener(function() - if self.autoCloseBuffSid then - self:unscheduleGlobal(self.autoCloseBuffSid) - self.autoCloseBuffSid = nil - end - self.battleBuffTipsRoot:setLocalScale(0, 0, 0) - end) - self.battleBuffTipsBg = self.uiMap["battle_ui.battle_buff_tips.bg"] - self.battleBuffTipsBuff = self.uiMap["battle_ui.battle_buff_tips.bg.buff"] - self.battleBuffTipsBuffList = {} - local children = self.battleBuffTipsBg:getChildList() - if children then - for k, v in ipairs(children) do - table.insert(self.battleBuffTipsBuffList, v) - end - end -end - -function BattleUI:refreshBuff(side, buffList) - if side == GConst.BattleConst.SIDE_ATK then - local buffObj = nil - local count = #buffList - local buffIconCount = #self.atkBuffIconList - local index = 1 - for i = 1, count do - buffObj = buffList[i] - if buffObj and buffObj.buff:getIcon() and not buffObj.buff:getNotShowIcon() then - local icon = self.atkBuffIconList[index] - local text = self.atkBuffTextList[index] - icon:setLocalScale(1, 1, 1) - icon:setSprite(GConst.ATLAS_PATH.ICON_BUFF, buffObj.buff:getIcon()) - local round = buffObj.round - if round <= 0 or round > 9 then - text:setText(GConst.EMPTY_STRING) - else - text:setText(tostring(round)) - end - index = index + 1 - if index > buffIconCount then - break - end - end - end - for i = index, buffIconCount do - self.atkBuffIconList[i]:setLocalScale(0, 0, 0) - self.atkBuffTextList[i]:setText(GConst.EMPTY_STRING) - end - else - local buffObj = nil - local count = #buffList - local buffIconCount = #self.defBuffIconList - local index = 1 - for i = 1, count do - buffObj = buffList[i] - if buffObj and buffObj.buff:getIcon() and not buffObj.buff:getNotShowIcon() then - local icon = self.defBuffIconList[index] - local text = self.defBuffTextList[index] - icon:setLocalScale(1, 1, 1) - icon:setSprite(GConst.ATLAS_PATH.ICON_BUFF, buffObj.buff:getIcon()) - local round = buffObj.round - if round <= 0 or round > 9 then - text:setText(GConst.EMPTY_STRING) - else - text:setText(tostring(round)) - end - index = index + 1 - if index > buffIconCount then - break - end - end - end - for i = index, buffIconCount do - self.defBuffIconList[i]:setLocalScale(0, 0, 0) - self.defBuffTextList[i]:setText(GConst.EMPTY_STRING) - end - end -end - -function BattleUI:clearBuff(side) - if side == GConst.BattleConst.SIDE_ATK then - for k, v in ipairs(self.atkBuffIconList) do - v:setLocalScale(0, 0, 0) - end - for k, v in ipairs(self.atkBuffTextList) do - v:setText(GConst.EMPTY_STRING) - end - else - for k, v in ipairs(self.defBuffIconList) do - v:setLocalScale(0, 0, 0) - end - for k, v in ipairs(self.defBuffTextList) do - v:setText(GConst.EMPTY_STRING) - end - end -end - -function BattleUI:showLeftBuffTips(buffList, autoClose) - local x = self.battleBuffTipsBg:fastGetAnchoredPosition() - if x > 0 then - self.battleBuffTipsBg:setAnchoredPositionX(-x) - end - self:showBuffTips(buffList, autoClose) -end - -function BattleUI:showRightBuffTips(buffList, autoClose) - local x = self.battleBuffTipsBg:fastGetAnchoredPosition() - if x < 0 then - self.battleBuffTipsBg:setAnchoredPositionX(-x) - end - self:showBuffTips(buffList, autoClose) -end - -function BattleUI:showBuffTips(buffList, autoClose) - if #buffList <= 0 then - return - end - self.battleBuffTipsRoot:setLocalScale(1, 1, 1) - local buffObj = nil - local count = #buffList - local index = 1 - local addY = 0 - for i = 1, count do - buffObj = buffList[i] - if buffObj and buffObj.buff:getIcon() and not buffObj.buff:getNotShowIcon() then - local buffTipsObj = self:getBattleBuffTipsObj(index) - buffTipsObj:setLocalScale(1, 1, 1) - buffTipsObj:setAnchoredPositionY(-addY) - local buffTipsObjMap = buffTipsObj:genAllChildren() - buffTipsObjMap["buff.icon"]:setSprite(GConst.ATLAS_PATH.ICON_BUFF, buffObj.buff:getIcon()) - local round = buffObj.round - if round <= 0 or round > 9 then - buffTipsObjMap["buff.round"]:setText(GConst.EMPTY_STRING) - else - buffTipsObjMap["buff.round"]:setText(tostring(round)) - end - local descTx = buffTipsObjMap["buff.desc"] - descTx:setText(buffObj.buff:getDesc()) - descTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO):ForceMeshUpdate() - local height = descTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).renderedHeight - if height > 30 then - addY = addY + 56 + height - 30 - else - addY = addY + 56 - end - index = index + 1 - end - end - if index <= 1 then -- 没有找到buff - self.battleBuffTipsRoot:setLocalScale(0, 0, 0) - return - end - - for i = index, #self.battleBuffTipsBuffList do - self.battleBuffTipsBuffList[i]:setLocalScale(0, 0, 0) - end - self.battleBuffTipsBg:setSizeDeltaY(addY + 10) - - if self.autoCloseBuffSid then - self:unscheduleGlobal(self.autoCloseBuffSid) - self.autoCloseBuffSid = nil - end - - if autoClose then - self.autoCloseBuffSid = self:performWithDelayGlobal(function() - self.battleBuffTipsRoot:setLocalScale(0, 0, 0) - end, 1.5) - end -end - -function BattleUI:hideBuffTips() - if self.autoCloseBuffSid then - self:unscheduleGlobal(self.autoCloseBuffSid) - self.autoCloseBuffSid = nil - end - - if not self.battleBuffTipsRoot then - return - end - self.battleBuffTipsRoot:setLocalScale(0, 0, 0) -end - -function BattleUI:getBattleBuffTipsObj(index) - if self.battleBuffTipsBuffList[index] then - return self.battleBuffTipsBuffList[index] - end - local prefab = CS.UnityEngine.Object.Instantiate(self.battleBuffTipsBuff:getGameObject()) - local prefabObject = UIPrefabObject:create() - prefabObject:initWithPrefab(self.battleBuffTipsBuff:getAssetPath(), prefab) - prefabObject:initPrefabHelper() - prefabObject:setParent(self.battleBuffTipsBg, false) - table.insert(self.battleBuffTipsBuffList, prefabObject) - return prefabObject + local battleBuffTipsBg = self.uiMap["battle_ui.battle_buff_tips.bg"] + local battleBuffTipsBuff = self.uiMap["battle_ui.battle_buff_tips.bg.buff"] + self:_initBuff(atkBuffPrefix, defBuffPrefix, battleBuffTipsRoot, battleBuffTipsMask, battleBuffTipsBg, battleBuffTipsBuff) end function BattleUI:initBattlefield() self.battleNode = self.uiMap["battle_ui.battle_root.battle_node"] end -function BattleUI:getBattleNode() - return self.battleNode -end - function BattleUI:initNumberNode() self.battleNumberNode = self.uiMap["battle_ui.battle_root.battle_number_node"] self.battleNumberRed = self.uiMap["battle_ui.cache_node.battle_number_red"] @@ -436,1458 +63,34 @@ function BattleUI:initNumberNode() self.battleNumberSpecial = self.uiMap["battle_ui.cache_node.battle_number_special"] end -function BattleUI:getNumberNode() - return self.battleNumberNode -end - -function BattleUI:getBattleNumberRed() - return self.battleNumberRed -end - -function BattleUI:getBattleNumberGreen() - return self.battleNumberGreen -end - -function BattleUI:getBattleNumberBlue() - return self.battleNumberBlue -end - -function BattleUI:getBattleNumberWhite() - return self.battleNumberWhite -end - -function BattleUI:getBattleNumberSpecial() - return self.battleNumberSpecial -end - function BattleUI:initComboNode() self.comboNode = self.uiMap["battle_ui.top_node.combo"] - self.comboAnimator = self.comboNode:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR) - self.comboNodeVisible = false - self.comboNode:setVisible(false) self.comboBg1 = self.uiMap["battle_ui.top_node.combo.bg.bg_1"] - self.comboBg1:setVisible(false) self.comboTx1 = self.uiMap["battle_ui.top_node.combo.number.text.text_1"] - self.comboTxComp1 = self.comboTx1:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT) self.comboTx2 = self.uiMap["battle_ui.top_node.combo.number.text.text_2"] - self.comboTxComp2 = self.comboTx2:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT) self.comboFx1 = self.uiMap["battle_ui.top_node.combo.bg.vfx_ui_hit_b01"] - self.comboFx1:setActive(false) - self.comboFxVisible1 = false self.comboFx2 = self.uiMap["battle_ui.top_node.combo.bg.vfx_ui_hit_b02"] - self.comboFx2:setActive(false) - self.comboFxVisible2 = false self.comboFx3 = self.uiMap["battle_ui.top_node.combo.bg.vfx_ui_hit_b03"] - self.comboFx3:setActive(false) - self.comboFxVisible3 = false + self:_initComboNode() end -function BattleUI:hideCombo() - if not self.comboNodeVisible then - return - end - self.comboNodeVisible = false - if self.comboSid then - self:unscheduleGlobal(self.comboSid) - end - self.comboSid = self:performWithDelayGlobal(function() - self.comboSid = nil - self.comboNode:setVisible(false) - if self.comboFxVisible1 then - self.comboFxVisible1 = false - self.comboFx1:setActive(false) - end - if self.comboFxVisible2 then - self.comboFxVisible2 = false - self.comboFx2:setActive(false) - end - if self.comboFxVisible3 then - self.comboFxVisible3 = false - self.comboFx3:setActive(false) - end - end, 0.5) -end - -function BattleUI:showCombo(count) - if count > 99 then - count = 99 - end - self.comboNodeVisible = true - self.comboNode:setVisible(true) - if count <= 5 then - if self.comboFxVisible1 then - self.comboFxVisible1 = false - self.comboFx1:setActive(false) - end - if self.comboFxVisible2 then - self.comboFxVisible2 = false - self.comboFx2:setActive(false) - end - if self.comboFxVisible3 then - self.comboFxVisible3 = false - self.comboFx3:setActive(false) - end - self.comboBg1:setVisible(false) - self.comboTx1:setText(GConst.INT_TO_STRING[count], self.comboTxComp1) - self.comboTx1:setAnchoredPositionX(0) - self.comboTx2:setText(GConst.EMPTY_STRING, self.comboTxComp2) - self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_1, -1, 0) - elseif count <= 10 then - if self.comboFxVisible1 then - self.comboFxVisible1 = false - self.comboFx1:setActive(false) - end - if self.comboFxVisible2 then - self.comboFxVisible2 = false - self.comboFx2:setActive(false) - end - if not self.comboFxVisible3 then - self.comboFxVisible3 = true - self.comboFx3:setActive(true) - end - self.comboBg1:setVisible(true) - self.comboTx1:setText(GConst.INT_TO_STRING[count], self.comboTxComp1) - if count == 10 then - self.comboTx1:setAnchoredPositionX(-26) - else - self.comboTx1:setAnchoredPositionX(0) - end - self.comboTx2:setText(GConst.EMPTY_STRING, self.comboTxComp2) - self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_2, -1, 0) - else - if not self.comboFxVisible1 then - self.comboFxVisible1 = true - self.comboFx1:setActive(true) - end - if not self.comboFxVisible2 then - self.comboFxVisible2 = true - self.comboFx2:setActive(true) - end - if self.comboFxVisible3 then - self.comboFxVisible3 = false - self.comboFx3:setActive(false) - end - self.comboBg1:setVisible(true) - self.comboTx1:setText(GConst.EMPTY_STRING, self.comboTxComp1) - self.comboTx2:setText(GConst.INT_TO_STRING[count], self.comboTxComp2) - self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_3, -1, 0) - end -end - -function BattleUI:initCounterAttack() - self.counterAttackNode = self.uiMap["battle_ui.battle_root.battle_number_node.counter_attack"] - self.counterTx = self.uiMap["battle_ui.battle_root.battle_number_node.counter_attack.text_number"] - self.counterTxTmp = self.counterTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO) - self.counterTxbgComp = self.uiMap["battle_ui.battle_root.top_node.counter_attack.bg"] - self.counterAttackNode:setVisible(false) -end - -function BattleUI:showCounterAttack(count, side) - local x = 280 - local horizontal = 180 - if side == GConst.BattleConst.SIDE_ATK then - x = -280 - horizontal = 0 - self.counterTxTmp.alignment = CS.TMPro.TextAlignmentOptions.MidlineLeft - else - self.counterTxTmp.alignment = CS.TMPro.TextAlignmentOptions.MidlineRight - end - self.counterTxbgComp:setEulerAngles(0, horizontal, 0) - self.counterAttackNode:setAnchoredPositionX(x) - self.counterTx:setText(I18N:getGlobalText(I18N.GlobalConst.COUNTER_ATTACK_DESC) .. "x" .. count) - self.counterAttackNode:setVisible(true) -end - -function BattleUI:hideCounterAttack() - self.counterAttackNode:setVisible(false) +function BattleUI:initHpNode() + self.hpProgressLeft = self.uiMap["battle_ui.top_node.bg_l.atk_slider_green"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.hpProgressRight = self.uiMap["battle_ui.top_node.bg_r.def_slider_red"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.hpProgressYellowLeft = self.uiMap["battle_ui.top_node.bg_l.atk_slider_yellow"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.hpProgressYellowRight = self.uiMap["battle_ui.top_node.bg_r.def_slider_yellow"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.hpTextLeft = self.uiMap["battle_ui.top_node.atk_hp"] + self.hpTextRight = self.uiMap["battle_ui.top_node.def_hp"] + self:_initHpNode() end function BattleUI:initFxNode() self.fxNode = self.uiMap["battle_ui.battle_root.batttle_fx_node"] end -function BattleUI:getFxNode() - return self.fxNode -end - -function BattleUI:initHpNode() - self.hpProgressLeft = self.uiMap["battle_ui.top_node.bg_l.atk_slider_green"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.hpProgressRight = self.uiMap["battle_ui.top_node.bg_r.def_slider_red"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.hpProgressLeft.value = 1 - self.hpProgressRight.value = 1 - self.hpProgressYellowLeft = self.uiMap["battle_ui.top_node.bg_l.atk_slider_yellow"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.hpProgressYellowRight = self.uiMap["battle_ui.top_node.bg_r.def_slider_yellow"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.hpProgressYellowLeft.value = 1 - self.hpProgressYellowRight.value = 1 - self.hpTextLeft = self.uiMap["battle_ui.top_node.atk_hp"] - self.hpTextRight = self.uiMap["battle_ui.top_node.def_hp"] - self.hpPercentLeft = 1 - self.hpPercentRight = 1 -end - -function BattleUI:setIsPauseHpProgress(value) - if self.isPauseHpProgress == value then - return - end - self.isPauseHpProgress = value - if not value then - local timeLeft = math.abs(self.hpProgressYellowLeft.value - self.hpPercentLeft) - if timeLeft > 0.01 then - local delayTime = math.abs(self.hpProgressLeft.value - self.hpPercentLeft)*2 - if delayTime > 0.05 then - if self.hpProgressYellowLeftSid then - self:unscheduleGlobal(self.hpProgressYellowLeftSid) - end - self.hpProgressYellowLeftSid = self:performWithDelayGlobal(function() - self:playHpProgressYellowLeftTween(timeLeft) - end, delayTime) - else - self:playHpProgressYellowLeftTween(timeLeft) - end - else - if self.hpProgressYellowLeftTween then - self.hpProgressYellowLeftTween:Pause() - end - self.hpProgressYellowLeft.value = self.hpPercentLeft - end - local timeRight = math.abs(self.hpProgressYellowRight.value - self.hpPercentRight) - if timeRight > 0.01 then - local delayTime = math.abs(self.hpProgressRight.value - self.hpPercentRight)*2 - if delayTime > 0.05 then - if self.hpProgressYellowRightSid then - self:unscheduleGlobal(self.hpProgressYellowRightSid) - end - self.hpProgressYellowRightSid = self:performWithDelayGlobal(function() - self:playHpProgressYellowRightTween(timeRight) - end, delayTime) - else - self:playHpProgressYellowRightTween(timeRight) - end - else - if self.hpProgressYellowRightTween then - self.hpProgressYellowRightTween:Pause() - end - self.hpProgressYellowRight.value = self.hpPercentRight - end - end -end - -function BattleUI:playHpProgressYellowLeftTween(time) - if self.hpProgressYellowLeftTween == nil then - self.hpProgressYellowLeftTween = GFunc.DOBFSliderValue(self.hpProgressYellowLeft, self.hpPercentLeft, time, false) - self.hpProgressYellowLeftTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE) - self.hpProgressYellowLeftTween:SetAutoKill(false) - else - self.hpProgressYellowLeftTween:ChangeEndValue(self.hpPercentLeft, time, true) - self.hpProgressYellowLeftTween:Restart() - end -end - -function BattleUI:playHpProgressYellowRightTween(time) - if self.hpProgressYellowRightTween == nil then - self.hpProgressYellowRightTween = GFunc.DOBFSliderValue(self.hpProgressYellowRight, self.hpPercentRight, time, false) - self.hpProgressYellowRightTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE) - self.hpProgressYellowRightTween:SetAutoKill(false) - else - self.hpProgressYellowRightTween:ChangeEndValue(self.hpPercentRight, time, true) - self.hpProgressYellowRightTween:Restart() - end -end - -function BattleUI:refreshAtkHp(num, percent) - self.hpTextLeft:setText(GFunc.num2Str(num)) - if not self.isPauseHpProgress then - if self.hpProgressLeftTween then - self.hpProgressLeftTween:Pause() - end - if self.hpProgressYellowLeftTween then - self.hpProgressYellowLeftTween:Pause() - end - if self.hpProgressYellowLeftSid then - self:unscheduleGlobal(self.hpProgressYellowLeftSid) - self.hpProgressYellowLeftSid = nil - end - self.hpProgressLeft.value = percent - self.hpProgressYellowLeft.value = percent - self.hpPercentLeft = percent - return - end - if self.hpPercentLeft == percent then - return - end - self.hpPercentLeft = percent - local time = math.abs(self.hpProgressLeft.value - percent)*2 - if self.hpProgressLeftTween == nil then - self.hpProgressLeftTween = GFunc.DOBFSliderValue(self.hpProgressLeft, percent, time, false) - self.hpProgressLeftTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE) - self.hpProgressLeftTween:SetAutoKill(false) - else - self.hpProgressLeftTween:ChangeEndValue(percent, time, true) - self.hpProgressLeftTween:Restart() - end -end - -function BattleUI:refreshDefHp(num, percent) - self.hpTextRight:setText(GFunc.num2Str(num)) - if not self.isPauseHpProgress then - if self.hpProgressRightTween then - self.hpProgressRightTween:Pause() - end - if self.hpProgressYellowRightTween then - self.hpProgressYellowRightTween:Pause() - end - if self.hpProgressYellowRightSid then - self:unscheduleGlobal(self.hpProgressYellowRightSid) - self.hpProgressYellowRightSid = nil - end - self.hpProgressRight.value = percent - self.hpProgressYellowRight.value = percent - self.hpPercentRight = percent - return - end - if self.hpPercentRight == percent then - return - end - self.hpPercentRight = percent - local time = math.abs(self.hpProgressRight.value - percent)*2 - if self.hpProgressRightTween == nil then - self.hpProgressRightTween = GFunc.DOBFSliderValue(self.hpProgressRight, percent, time, false) - self.hpProgressRightTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE) - self.hpProgressRightTween:SetAutoKill(false) - else - self.hpProgressRightTween:ChangeEndValue(percent, time, true) - self.hpProgressRightTween:Restart() - end -end - -function BattleUI:refreshSkill(elementMap, showSfx) - if not self.skillNodeCells then - return - end - - for elementType, skillEntity in pairs(DataManager.BattleData:getSkillEntities()) do - if not self.skillNodeCells[elementType] then - return - end - self.skillNodeCells[elementType]:refresh(skillEntity, elementMap, showSfx) - end -end - --- shakeType: 奇数是水平震动 偶数是垂直震动 -function BattleUI:shakeScreen(shakeType, duration) - self.battleRoot:setLocalPosition(0, 0, 0) - if self.shakeTween == nil then - local length = ConfigManager:getConfig("const")["shake_level_" .. math.ceil(shakeType / 2)].value - if shakeType % 2 == 0 then - CacheVector2.x = 0 - CacheVector2.y = length - self.shakeTween = self.battleRoot:getTransform():DOShakeAnchorPos(duration, CacheVector2, 100, 90, false, false) - else - CacheVector2.x = length - CacheVector2.y = 0 - self.shakeTween = self.battleRoot:getTransform():DOShakeAnchorPos(duration, CacheVector2, 100, 90, false, false) - end - self.shakeTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE) - self.shakeTween:SetAutoKill(false) - self.shakeType = shakeType - self.shakeDuration = duration - elseif self.shakeType == shakeType and self.shakeDuration == duration then - self.shakeTween:Restart() - else - self.shakeTween:Kill() - local length = ConfigManager:getConfig("const")["shake_level_" .. math.ceil(shakeType / 2)].value - if shakeType % 2 == 0 then - CacheVector2.x = 0 - CacheVector2.y = length - self.shakeTween = self.battleRoot:getTransform():DOShakeAnchorPos(duration, CacheVector2, 100, 90, false, false) - else - CacheVector2.x = length - CacheVector2.y = 0 - self.shakeTween = self.battleRoot:getTransform():DOShakeAnchorPos(duration, CacheVector2, 100, 90, false, false) - end - self.shakeTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE) - self.shakeTween:SetAutoKill(false) - self.shakeType = shakeType - self.shakeDuration = duration - end - self.shakeTween.timeScale = DataManager.BattleData:getTimeScale() -end - -function BattleUI:initGridCell(callback) - self.onInitGridCellOverCallback = callback - if self.root.gridCells then - self.gridCells = self.root.gridCells - self.gridInitOver = true - end - - if self.gridCells and self.gridInitOver then - self:onInitGridCellOver() - return - end - - self.gridCells = {} - self.cellLoadRemianCount = GConst.BattleConst.ROW_COUNT * GConst.BattleConst.COLUMN_COUNT - for r = 1, GConst.BattleConst.ROW_COUNT do - for c = 1, GConst.BattleConst.COLUMN_COUNT do - CellManager:loadCellAsync(GRID_CELL_PATH, GRID_CELL, self.gridNode, function(cell) - local posId = ModuleManager.BattleManager:getPosId(r, c) - self.gridCells[posId] = cell - cell:getBaseObject():setAnchoredPositionX(DEFAULT_X) -- 初始化时放到屏幕外 - - self.cellLoadRemianCount = self.cellLoadRemianCount - 1 - if self.cellLoadRemianCount <= 0 then - self.gridInitOver = true - self:onInitGridCellOver() - self.root.gridCells = self.gridCells - end - end) - end - end -end - -function BattleUI:onInitGridCellOver() - for posId, cell in pairs(self.gridCells) do - local entity = DataManager.BattleData:getGridEntity(posId) - if entity then - cell:hideAni() - cell:setOrder(self:getUIOrder()) - cell:refresh(entity) - cell:addTouchListener(function(eventType) - if self.battleController then - self.battleController:onTouchEvent(eventType, entity:getPosId()) - end - end) - cell:unBindAll() - cell:bind(entity, "isDirty", function() - cell:refresh(entity, self.curElementType) - end) - local pos = entity:getPos() - cell:getBaseObject():setAnchoredPosition(pos.x, pos.y) - entity:setCell(cell) - end - end - - local callback = self.onInitGridCellOverCallback - self.onInitGridCellOverCallback = nil - if callback then - callback() - end - - ---- 检查引导 - ModuleManager.TutorialManager:checkFuncTutorial(GConst.TutorialConst.START_TUTORIAL) -end - -function BattleUI:switchBoard(downCallback, callback, isFirst) - if self.switchBoardSeq then - self.switchBoardSeq:Kill() - self.switchBoardSeq = nil - end - - if isFirst then - if downCallback then - downCallback() - end - if callback then - callback() - end - self.boardNode:setAnchoredPositionY(BOARD_POS_UP.y) - return - end - - self.switchBoardSeq = self.root:createBindTweenSequence() - self.switchBoardSeq:Append(self.boardNode:getTransform():DOAnchorPos(BOARD_POS_DOWN, 0.5)) - self.switchBoardSeq:AppendCallback(function() - if downCallback then - downCallback() - end - end) - self.switchBoardSeq:Append(self.boardNode:getTransform():DOAnchorPos(BOARD_POS_UP, 0.5)) - self.switchBoardSeq:AppendCallback(function() - if callback then - callback() - end - end) -end - -function BattleUI:showBoardMask(elementType, skillPosId) - if not self.gridCells then - return - end - if self.curElementType == elementType and self.skillPosId == skillPosId then - return - end - - self.curElementType = elementType - self.skillPosId = skillPosId - self:refreshBoard() -end - -function BattleUI:refreshBoard() - local entities = DataManager.BattleData:getGridEnties() - for posId, entity in pairs(entities) do - if entity and entity:getCell() then - entity:getCell():refresh(entity, self.curElementType, self.skillPosId) - end - end -end - -function BattleUI:eliminationAni(aniSequence, effectGridMap, callback) - self:showMask(true) - if not aniSequence then - if callback then - callback() - end - return - end - - self.boardMask:getTransform():SetAsLastSibling() - if self.eliminationAniSeq then - self.eliminationAniSeq:Kill() - self.eliminationAniSeq = nil - end - - self.eliminationAniSeq = self.root:createBindTweenSequence() - self.eliminationAniSeq:AppendCallback(function() - if self.boardMask2D then - self.boardMask2D.enabled = false - end - end) - - if not self.posIdMap then - self.posIdMap = {} - end - - local breakSfxNameIndexMap = {} - for index, info in ipairs(aniSequence) do - if not self.posIdMap[info.posId] then - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) - self.posIdMap[info.posId] = true - local entity = DataManager.BattleData:getGridEntity(info.posId) - - local time = info.timeIdx - if entity and entity:getCell() then - entity:getCell():refresh(entity) - - if info.callback then - self.eliminationAniSeq:InsertCallback(time, function() - if info.callback then - info.callback() - end - end) - end - - self:dealGridBreakSfx(time, info, breakSfxNameIndexMap) - self:dealGridEffectSfx(time, info, breakSfxNameIndexMap, entity) - - time = time + (info.bftcTime or 0) - if info.isIdle then - if entity:getSkillId() then - entity:getCell():hideSkillSfx() - end - local baseObject = entity:getCell():getBaseObject() - baseObject:getTransform():SetAsLastSibling() - local anitime = 0 - if info.aniPosList then - local posList = {} - local count = 0 - for _, posId in ipairs(info.aniPosList) do - table.insert(posList, ModuleManager.BattleManager:getPosInfo(posId)) - count = count + 1 - end - anitime = count * GConst.BattleConst.GRID_BREAK_EFFECT_INTERVAL - self.eliminationAniSeq:Insert(time, baseObject:getTransform():DOLocalPath(posList, anitime):SetEase(CS.DG.Tweening.Ease.Linear)) - else - if info.noAni then - self.eliminationAniSeq:InsertCallback(time, function() - baseObject:setAnchoredPositionX(DEFAULT_X) - end) - else - if info.rangeList then - self.eliminationAniSeq:InsertCallback(time, function() - self:playSkillLineSfx(info.posId, info.rangeList, info.randomPosList) - end) - end - self.eliminationAniSeq:Insert(time, baseObject:getTransform():DOScale(1.3, 0.1)) - self.eliminationAniSeq:InsertCallback(time + 0.2, function() - self:getSfxSmoke(index, function(obj) - obj:setAnchoredPosition(pos.x, pos.y) - obj:play() - end) - end) - local targetPos = self:getElementSkillPos(entity:getElementType()) - if info.breakFlyToCharacter then - targetPos = self.battleController.atkTeam:getMainUnit():getBaseObject():getTransform().position - local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(targetPos) - targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) - end - self.eliminationAniSeq:Insert(time + 0.2, baseObject:getTransform():DOAnchorPos(targetPos, 0.3)) - self.eliminationAniSeq:Insert(time + 0.2, baseObject:getTransform():DOScale(0.5, 0.3)) - anitime = 0.5 - end - end - self.eliminationAniSeq:InsertCallback(time + anitime, function() - baseObject:setAnchoredPositionX(DEFAULT_X) - if info.overCallback then - info.overCallback() - end - end) - end - end - end - end - - local list - for posId, _ in pairs(effectGridMap) do - local entity = DataManager.BattleData:getGridEntity(posId) - local baseObject = entity:getCell():getBaseObject() - baseObject:getTransform():SetAsLastSibling() - if MAX_LASTSIBLING_TYPE[entity:getGridType()] then - if not list then - list = {} - end - table.insert(list, baseObject) - end - end - - if list then - for _, baseObject in ipairs(list) do - baseObject:getTransform():SetAsLastSibling() - end - end - - self.eliminationAniSeq:AppendCallback(function() - for posId, _ in pairs(self.posIdMap) do - local entity = DataManager.BattleData:getGridEntity(posId) - - if entity and entity:getCell() then - entity:getCell():hideAni() - end - end - - self.posIdMap = {} - if self.boardMask2D then - self.boardMask2D.enabled = true - end - - if callback then - callback() - end - - self:refreshSkill() - self:resetParentAllSfxGridBreak() - self.eliminationAniSeq = nil - end) -end - -function BattleUI:dealGridBreakSfx(time, info, breakSfxNameIndexMap) - if info.breakSfxName then - breakSfxNameIndexMap[info.breakSfxName] = (breakSfxNameIndexMap[info.breakSfxName] or 0) + 1 - local breakIndex = breakSfxNameIndexMap[info.breakSfxName] - self.eliminationAniSeq:InsertCallback(time, function() - self:getSfxGridBreak(info.breakSfxName, breakIndex, function(obj) - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) - obj:setLocalPosition(pos.x, pos.y, 0) - obj:play() - end) - end) - end -end - -function BattleUI:dealGridEffectSfx(time, info, breakSfxNameIndexMap, entity) - if not self.eliminationAniSeq then - return - end - - self.flowEffects = table.clearOrCreate(self.flowEffects) - if info.effectSfxName then - breakSfxNameIndexMap[info.effectSfxName] = (breakSfxNameIndexMap[info.effectSfxName] or 0) + 1 - local breakIndex = breakSfxNameIndexMap[info.effectSfxName] - self.eliminationAniSeq:InsertCallback(time, function() - self:getSfxGridBreak(info.effectSfxName, breakIndex, function(obj) - if not self.eliminationAniSeq then -- 动画已结束 - obj:setActive(false) - return - end - if info.effectSfxFlow then - obj:setParent(entity:getCell():getBaseObject(), false) - obj:setLocalPosition(0, 0, 0) - obj:play() - table.insert(self.flowEffects, obj) - else - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) - obj:setLocalPosition(pos.x, pos.y, 0) - obj:play() - end - - if info.effectSfxDir == GConst.BattleConst.BOARD_RANGE_TYPE.UP then - obj:setLocalEulerAngles(0, 0, 0) - elseif info.effectSfxDir == GConst.BattleConst.BOARD_RANGE_TYPE.DOWN then - obj:setLocalEulerAngles(0, 0, 180) - elseif info.effectSfxDir == GConst.BattleConst.BOARD_RANGE_TYPE.LEFT then - obj:setLocalEulerAngles(0, 0, 90) - elseif info.effectSfxDir == GConst.BattleConst.BOARD_RANGE_TYPE.RIGHT then - obj:setLocalEulerAngles(0, 0, -90) - else - obj:setLocalEulerAngles(0, 0, 0) - end - end) - end) - end -end - -function BattleUI:showGridEffectSfx(posId, sfxName, callback, customTime, zEuler) - self:getSfxGridEffect(sfxName, function(info) - info.isIdle = false - local pos = ModuleManager.BattleManager:getPosInfo(posId) - customTime = customTime or info.obj:getDuration() - info.obj:setLocalPosition(pos.x, pos.y, 0) - info.obj:setLocalEulerAngles(0, 0, zEuler) - info.obj:setActive(true) - info.obj:playComplete(function() - info.isIdle = true - info.obj:setActive(false) - end, customTime, function() - if callback then - callback() - end - end) - end) -end - -function BattleUI:moveGridCells(gridEntityList, callback) - if not gridEntityList then - if callback then - callback() - end - end - - if self.moveGridCellsSeq then - self.moveGridCellsSeq:Kill() - self.moveGridCellsSeq = nil - end - - self.moveGridCellsSeq = self.root:createBindTweenSequence() - for _, entity in pairs(gridEntityList) do - local posId = entity:getPosId() - local baseObject = entity:getCell():getBaseObject() - local pos = ModuleManager.BattleManager:getPosInfo(posId) - if entity:getEffectType() then - baseObject:getTransform():SetAsLastSibling() - end - self.moveGridCellsSeq:Insert(0, baseObject:getTransform():DOLocalMove(pos, 1)) - end - self.moveGridCellsSeq:AppendCallback(function() - if callback then - callback() - end - end) -end - -function BattleUI:generateSkillAni(map, callback) - if table.nums(map) <= 0 then - if callback then - callback() - end - return - end - - self:hideGenerateSkillGridCells() - if self.generateSkillAniSeq then - self.generateSkillAniSeq:Kill() - self.generateSkillAniSeq = nil - end - - self.generateSkillAniSeq = self.root:createBindTweenSequence() - local count = 0 - for elementType, info in pairs(map) do - local entity = self.generateSkillGridEntities[elementType] - if entity and entity:getCell() then - count = count + 1 - entity:setSkilId(info.skillId) - local cell = entity:getCell() - cell:refresh(entity) - self.generateSkillAniSeq:AppendCallback(function() - local pos = self:getElementSkillPos(elementType) - cell:getBaseObject():setAnchoredPosition(pos.x, pos.y) - end) - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) - self.generateSkillAniSeq:Append(cell:getBaseObject():getTransform():DOAnchorPos(pos, 0.5)) - if self.generateSkillSfxs and self.generateSkillSfxs[count] then - self.generateSkillSfxs[count]:setAnchoredPosition(pos.x, pos.y) - self.generateSkillAniSeq:AppendCallback(function() - self.generateSkillSfxs[count]:setActive(true) - self.generateSkillSfxs[count]:play() - end) - end - end - end - self.generateSkillAniSeq:AppendCallback(function() - if callback then - callback() - end - self:hideGenerateSkillGridCells() - end) -end - function BattleUI:hideGenerateSkillGridCells() - if not self.generateSkillGridEntities then - local uiMap = self.root:genAllChildren() - self.generateSkillGridEntities = {} - for name, elementType in pairs(GConst.BattleConst.ELEMENT_TYPE) do - local obj = uiMap["battle_ui.bg_2.ani_node.grid_cell_" .. elementType] - if obj then - local cell = CellManager:addCellComp(obj, GRID_CELL) - local entity = DataManager.BattleData:getNewGridEntity() - entity:setCell(cell) - self.generateSkillGridEntities[elementType] = entity - end - end - end - - for _, entity in pairs(self.generateSkillGridEntities) do - if entity:getCell() then - entity:getCell():getBaseObject():setAnchoredPositionX(DEFAULT_X) - end - end -end - -function BattleUI:showMonsterSkillAni(map, monsterPos, callback) - if table.nums(map) <= 0 then - if callback then - callback() - end - return - end - - self:hideMonsterSkillGridCells() - if self.monsterSkillAniSeq then - self.monsterSkillAniSeq:Kill() - self.monsterSkillAniSeq = nil - end - - local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(monsterPos) - monsterPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) - - self.monsterSkillAniSeq = self.root:createBindTweenSequence() - local count = 1 - for posId, info in pairs(map) do - local entity = self.monsterSkillGridEntities[count] - if entity and entity:getCell() then - entity:setGridType(info.gridType) - entity:setElementType(GConst.BattleConst.ELEMENT_TYPE.EMPTY) - count = count + 1 - local cell = entity:getCell() - cell:refresh(entity) - cell:getBaseObject():setAnchoredPosition(monsterPos.x, monsterPos.y) - cell:getBaseObject():setLocalScale(0.3, 0.3, 0.3) - local pos = ModuleManager.BattleManager:getPosInfo(posId) - if count == 1 then - self.monsterSkillAniSeq:Append(cell:getBaseObject():getTransform():DOAnchorPos(pos, 0.3)) - else - self.monsterSkillAniSeq:Join(cell:getBaseObject():getTransform():DOAnchorPos(pos, 0.3)) - end - self.monsterSkillAniSeq:Join(cell:getBaseObject():getTransform():DOScale(1, 0.3)) - end - end - self.monsterSkillAniSeq:AppendCallback(function() - if callback then - callback() - end - self:hideMonsterSkillGridCells() - end) -end - -function BattleUI:hideMonsterSkillGridCells() - if not self.monsterSkillGridEntities then - local uiMap = self.root:genAllChildren() - self.monsterSkillGridEntities = {} - for name, elementType in pairs(GConst.BattleConst.ELEMENT_TYPE) do - local obj = uiMap["battle_ui.bg_2.ani_node.grid_cell_m" .. elementType] - if obj then - local cell = CellManager:addCellComp(obj, GRID_CELL) - local entity = DataManager.BattleData:getNewGridEntity() - entity:setCell(cell) - self.monsterSkillGridEntities[elementType] = entity - end - end - end - - for _, entity in pairs(self.monsterSkillGridEntities) do - if entity:getCell() then - entity:getCell():getBaseObject():setAnchoredPositionX(DEFAULT_X) - end - end -end - -function BattleUI:initGenerateSkillEffect() - if not self.generateSkillSfxs then - local uiMap = self.root:genAllChildren() - self.generateSkillSfxs = {} - self.generateSkillSfxs[1] = uiMap["battle_ui.bg_2.ani_node.sfx_piece_skill_b01_1"] - self.generateSkillSfxs[2] = uiMap["battle_ui.bg_2.ani_node.sfx_piece_skill_b01_2"] - self.generateSkillSfxs[3] = uiMap["battle_ui.bg_2.ani_node.sfx_piece_skill_b01_3"] - self.generateSkillSfxs[4] = uiMap["battle_ui.bg_2.ani_node.sfx_piece_skill_b01_4"] - self.generateSkillSfxs[5] = uiMap["battle_ui.bg_2.ani_node.sfx_piece_skill_b01_5"] - end - - for _, obj in pairs(self.generateSkillSfxs) do - obj:setActive(true) - obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) - obj:setActive(false) - end -end - -function BattleUI:gotOneSkillAni(skillId, elementType, callback, startPos) - if not skillId or not self.skillSelectCell then - if callback then - callback() - end - return - end - - self.skillSelectCell:refresh(skillId) - self.skillSelectCell:getBaseObject():setAnchoredPosition(startPos.x, startPos.y) - self.skillSelectCell:getBaseObject():setVisible(true) - if self.gotOneSkillAniSeq then - self.gotOneSkillAniSeq:Kill() - self.gotOneSkillAniSeq = nil - end - - self.gotOneSkillAniSeq = self.root:createBindTweenSequence() - local pos = self:getElementSkillPos(elementType) - self.gotOneSkillAniSeq:Append(self.skillSelectCell:getBaseObject():getTransform():DOAnchorPos(pos, 0.7)) - self.gotOneSkillAniSeq:Join(self.skillSelectCell:getBaseObject():getTransform():DOScale(0.76, 0.7)) - self.gotOneSkillAniSeq:AppendCallback(function() - self.skillSelectCell:getBaseObject():setAnchoredPositionX(DEFAULT_X) - if callback then - callback() - end - end) -end - -function BattleUI:initSkillSelectCells() - if not self.skillSelectCell then - local uiMap = self.root:genAllChildren() - self.skillSelectCell = CellManager:addCellComp(uiMap["battle_ui.bg_2.ani_node.skill_select_cell"], SELECT_SKILL_CELL) - self.skillSelectCell:getBaseObject():setAnchoredPositionX(DEFAULT_X) - end -end - -function BattleUI:shuffleBoard(changeInfo, callback) - if self.shuffleBoardSeq then - self.shuffleBoardSeq:Kill() - self.shuffleBoardSeq = nil - end - - self.shuffleBoardSeq = self.root:createBindTweenSequence() - for posId, tartgetPos in pairs(changeInfo) do - local entity = DataManager.BattleData:getGridEntity(posId) - local cell = entity:getCell() - local posId = entity:getPosId() - if cell then - local pos = ModuleManager.BattleManager:getPosInfo(posId) - self.shuffleBoardSeq:Insert(0, cell:getBaseObject():getTransform():DOAnchorPos(pos, 1)) - end - end - self.shuffleBoardSeq:AppendCallback(function() - if callback then - callback() - end - end) -end - -function BattleUI:removeGridOutOfScreen(posIdList) - for _, posId in ipairs(posIdList) do - self:removeOneGridOutOfScreen(posId) - end -end - -function BattleUI:removeOneGridOutOfScreen(posId) - local entity = DataManager.BattleData:getGridEntity(posId) - local cell = entity:getCell() - cell:getBaseObject():setAnchoredPositionX(DEFAULT_X) -end - -function BattleUI:fallGrid(listInfo, isRoundBeginCheck, callback) - if isRoundBeginCheck then - self:showMask(false) - else - self.boardMask:getTransform():SetAsLastSibling() - end - self.fallAniCount = 0 - for posId, info in pairs(listInfo) do - local entity = DataManager.BattleData:getGridEntity(posId) - local cell = entity:getCell() - if cell then - self.fallAniCount = self.fallAniCount + 1 - if cell.fallSeq then - cell.fallSeq:Kill() - cell.fallSeq = nil - end - local baseObject = cell:getBaseObject() - cell.fallSeq = baseObject:createBindTweenSequence() - baseObject:setAnchoredPosition(info[1].x, info[1].y) - local count = #info - local time = GConst.BattleConst.ONE_STEP_TIME * count - cell.fallSeq:Append(baseObject:getTransform():DOLocalPath(info, time):SetEase(CS.DG.Tweening.Ease.InQuad)) - cell.fallSeq:AppendCallback(function() - self.fallAniCount = self.fallAniCount - 1 - if self.fallAniCount == 0 then - if callback then - callback() - end - end - end) - cell.fallSeq:InsertCallback(time + math.random() * 0.1 - 0.2, function() - cell:showAni() - end) - end - end - if self.fallAniCount == 0 and callback then - callback() - end -end - -function BattleUI:cacheSkillAni(skillInfo, isPop, callback) - local skillInfoCount = #skillInfo - if skillInfoCount <= 0 then - if callback then - callback() - end - return - end - - self:disableUITouch() - - if not self.root.skillAniGridEntities then - self.root.skillAniGridEntities = {} - end - - for _, entity in ipairs(self.root.skillAniGridEntities) do - local cell = entity:getCell() - if cell then - cell:getBaseObject():setAnchoredPositionX(DEFAULT_X) -- 放到屏幕外 - end - end - - local gridEntityCount = #self.root.skillAniGridEntities - if gridEntityCount < skillInfoCount then - for i = gridEntityCount, skillInfoCount do - CellManager:loadCellAsync(GRID_CELL_PATH, GRID_CELL, self.boardCacheNode, function(cell) - cell:getBaseObject():setAnchoredPositionX(DEFAULT_X) -- 初始化时放到屏幕外 - local entity = DataManager.BattleData:getNewGridEntity() - entity:setCell(cell) - cell:hideAni() - table.insert(self.root.skillAniGridEntities, entity) - if i == skillInfoCount then - if isPop then - self:doCachePopAni(skillInfo, callback) - else - self:doCacheAni(skillInfo, callback) - end - end - end) - end - else - if isPop then - self:doCachePopAni(skillInfo, callback) - else - self:doCacheAni(skillInfo, callback) - end - end -end - -function BattleUI:doCacheAni(skillInfo, callback) - if self.cacheSkillAniSeq then - self.cacheSkillAniSeq:Kill() - self.cacheSkillAniSeq = nil - end - - if not self.root.skillAniGridEntities then - if callback then - callback() - end - return - end - - self.boardCacheNode:setVisible(true) - - local w, h = GFunc.getUIExpandScreenSize() - local w = w / 2 + 100 - self.cacheSkillAniSeq = self.root:createBindTweenSequence() - self.cacheSkillAniSeq:AppendCallback(function() - self.boardCacheBox:setAnchoredPositionX(- w) - end) - - for index, info in ipairs(skillInfo) do - local entity = self.root.skillAniGridEntities[index] - if entity then - entity:setSkilId(info.skillId) - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) - local cell = entity:getCell() - if cell then - cell:refresh(entity) - local obj = cell:getBaseObject() - self.cacheSkillAniSeq:InsertCallback(0.5 * (index - 1), function() - obj:setAnchoredPosition(pos.x, pos.y) - local gridEntity = DataManager.BattleData:getGridEntity(info.posId) - if gridEntity and gridEntity:getCell() then - gridEntity:getCell():getBaseObject():setAnchoredPositionX(DEFAULT_X) -- 放到屏幕外 - end - end) - - self.cacheSkillAniSeq:Insert(0.5 * (index - 1) + 0.02, obj:getTransform():DOAnchorPos(CACHE_SKILL_POS_2, 0.7)) - end - end - end - - self.cacheSkillAniSeq:Append(self.boardCacheBox:getTransform():DOAnchorPosX(0, 0.5)) - for index, info in ipairs(skillInfo) do - local entity = self.root.skillAniGridEntities[index] - if entity then - local cell = entity:getCell() - if cell then - local obj = cell:getBaseObject() - if index == 1 then - self.cacheSkillAniSeq:Append(obj:getTransform():DOAnchorPos(CACHE_SKILL_POS_1, 0.3)) - else - self.cacheSkillAniSeq:Join(obj:getTransform():DOAnchorPos(CACHE_SKILL_POS_1, 0.3)) - end - end - end - end - self.cacheSkillAniSeq:AppendCallback(function() - for index, entity in ipairs(self.root.skillAniGridEntities) do - if entity and entity:getCell() then - entity:getCell():getBaseObject():setAnchoredPositionX(DEFAULT_X) - end - end - end) - self.cacheSkillAniSeq:Append(self.boardCacheBox:getTransform():DOAnchorPosX(w, 0.5)) - self.cacheSkillAniSeq:AppendCallback(function() - self.boardCacheNode:setVisible(false) - self:enableUITouch() - if callback then - callback() - end - end) -end - -function BattleUI:doCachePopAni(skillInfo, callback) - if self.cacheSkillAniSeq then - self.cacheSkillAniSeq:Kill() - self.cacheSkillAniSeq = nil - end - - if not self.root.skillAniGridEntities then - if callback then - callback() - end - return - end - - self.boardCacheNode:setVisible(true) - local w, h = GFunc.getUIExpandScreenSize() - local w = w / 2 + 100 - self.cacheSkillAniSeq = self.root:createBindTweenSequence() - self.cacheSkillAniSeq:AppendCallback(function() - self.boardCacheBox:setAnchoredPositionX(- w) - end) - self.cacheSkillAniSeq:Append(self.boardCacheBox:getTransform():DOAnchorPosX(0, 0.5)) - for index, info in ipairs(skillInfo) do - local entity = self.root.skillAniGridEntities[index] - if entity then - entity:setSkilId(info.skillId) - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) - local cell = entity:getCell() - if cell then - cell:refresh(entity) - local obj = cell:getBaseObject() - self.cacheSkillAniSeq:InsertCallback(0, function() - obj:setAnchoredPositionX(DEFAULT_X) - end) - self.cacheSkillAniSeq:InsertCallback(0.5 + 0.5 * (index - 1), function() - obj:setAnchoredPosition(CACHE_SKILL_POS_1.x, CACHE_SKILL_POS_1. y) - end) - - self.cacheSkillAniSeq:Insert(0.5 + 0.5 * (index - 1) + 0.02, obj:getTransform():DOAnchorPos(CACHE_SKILL_POS_2, 0.3)) - end - end - end - self.cacheSkillAniSeq:Append(self.boardCacheBox:getTransform():DOAnchorPosX(w, 0.5)) - - for index, info in ipairs(skillInfo) do - local entity = self.root.skillAniGridEntities[index] - if entity then - local pos = ModuleManager.BattleManager:getPosInfo(info.posId) - local cell = entity:getCell() - if cell then - local obj = cell:getBaseObject() - if index == 1 then - self.cacheSkillAniSeq:Append(obj:getTransform():DOAnchorPos(pos, 0.7)) - else - self.cacheSkillAniSeq:Join(obj:getTransform():DOAnchorPos(pos, 0.7)) - end - end - end - end - - self.cacheSkillAniSeq:AppendCallback(function() - self.boardCacheNode:setVisible(false) - self:enableUITouch() - if callback then - callback() - end - end) -end - -function BattleUI:showMask(show) - if not self.boardMask then - return - end - self.boardMask:setVisible(show) -end - -function BattleUI:getElementSkillPos(elementType) - if not self.skillPoss then - self.skillPoss = {} - end - - if not self.skillPoss[elementType] then - local cell = self.skillNodeCells[elementType] - if not cell then - self.skillPoss[elementType] = BF.Vector2(0, 0) - else - local targetPos = cell:getBaseObject():getTransform().position - local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(targetPos) - targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) - self.skillPoss[elementType] = targetPos - end - end - - return self.skillPoss[elementType] -end - -function BattleUI:refreshLv() - local uiMap = self.root:genAllChildren() - if not self.lvSlider then - self.lvSlider = uiMap["battle_ui.bg_2.lv_node.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.lvDesc = uiMap["battle_ui.bg_2.lv_node.icon.lv_desc"] - end - local curExp = DataManager.BattleData:getBattleExp() - local curNeedExp = DataManager.BattleData:getBattleNeedExp() - self.lvSlider.value = curExp / curNeedExp - local lv = DataManager.BattleData:getBattleLv() - self.lvDesc:setText(lv) - local sfx = uiMap["battle_ui.bg_2.lv_node.icon.vfx_ui_battle_progress_light_b01"] - if not self.lastLv then - sfx:setActive(true) - sfx:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) - sfx:setActive(false) - elseif self.lastLv ~= lv then - sfx:setActive(true) - sfx:play() - end - self.lastLv = lv -end - -function BattleUI:refreshWave(wave, iconAtlas, iconName) - local uiMap = self.root:genAllChildren() - local icon = uiMap["battle_ui.top_node.wave_icon"] - local desc = uiMap["battle_ui.top_node.wave_desc"] - desc:setText(wave) - GFunc.centerImgAndTx(icon, desc, 10) - - iconAtlas = iconAtlas or GConst.ATLAS_PATH.COMMON - iconName = iconName or "common_dec_3" - icon:setSprite(iconAtlas, iconName) -end - -function BattleUI:refreshTaskBtn() - local uiMap = self.root:genAllChildren() - local taskBtn = uiMap["battle_ui.top_node.task_btn"] - if self.battleController.battleType == GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE then - taskBtn:setActive(true) - taskBtn:addClickListener(function() - ModuleManager.DailyChallengeManager:showBattleTaskUI() - end) - else - taskBtn:setActive(false) - end -end - -function BattleUI:getSfxLine(index, func) - self.hidingAllSfxLine = false - - if not self.root.lineSfxObjs then - self.root.lineSfxObjs = {} - end - if self.root.lineSfxObjs[index] then - if self.root.lineSfxObjs[index].obj and func then - local obj = self.root.lineSfxObjs[index].obj - obj:setActive(true) - func(obj) - end - else - self.root.lineSfxObjs[index] = { - isLoaded = true - } - EffectManager:loadUIEffectAsync(GConst.BattleConst.LINE_SFX, self, self.gridNode, BOARD_SFX_ORDER, function(obj) - self.root.lineSfxObjs[index].obj = obj - if self.hidingAllSfxLine then - obj:setActive(false) - else - if func then - func(obj) - end - end - end) - end -end - -function BattleUI:hideAllSfxLine() - self.hidingAllSfxLine = true - if not self.root.lineSfxObjs then - return - end - for inde, info in pairs(self.root.lineSfxObjs) do - if info.obj then - info.obj:setActive(false) - end - end -end - -function BattleUI:getSfxGridBreak(breakSfxPath, index, func) - if not breakSfxPath then - return - end - - self.hidingAllSfxGridBreak = false - - if not self.root.gridBreakSfxObjs then - self.root.gridBreakSfxObjs = {} - end - if not self.root.gridBreakSfxObjs[breakSfxPath] then - self.root.gridBreakSfxObjs[breakSfxPath] = {} - end - if self.root.gridBreakSfxObjs[breakSfxPath][index] then - if self.root.gridBreakSfxObjs[breakSfxPath][index].obj and func then - local obj = self.root.gridBreakSfxObjs[breakSfxPath][index].obj - obj:setActive(true) - func(obj) - end - else - self.root.gridBreakSfxObjs[breakSfxPath][index] = { - isLoaded = true - } - EffectManager:loadUIEffectAsync(breakSfxPath, self, self.gridNode, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj) - self.root.gridBreakSfxObjs[breakSfxPath][index].obj = obj - if self.hidingAllSfxGridBreak then - obj:setActive(false) - else - if func then - func(obj) - end - end - end) - end -end - -function BattleUI:hideAllSfxGridBreak() - self.hidingAllSfxLine = false - if not self.root.gridBreakSfxObjs then - return - end - for breakSfxPath, map in pairs(self.root.gridBreakSfxObjs) do - for index, info in pairs(map) do - if info.obj then - info.obj:setParent(self.gridNode, false) - info.obj:setActive(false) - end - end - end -end - -function BattleUI:resetParentAllSfxGridBreak() - for _, obj in ipairs(self.flowEffects) do - obj:setActive(false) - obj:setParent(self.gridNode, true) - end -end - -function BattleUI:getSfxGridEffect(effectSfxPath, func) - if not effectSfxPath then - return - end - - if not self.root.gridEffectSfx then - self.root.gridEffectSfx = {} - end - if not self.root.gridEffectSfx[effectSfxPath] then - self.root.gridEffectSfx[effectSfxPath] = {} - end - local count = 0 - for index, info in pairs(self.root.gridEffectSfx[effectSfxPath]) do - if info.isIdle then - func(self.root.gridEffectSfx[effectSfxPath][index]) - return - end - count = count + 1 - end - - local index = count + 1 - self.root.gridEffectSfx[effectSfxPath][index] = { - isLoaded = true, - } - EffectManager:loadUIEffectAsync(effectSfxPath, self, self.gridNode, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj) - self.root.gridEffectSfx[effectSfxPath][index].obj = obj - self.root.gridEffectSfx[effectSfxPath][index].isIdle = true - if func then - func(self.root.gridEffectSfx[effectSfxPath][index]) - end - end) -end - -function BattleUI:getSfxSmoke(index, func) - self.hidingAllSfxSmoke = false - - if not self.root.smokeSfxObjs then - self.root.smokeSfxObjs = {} - end - if self.root.smokeSfxObjs[index] then - if self.root.smokeSfxObjs[index].obj and func then - local obj = self.root.smokeSfxObjs[index].obj - obj:setActive(true) - func(obj) - end - else - self.root.smokeSfxObjs[index] = { - isLoaded = true - } - EffectManager:loadUIEffectAsync(GConst.BattleConst.LINK_SMOKE, self, self.gridNode, BOARD_SFX_ORDER, function(obj) - self.root.smokeSfxObjs[index].obj = obj - obj:setLocalScale(1.5, 1.5, 1.5) - if self.hidingAllSfxSmoke then - obj:setActive(false) - else - if func then - func(obj) - end - end - end) - end -end - -function BattleUI:hideAllSfxSmoke() - self.hidingAllSfxSmoke = true - if not self.root.smokeSfxObjs then - return - end - for inde, info in pairs(self.root.smokeSfxObjs) do - if info.obj then - info.obj:setActive(false) - end - end + local generateSkillCellPrefix = "battle_ui.bg_2.ani_node.grid_cell_" + self:_hideGenerateSkillGridCells(generateSkillCellPrefix) end function BattleUI:initSkillLineSfx() @@ -1926,110 +129,24 @@ function BattleUI:initSkillLineSfx() self.skillLightSfxs[25] = uiMap["battle_ui.bg_2.board_node.grid_node.sfx_skill_b05_5"] end - for _, obj in pairs(self.skillLineSfxs) do - obj:setActive(true) - obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) - obj:setActive(false) - end - - for _, obj in pairs(self.skillLightSfxs) do - obj:setActive(true) - obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) - obj:setActive(false) - end + self:_initSkillLineSfx() end -function BattleUI:playSkillLineSfx(posId, boradRangeList, randomPosList) - if not boradRangeList or not boradRangeList[1] or not self.skillLineSfxs then - return - end - - local directionAndRange = {} - for _, info in ipairs(boradRangeList) do - if info.type == GConst.BattleConst.BOARD_RANGE_TYPE.RANDOM then - directionAndRange[GConst.BattleConst.BOARD_RANGE_TYPE.RANDOM] = info.range - elseif info.type == GConst.BattleConst.BOARD_RANGE_TYPE.UP or - info.type == GConst.BattleConst.BOARD_RANGE_TYPE.DOWN then - directionAndRange[GConst.BattleConst.BOARD_RANGE_TYPE.UP] = info.range - elseif info.type == GConst.BattleConst.BOARD_RANGE_TYPE.LEFT or - info.type == GConst.BattleConst.BOARD_RANGE_TYPE.RIGHT then - directionAndRange[GConst.BattleConst.BOARD_RANGE_TYPE.LEFT] = info.range - elseif info.type == GConst.BattleConst.BOARD_RANGE_TYPE.LEFT_UP or - info.type == GConst.BattleConst.BOARD_RANGE_TYPE.LEFT_DOWN then - directionAndRange[GConst.BattleConst.BOARD_RANGE_TYPE.LEFT_UP] = info.range - elseif info.type == GConst.BattleConst.BOARD_RANGE_TYPE.RIGHT_UP or - info.type == GConst.BattleConst.BOARD_RANGE_TYPE.RIGHT_DOWN then - directionAndRange[GConst.BattleConst.BOARD_RANGE_TYPE.RIGHT_UP] = info.range - end - end - - local pos = ModuleManager.BattleManager:getPosInfo(posId) - for dir, range in pairs(directionAndRange) do - local index = range * 10 + dir - local obj = self.skillLineSfxs[index] - if obj then - obj:setAnchoredPosition(pos.x, pos.y) - obj:setActive(true) - obj:play() - end - end - - if randomPosList and randomPosList[1] then - local count = math.min(#randomPosList, 5) -- 特效最多5个 - self.skillLightSfxs.point:setAnchoredPosition(pos.x, pos.y) - self.skillLightSfxs.point:setActive(true) - self.skillLightSfxs.point:play() - for i = 1, count do - local tartgetPos = randomPosList[i] - tartgetPos = ModuleManager.BattleManager:getPosInfo(tartgetPos) - local obj = self.skillLightSfxs[20 + i] - if obj then - obj:setAnchoredPosition(tartgetPos.x, tartgetPos.y) - obj:setActive(true) - obj:play() - end - - obj = self.skillLightSfxs[10 + i] - local yOffset = tartgetPos.y - pos.y - local xOffset = tartgetPos.x - pos.x - local height = math.sqrt(xOffset * xOffset + yOffset * yOffset) - if obj then - obj:setAnchoredPosition(pos.x, pos.y) - obj:setLocalScaleX(0.3 * height / 94) - obj:setEulerAngles(0, 0, - math.deg(math.atan(xOffset, yOffset)) + 90) - obj:setActive(true) - obj:play() - end - end - end +function BattleUI:initGenerateSkillEffect() + local generateSkillEffecPrefix = "battle_ui.bg_2.ani_node.sfx_piece_skill_b01_" + self:_initGenerateSkillEffect(generateSkillEffecPrefix) end -function BattleUI:playChangeElementSfx(posId, index) - if not self.root.changeElementSfxs then - self.root.changeElementSfxs = {} - end - - local pos = ModuleManager.BattleManager:getPosInfo(posId) - local info = self.root.changeElementSfxs[index] - if info then - local obj = info.obj - if obj then - obj:setAnchoredPosition(pos.x, pos.y) - obj:setActive(true) - obj:play() - end - else - self.root.changeElementSfxs[index] = { - isLoaded = true - } - EffectManager:loadUIEffectAsync(GConst.BattleConst.CHANGE_ELEMENT_SFX, self, self.gridNode, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj) - self.root.changeElementSfxs[index].obj = obj - obj:setAnchoredPosition(pos.x, pos.y) - obj:play() - end) - end +function BattleUI:initCounterAttack() + self.counterAttackNode = self.uiMap["battle_ui.battle_root.battle_number_node.counter_attack"] + self.counterTx = self.uiMap["battle_ui.battle_root.battle_number_node.counter_attack.text_number"] + self.counterTxbgComp = self.uiMap["battle_ui.battle_root.top_node.counter_attack.bg"] + self.counterAttackNode:setVisible(false) end +--------------------------------end必须重写的方法-------------------------------- +----------------------------------按需重写的方法 可以为nil,已容错---------------- + function BattleUI:initTutorialNode() local uiMap = self.root:genAllChildren() self.tutorialNode = uiMap["battle_ui.tutorial_node"] @@ -2037,59 +154,40 @@ function BattleUI:initTutorialNode() self:showTutorialFinger() end -function BattleUI:initUISfxs() - if self.root.gridBreakSfxObjs then - for breakSfxPath, map in pairs(self.root.gridBreakSfxObjs) do - for index, info in pairs(map) do - if info.obj then - info.obj:setActive(true) - info.obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) - info.obj:setActive(false) - end - end - end - end +function BattleUI:initCommonSkillDescTips() + local uiMap = self.root:genAllChildren() + self.skillDescTipsNode = uiMap["battle_ui.bg_2.lv_node.skill_desc_tips"] + self.skillDescTips = uiMap["battle_ui.bg_2.lv_node.skill_desc_tips.desc"] + self.skillDescTipsNode:setVisible(false) +end - if self.root.gridEffectSfx then - for breakSfxPath, list in pairs(self.root.gridEffectSfx) do - for index, info in pairs(list) do - if info.obj then - info.obj:setActive(true) - info.obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) - info.obj:setActive(false) - end - end - end +function BattleUI:initSelectSkillNode() + if not self.selectSkillComp then + local uiMap = self.root:genAllChildren() + local obj = uiMap["battle_ui.bg_2.battle_select_skill_comp"] + obj:initPrefabHelper() + obj:genAllChildren() + self.selectSkillComp = obj:addLuaComponent(BATTLE_SELECT_SKILL_COMP) + self.selectSkillComp:hide() end +end - if self.root.lineSfxObjs then - for index, info in pairs(self.root.lineSfxObjs) do - if info.obj then - info.obj:setActive(true) - info.obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), BOARD_SFX_ORDER) - info.obj:setActive(false) - end - end - end +function BattleUI:initBossEnterAni() + local uiMap = self.root:genAllChildren() + self.bossEnterNode = uiMap["battle_ui.bg_2.boss_enter_node"] + self.bossEnterImg = uiMap["battle_ui.bg_2.boss_enter_node.ui_spine_obj"] + self.bossName = uiMap["battle_ui.bg_2.boss_enter_node.boss_name"] + self.bossEnterNodeAnimator = self.bossEnterNode:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR) + self.bossEnterNodeAnimator.enabled = false + self.bossEnterNodeCanvasGroup = self.bossEnterNode:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP) + self.bossEnterNode:setVisible(false) +end - if self.root.smokeSfxObjs then - for index, info in pairs(self.root.smokeSfxObjs) do - if info.obj then - info.obj:setActive(true) - info.obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), BOARD_SFX_ORDER) - info.obj:setActive(false) - end - end - end - - if self.root.changeElementSfxs then - for index, info in pairs(self.root.changeElementSfxs) do - if info.obj then - info.obj:setActive(true) - info.obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) - info.obj:setActive(false) - end - end +function BattleUI:initSkillSelectCells() + if not self.skillSelectCell then + local uiMap = self.root:genAllChildren() + self.skillSelectCell = CellManager:addCellComp(uiMap["battle_ui.bg_2.ani_node.skill_select_cell"], SELECT_SKILL_CELL) + self.skillSelectCell:getBaseObject():setAnchoredPositionX(DEFAULT_X) end end @@ -2117,7 +215,7 @@ function BattleUI:showTutorialFinger(posIdList) local path = {} local count = 0 for index, posId in ipairs(posIdList) do - local curPos = ModuleManager.BattleManager:getPosInfo(posId) + local curPos = self:getPosInfo(posId) if index == 1 then self.tutorialFinger:setAnchoredPosition(curPos.x, curPos.y) else @@ -2152,279 +250,177 @@ function BattleUI:showTutorialFinger(posIdList) self.showTutorialFingerSeq:SetLoops(-1) end -function BattleUI:initSelectSkillNode() - if not self.selectSkillComp then - local uiMap = self.root:genAllChildren() - local obj = uiMap["battle_ui.bg_2.battle_select_skill_comp"] - obj:initPrefabHelper() - obj:genAllChildren() - self.selectSkillComp = obj:addLuaComponent(BATTLE_SELECT_SKILL_COMP) - self.selectSkillComp:hide() - end +--------------------------------end按需重写的方法-------------------------------- + +function BattleUI:getPrefabPath() + return "assets/prefabs/ui/battle/battle_ui.prefab" end -function BattleUI:showSelectSkillComp(skillList, isCommon) - if not self.selectSkillComp then - return - end - self.selectSkillComp:refresh(skillList, isCommon) +function BattleUI:_display() + BattleBaseUI._display(self) + self:refreshTaskBtn() end -function BattleUI:hideAllBoardSfxs() - if self.generateSkillSfxs then - for _, obj in pairs(self.generateSkillSfxs) do - obj:setActive(false) - end - end - - if self.skillLineSfxs then - for _, obj in pairs(self.skillLineSfxs) do - obj:setActive(false) - end - end - - if self.skillLightSfxs then - for _, obj in pairs(self.skillLightSfxs) do - obj:setActive(false) - end - end - - if self.root.gridBreakSfxObjs then - for breakSfxPath, map in pairs(self.root.gridBreakSfxObjs) do - for index, info in pairs(map) do - if info.obj then - info.obj:setActive(false) - end - end - end - end - - if self.root.lineSfxObjs then - for index, info in pairs(self.root.lineSfxObjs) do - if info.obj then - info.obj:setActive(false) - end - end - end - - if self.root.smokeSfxObjs then - for index, info in pairs(self.root.smokeSfxObjs) do - if info.obj then - info.obj:setActive(false) - end - end - end -end - -function BattleUI:initCommonSkillDescTips() +function BattleUI:_addListeners() local uiMap = self.root:genAllChildren() - self.skillDescTipsNode = uiMap["battle_ui.bg_2.lv_node.skill_desc_tips"] - self.skillDescTips = uiMap["battle_ui.bg_2.lv_node.skill_desc_tips.desc"] - self.skillDescTipsNode:setVisible(false) -end - -function BattleUI:showCommonSkillTips(skillId) - -- 需要合并显示 - local rogueCfg = ConfigManager:getConfig("skill_rogue") - local curCfg = rogueCfg[skillId] - if not curCfg or curCfg.universal ~= 1 then - return - end - - local value = 0 - local selectSkillMap = DataManager.BattleData:getSelectSkillMap() - if selectSkillMap[skillId] then - value = selectSkillMap[skillId].value - end - - if curCfg.toast_mark then - for id, info in pairs(rogueCfg) do - if selectSkillMap[id] and id ~= skillId and info.toast_mark == curCfg.toast_mark then - value = value + selectSkillMap[id].value - end - end - end - - - if self.showCommonSkillTipsSid then - self:unscheduleGlobal(self.showCommonSkillTipsSid) - self.showCommonSkillTipsSid = nil - end - self.skillDescTipsNode:setVisible(true) - self.skillDescTips:setText(ModuleManager.HeroManager:getSkillRogueDesc(skillId, value)) - self.showCommonSkillTipsSid = self:performWithDelayGlobal(function() - self.skillDescTipsNode:setVisible(false) - end, 1.5) -end - -function BattleUI:initBossEnterAni() - local uiMap = self.root:genAllChildren() - self.bossEnterNode = uiMap["battle_ui.bg_2.boss_enter_node"] - self.bossEnterImg = uiMap["battle_ui.bg_2.boss_enter_node.ui_spine_obj"] - self.bossName = uiMap["battle_ui.bg_2.boss_enter_node.boss_name"] - self.bossEnterNodeAnimator = self.bossEnterNode:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR) - self.bossEnterNodeAnimator.enabled = false - self.bossEnterNodeCanvasGroup = self.bossEnterNode:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP) - self.bossEnterNode:setVisible(false) -end - -function BattleUI:showBossEnterAni(bornTime, bossName, monsterComp, callback) - if not self.bossEnterNode then - if callback then - callback() - end - self.battleController:showBuffTips(GConst.BattleConst.SIDE_DEF, true) - return - end - AudioManager:playEffect(AudioManager.EFFECT_ID.BOSS_WARNING) - self.bossEnterNode:setVisible(true) - self.bossEnterImg:setVisible(false) - self.bossName:setText(bossName) - self.bossName:setAnchoredPositionX(-756) - self.bossEnterNodeCanvasGroup.alpha = 0 - monsterComp:getBaseObject():setLocalPosition(DEFAULT_X, 0, 0) - if self.bossEnterAniSeq then - self.bossEnterAniSeq:Kill() - self.bossEnterAniSeq = nil - end - self.bossEnterAniSeq = self.root:createBindTweenSequence() - self.bossEnterAniSeq:Append(self.bossEnterNodeCanvasGroup:DOFade(1, 0.2)) - self.bossEnterAniSeq:AppendCallback(function() - self.bossEnterImg:setVisible(true) - self.bossEnterImg:playAnim("idle", false, true) - -- CS.UnityEngine.Animator.StringToHash("born") 结果是1155742626 - self.bossEnterNodeAnimator.enabled = true - self.bossEnterNodeAnimator:Play(1155742626, -1, 0) - monsterComp:initPosition() - monsterComp:getBaseObject():setParent(self.maxLayerNode, false) - if callback then - callback() - end + uiMap["battle_ui.top_node.close_btn"]:addClickListener(function() + ModuleManager.BattleManager:showPauseUI(self.battleController.battleType) end) - self.bossEnterAniSeq:AppendInterval(2) - self.bossEnterAniSeq:Append(self.bossEnterNodeCanvasGroup:DOFade(0, 0.2)) - self.bossEnterAniSeq:AppendCallback(function() - monsterComp:getBaseObject():setParent(self:getBattleNode(), false) - self.bossEnterNode:setVisible(false) - self.battleController:showBuffTips(GConst.BattleConst.SIDE_DEF, true) - self.bossEnterNodeAnimator.enabled = false + + self:addEventListener(EventManager.CUSTOM_EVENT.SHOW_ELIMINATION_TUTORAIL, function(posIdList) + self:showTutorialFinger(posIdList) + end) + + self:addEventListener(EventManager.CUSTOM_EVENT.SKILL_REFRESH_SUCC, function(posIdList) + if self.selectSkillComp then + self.selectSkillComp:getNewRandomSkill() + end end) end -function BattleUI:clear() - if self.alreadyClear then - return - end - self.alreadyClear = true - if self.battleNode then - self.battleNode:removeAllChildren() - end - if self.fxNode then - self.fxNode:removeAllChildren() - end - if self.battleNumberNode then - self.battleNumberNode:removeAllChildren() - end - if self.hpProgressYellowLeftSid then - self:unscheduleGlobal(self.hpProgressYellowLeftSid) - self.hpProgressYellowLeftSid = nil - end - if self.hpProgressYellowRightSid then - self:unscheduleGlobal(self.hpProgressYellowRightSid) - self.hpProgressYellowRightSid = nil - end - if self.hpProgressLeftTween then - self.hpProgressLeftTween:Kill() - self.hpProgressLeftTween = nil - end - if self.hpProgressYellowLeftTween then - self.hpProgressYellowLeftTween:Kill() - self.hpProgressYellowLeftTween = nil - end - if self.hpProgressRightTween then - self.hpProgressRightTween:Kill() - self.hpProgressRightTween = nil - end - if self.hpProgressYellowRightTween then - self.hpProgressYellowRightTween:Kill() - self.hpProgressYellowRightTween = nil - end - if self.bgMoveTween then - self.bgMoveTween:Kill() - self.bgMoveTween = nil - end - if self.shakeTween then - self.shakeTween:Kill() - self.shakeTween = nil - end +function BattleUI:_bind() + self:bind(self.battleData, "lvDirty", function() + self:refreshLv() + end, true) +end - if self.showTutorialFingerSeq then - self.showTutorialFingerSeq:Kill() - self.showTutorialFingerSeq = nil +function BattleUI:moveBattlefield(time) + local width = self.bg:fastGetSizeDelta() + self.bg:setAnchoredPositionX(width/4) + if self.bgMoveTween == nil then + self.bgMoveTween = self.bg:getTransform():DOAnchorPosX(-width/4, time) + self.bgMoveTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE) + self.bgMoveTween:SetAutoKill(false) + else + local x, y = self.bg:fastGetAnchoredPosition() + CacheVector2.x = -width/4 + CacheVector2.y = y + self.bgMoveTween:ChangeEndValue(CacheVector2, time, true) + self.bgMoveTween:Restart() end +end +function BattleUI:showLeftBuffTips(buffList, autoClose) + local x = self.battleBuffTipsBg:fastGetAnchoredPosition() + if x > 0 then + self.battleBuffTipsBg:setAnchoredPositionX(-x) + end + self:showBuffTips(buffList, autoClose) +end + +function BattleUI:showRightBuffTips(buffList, autoClose) + local x = self.battleBuffTipsBg:fastGetAnchoredPosition() + if x < 0 then + self.battleBuffTipsBg:setAnchoredPositionX(-x) + end + self:showBuffTips(buffList, autoClose) +end + +function BattleUI:onInitGridCellOver(...) + BattleBaseUI.onInitGridCellOver(self, ...) + ---- 检查引导 + ModuleManager.TutorialManager:checkFuncTutorial(GConst.TutorialConst.START_TUTORIAL) +end + +function BattleUI:switchBoard(downCallback, callback, isFirst) if self.switchBoardSeq then self.switchBoardSeq:Kill() self.switchBoardSeq = nil end - if self.eliminationAniSeq then - self.eliminationAniSeq:Kill() - self.eliminationAniSeq = nil + if isFirst then + if downCallback then + downCallback() + end + if callback then + callback() + end + self.boardNode:setAnchoredPositionY(BOARD_POS_UP.y) + return end - if self.generateSkillAniSeq then - self.generateSkillAniSeq:Kill() - self.generateSkillAniSeq = nil - end + self.switchBoardSeq = self.root:createBindTweenSequence() + self.switchBoardSeq:Append(self.boardNode:getTransform():DOAnchorPos(BOARD_POS_DOWN, 0.5)) + self.switchBoardSeq:AppendCallback(function() + if downCallback then + downCallback() + end + end) + self.switchBoardSeq:Append(self.boardNode:getTransform():DOAnchorPos(BOARD_POS_UP, 0.5)) + self.switchBoardSeq:AppendCallback(function() + if callback then + callback() + end + end) +end - if self.gotOneSkillAniSeq then - self.gotOneSkillAniSeq:Kill() - self.gotOneSkillAniSeq = nil - end - - if self.shuffleBoardSeq then - self.shuffleBoardSeq:Kill() - self.shuffleBoardSeq = nil - end - - if self.gridCells then - for _, cell in pairs(self.gridCells) do - if cell.fallSeq then - cell.fallSeq:Kill() - cell.fallSeq = nil +function BattleUI:hideMonsterSkillGridCells() + if not self.monsterSkillGridEntities then + local uiMap = self.root:genAllChildren() + self.monsterSkillGridEntities = {} + for name, elementType in pairs(GConst.BattleConst.ELEMENT_TYPE) do + local obj = uiMap["battle_ui.bg_2.ani_node.grid_cell_m" .. elementType] + if obj then + local cell = CellManager:addCellComp(obj, GRID_CELL) + local entity = self.battleData:getNewGridEntity() + entity:setCell(cell) + self.monsterSkillGridEntities[elementType] = entity end end end - if self.cacheSkillAniSeq then - self.cacheSkillAniSeq:Kill() - self.cacheSkillAniSeq = nil + for _, entity in pairs(self.monsterSkillGridEntities) do + if entity:getCell() then + entity:getCell():getBaseObject():setAnchoredPositionX(DEFAULT_X) + end end +end - if self.monsterSkillAniSeq then - self.monsterSkillAniSeq:Kill() - self.monsterSkillAniSeq = nil +function BattleUI:refreshLv() + local uiMap = self.root:genAllChildren() + if not self.lvSlider then + self.lvSlider = uiMap["battle_ui.bg_2.lv_node.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.lvDesc = uiMap["battle_ui.bg_2.lv_node.icon.lv_desc"] end - - if self.showCommonSkillTipsSid then - self:unscheduleGlobal(self.showCommonSkillTipsSid) - self.showCommonSkillTipsSid = nil + local curExp = self.battleData:getBattleExp() + local curNeedExp = self.battleData:getBattleNeedExp() + self.lvSlider.value = curExp / curNeedExp + local lv = self.battleData:getBattleLv() + self.lvDesc:setText(lv) + local sfx = uiMap["battle_ui.bg_2.lv_node.icon.vfx_ui_battle_progress_light_b01"] + if not self.lastLv then + sfx:setActive(true) + sfx:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) + sfx:setActive(false) + elseif self.lastLv ~= lv then + sfx:setActive(true) + sfx:play() end + self.lastLv = lv +end - if self.autoCloseBuffSid then - self:unscheduleGlobal(self.autoCloseBuffSid) - self.autoCloseBuffSid = nil - end +function BattleUI:refreshWave(wave, iconAtlas, iconName) + local uiMap = self.root:genAllChildren() + local icon = uiMap["battle_ui.top_node.wave_icon"] + local desc = uiMap["battle_ui.top_node.wave_desc"] + desc:setText(wave) + GFunc.centerImgAndTx(icon, desc, 10) - if self.bossEnterAniSeq then - self.bossEnterAniSeq:Kill() - self.bossEnterAniSeq = nil - end + iconAtlas = iconAtlas or GConst.ATLAS_PATH.COMMON + iconName = iconName or "common_dec_3" + icon:setSprite(iconAtlas, iconName) +end - if self.moveGridCellsSeq then - self.moveGridCellsSeq:Kill() - self.moveGridCellsSeq = nil +function BattleUI:refreshTaskBtn() + local uiMap = self.root:genAllChildren() + local taskBtn = uiMap["battle_ui.top_node.task_btn"] + if self.battleController.battleType == GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE then + taskBtn:setActive(true) + taskBtn:addClickListener(function() + ModuleManager.DailyChallengeManager:showBattleTaskUI() + end) + else + taskBtn:setActive(false) end end diff --git a/lua/app/ui/battle/battle_ui_pvp.lua b/lua/app/ui/battle/battle_ui_pvp.lua index 6b1a3132..e30a594a 100644 --- a/lua/app/ui/battle/battle_ui_pvp.lua +++ b/lua/app/ui/battle/battle_ui_pvp.lua @@ -2,29 +2,28 @@ local BattleBaseUI = require "app/ui/battle/battle_base_ui" local BattleUIPVP = class("BattleUIPVP", BattleBaseUI) local DEFAULT_X = 10000 -local BOARD_POS_UP = BF.Vector2(0, 47) -local BOARD_POS_DOWN = BF.Vector2(0, -740) ---------------------------------必须重写的方法---------------------------------- -function BattleBaseUI:initBaseInfo() +function BattleUIPVP:initBaseInfo() local uiMap = self.root:genAllChildren() self.uiMap = uiMap self.gridNode = uiMap["battle_ui_pvp.board_root_node.board_node_atk.grid_node"] - self.boardNode = uiMap["battle_ui_pvp.board_root_node.board_node_atk"] + self.boardNode = uiMap["battle_ui_pvp.board_root_node"] + self.boardCenterNode = uiMap["battle_ui_pvp.board_root_node.board_center_node"] self.boardNode:setAnchoredPositionX(DEFAULT_X) self.boardMask2D = self.gridNode:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_RECT_MASK_2D) - self.boardMask = uiMap["battle_ui_pvp.board_root_node.board_node_atk.grid_node.board_mask"] + self.boardMask = uiMap["battle_ui_pvp.board_root_node.board_mask"] self.boardMask:setVisible(false) - self.boardCacheNode = uiMap["battle_ui.bg_2.board_cache_node"] + self.boardCacheNode = uiMap["battle_ui_pvp.board_root_node.board_cache_node"] self.boardCacheNode:setVisible(false) - self.boardCacheBox = uiMap["battle_ui.bg_2.board_cache_node.skill_box"] + self.boardCacheBox = uiMap["battle_ui_pvp.board_root_node.board_cache_node.skill_box"] self.boardCacheBox:setAnchoredPositionX(DEFAULT_X) - self.battleRoot = uiMap["battle_ui.battle_root"] - self.maxLayerNode = uiMap["battle_ui.battle_root.battle_node.max_layer_show_node"] + self.battleRoot = uiMap["battle_ui_pvp.battle_root"] + self.maxLayerNode = uiMap["battle_ui_pvp.battle_root.battle_node.max_layer_show_node"] end function BattleUIPVP:initBg() - self.bg = self.uiMap["battle_ui.battle_root.bg"] + self.bg = self.uiMap["battle_ui_pvp.battle_root.bg"] self.bg:setLocalScale(0, 0, 0) local width = self.bg:fastGetSizeDelta() self.bg:setAnchoredPositionX(width/4) @@ -50,7 +49,7 @@ function BattleUIPVP:initBuff() end function BattleUIPVP:initBattlefield() - self.battleNode = self.uiMap["battle_ui.battle_root.battle_node"] + self.battleNode = self.uiMap["battle_ui_pvp.battle_root.battle_node"] end function BattleUIPVP:initNumberNode() @@ -62,7 +61,7 @@ function BattleUIPVP:initNumberNode() self.battleNumberSpecial = self.uiMap["battle_ui_pvp.cache_node.battle_number_special"] end -function BattleBaseUI:initComboNode() +function BattleUIPVP:initComboNode() self.comboNode = self.uiMap["battle_ui_pvp.battle_root.combo"] self.comboBg1 = self.uiMap["battle_ui_pvp.battle_root.combo.bg.bg_1"] self.comboTx1 = self.uiMap["battle_ui_pvp.battle_root.combo.number.text.text_1"] @@ -73,7 +72,7 @@ function BattleBaseUI:initComboNode() self:_initComboNode() end -function BattleBaseUI:initHpNode() +function BattleUIPVP:initHpNode() self.hpProgressLeft = self.uiMap["battle_ui_pvp.bottom_node.hp_node.hp_progress"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) self.hpProgressRight = self.uiMap["battle_ui_pvp.top_node.hp_node.hp_progress"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) self.hpTextLeft = self.uiMap["battle_ui_pvp.bottom_node.hp_node.hp"] @@ -84,7 +83,7 @@ function BattleBaseUI:initHpNode() end function BattleUIPVP:initFxNode() - self.fxNode = self.uiMap["battle_ui.battle_root.batttle_fx_node"] + self.fxNode = self.uiMap["battle_ui_pvp.battle_root.batttle_fx_node"] end function BattleUIPVP:hideGenerateSkillGridCells() @@ -92,7 +91,7 @@ function BattleUIPVP:hideGenerateSkillGridCells() self:_hideGenerateSkillGridCells(generateSkillCellPrefix) end -function BattleBaseUI:initSkillLineSfx() +function BattleUIPVP:initSkillLineSfx() if not self.skillLineSfxs then self.skillLineSfxs = {} self.skillLineSfxs[13] = self.uiMap["battle_ui_pvp.board_root_node.ani_node.sfx_skill_b01_2_1h"] @@ -126,10 +125,12 @@ function BattleBaseUI:initSkillLineSfx() self.skillLightSfxs[24] = self.uiMap["battle_ui_pvp.board_root_node.ani_node.sfx_skill_b05_4"] self.skillLightSfxs[25] = self.uiMap["battle_ui_pvp.board_root_node.ani_node.sfx_skill_b05_5"] end + + self:_initSkillLineSfx() end function BattleUIPVP:initGenerateSkillEffect() - local generateSkillEffecPrefix = "battle_ui_pvp.board_root_node.ani_node.grid_cell_" + local generateSkillEffecPrefix = "battle_ui_pvp.board_root_node.ani_node.sfx_piece_skill_b01_" self:_initGenerateSkillEffect(generateSkillEffecPrefix) end @@ -147,66 +148,40 @@ function BattleUIPVP:getPrefabPath() return "assets/prefabs/ui/battle/battle_ui_pvp.prefab" end -function BattleUIPVP:getBGMId() - return AudioManager.BGM_ID.BATTLE -end - function BattleUIPVP:_display() BattleBaseUI._display(self) self:refreshAvatar() + + ---- 适配 + local w, h = GFunc.getUIExpandScreenSize() + local scale = math.min(1, h / 1280 * 0.84) + self.boardCenterNode:setVisible(true, scale) end function BattleUIPVP:_addListeners() local uiMap = self.root:genAllChildren() - uiMap["battle_ui.top_node.close_btn"]:addClickListener(function() + uiMap["battle_ui_pvp.top_node.close_btn"]:addClickListener(function() ModuleManager.BattleManager:showPauseUI(self.battleController.battleType) end) end +function BattleUIPVP:getBoardRootNode() + local uiMap = self.root:genAllChildren() + return uiMap["battle_ui_pvp.board_root_node"] +end + function BattleUIPVP:refreshAvatar() -- 等数据 end function BattleUIPVP:showLeftBuffTips(buffList, autoClose) local addY = self:showBuffTips(buffList, autoClose) - self.battleBuffTipsBg:setAnchoredPosition(-175, -1018 + addY) + self.battleBuffTipsBg:setAnchoredPosition(-175, -1050 + addY) end function BattleUIPVP:showRightBuffTips(buffList, autoClose) self:showBuffTips(buffList, autoClose) - self.battleBuffTipsBg:setAnchoredPosition(175, -188) -end - -function BattleUIPVP:switchBoard(downCallback, callback, isFirst) - if self.switchBoardSeq then - self.switchBoardSeq:Kill() - self.switchBoardSeq = nil - end - - if isFirst then - if downCallback then - downCallback() - end - if callback then - callback() - end - self.boardNode:setAnchoredPositionY(BOARD_POS_UP.y) - return - end - - self.switchBoardSeq = self.root:createBindTweenSequence() - self.switchBoardSeq:Append(self.boardNode:getTransform():DOAnchorPos(BOARD_POS_DOWN, 0.5)) - self.switchBoardSeq:AppendCallback(function() - if downCallback then - downCallback() - end - end) - self.switchBoardSeq:Append(self.boardNode:getTransform():DOAnchorPos(BOARD_POS_UP, 0.5)) - self.switchBoardSeq:AppendCallback(function() - if callback then - callback() - end - end) + self.battleBuffTipsBg:setAnchoredPosition(175, -200) end function BattleUIPVP:refreshWave(wave, iconAtlas, iconName) @@ -214,11 +189,41 @@ function BattleUIPVP:refreshWave(wave, iconAtlas, iconName) local icon = uiMap["battle_ui_pvp.bottom_node.round_icon"] local desc = uiMap["battle_ui_pvp.bottom_node.round_text"] desc:setText(wave) - GFunc.centerImgAndTx(icon, desc, 10) + -- GFunc.centerImgAndTx(icon, desc, 10) iconAtlas = iconAtlas or GConst.ATLAS_PATH.COMMON iconName = iconName or "common_dec_3" icon:setSprite(iconAtlas, iconName) end +function BattleBaseUI:enterShowBoardAni(callback) + self:clearEnterShowBoardSeq() + self.enterShowBoardSeq = self.root:createBindTweenSequence() + self.enterShowBoardSeq:Append(self:getBoardRootNode():getTransform():DOLocalMoveX(0, 0.5)) + self.enterShowBoardSeq:AppendCallback(function() + local str + if self.battleController.curActionSide == GConst.BattleConst.SIDE_ATK then + str = I18N:getGlobalText(I18N.GlobalConst.ARENA_BATTLE_DESC_1) + else + str = I18N:getGlobalText(I18N.GlobalConst.ARENA_BATTLE_DESC_2) + end + GFunc.showToast(str) + if callback then + callback() + end + end) +end + +function BattleBaseUI:enterHideBoardAni(callback) + self:clearEnterShowBoardSeq() + self.enterShowBoardSeq = self.root:createBindTweenSequence() + local w, h = GFunc.getUIExpandScreenSize() + self.enterShowBoardSeq:Append(self:getBoardRootNode():getTransform():DOLocalMoveX(w / 2 + 360, 0.5)) + self.enterShowBoardSeq:AppendCallback(function() + if callback then + callback() + end + end) +end + return BattleUIPVP \ No newline at end of file diff --git a/lua/app/ui/battle/cell/grid_cell.lua b/lua/app/ui/battle/cell/grid_cell.lua index 9d28e0bf..5b563cde 100644 --- a/lua/app/ui/battle/cell/grid_cell.lua +++ b/lua/app/ui/battle/cell/grid_cell.lua @@ -67,7 +67,7 @@ function GridCell:refresh(gridEntity, curElement, skillPosId) skillIcon:setVisible(true) local sprite - local skillEntity = DataManager.BattleData:getSkillEntityBySkillId(skillId) + local skillEntity = self:getSkillEntity() if skillEntity then sprite = skillEntity:getBattleIcon() else @@ -91,7 +91,6 @@ function GridCell:refresh(gridEntity, curElement, skillPosId) end end - local skillEntity = DataManager.BattleData:getSkillEntityBySkillId(skillId) local ignoreElementType = skillEntity:getIgnoreElementType() local skillBg if ignoreElementType and not self.lastShowHlElementType then @@ -108,7 +107,7 @@ function GridCell:refresh(gridEntity, curElement, skillPosId) skillIcon:setVisible(false) end - uiMap["grid_cell.touch_node.ani_node.mask"]:setVisible(showMask) + self:showMask(showMask) self:showCircle(gridEntity:getNeedElimination()) if self.gridEntity:getIsIdle() then self.lastShowHlElementType = nil @@ -128,6 +127,11 @@ function GridCell:refresh(gridEntity, curElement, skillPosId) end end +function GridCell:showMask(showMask) + local uiMap = self:getUIMap() + uiMap["grid_cell.touch_node.ani_node.mask"]:setVisible(showMask) +end + function GridCell:addTouchListener(func) local uiMap = self:getUIMap() uiMap["grid_cell.touch_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_ELIMINATION_TOUCH_EVENT):AddTouchEventListener(func) @@ -150,7 +154,7 @@ function GridCell:showHighLight(show, mainElementType) downBg:setVisible(skillId ~= nil) if skillId then show = true -- 有技能,强制显示特效 - local skillEntity = DataManager.BattleData:getSkillEntityBySkillId(skillId) + local skillEntity = self:getSkillEntity() local ignoreElementType = skillEntity:getIgnoreElementType() local skillBg if ignoreElementType and not mainElementType then @@ -284,4 +288,15 @@ function GridCell:playAnim(aniName, loop, forceRefresh, forceGetSG) spineObj:playAnim(aniName, loop, forceRefresh, forceGetSG) end +function GridCell:getSkillEntity() + if not self.gridEntity then + return + end + local skillId = self.gridEntity:getSkillId() + if skillId then + local skillEntity = self.gridEntity:getBattleData():getSkillEntityBySkillId(skillId, self.gridEntity:getSkillSide()) + return skillEntity + end +end + return GridCell \ No newline at end of file diff --git a/lua/app/ui/battle/cell/tiny_buff_cell.lua b/lua/app/ui/battle/cell/tiny_buff_cell.lua index 8aebe0ac..4ae37ecd 100644 --- a/lua/app/ui/battle/cell/tiny_buff_cell.lua +++ b/lua/app/ui/battle/cell/tiny_buff_cell.lua @@ -2,9 +2,9 @@ local TinyBuffCell = class("TinyBuffCell", BaseCell) function TinyBuffCell:refresh(buffName, round) if round <= 1 or round > 9 then - round:setText(GConst.EMPTY_STRING) + round = GConst.EMPTY_STRING else - round:setText(tostring(round)) + round = tostring(round) end local uiMap = self:getUIMap() diff --git a/lua/app/ui/tips/battle_board_skill_tips.lua b/lua/app/ui/tips/battle_board_skill_tips.lua index 3dac4b06..ed633b7f 100644 --- a/lua/app/ui/tips/battle_board_skill_tips.lua +++ b/lua/app/ui/tips/battle_board_skill_tips.lua @@ -12,10 +12,12 @@ function BattleBoardSkillTips:onPressBackspace() end function BattleBoardSkillTips:ctor(params) - local elementType = params.elementType self.params = params - self.boardSkillEntity = DataManager.BattleData:getSkillEntityByElement(elementType) - self.battleUnitEntity = DataManager.BattleData:getAtkTeam():getAllMembers()[elementType] + self.heroEntity = params.heroEntity + self.battleData = params.battleController.battleData + self.side = params.side + self.boardSkillEntity = self.battleData:getSkillEntityByElement(self.heroEntity:getMatchType()) + self.battleUnitEntity = self.battleData:getTeamBySide(self.side):getAllMembers()[self.heroEntity:getMatchType()] self.tarCornerScreenPos = params.tarCornerScreenPos self.location = params.location end @@ -51,15 +53,11 @@ function BattleBoardSkillTips:onRefresh() self:closeUI() end) - local heroId = self.battleUnitEntity:getId() - local heroEntity = DataManager.HeroData:getHeroById(heroId) - if not heroEntity then - return - end + local heroId = self.heroEntity:getCfgId() local heroNmae = ModuleManager.HeroManager:getHeroName(heroId) local atk = self.battleUnitEntity:getAtk() self.atkDesc:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_9, heroNmae, atk)) - self.skillDesc:setText(ModuleManager.HeroManager:getSkillDesc(heroEntity:getBaseSkill())) + self.skillDesc:setText(ModuleManager.HeroManager:getSkillDesc(self.heroEntity:getBaseSkill())) self.validEffectDesc:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_10)) local addY = self.skillDesc:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredHeight - self.skillDesc:fastGetSizeDeltaY() @@ -68,17 +66,17 @@ function BattleBoardSkillTips:onRefresh() end local count = 0 - local rougeSkillList = heroEntity:getRogueSkillList() + local rougeSkillList = self.heroEntity:getRogueSkillList() for index, cell in ipairs(self.selectSkillCells) do local rogueSkillId = rougeSkillList[index] cell:getBaseObject():setActive(rogueSkillId ~= nil) if rogueSkillId then - local selectedCount = DataManager.BattleData:getSkillCount(rogueSkillId) + local selectedCount = self.battleData:getSkillCount(rogueSkillId, self.side) if selectedCount > 0 then count = count + 1 local skillId = rogueSkillId local count = selectedCount - local value = DataManager.BattleData:getSelectSkillMap()[skillId].value or 0 + local value = self.battleData:getSelectSkillMap(self.side)[skillId].value or 0 cell:refresh(skillId, count) cell:addClickListener(function() ModuleManager.TipsManager:showDescTips(ModuleManager.HeroManager:getSkillRogueDesc(skillId, value), cell:getBaseObject()) diff --git a/lua/app/userdata/battle/battle_base_data.lua b/lua/app/userdata/battle/battle_base_data.lua index af9d6e15..33ec86e6 100644 --- a/lua/app/userdata/battle/battle_base_data.lua +++ b/lua/app/userdata/battle/battle_base_data.lua @@ -41,6 +41,8 @@ function BattleBaseData:init(params) self.defTeam = self:initTeam(SIDE_DEF, params.defFormation) self:initRogueSkills(SIDE_ATK, params.atkFormation) self:initRogueSkills(SIDE_DEF, params.defFormation) + self.atkFormation = params.atkFormation or {} + self.defFormation = params.defFormation or {} end function BattleBaseData:getTimeScale() @@ -129,7 +131,7 @@ function BattleBaseData:initRogueSkills(side, formation) for matchType, heroEntity in pairs(formation) do local skillId = heroEntity:getBaseSkill() local cfg = SKILL_CFG[skillId] - self.skillMap[side][cfg.position] = BATTLE_BOARD_SKILL_ENTITY:create(skillId) + self.skillMap[side][cfg.position] = BATTLE_BOARD_SKILL_ENTITY:create(skillId, side) self.skillMap[side][cfg.position]:addUpSkills(heroEntity:getRogueSkillList()) self.skillMap[side][cfg.position]:setUnlockId(heroEntity:getUnlockRogueId()) for _, id in ipairs(heroEntity:getActiveRogueSkills()) do @@ -168,7 +170,7 @@ function BattleBaseData:refreshBoard(board, blockIcon) self.gridEntities[data.posId]:setGridType(data.gridType) self.gridEntities[data.posId]:setElementType(data.elementType) else - self.gridEntities[data.posId] = BATTLE_GRID_ENTITY:create(data) + self.gridEntities[data.posId] = self:getNewGridEntity(data.posId, data.gridType, data.elementType) end self.gridEntities[data.posId]:determineIdleStatus() self.gridEntities[data.posId]:setObstacleIcon(blockIcon) @@ -180,7 +182,8 @@ function BattleBaseData:getNewGridEntity(posId, gridType, elementType) local data = { posId = posId or 0, gridType = gridType or BattleConst.GRID_TYPE.EMPTY, - elementType = elementType or BattleConst.ELEMENT_TYPE.RED + elementType = elementType or BattleConst.ELEMENT_TYPE.RED, + battleData = self } return BATTLE_GRID_ENTITY:create(data) end @@ -191,6 +194,7 @@ function BattleBaseData:clear() self.gridEntities = {} self.skillMap = {} + self.skillPool = {} self.selectSkillMap = {} end @@ -366,13 +370,14 @@ function BattleBaseData:setGridDirty(posId) entity:setDirty() end -function BattleBaseData:lockAllSkillGrid(lock) +function BattleBaseData:lockAllSkillGrid(lock, side) + side = side or SIDE_ATK if not self.gridEntities then return end for posId, entity in pairs(self.gridEntities) do - if entity:getSkillId() then + if entity:getSkillId() and (not entity:getSkillSide() or entity:getSkillSide() == side) then local gridType = GConst.BattleConst.GRID_TYPE.EMPTY if lock then gridType = GConst.BattleConst.GRID_TYPE.LOCK @@ -614,6 +619,14 @@ function BattleBaseData:initTeam(side, formation) return team end +function BattleBaseData:getTeamBySide(side) + if side == SIDE_ATK then + return self.atkTeam + else + return self.defTeam + end +end + function BattleBaseData:getAtkTeam() return self.atkTeam end @@ -622,6 +635,14 @@ function BattleBaseData:getDefTeam() return self.defTeam end +function BattleBaseData:getHeroEntity(elementType, side) + if side == SIDE_DEF then + return self.defFormation[elementType] + else + return self.atkFormation[elementType] + end +end + function BattleBaseData:initHeroData(formation) local units = {} if formation then diff --git a/lua/app/userdata/battle/battle_data.lua b/lua/app/userdata/battle/battle_data.lua index 2210d6dc..60a5b3d6 100644 --- a/lua/app/userdata/battle/battle_data.lua +++ b/lua/app/userdata/battle/battle_data.lua @@ -3,8 +3,8 @@ local BattleData = class("BattleData", BattleBaseData) local BattleConst = GConst.BattleConst -function BattleBaseData:getRowCount() - return BattleConst.PVP_ROW_COUNT +function BattleData:getRowCount() + return BattleConst.ROW_COUNT end return BattleData \ No newline at end of file diff --git a/lua/app/userdata/battle/battle_grid_entity.lua b/lua/app/userdata/battle/battle_grid_entity.lua index b3a73254..900d90f7 100644 --- a/lua/app/userdata/battle/battle_grid_entity.lua +++ b/lua/app/userdata/battle/battle_grid_entity.lua @@ -10,6 +10,7 @@ function BattleGridEntity:ctor(data) self.elementType = data.elementType or BattleConst.ELEMENT_TYPE.NONE self.skillId = data.skillId self.linkSkillCount = data.linkSkillCount or 0 -- 任意链接技能激活次数 + self.battleData = data.battleData self.isIdle = false self.breakCount = 0 self.data.isDirty = false @@ -26,6 +27,10 @@ function BattleGridEntity:clear() self.data.isDirty = false end +function BattleGridEntity:getBattleData() + return self.battleData +end + function BattleGridEntity:getSnapshoptInfo() return { posId = self.posId, @@ -149,7 +154,7 @@ function BattleGridEntity:tryBreakGrid(condition, onlyCheck) end function BattleGridEntity:getPos() - return ModuleManager.BattleManager:getPosInfo(self.posId) + return ModuleManager.BattleManager:getPosInfo(self.posId, self.battleData:getRowCount()) end function BattleGridEntity:setCell(cell) @@ -203,7 +208,7 @@ end function BattleGridEntity:setElementType(elementType, noDirty) self.elementType = elementType - if DataManager.BattleData:getCacheLockedElement(self.elementType) and not self.skillId then + if self.battleData:getCacheLockedElement(self.elementType) and not self.skillId then self:setGridType(BattleConst.GRID_TYPE.LOCK) end if not noDirty then @@ -218,14 +223,36 @@ function BattleGridEntity:getSkillId() return self.skillId end -function BattleGridEntity:setSkilId(skillId, noDirty) +function BattleGridEntity:setSkilId(skillId, noDirty, side) self.skillId = skillId self.linkSkillCount = 0 + self.skillSide = side or GConst.BattleConst.SIDE_ATK if not noDirty then self:setDirty() end end +function BattleGridEntity:getSkillSide() + return self.skillSide +end + +function BattleGridEntity:getSkillMatchType() + if not self:getSkillId() then + return + end + local skillEntity = self:getSkillEntity() + return skillEntity and skillEntity:getPosition() +end + +function BattleGridEntity:getSkillEntity() + if not self:getSkillId() then + return + end + local skillEntity = self.battleData:getSkillEntityBySkillId(self:getSkillId(), self.skillSide) + return skillEntity +end + + function BattleGridEntity:canChangeInfo() if self:canLink() and not self:getSkillId() then return true @@ -267,7 +294,7 @@ function BattleGridEntity:getNeedChangePos() return false end - local skillEntity = DataManager.BattleData:getSkillEntityBySkillId(self:getSkillId()) + local skillEntity = self:getSkillEntity() if not skillEntity then return false end diff --git a/lua/app/userdata/battle/skill/battle_board_skill_entity.lua b/lua/app/userdata/battle/skill/battle_board_skill_entity.lua index 240ad0de..f965c11a 100644 --- a/lua/app/userdata/battle/skill/battle_board_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_board_skill_entity.lua @@ -1,8 +1,9 @@ local BattleBoardSkillEntity = class("BattleBoardSkillEntity", BaseData) local BattleBuffEntity = require "app/userdata/battle/skill/battle_buff_entity" -function BattleBoardSkillEntity:ctor(skillId) +function BattleBoardSkillEntity:ctor(skillId, side) self:refreshSkillId(skillId) + self.side = side self.curEnergy = 0 self.addRange = {} self.linkEffectEntities = {} -- 链接攻击伤害 type = 3 @@ -349,7 +350,7 @@ function BattleBoardSkillEntity:getElementCountEffect() end function BattleBoardSkillEntity:getEliminateEffects(battleController) - local unitEntity = battleController.battleData.atkTeam:getAllMembers()[self:getPosition()] + local unitEntity = battleController:getCurActionTeam(self.side):getAllMembers()[self:getPosition()] if not unitEntity or not self.config.eliminate_effect then return end diff --git a/lua/app/userdata/battle/skill/battle_skill_entity.lua b/lua/app/userdata/battle/skill/battle_skill_entity.lua index e753951c..99675501 100644 --- a/lua/app/userdata/battle/skill/battle_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_skill_entity.lua @@ -36,8 +36,12 @@ end function BattleSkillEntity:initSkillEffect() self.effectList = {} self.isHurtType = false - if self.skillInfo.effect then - for k, v in ipairs(self.skillInfo.effect) do + local effect = self.skillInfo.effect + if self:getUsePvpEffect() then + effect = self.skillInfo.pvp_effect or effect + end + if effect then + for k, v in ipairs(effect) do local buffEntity = BattleBuffEntity:create() buffEntity:init(v, self.owner, self) if buffEntity:getIsHurtType() then @@ -66,8 +70,12 @@ function BattleSkillEntity:initEffectBlock() end else local count = 0 - if self.skillInfo.effect then - count = #self.skillInfo.effect + local effect = self.skillInfo.effect + if self:getUsePvpEffect() then + effect = self.skillInfo.pvp_effect or effect + end + if effect then + count = #effect end table.insert(self.effectBlock, count) end @@ -78,6 +86,18 @@ function BattleSkillEntity:initEffectBlock() end end +function BattleSkillEntity:setUsePvpEffect(use) + self.usePvpEffect = use +end + +function BattleSkillEntity:getUsePvpEffect() + if self.usePvpEffect == nil then + local battleController = ModuleManager.BattleManager.battleController + self.usePvpEffect = battleController:getIsPvpBattle() or false + end + return self.usePvpEffect +end + function BattleSkillEntity:startUse() self.skillCanUseTimes = self.owner:getSkillExtraUseTimes(self.skillId) + 1 end @@ -156,6 +176,16 @@ function BattleSkillEntity:addSkillEffectRatio(effect) end end +function BattleSkillEntity:getSkillSide() + if self.owner then + return self.owner:getSide() + end +end + +function BattleSkillEntity:getIsAtkSideSkill() + return self:getSkillSide() == GConst.BattleConst.SIDE_ATK +end + function BattleSkillEntity:getSkillId() return self.skillId end @@ -270,7 +300,11 @@ function BattleSkillEntity:getPassiveTriggerId() end function BattleSkillEntity:getFxSelf() - return self.skillInfo.fx_self + if not self:getIsAtkSideSkill() and self:getUsePvpEffect() then + return self.skillInfo.fx_self_mirror or self.skillInfo.fx_self + else + return self.skillInfo.fx_self + end end function BattleSkillEntity:getFxSelfDelay() @@ -278,7 +312,11 @@ function BattleSkillEntity:getFxSelfDelay() end function BattleSkillEntity:getFxTarget() - return self.skillInfo.fx_target + if not self:getIsAtkSideSkill() and self:getUsePvpEffect() then + return self.skillInfo.fx_target_mirror or self.skillInfo.fx_target + else + return self.skillInfo.fx_target + end end function BattleSkillEntity:getFxTargetDelay()