代码提交

This commit is contained in:
xiekaidong 2023-04-10 09:58:43 +08:00
parent 072b6b637d
commit be1b2d1e4f
96 changed files with 6212 additions and 29 deletions

View File

@ -61,6 +61,9 @@ local attr = {
},
[21]={
["name"]="block"
},
[22]={
["name"]="dmg_dec"
}
}
local keys = {
@ -85,12 +88,13 @@ local keys = {
["exp_time"]=attr[18],
["cured"]=attr[19],
["vampire"]=attr[20],
["block"]=attr[21]
["block"]=attr[21],
["dmg_dec"]=attr[22]
}
}
local config = {
data=attr,
keys=keys,
count=21
count=22
}
return config

128
lua/app/config/buff.lua Normal file
View File

@ -0,0 +1,128 @@
local buff = {
[1]={
["name"]="stun",
["buff_type"]=8,
["decr"]=2,
["is_percent"]=2,
["v_buf"]="stun",
["icon"]="stun",
["fx_continued"]={
4001
},
["hit_show"]=1
},
[2]={
["name"]="hit_stun",
["buff_type"]=9,
["decr"]=2,
["is_percent"]=2,
["v_buf"]="stun",
["change_name"]="stun",
["hit_show"]=1
},
[3]={
["name"]="hurt",
["buff_type"]=3,
["decr"]=3,
["is_percent"]=1,
["v_buf"]="hurt"
},
[4]={
["name"]="shield",
["buff_type"]=2,
["decr"]=1,
["is_percent"]=2,
["v_buf"]="shield",
["fx_get"]={
2010
},
["hit_show"]=1
},
[5]={
["name"]="atkp_add",
["buff_type"]=1,
["decr"]=1,
["is_percent"]=2,
["v_buf"]="atkp_add"
},
[6]={
["name"]="atkp_add_defenderhp",
["buff_type"]=1,
["decr"]=1,
["is_percent"]=2,
["v_buf"]="atkp_add"
},
[7]={
["name"]="healp",
["buff_type"]=5,
["decr"]=3,
["is_percent"]=2,
["v_buf"]="healp",
["fx_get"]={
2001
}
},
[8]={
["name"]="wavehealp",
["buff_type"]=5,
["decr"]=3,
["is_percent"]=2,
["v_buf"]="healp"
},
[9]={
["name"]="atkp_add_connect",
["buff_type"]=1,
["is_percent"]=2,
["v_buf"]="atkp_add"
},
[10]={
["name"]="spd_dec",
["buff_type"]=8,
["is_percent"]=2,
["v_buf"]="spd_dec"
},
[11]={
["name"]="block",
["buff_type"]=1,
["decr"]=1,
["is_percent"]=2,
["v_buf"]="block"
},
[12]={
["name"]="hit_block",
["buff_type"]=1,
["decr"]=1,
["is_percent"]=2,
["v_buf"]="block"
},
[13]={
["name"]="hit_healp",
["buff_type"]=5,
["decr"]=3,
["is_percent"]=2,
["v_buf"]="healp"
}
}
local keys = {
name = {
["stun"]=buff[1],
["hit_stun"]=buff[2],
["hurt"]=buff[3],
["shield"]=buff[4],
["atkp_add"]=buff[5],
["atkp_add_defenderhp"]=buff[6],
["healp"]=buff[7],
["wavehealp"]=buff[8],
["atkp_add_connect"]=buff[9],
["spd_dec"]=buff[10],
["block"]=buff[11],
["hit_block"]=buff[12],
["hit_healp"]=buff[13]
}
}
local config = {
data=buff,
keys=keys,
count=13
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 5d97060401e1c8d48a6bf3e1b9337bce
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

2334
lua/app/config/chapter.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 2b11cd1a5a7011a42980563e2f966c4e
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

310
lua/app/config/hero.lua Normal file
View File

@ -0,0 +1,310 @@
local hero = {
[1]={
["position"]=3,
["qlt"]=2,
["base_skill"]=10,
["rouge_skill_1"]=200101,
["rouge_skill_2"]=200102,
["rouge_skill_3"]=200103,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[2]={
["position"]=2,
["qlt"]=2,
["base_skill"]=20,
["rouge_skill_1"]=200201,
["rouge_skill_2"]=200202,
["rouge_skill_3"]=200203,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[3]={
["position"]=4,
["qlt"]=2,
["base_skill"]=30,
["rouge_skill_1"]=200301,
["rouge_skill_2"]=200302,
["rouge_skill_3"]=200303,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[4]={
["position"]=5,
["qlt"]=2,
["base_skill"]=40,
["rouge_skill_1"]=200401,
["rouge_skill_2"]=200402,
["rouge_skill_3"]=200403,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[5]={
["position"]=1,
["qlt"]=2,
["base_skill"]=50,
["rouge_skill_1"]=200501,
["rouge_skill_2"]=200502,
["rouge_skill_3"]=200503,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[6]={
["position"]=3,
["qlt"]=3,
["base_skill"]=60,
["rouge_skill_1"]=200601,
["rouge_skill_2"]=200602,
["rouge_skill_3"]=200603,
["hp_1"]=150,
["hp_2"]=165,
["hp_3"]=180,
["hp_4"]=195,
["hp_5"]=210,
["hp_6"]=225,
["hp_7"]=240,
["hp_8"]=255,
["hp_9"]=270,
["hp_10"]=285,
["hp_11"]=300,
["hp_12"]=315,
["hp_13"]=330,
["hp_14"]=345,
["hp_15"]=360,
["atk_1"]=150,
["atk_2"]=165,
["atk_3"]=180,
["atk_4"]=195,
["atk_5"]=210,
["atk_6"]=225,
["atk_7"]=240,
["atk_8"]=255,
["atk_9"]=270,
["atk_10"]=285,
["atk_11"]=300,
["atk_12"]=315,
["atk_13"]=330,
["atk_14"]=345,
["atk_15"]=360
},
[7]={
["position"]=2,
["qlt"]=3,
["base_skill"]=70,
["rouge_skill_1"]=200701,
["rouge_skill_2"]=200702,
["rouge_skill_3"]=200703,
["hp_1"]=150,
["hp_2"]=165,
["hp_3"]=180,
["hp_4"]=195,
["hp_5"]=210,
["hp_6"]=225,
["hp_7"]=240,
["hp_8"]=255,
["hp_9"]=270,
["hp_10"]=285,
["hp_11"]=300,
["hp_12"]=315,
["hp_13"]=330,
["hp_14"]=345,
["hp_15"]=360,
["atk_1"]=150,
["atk_2"]=165,
["atk_3"]=180,
["atk_4"]=195,
["atk_5"]=210,
["atk_6"]=225,
["atk_7"]=240,
["atk_8"]=255,
["atk_9"]=270,
["atk_10"]=285,
["atk_11"]=300,
["atk_12"]=315,
["atk_13"]=330,
["atk_14"]=345,
["atk_15"]=360
},
[8]={
["position"]=4,
["qlt"]=3,
["base_skill"]=80,
["rouge_skill_1"]=200801,
["rouge_skill_2"]=200802,
["rouge_skill_3"]=200803,
["hp_1"]=150,
["hp_2"]=165,
["hp_3"]=180,
["hp_4"]=195,
["hp_5"]=210,
["hp_6"]=225,
["hp_7"]=240,
["hp_8"]=255,
["hp_9"]=270,
["hp_10"]=285,
["hp_11"]=300,
["hp_12"]=315,
["hp_13"]=330,
["hp_14"]=345,
["hp_15"]=360,
["atk_1"]=150,
["atk_2"]=165,
["atk_3"]=180,
["atk_4"]=195,
["atk_5"]=210,
["atk_6"]=225,
["atk_7"]=240,
["atk_8"]=255,
["atk_9"]=270,
["atk_10"]=285,
["atk_11"]=300,
["atk_12"]=315,
["atk_13"]=330,
["atk_14"]=345,
["atk_15"]=360
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e4de3b3cfa480a541bd8196e08f63bd9
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,195 @@
local hero_level = {
[1]={
["cost_2"]={
3,
0
},
["unlock_skill"]=1
},
[2]={
["cost_2"]={
5,
100
}
},
[3]={
["cost_2"]={
10,
250
},
["cost_3"]={
3,
0
}
},
[4]={
["cost_2"]={
25,
500
},
["cost_3"]={
5,
500
},
["unlock_skill"]=2
},
[5]={
["cost_2"]={
50,
1000
},
["cost_3"]={
10,
500
},
["cost_4"]={
3,
500
}
},
[6]={
["cost_2"]={
100,
1000
},
["cost_3"]={
25,
500
},
["cost_4"]={
5,
500
}
},
[7]={
["cost_2"]={
200,
10000
},
["cost_3"]={
50,
10000
},
["cost_4"]={
10,
500
}
},
[8]={
["cost_2"]={
500,
10000
},
["cost_3"]={
100,
10000
},
["cost_4"]={
20,
10000
},
["unlock_skill"]=3
},
[9]={
["cost_2"]={
1000,
10000
},
["cost_3"]={
200,
10000
},
["cost_4"]={
40,
10000
}
},
[10]={
["cost_2"]={
1500,
10000
},
["cost_3"]={
400,
10000
},
["cost_4"]={
80,
10000
}
},
[11]={
["cost_2"]={
2000,
10000
},
["cost_3"]={
1000,
10000
},
["cost_4"]={
160,
10000
}
},
[12]={
["cost_2"]={
2500,
10000
},
["cost_3"]={
1500,
10000
},
["cost_4"]={
320,
10000
}
},
[13]={
["cost_2"]={
3000,
10000
},
["cost_3"]={
2000,
10000
},
["cost_4"]={
640,
10000
}
},
[14]={
["cost_2"]={
4000,
10000
},
["cost_3"]={
3000,
10000
},
["cost_4"]={
1000,
10000
}
},
[15]={
["cost_2"]={
5000,
10000
},
["cost_3"]={
4000,
10000
},
["cost_4"]={
1500,
10000
}
}
}
local config = {
data=hero_level,count=15
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 14f57295dd6b483408a6e09e58d4bf01
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,260 @@
local skill_hero = {
[10]={
["method"]=2,
["skill_type"]=1,
["boardrange"]={
{
["type"]=1,
["range"]=1
},
{
["type"]=2,
["range"]=1
}
},
["icon"]=10
},
[20]={
["method"]=2,
["skill_type"]=0,
["effect"]={
{
["type"]="hurt",
["num"]=20000,
["ratio"]=10000,
["round"]=0
}
},
["obj"]=2,
["icon"]=20
},
[21]={
["method"]=2,
["skill_type"]=2,
["skill_type_parameter"]=2,
["boardrange"]={
{
["type"]=2,
["range"]=1
},
{
["type"]=6,
["range"]=1
},
{
["type"]=8,
["range"]=1
}
},
["effect"]={
{
["type"]="hurt",
["num"]=20000,
["ratio"]=10000,
["round"]=0
}
},
["icon"]=20
},
[30]={
["method"]=2,
["skill_type"]=1,
["boardrange"]={
{
["type"]=0,
["range"]=2
}
},
["icon"]=30
},
[40]={
["method"]=2,
["skill_type"]=0,
["effect"]={
{
["type"]="shield",
["num"]=1000,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=1,
["icon"]=40
},
[50]={
["method"]=2,
["skill_type"]=1,
["boardrange"]={
{
["type"]=3,
["range"]=2
},
{
["type"]=4,
["range"]=2
}
},
["icon"]=50
},
[60]={
["method"]=2,
["skill_type"]=0,
["effect"]={
{
["type"]="healp",
["num"]=2000,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=1,
["icon"]=60
},
[70]={
["method"]=2,
["skill_type"]=0,
["effect"]={
{
["type"]="atkp_add_connect",
["num"]=5000,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=1,
["icon"]=70
},
[71]={
["method"]=1,
["skill_type"]=3,
["skill_type_parameter"]=2,
["boardrange"]={
{
["type"]=1,
["range"]=1
},
{
["type"]=2,
["range"]=1
},
{
["type"]=3,
["range"]=1
},
{
["type"]=4,
["range"]=1
}
},
["effect"]={
{
["type"]="atkp_add_connect",
["num"]=5000,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=1,
["icon"]=70
},
[72]={
["method"]=1,
["skill_type"]=3,
["skill_type_parameter"]=2,
["boardrange"]={
{
["type"]=1,
["range"]=1
},
{
["type"]=2,
["range"]=1
},
{
["type"]=3,
["range"]=1
},
{
["type"]=4,
["range"]=1
},
{
["type"]=5,
["range"]=1
},
{
["type"]=6,
["range"]=1
},
{
["type"]=7,
["range"]=1
},
{
["type"]=8,
["range"]=1
}
},
["icon"]=70
},
[80]={
["method"]=2,
["skill_type"]=0,
["effect"]={
{
["type"]="hurt",
["num"]=15000,
["ratio"]=10000,
["round"]=0
},
{
["type"]="spd_dec",
["num"]=1,
["ratio"]=10000,
["round"]=1
}
},
["icon"]=80
},
[81]={
["method"]=2,
["skill_type"]=1,
["boardrange"]={
{
["type"]=1,
["range"]=1
},
{
["type"]=2,
["range"]=1
},
{
["type"]=3,
["range"]=1
},
{
["type"]=4,
["range"]=1
}
},
["effect"]={
{
["type"]="hurt",
["num"]=15000,
["ratio"]=10000,
["round"]=0
},
{
["type"]="spd_dec",
["num"]=1,
["ratio"]=10000,
["round"]=1
}
},
["icon"]=80
}
}
local config = {
data=skill_hero,count=12
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 8f21ad5b647d36e44b0244e08f80dcf7
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
["name"]="第1关"
},
[2]={
["name"]="第2关"
},
[3]={
["name"]="第3关"
},
[4]={
["name"]="第4关"
},
[5]={
["name"]="第5关"
},
[6]={
["name"]="第6关"
},
[7]={
["name"]="第7关"
},
[8]={
["name"]="第8关"
},
[9]={
["name"]="第9关"
},
[10]={
["name"]="第10关"
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 06dc66715efffc7488c0799eece909e7
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
["name"]="王八拳"
},
[2]={
["name"]="无影腿"
},
[3]={
["name"]="闪电鞭"
},
[4]={
["name"]="金钟罩"
},
[5]={
["name"]="大鹏展翅"
},
[6]={
["name"]="丹田吐纳"
},
[7]={
["name"]="疾风骤雨"
},
[8]={
["name"]="寒冰掌"
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: bfdf114d91c84004f981a42b116e222a
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
["desc"]="将上下2格元素进行消除"
},
[20]={
["desc"]="使用一次无影腿终结技,造成大量伤害"
},
[30]={
["desc"]="随机额外消除2个元素"
},
[40]={
["desc"]="生成一个金钟罩持续1回合可承受最大生命值10%伤害"
},
[50]={
["desc"]="将左右2格元素进行消除"
},
[60]={
["desc"]="立即恢复20%生命值"
},
[70]={
["desc"]="每一次攻击的伤害将增加50%"
},
[80]={
["desc"]="额外造成1次伤害并给敌人1回合冰霜效果"
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4db85e4e801fe2848b59bdc6f47d2c71
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7aca43fcabcd32044953d9f29afea299
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 1b1b37f2527d612468ac1ad7a73e896d
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e6ba105cda5bc02478caa3e378445c65
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 8bf8647e7bf0af44d9224c90bebf0d4a
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 743e3966b9e4aea49a0232969885d99d
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a265d8063aafee54ebd0693e1ea25c65
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a0f0255a814325842a01892486ff9ea5
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 014caf639ac1aa04aa1072ef073cdab5
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 31a544a7c5108a74eb493a634b26c479
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7a5750d8578ab8e43a2d9c167ad8e2fd
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e3cfacdb74649854fa9cea1813e20179
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: c9c7950ff6c3d4245ae756cac96d38c7
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 431d45043fea16340901881a7a8f1b81
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 986e227901251124895104dd99a07408
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a3da81e2dacbd7f4bb3d3eda6efd5218
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 635985b190bbe5a4281cfab3482ce69c
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 778de7df0c85b71478f00f5fd98fd7f7
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 3a51953f3abf899408c5745c025e3842
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 14018193890e1f240afcc2128a57eb72
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e3773ebd5ee04124b8f345405eba73dd
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 29b6dd5435799ca47a0f644b1807aac1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 418a8f3fe3b0ded489979df16eb9fecf
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 3c07b2a7face40546a003517bdb018d2
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 1182037cb5052d94297f830afc5ba166
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 3770226eb2455b04f8467f9f323fdb87
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 3c5a67651188b5742b49a5635f5012cd
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ba2078397ee54ed49bc8801f9ff38ebb
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: fba772890a396af4da6c731b5d9062cc
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a40e485d70e3a304fa925e15a109a8f5
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 642b41350e017604ba16c1111d002b9a
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,36 @@
local chapter = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
},
[9]={
},
[10]={
}
}
local config = {
data=chapter,count=10
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7d97ef3faaaa1f14faa75d5e55227eb0
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local hero = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
},
[6]={
},
[7]={
},
[8]={
}
}
local config = {
data=hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 87600f0b5a6c45541ab6bc8545775614
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,30 @@
local skill_hero = {
[10]={
},
[20]={
},
[30]={
},
[40]={
},
[50]={
},
[60]={
},
[70]={
},
[80]={
}
}
local config = {
data=skill_hero,count=8
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: d6a0e54a6636c064599a08a3fd8b07a8
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -13,9 +13,24 @@ local struct = {
["boardrange"]={
["parameter1"]="type:int",
["parameter2"]="range:int"
},
["attr"]={
["parameter1"]="type:string",
["parameter2"]="num:int"
},
["effect"]={
["parameter1"]="type:string",
["parameter2"]="num:int",
["parameter3"]="ratio:int",
["parameter4"]="round:int"
},
["attr_range"]={
["parameter1"]="type:string",
["parameter2"]="minnum:int",
["parameter3"]="maxnum:int"
}
}
local config = {
data=struct,count=3
data=struct,count=6
}
return config

View File

@ -234,4 +234,22 @@ BattleConst.UP_LINE_FILL_LIST = {
[77] = {67, 66},
}
BattleConst.BOARD_RANGE_TYPE = {
RANDOM = 0,
UP = 1,
DOWN = 2,
LEFT = 3,
RIGHT = 4,
LEFT_UP = 5,
LEFT_DOWN = 6,
RIGHT_UP = 7,
RIGHT_DOWN = 8,
}
BattleConst.SKILL_TYPE = {
NORMAL = 0,
ELIMINATION = 1,
CHANGE_AROUND = 2,
}
return BattleConst

View File

@ -62,6 +62,116 @@ function BattleManager:getFirstLineLastRowPosId(row, column)
return self:getPosId(1 - row, column)
end
function BattleManager:getAroundPosIdsByList(posId, boardrange, cludePosIdsMap)
local ids = {}
for _, info in ipairs(boardrange) do
local list = self:getAroundPosIds(posId, info.type, info.range, cludePosIdsMap)
for _, posId in ipairs(list) do
table.insert(ids, posId)
cludePosIdsMap[posId] = nil
end
end
return ids
end
function BattleManager:getAroundPosIds(posId, direction, range, cludePosIdsMap)
local rc = self:getPosRC(posId)
local r = rc.r
local c = rc.c
local posIdList = {}
if direction == BattleConst.BOARD_RANGE_TYPE.RANDOM then
if cludePosIdsMap then
local cludePosIds = {}
for posId, _ in pairs(cludePosIdsMap) do
table.insert(cludePosIds, posId)
end
local count = math.min(#cludePosIds, range)
for i = 1, count do
table.insert(posIdList, cludePosIds[math.random(1, #cludePosIds)])
end
end
elseif direction == BattleConst.BOARD_RANGE_TYPE.UP then
for i = r - 1, r - range, -1 do
if i >= 1 then
table.insert(posIdList, self:getPosId(i, c))
end
end
elseif direction == BattleConst.BOARD_RANGE_TYPE.DOWN then
for i = r + 1, r + range do
if i <= BattleConst.ROW_COUNT then
table.insert(posIdList, self:getPosId(i, c))
end
end
elseif direction == BattleConst.BOARD_RANGE_TYPE.LEFT then
for i = c - 1, c - range, -1 do
if i >= 1 then
table.insert(posIdList, self:getPosId(r, i))
end
end
elseif direction == BattleConst.BOARD_RANGE_TYPE.RIGHT then
for i = c + 1, c + range do
if i <= BattleConst.COLUMN_COUNT then
table.insert(posIdList, self:getPosId(r, i))
end
end
elseif direction == BattleConst.BOARD_RANGE_TYPE.LEFT_UP then
for i = c - 1, c - range, -1 do
if i >= 1 then
for j = r - 1, r - range, -1 do
if j >= 1 then
table.insert(posIdList, self:getPosId(j, i))
end
end
end
end
elseif direction == BattleConst.BOARD_RANGE_TYPE.LEFT_DOWN then
for i = c - 1, c - range, -1 do
if i >= 1 then
for j = r + 1, r + range do
if j <= BattleConst.ROW_COUNT then
table.insert(posIdList, self:getPosId(j, i))
end
end
end
end
elseif direction == BattleConst.BOARD_RANGE_TYPE.RIGHT_UP then
for i = c + 1, c + range do
if i <= BattleConst.COLUMN_COUNT then
for j = r - 1, r - range, -1 do
if j >= 1 then
table.insert(posIdList, self:getPosId(j, i))
end
end
end
end
elseif direction == BattleConst.BOARD_RANGE_TYPE.RIGHT_DOWN then
for i = c + 1, c + range do
if i <= BattleConst.COLUMN_COUNT then
for j = r + 1, r + range do
if j <= BattleConst.ROW_COUNT then
table.insert(posIdList, self:getPosId(j, i))
end
end
end
end
end
if cludePosIdsMap then
local newList = {}
for _, posId in ipairs(posIdList) do
if cludePosIdsMap[posId] then
table.insert(newList, posId)
end
end
return newList
else
return posIdList
end
end
function BattleManager:getPosRC(posId)
if not BattleConst.POS_ID_2_RC[posId] then
local r = posId // BattleConst.ROW_STEP

View File

@ -25,6 +25,20 @@ end
function BattleController:initOther()
end
function BattleController:onLinkChange()
local sequence = DataManager.BattleData:getGridSequence()
local elementTypeMap = {}
for _, info in ipairs(sequence) do
local entity = DataManager.BattleData:getGridEntity(info.posId)
if not entity:getSkillId() then
local elementType = entity:getElementType()
elementTypeMap[elementType] = (elementTypeMap[elementType] or 0) + 1
end
end
Logger.logHighlight("---------onLinkChange--------------")
Logger.printTable(elementTypeMap)
end
-- *************各个子模块的战斗需要重写的方法 START*************
function BattleController:ctor()
@ -52,11 +66,14 @@ function BattleController:onTouchEvent(eventType, posId)
if #DataManager.BattleData:getGridSequence() > 0 then
DataManager.BattleData:clearGridSequence()
end
DataManager.BattleData:insertGridSequence(posId)
DataManager.BattleData:insertGridSequence(posId, self:snapshotBoard())
self.battleUI:showBoardMask(entity:getElementType())
self:onLinkChange()
self:findSkillInfluenceGrids()
elseif eventType == ELIMINATION_TOUCH_EVENT.ENTER then
local sequence = DataManager.BattleData:getGridSequence()
local lastPosId = sequence[#sequence]
local info = sequence[#sequence]
local lastPosId = info and info.posId
if not lastPosId then
return
end
@ -68,14 +85,29 @@ function BattleController:onTouchEvent(eventType, posId)
if lastEntity:getElementType() ~= entity:getElementType() then
return
end
if not DataManager.BattleData:insertGridSequence(posId) then
local beforePosId = sequence[#sequence - 1]
if DataManager.BattleData:alreadyInsertSequence(posId) then
local info = sequence[#sequence - 1]
local beforePosId = info and info.posId
if not beforePosId then
return
end
if beforePosId == posId then -- 进入的是倒数第二个,则移除倒数第一个
DataManager.BattleData:removeGridSequence(lastPosId)
local snapshot = DataManager.BattleData:removeGridSequence(lastPosId)
if snapshot then -- 如果有快照,则恢复一次
for posId, info in pairs(snapshot) do
local entity = DataManager.BattleData:getGridEntity(posId)
if entity then
entity:setInfoBySnapshop(info)
end
end
end
self:onLinkChange()
end
else
DataManager.BattleData:insertGridSequence(posId, self:snapshotBoard())
self:onLinkChange()
self:findSkillInfluenceGrids()
end
elseif eventType == ELIMINATION_TOUCH_EVENT.EXIT then
@ -84,11 +116,23 @@ function BattleController:onTouchEvent(eventType, posId)
local sequence = DataManager.BattleData:getGridSequence()
local count = #sequence
if count < BattleConst.ELIMINATION_MIN_COUNT then
local snapshot = DataManager.BattleData:removeGridSequence(sequence[1].posId)
if snapshot then -- 如果有快照,则恢复一次
for posId, info in pairs(snapshot) do
local entity = DataManager.BattleData:getGridEntity(posId)
if entity then
entity:setInfoBySnapshop(info)
end
end
end
DataManager.BattleData:clearGridSequence()
return
end
local cellList = {}
for _, posId in ipairs(sequence) do
local entity = DataManager.BattleData:getGridEntity(posId)
for _, info in ipairs(sequence) do
local entity = DataManager.BattleData:getGridEntity(info.posId)
table.insert(cellList, entity:getCell())
end
self.battleUI:eliminationAni(cellList, function()
@ -106,15 +150,15 @@ function BattleController:onEliminationAniOver()
local boomGridIds = {}
local eliminationPosIds = {}
for _, posId in ipairs(sequence) do
local outline = BattleConst.GRID_OUT_LINE_POS_ID[posId]
for _, info in ipairs(sequence) do
local outline = BattleConst.GRID_OUT_LINE_POS_ID[info.posId]
for aroundPosId, _ in pairs(outline) do
boomGridIds[aroundPosId] = true
end
local entity = DataManager.BattleData:getGridEntity(posId)
local entity = DataManager.BattleData:getGridEntity(info.posId)
entity:setIsIdle(true)
eliminationPosIds[posId] = true
eliminationPosIds[info.posId] = true
end
local newIdleList = {}
@ -269,4 +313,56 @@ function BattleController:getRandomGridInfo()
return {gridType = gridType, elementType = elementType}
end
function BattleController:findSkillInfluenceGrids(isFinal)
local sequence = DataManager.BattleData:getGridSequence()
for _, info in ipairs(sequence) do
local entity = DataManager.BattleData:getGridEntity(info.posId)
-- local skillId = entity:getSkillId()
local skillId = 71
if skillId then
self:activeBoardSkill(info.posId, skillId, isFinal)
end
end
end
function BattleController:activeBoardSkill(posId, skillId, isFinal)
local skillCard = ConfigManager:getConfig("skill_hero")[skillId]
if not skillCard then
return
end
if isFinal then
if skillCard.method == 2 then
if skillCard.boardrange then
-- body
end
end
else
if skillCard.method == 1 then
if skillCard.boardrange then
local cludePosIdsMap = {}
for posId, entity in pairs(DataManager.BattleData:getGridEnties()) do
if entity:canLink() then
cludePosIdsMap[posId] = true
end
end
local ids = ModuleManager.BattleManager:getAroundPosIdsByList(posId, skillCard.boardrange, cludePosIdsMap)
for _, posId in ipairs(ids) do
local entity = DataManager.BattleData:getGridEntity(posId)
entity:setElementType(skillCard.skill_type_parameter)
end
end
end
end
end
---- 快照一次棋盘
function BattleController:snapshotBoard()
local snapshot = {}
for _, entity in pairs(DataManager.BattleData:getGridEnties()) do
snapshot[entity:getPosId()] = entity:getSnapshoptInfo()
end
return snapshot
end
return BattleController

View File

@ -2,12 +2,12 @@ local BattleController = require "app/module/battle/controller/battle_controller
local BattleControllerStage = class("BattleControllerStage", BattleController)
function BattleControllerStage:getInitBoard()
local config = ConfigManager:getConfig("stage")[1]
local config = ConfigManager:getConfig("chapter")[1]
return config.board
end
function BattleControllerStage:getFixedRandomGrid()
local config = ConfigManager:getConfig("stage")[1]
local config = ConfigManager:getConfig("chapter")[1]
return config.control_element
end

View File

@ -66,7 +66,7 @@ function BattleUI:onInitGridCellOver()
end)
cell:unBindAll()
cell:bind(entity, "isDirty", function()
cell:refresh(entity)
cell:refresh(entity, self.curElementType)
end)
local pos = entity:getPos()
cell:getBaseObject():setAnchoredPosition(pos.x, pos.y)
@ -83,10 +83,11 @@ function BattleUI:showBoardMask(elementType)
if not self.gridCells then
return
end
self.curElementType = elementType
local entities = DataManager.BattleData:getGridEnties()
for posId, entity in pairs(entities) do
if entity and entity:getCell() then
entity:getCell():refresh(entity, elementType)
entity:getCell():refresh(entity, self.curElementType)
end
end
end

View File

@ -13,8 +13,9 @@ function GridCell:refresh(gridEntity, curElement)
if curElement and (curElement ~= elementType or not gridEntity:canLink()) then
showMask = true
end
self.curElement = curElement
uiMap["grid_cell.touch_node.ani_node.mask"]:setVisible(showMask)
uiMap["grid_cell.touch_node.ani_node.obstacle"]:setVisible(gridEntity:isObstacleType())
if self.lastGridType ~= gridEntity:getGridType() then

View File

@ -2,6 +2,7 @@ local BattleData = class("BattleData", BaseData)
local BattleConst = GConst.BattleConst
local BATTLE_GRID_ENTITY = require "app/userdata/battle/battle_grid_entity"
local BATTLE_CARD_SKILL_ENTITY = require "app/userdata/battle/skill/battle_card_skill_entity"
function BattleData:init(board)
self:clear()
@ -47,30 +48,43 @@ function BattleData:getGridSequence()
return self.gridSequence
end
function BattleData:insertGridSequence(posId)
if self.gridSequenceMap[posId] then
function BattleData:alreadyInsertSequence(posId)
return self.gridSequenceMap[posId] == true
end
function BattleData:insertGridSequence(posId, snapshot)
if self:alreadyInsertSequence(posId) then
return false
end
self.gridSequenceMap[posId] = true
table.insert(self.gridSequence, posId)
table.insert(self.gridSequence, {posId = posId, snapshot = snapshot})
return true
end
function BattleData:removeGridSequence(posId)
if not self.gridSequenceMap[posId] then
return false
if not self:alreadyInsertSequence(posId) then
return
end
local count = #self.gridSequence
local lastPosId = self.gridSequence[count]
local lastPosId = self.gridSequence[count].posId
local snapshot = self.gridSequence[count].snapshot
if lastPosId ~= posId then
return false
return
end
table.remove(self.gridSequence, count)
self.gridSequenceMap[lastPosId] = false
return true
return snapshot
end
function BattleData:cacheSkillInfluenceGrids(grids)
self.skillInfluenceGrids = grids
end
function BattleData:getSkillInfluenceGrids()
return self.skillInfluenceGrids
end
function BattleData:clearGridSequence()

View File

@ -6,10 +6,32 @@ function BattleGridEntity:ctor(data)
self.gridType = data.gridType or BattleConst.GRID_TYPE.EMPTY
self.elementType = data.elementType or BattleConst.ELEMENT_TYPE.RED
self.aroundEliminationCount = data.aroundEliminationCount or 0 -- 周围消除次数
self.skillId = data.skillId
self.isIdle = false
self.data.isDirty = false
end
function BattleGridEntity:getSnapshoptInfo()
return {
posId = self.posId,
gridType = self.gridType,
elementType = self.elementType,
aroundEliminationCount = self.aroundEliminationCount,
isIdle = self.isIdle,
skillId = self.skillId,
}
end
function BattleGridEntity:setInfoBySnapshop(snapshot)
self.posId = snapshot.posId or 0
self.gridType = snapshot.gridType or BattleConst.GRID_TYPE.EMPTY
self.elementType = snapshot.elementType or BattleConst.ELEMENT_TYPE.RED
self.aroundEliminationCount = snapshot.aroundEliminationCount or 0 -- 周围消除次数
self.isIdle = snapshot.isIdle
self.skillId = snapshot.skillId
self:setDirty()
end
function BattleGridEntity:setDirty()
self.data.isDirty = not self.data.isDirty
end
@ -110,4 +132,11 @@ function BattleGridEntity:setElementType(elementType)
self:setDirty()
end
function BattleGridEntity:getSkillId()
if not self.skillId or self.skillId <= 0 then
return
end
return self.skillId
end
return BattleGridEntity

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a4d433b4eec374743b4ad558de24f6e6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,87 @@
local BattleCardSkillEnity = class("BattleCardSkillEnity", BaseData)
function BattleCardSkillEnity:ctor(skillId)
self:refreshSkillId(skillId)
end
function BattleCardSkillEnity:refreshSkillId(skillId)
self.skillId = skillId
self.config = ConfigManager:getConfig("skill_hero")[skillId]
end
function BattleCardSkillEnity:getSkillId()
return self.skillId
end
function BattleCardSkillEnity:getMethond()
if not self.config then
return
end
return self.config.method
end
function BattleCardSkillEnity:getSkillType()
if not self.config then
return
end
return self.config.skill_type
end
function BattleCardSkillEnity:getSkillTypeParameter()
if not self.config then
return
end
return self.config.skill_type_parameter
end
function BattleCardSkillEnity:getBoardRange()
if not self.config then
return
end
return self.config.boardrange
end
function BattleCardSkillEnity:getEffect()
if not self.config then
return
end
return self.config.effect
end
function BattleCardSkillEnity:getTartget()
if not self.config then
return
end
return self.config.obj
end
function BattleCardSkillEnity:getTartget()
if not self.config then
return
end
return self.config.obj
end
function BattleCardSkillEnity:getIcon()
if not self.config then
return
end
return self.config.icon
end
function BattleCardSkillEnity:getBattleIcon()
if not self.config then
return
end
return self.config.battle_icon
end
function BattleCardSkillEnity:getNameAct()
if not self.config then
return
end
return self.config.name_act
end
return BattleCardSkillEnity

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 14a09e5699837c548b5878119e718c87
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}