天赋属性初始化

配置同步
This commit is contained in:
meixiongfeng 2022-10-25 19:27:45 +08:00
parent 6308da3bcc
commit d07b80f454
14 changed files with 415 additions and 183 deletions

View File

@ -38,5 +38,15 @@
"n": 20000 "n": 20000
} }
] ]
},
{
"index": "talent_reset",
"var": [
{
"a": "attr",
"t": "gold",
"n": 20000
}
]
} }
] ]

View File

@ -1,9 +1,7 @@
[ [
{ {
"id": 1, "id": 1,
"type": [ "type": 0,
0
],
"talentid": 40101, "talentid": 40101,
"before": [ "before": [
0 0
@ -11,7 +9,7 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 20000 "n": 20000
}, },
{ {
@ -20,6 +18,7 @@
"n": 5000 "n": 5000
} }
], ],
"point": 20,
"position": [ "position": [
1, 1,
1 1
@ -27,9 +26,7 @@
}, },
{ {
"id": 2, "id": 2,
"type": [ "type": 0,
0
],
"talentid": 40102, "talentid": 40102,
"before": [ "before": [
0 0
@ -37,7 +34,7 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 20000 "n": 20000
}, },
{ {
@ -46,6 +43,7 @@
"n": 5000 "n": 5000
} }
], ],
"point": 20,
"position": [ "position": [
1, 1,
3 3
@ -53,9 +51,7 @@
}, },
{ {
"id": 3, "id": 3,
"type": [ "type": 0,
0
],
"talentid": 40103, "talentid": 40103,
"before": [ "before": [
0 0
@ -63,7 +59,7 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 20000 "n": 20000
}, },
{ {
@ -72,6 +68,7 @@
"n": 5000 "n": 5000
} }
], ],
"point": 20,
"position": [ "position": [
1, 1,
5 5
@ -79,9 +76,7 @@
}, },
{ {
"id": 4, "id": 4,
"type": [ "type": 1,
1
],
"talentid": 10101, "talentid": 10101,
"before": [ "before": [
1 1
@ -89,10 +84,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
3, 3,
1 1
@ -100,9 +96,7 @@
}, },
{ {
"id": 5, "id": 5,
"type": [ "type": 1,
1
],
"talentid": 10102, "talentid": 10102,
"before": [ "before": [
4 4
@ -110,10 +104,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
5, 5,
1 1
@ -121,9 +116,7 @@
}, },
{ {
"id": 6, "id": 6,
"type": [ "type": 1,
1
],
"talentid": 10103, "talentid": 10103,
"before": [ "before": [
5 5
@ -131,10 +124,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
7, 7,
1 1
@ -142,9 +136,7 @@
}, },
{ {
"id": 7, "id": 7,
"type": [ "type": 1,
1
],
"talentid": 10104, "talentid": 10104,
"before": [ "before": [
6, 6,
@ -153,10 +145,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
9, 9,
1 1
@ -164,9 +157,7 @@
}, },
{ {
"id": 8, "id": 8,
"type": [ "type": 1,
1
],
"talentid": 10105, "talentid": 10105,
"before": [ "before": [
7 7
@ -174,10 +165,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
11, 11,
1 1
@ -185,9 +177,7 @@
}, },
{ {
"id": 9, "id": 9,
"type": [ "type": 1,
1
],
"talentid": 10106, "talentid": 10106,
"before": [ "before": [
8 8
@ -195,10 +185,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
13, 13,
1 1
@ -206,9 +197,7 @@
}, },
{ {
"id": 10, "id": 10,
"type": [ "type": 2,
2
],
"talentid": 20101, "talentid": 20101,
"before": [ "before": [
2 2
@ -216,10 +205,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
3, 3,
3 3
@ -227,9 +217,7 @@
}, },
{ {
"id": 11, "id": 11,
"type": [ "type": 2,
2
],
"talentid": 20102, "talentid": 20102,
"before": [ "before": [
10 10
@ -237,10 +225,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
5, 5,
3 3
@ -248,9 +237,7 @@
}, },
{ {
"id": 12, "id": 12,
"type": [ "type": 2,
2
],
"talentid": 20103, "talentid": 20103,
"before": [ "before": [
11, 11,
@ -260,10 +247,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
7, 7,
3 3
@ -271,9 +259,7 @@
}, },
{ {
"id": 13, "id": 13,
"type": [ "type": 2,
2
],
"talentid": 20104, "talentid": 20104,
"before": [ "before": [
23, 23,
@ -282,10 +268,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
9, 9,
3 3
@ -293,9 +280,7 @@
}, },
{ {
"id": 14, "id": 14,
"type": [ "type": 2,
2
],
"talentid": 20105, "talentid": 20105,
"before": [ "before": [
7, 7,
@ -305,10 +290,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
11, 11,
3 3
@ -316,9 +302,7 @@
}, },
{ {
"id": 15, "id": 15,
"type": [ "type": 2,
2
],
"talentid": 20106, "talentid": 20106,
"before": [ "before": [
14 14
@ -326,10 +310,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
13, 13,
3 3
@ -337,9 +322,7 @@
}, },
{ {
"id": 16, "id": 16,
"type": [ "type": 2,
2
],
"talentid": 20107, "talentid": 20107,
"before": [ "before": [
10 10
@ -347,10 +330,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
4, 4,
2 2
@ -358,9 +342,7 @@
}, },
{ {
"id": 17, "id": 17,
"type": [ "type": 3,
3
],
"talentid": 30101, "talentid": 30101,
"before": [ "before": [
3 3
@ -368,10 +350,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
3, 3,
5 5
@ -379,9 +362,7 @@
}, },
{ {
"id": 18, "id": 18,
"type": [ "type": 3,
3
],
"talentid": 30102, "talentid": 30102,
"before": [ "before": [
17 17
@ -389,10 +370,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
5, 5,
5 5
@ -400,9 +382,7 @@
}, },
{ {
"id": 19, "id": 19,
"type": [ "type": 3,
3
],
"talentid": 30103, "talentid": 30103,
"before": [ "before": [
18 18
@ -410,10 +390,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
7, 7,
5 5
@ -421,9 +402,7 @@
}, },
{ {
"id": 20, "id": 20,
"type": [ "type": 3,
3
],
"talentid": 30104, "talentid": 30104,
"before": [ "before": [
24 24
@ -431,10 +410,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
9, 9,
5 5
@ -442,9 +422,7 @@
}, },
{ {
"id": 21, "id": 21,
"type": [ "type": 3,
3
],
"talentid": 30105, "talentid": 30105,
"before": [ "before": [
20 20
@ -452,10 +430,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
11, 11,
5 5
@ -463,9 +442,7 @@
}, },
{ {
"id": 22, "id": 22,
"type": [ "type": 3,
3
],
"talentid": 30106, "talentid": 30106,
"before": [ "before": [
21 21
@ -473,10 +450,11 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 15000 "n": 15000
} }
], ],
"point": 10,
"position": [ "position": [
13, 13,
5 5
@ -484,9 +462,7 @@
}, },
{ {
"id": 23, "id": 23,
"type": [ "type": 999,
999
],
"talentid": 99101, "talentid": 99101,
"before": [ "before": [
6, 6,
@ -495,7 +471,7 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 40000 "n": 40000
}, },
{ {
@ -504,6 +480,7 @@
"n": 5000 "n": 5000
} }
], ],
"point": 15,
"position": [ "position": [
8, 8,
2 2
@ -511,9 +488,7 @@
}, },
{ {
"id": 24, "id": 24,
"type": [ "type": 999,
999
],
"talentid": 99102, "talentid": 99102,
"before": [ "before": [
12, 12,
@ -522,7 +497,7 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 40000 "n": 40000
}, },
{ {
@ -531,6 +506,7 @@
"n": 5000 "n": 5000
} }
], ],
"point": 15,
"position": [ "position": [
8, 8,
4 4
@ -538,9 +514,7 @@
}, },
{ {
"id": 25, "id": 25,
"type": [ "type": 999,
999
],
"talentid": 99103, "talentid": 99103,
"before": [ "before": [
9, 9,
@ -550,7 +524,7 @@
"thing": [ "thing": [
{ {
"a": "attr", "a": "attr",
"t": "glod", "t": "gold",
"n": 40000 "n": 40000
}, },
{ {
@ -559,6 +533,7 @@
"n": 5000 "n": 5000
} }
], ],
"point": 15,
"position": [ "position": [
15, 15,
3 3

View File

@ -1632,5 +1632,134 @@
"key": "itemtipstxt_60003", "key": "itemtipstxt_60003",
"text": "5星套装宝箱不足" "text": "5星套装宝箱不足"
} }
},
{
"id": "90001",
"name": {
"key": "itemname_90001",
"text": "阿宝天赋点"
},
"usetype": 3,
"color": 5,
"bagtype": 1,
"index": 99,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 0,
"access": [
122
],
"use_skip": 109,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 0,
"race": 0,
"img": "action_11001",
"ico": "action_11001",
"intr": {
"key": "itemdesc_90001",
"text": "阿宝天赋点"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"synthetize_deplete": [],
"tipstxt": {
"key": "itemtipstxt_90001",
"text": "阿宝的天赋点不足"
}
},
{
"id": "90002",
"name": {
"key": "itemname_90002",
"text": "波比天赋点"
},
"usetype": 3,
"color": 5,
"bagtype": 1,
"index": 99,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 0,
"access": [
122
],
"use_skip": 109,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 0,
"race": 0,
"img": "action_11003",
"ico": "action_11003",
"intr": {
"key": "itemdesc_90002",
"text": "波比天赋点"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"synthetize_deplete": [],
"tipstxt": {
"key": "itemtipstxt_90002",
"text": "波比的天赋点不足"
}
},
{
"id": "90003",
"name": {
"key": "itemname_90003",
"text": "小伊天赋点"
},
"usetype": 3,
"color": 5,
"bagtype": 1,
"index": 99,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 0,
"access": [
122
],
"use_skip": 109,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 0,
"race": 0,
"img": "action_44005",
"ico": "action_44005",
"intr": {
"key": "itemdesc_90003",
"text": "小伊天赋点"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"synthetize_deplete": [],
"tipstxt": {
"key": "itemtipstxt_90003",
"text": "小伊的天赋点不足"
}
} }
] ]

View File

@ -0,0 +1,14 @@
[
{
"heroid": "25001",
"itemid": "90001"
},
{
"heroid": "25004",
"itemid": "90002"
},
{
"heroid": "44005",
"itemid": "90003"
}
]

View File

@ -8,7 +8,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -20,7 +20,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -32,7 +32,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -44,7 +44,7 @@
"hp": 1800, "hp": 1800,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -56,7 +56,7 @@
"hp": 1800, "hp": 1800,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -68,7 +68,7 @@
"hp": 1800, "hp": 1800,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -80,7 +80,7 @@
"hp": 1800, "hp": 1800,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -92,7 +92,7 @@
"hp": 1800, "hp": 1800,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -104,7 +104,7 @@
"hp": 1800, "hp": 1800,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -113,10 +113,10 @@
"skillname": "生命天赋", "skillname": "生命天赋",
"skilltxt": "这是生命天赋的描述tips", "skilltxt": "这是生命天赋的描述tips",
"skillicon": "jn_dzj_0001", "skillicon": "jn_dzj_0001",
"hp": 1800, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -125,10 +125,10 @@
"skillname": "生命天赋", "skillname": "生命天赋",
"skilltxt": "这是生命天赋的描述tips", "skilltxt": "这是生命天赋的描述tips",
"skillicon": "jn_dzj_0001", "skillicon": "jn_dzj_0001",
"hp": 1800, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -137,10 +137,10 @@
"skillname": "生命天赋", "skillname": "生命天赋",
"skilltxt": "这是生命天赋的描述tips", "skilltxt": "这是生命天赋的描述tips",
"skillicon": "jn_dzj_0001", "skillicon": "jn_dzj_0001",
"hp": 1800, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -149,10 +149,10 @@
"skillname": "生命天赋", "skillname": "生命天赋",
"skilltxt": "这是生命天赋的描述tips", "skilltxt": "这是生命天赋的描述tips",
"skillicon": "jn_dzj_0001", "skillicon": "jn_dzj_0001",
"hp": 1800, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -164,7 +164,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": 1500,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -176,7 +176,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": 1500,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -188,7 +188,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": 1500,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -200,7 +200,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": 1500,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -212,7 +212,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": 1500,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -224,7 +224,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": 1500,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -235,8 +235,8 @@
"skillicon": "jn_dzj_0008", "skillicon": "jn_dzj_0008",
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -247,8 +247,8 @@
"skillicon": "jn_dzj_0009", "skillicon": "jn_dzj_0009",
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -259,8 +259,8 @@
"skillicon": "jn_dzj_0010", "skillicon": "jn_dzj_0010",
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -271,8 +271,8 @@
"skillicon": "jn_dzj_0011", "skillicon": "jn_dzj_0011",
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": 1500, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -284,7 +284,7 @@
"hp": -1, "hp": -1,
"atk": 1500, "atk": 1500,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -296,7 +296,7 @@
"hp": -1, "hp": -1,
"atk": 1500, "atk": 1500,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -308,7 +308,7 @@
"hp": -1, "hp": -1,
"atk": 1500, "atk": 1500,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -320,7 +320,7 @@
"hp": -1, "hp": -1,
"atk": 1500, "atk": 1500,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -332,7 +332,7 @@
"hp": -1, "hp": -1,
"atk": 1500, "atk": 1500,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -344,7 +344,7 @@
"hp": -1, "hp": -1,
"atk": 1500, "atk": 1500,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -354,9 +354,9 @@
"skilltxt": "这是防御天赋的描述tips", "skilltxt": "这是防御天赋的描述tips",
"skillicon": "jn_dzj_0018", "skillicon": "jn_dzj_0018",
"hp": -1, "hp": -1,
"atk": 1500, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -366,9 +366,9 @@
"skilltxt": "这是防御天赋的描述tips", "skilltxt": "这是防御天赋的描述tips",
"skillicon": "jn_dzj_0019", "skillicon": "jn_dzj_0019",
"hp": -1, "hp": -1,
"atk": 1500, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -378,9 +378,9 @@
"skilltxt": "这是防御天赋的描述tips", "skilltxt": "这是防御天赋的描述tips",
"skillicon": "jn_dzj_0020", "skillicon": "jn_dzj_0020",
"hp": -1, "hp": -1,
"atk": 1500, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -390,9 +390,9 @@
"skilltxt": "这是防御天赋的描述tips", "skilltxt": "这是防御天赋的描述tips",
"skillicon": "jn_dzj_0021", "skillicon": "jn_dzj_0021",
"hp": -1, "hp": -1,
"atk": 1500, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": -1 "speed": -1
}, },
{ {
@ -404,7 +404,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": 3000 "speed": 3000
}, },
{ {
@ -416,7 +416,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": -1, "cri": -1,
"speed": 4000 "speed": 4000
}, },
{ {
@ -428,7 +428,7 @@
"hp": -1, "hp": -1,
"atk": -1, "atk": -1,
"def": -1, "def": -1,
"crt": 10000, "cri": 10000,
"speed": -1 "speed": -1
} }
] ]

View File

@ -40,16 +40,15 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
} }
// 数据校验 // 数据校验
list, err := this.module.modelTalent.GetHerotalent(session.GetUserId()) list, err := this.module.modelTalent.GetHerotalent(session.GetUserId())
if err != nil { if err == nil {
code = pb.ErrorCode_DBError
return
}
for _, v := range list { for _, v := range list {
if v.HeroId == req.Heroid { if v.HeroId == req.Heroid {
talent = v talent = v
break break
} }
} }
}
if talent == nil { if talent == nil {
// 创建一条数据 // 创建一条数据
talent, err = this.module.modelTalent.CreateHeroTalent(session.GetUserId(), req.Heroid) talent, err = this.module.modelTalent.CreateHeroTalent(session.GetUserId(), req.Heroid)
@ -66,6 +65,9 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
} }
// 校验 // 校验
if len(talentConf.Before) == 1 && talentConf.Before[0] == 0 { // 前置解锁技能为0 if len(talentConf.Before) == 1 && talentConf.Before[0] == 0 { // 前置解锁技能为0
if talent.Talent == nil {
talent.Talent = make(map[int32]int32)
}
if _, ok := talent.Talent[req.TalentID]; ok { if _, ok := talent.Talent[req.TalentID]; ok {
code = pb.ErrorCode_TalentRepeatLearn // 重复激活 code = pb.ErrorCode_TalentRepeatLearn // 重复激活
return return

View File

@ -29,6 +29,7 @@ const (
hero_starupsp = "game_herostarupsp.json" // 精灵升星 hero_starupsp = "game_herostarupsp.json" // 精灵升星
hero_talentskill = "game_talentskill.json" // 天赋 hero_talentskill = "game_talentskill.json" // 天赋
hero_talent = "game_herotalent.json" // 天赋详细数据 hero_talent = "game_herotalent.json" // 天赋详细数据
hero_itembox = "game_itembox.json" // 天赋详细数据
) )
///配置管理组件 ///配置管理组件

View File

@ -61,6 +61,7 @@ func (this *ModelHero) InitHero(uid string, heroCfgId string) *pb.DBHero {
Property: make(map[string]int32), Property: make(map[string]int32),
EnergyProperty: make(map[string]int32), EnergyProperty: make(map[string]int32),
JuexProperty: make(map[string]int32), JuexProperty: make(map[string]int32),
TalentProperty: make(map[string]int32),
} }
this.PropertyCompute(newHero) this.PropertyCompute(newHero)
this.initHeroSkill(newHero) this.initHeroSkill(newHero)
@ -700,20 +701,44 @@ func (this *ModelHero) setTalentProperty(hero *pb.DBHero, conf *cfg.GameTalentSk
if conf == nil || hero == nil { if conf == nil || hero == nil {
return return
} }
if hero.TalentProperty == nil {
hero.TalentProperty = make(map[string]int32)
}
if conf.Hp != -1 { if conf.Hp != -1 {
if _, ok := hero.TalentProperty[comm.Hp]; ok {
hero.TalentProperty[comm.Hp] += int32(math.Floor((float64(conf.Hp) / 1000) * float64(hero.Property[comm.Hp]))) hero.TalentProperty[comm.Hp] += int32(math.Floor((float64(conf.Hp) / 1000) * float64(hero.Property[comm.Hp])))
} else {
hero.TalentProperty[comm.Hp] = int32(math.Floor((float64(conf.Hp) / 1000) * float64(hero.Property[comm.Hp])))
}
} }
if conf.Atk != -1 { if conf.Atk != -1 {
if _, ok := hero.TalentProperty[comm.Atk]; ok {
hero.TalentProperty[comm.Atk] += int32(math.Floor((float64(conf.Atk) / 1000) * float64(hero.Property[comm.Atk]))) hero.TalentProperty[comm.Atk] += int32(math.Floor((float64(conf.Atk) / 1000) * float64(hero.Property[comm.Atk])))
} else {
hero.TalentProperty[comm.Atk] = int32(math.Floor((float64(conf.Atk) / 1000) * float64(hero.Property[comm.Atk])))
}
} }
if conf.Def != -1 { if conf.Def != -1 {
if _, ok := hero.TalentProperty[comm.Def]; ok {
hero.TalentProperty[comm.Def] += int32(math.Floor((float64(conf.Def) / 1000) * float64(hero.Property[comm.Def]))) hero.TalentProperty[comm.Def] += int32(math.Floor((float64(conf.Def) / 1000) * float64(hero.Property[comm.Def])))
} else {
hero.TalentProperty[comm.Def] = int32(math.Floor((float64(conf.Def) / 1000) * float64(hero.Property[comm.Def])))
}
}
if conf.Cri != -1 {
if _, ok := hero.TalentProperty[comm.Cri]; ok {
hero.TalentProperty[comm.Cri] += int32(math.Floor((float64(conf.Cri) / 1000) * float64(hero.Property[comm.Cri])))
} else {
hero.TalentProperty[comm.Cri] = int32(math.Floor((float64(conf.Cri) / 1000) * float64(hero.Property[comm.Cri])))
} }
if conf.Crt != -1 {
hero.TalentProperty[comm.Cri] += int32(math.Floor((float64(conf.Crt) / 1000) * float64(hero.Property[comm.Cri])))
} }
if conf.Speed != -1 { if conf.Speed != -1 {
if _, ok := hero.TalentProperty[comm.Speed]; ok {
hero.TalentProperty[comm.Speed] += int32(math.Floor((float64(conf.Speed) / 1000) * float64(hero.Property[comm.Speed]))) hero.TalentProperty[comm.Speed] += int32(math.Floor((float64(conf.Speed) / 1000) * float64(hero.Property[comm.Speed])))
} else {
hero.TalentProperty[comm.Speed] = int32(math.Floor((float64(conf.Speed) / 1000) * float64(hero.Property[comm.Speed])))
}
} }
_heroMap := make(map[string]interface{}, 0) _heroMap := make(map[string]interface{}, 0)

View File

@ -27,7 +27,7 @@ func (this *ModelTalent) Init(service core.IService, module core.IModule, comp c
//获取用户天赋数据 //获取用户天赋数据
func (this *ModelTalent) GetHerotalent(uid string) (result []*pb.DBHeroTalent, err error) { func (this *ModelTalent) GetHerotalent(uid string) (result []*pb.DBHeroTalent, err error) {
result = make([]*pb.DBHeroTalent, 0) result = make([]*pb.DBHeroTalent, 0)
if err = this.GetList(uid, result); err != nil && err != redis.RedisNil { if err = this.GetList(uid, &result); err != nil && err != redis.RedisNil {
return return
} }
err = nil err = nil
@ -47,8 +47,8 @@ func (this *ModelTalent) ChangeHeroTalent(talent *pb.DBHeroTalent, update map[st
// 通过objId 查询天赋数据 // 通过objId 查询天赋数据
func (this *ModelTalent) GetHerotalentByObjId(uid string, oid string) (talent *pb.DBHeroTalent, err error) { func (this *ModelTalent) GetHerotalentByObjId(uid string, oid string) (talent *pb.DBHeroTalent, err error) {
result := &pb.DBHeroTalent{} talent = &pb.DBHeroTalent{}
err = this.GetListObj(uid, oid, result) err = this.GetListObj(uid, oid, talent)
return return
} }
@ -56,7 +56,7 @@ func (this *ModelTalent) GetHerotalentByObjId(uid string, oid string) (talent *p
func (this *ModelTalent) CreateHeroTalent(uid, heroId string) (talent *pb.DBHeroTalent, err error) { func (this *ModelTalent) CreateHeroTalent(uid, heroId string) (talent *pb.DBHeroTalent, err error) {
talent = &pb.DBHeroTalent{ talent = &pb.DBHeroTalent{
Id: primitive.NewObjectID().Hex(), Id: primitive.NewObjectID().Hex(),
Uid: "", Uid: uid,
HeroId: heroId, HeroId: heroId,
Talent: map[int32]int32{}, Talent: map[int32]int32{},
} }

View File

@ -12,10 +12,11 @@ import "errors"
type GameHeroTalentData struct { type GameHeroTalentData struct {
Id int32 Id int32
Type []int32 Type int32
Talentid int32 Talentid int32
Before []int32 Before []int32
Thing []*Gameatn Thing []*Gameatn
Point int32
Position []int32 Position []int32
} }
@ -27,20 +28,7 @@ func (*GameHeroTalentData) GetTypeId() int32 {
func (_v *GameHeroTalentData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GameHeroTalentData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["type"].([]interface{}); !_ok_ { err = errors.New("type error"); return }
_v.Type = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Type = append(_v.Type, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["talentid"].(float64); !_ok_ { err = errors.New("talentid error"); return }; _v.Talentid = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["talentid"].(float64); !_ok_ { err = errors.New("talentid error"); return }; _v.Talentid = int32(_tempNum_) }
{ {
var _arr_ []interface{} var _arr_ []interface{}
@ -70,6 +58,7 @@ func (_v *GameHeroTalentData)Deserialize(_buf map[string]interface{}) (err error
} }
} }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["point"].(float64); !_ok_ { err = errors.New("point error"); return }; _v.Point = int32(_tempNum_) }
{ {
var _arr_ []interface{} var _arr_ []interface{}
var _ok_ bool var _ok_ bool

View File

@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameItemBox struct {
_dataMap map[string]*GameItemBoxData
_dataList []*GameItemBoxData
}
func NewGameItemBox(_buf []map[string]interface{}) (*GameItemBox, error) {
_dataList := make([]*GameItemBoxData, 0, len(_buf))
dataMap := make(map[string]*GameItemBoxData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameItemBoxData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Heroid] = _v
}
}
return &GameItemBox{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameItemBox) GetDataMap() map[string]*GameItemBoxData {
return table._dataMap
}
func (table *GameItemBox) GetDataList() []*GameItemBoxData {
return table._dataList
}
func (table *GameItemBox) Get(key string) *GameItemBoxData {
return table._dataMap[key]
}

View File

@ -0,0 +1,37 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameItemBoxData struct {
Heroid string
Itemid string
}
const TypeId_GameItemBoxData = -1971148410
func (*GameItemBoxData) GetTypeId() int32 {
return -1971148410
}
func (_v *GameItemBoxData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; if _v.Heroid, _ok_ = _buf["heroid"].(string); !_ok_ { err = errors.New("heroid error"); return } }
{ var _ok_ bool; if _v.Itemid, _ok_ = _buf["itemid"].(string); !_ok_ { err = errors.New("itemid error"); return } }
return
}
func DeserializeGameItemBoxData(_buf map[string]interface{}) (*GameItemBoxData, error) {
v := &GameItemBoxData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -19,7 +19,7 @@ type GameTalentSkillData struct {
Hp int32 Hp int32
Atk int32 Atk int32
Def int32 Def int32
Crt int32 Cri int32
Speed int32 Speed int32
} }
@ -38,7 +38,7 @@ func (_v *GameTalentSkillData)Deserialize(_buf map[string]interface{}) (err erro
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hp"].(float64); !_ok_ { err = errors.New("hp error"); return }; _v.Hp = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hp"].(float64); !_ok_ { err = errors.New("hp error"); return }; _v.Hp = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["atk"].(float64); !_ok_ { err = errors.New("atk error"); return }; _v.Atk = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["atk"].(float64); !_ok_ { err = errors.New("atk error"); return }; _v.Atk = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["def"].(float64); !_ok_ { err = errors.New("def error"); return }; _v.Def = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["def"].(float64); !_ok_ { err = errors.New("def error"); return }; _v.Def = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["crt"].(float64); !_ok_ { err = errors.New("crt error"); return }; _v.Crt = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cri"].(float64); !_ok_ { err = errors.New("cri error"); return }; _v.Cri = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["speed"].(float64); !_ok_ { err = errors.New("speed error"); return }; _v.Speed = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["speed"].(float64); !_ok_ { err = errors.New("speed error"); return }; _v.Speed = int32(_tempNum_) }
return return
} }

View File

@ -114,6 +114,7 @@ type Tables struct {
PlayerInfor *GamePlayerInfor PlayerInfor *GamePlayerInfor
HeroTalent *GameHeroTalent HeroTalent *GameHeroTalent
TalentSkill *GameTalentSkill TalentSkill *GameTalentSkill
ItemBox *GameItemBox
} }
func NewTables(loader JsonLoader) (*Tables, error) { func NewTables(loader JsonLoader) (*Tables, error) {
@ -739,5 +740,12 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.TalentSkill, err = NewGameTalentSkill(buf); err != nil { if tables.TalentSkill, err = NewGameTalentSkill(buf); err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_itembox"); err != nil {
return nil, err
}
if tables.ItemBox, err = NewGameItemBox(buf); err != nil {
return nil, err
}
return tables, nil return tables, nil
} }