diff --git a/.agents/skills/code-hygiene/SKILL.md b/.agents/skills/code-hygiene/SKILL.md
index f8f8bb6..b290206 100644
--- a/.agents/skills/code-hygiene/SKILL.md
+++ b/.agents/skills/code-hygiene/SKILL.md
@@ -1,15 +1,15 @@
---
name: code-hygiene
description: >-
- Inspect and clean up code in the Seek-Battle-Evacuate (SBE) project according to AGENTS.md
+ Inspect and clean up code in Unity project according to AGENTS.md
null-checking rules, error handling specifications, and anti-defensive programming guidelines.
Use this skill whenever the user asks to format code per AGENTS.md, clean up redundant null checks,
remove over-defensive fallbacks, or review code hygiene.
---
-# SBE Code Hygiene & Defensive Cleanup
+# Code Hygiene & Defensive Cleanup
-本技能用于规范 SBE 项目中的 C# 代码质量,消除过度防御(Over-Defensive Programming)、冗余判空与静默吞错,严格对齐 `AGENTS.md` 规范与敏捷“Fail Fast”(快速失败)原则。
+本技能用于规范 Unity 项目中的 C# 代码质量,消除过度防御(Over-Defensive Programming)、冗余判空与静默吞错,严格对齐 `AGENTS.md` 规范与敏捷“Fail Fast”(快速失败)原则。
---
diff --git a/Assets/GameMain/DataTables/tbgoodsconfig.bytes b/Assets/GameMain/DataTables/tbgoodsconfig.bytes
index 6f2c956..47c255b 100644
Binary files a/Assets/GameMain/DataTables/tbgoodsconfig.bytes and b/Assets/GameMain/DataTables/tbgoodsconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbgoodsconfig.json b/Assets/GameMain/DataTables/tbgoodsconfig.json
index d63341b..d16d44a 100644
--- a/Assets/GameMain/DataTables/tbgoodsconfig.json
+++ b/Assets/GameMain/DataTables/tbgoodsconfig.json
@@ -2,151 +2,201 @@
{
"id": 1001,
"goodsType": 1,
- "propId": 1001,
- "weaponType": 0
+ "refId": 1001
},
{
"id": 1002,
- "goodsType": 2,
- "propId": 0,
- "weaponType": 1
+ "goodsType": 1,
+ "refId": 1002
},
{
"id": 1003,
"goodsType": 1,
- "propId": 1002,
- "weaponType": 0
+ "refId": 1003
},
{
"id": 1004,
"goodsType": 1,
- "propId": 1003,
- "weaponType": 0
+ "refId": 1004
},
{
"id": 1005,
"goodsType": 1,
- "propId": 1004,
- "weaponType": 0
+ "refId": 1005
},
{
"id": 1006,
- "goodsType": 2,
- "propId": 0,
- "weaponType": 2
+ "goodsType": 1,
+ "refId": 1006
},
{
"id": 1007,
"goodsType": 1,
- "propId": 1005,
- "weaponType": 0
+ "refId": 1007
},
{
"id": 1008,
"goodsType": 1,
- "propId": 1006,
- "weaponType": 0
+ "refId": 1008
},
{
"id": 1009,
"goodsType": 1,
- "propId": 1007,
- "weaponType": 0
+ "refId": 1009
},
{
"id": 1010,
"goodsType": 1,
- "propId": 1008,
- "weaponType": 0
+ "refId": 1010
},
{
"id": 1011,
"goodsType": 1,
- "propId": 1009,
- "weaponType": 0
+ "refId": 1011
},
{
"id": 1012,
"goodsType": 1,
- "propId": 1010,
- "weaponType": 0
+ "refId": 1012
},
{
"id": 1013,
"goodsType": 1,
- "propId": 1011,
- "weaponType": 0
+ "refId": 1013
},
{
"id": 1014,
"goodsType": 1,
- "propId": 1012,
- "weaponType": 0
+ "refId": 1014
},
{
"id": 1015,
"goodsType": 1,
- "propId": 1013,
- "weaponType": 0
+ "refId": 1015
},
{
"id": 1016,
"goodsType": 1,
- "propId": 1014,
- "weaponType": 0
+ "refId": 1016
},
{
"id": 1017,
"goodsType": 1,
- "propId": 1015,
- "weaponType": 0
+ "refId": 1017
},
{
"id": 1018,
"goodsType": 1,
- "propId": 1016,
- "weaponType": 0
+ "refId": 1018
},
{
"id": 1019,
"goodsType": 1,
- "propId": 1017,
- "weaponType": 0
+ "refId": 1019
},
{
"id": 1020,
"goodsType": 1,
- "propId": 1018,
- "weaponType": 0
+ "refId": 1020
},
{
- "id": 1021,
- "goodsType": 1,
- "propId": 1019,
- "weaponType": 0
- },
- {
- "id": 1022,
- "goodsType": 1,
- "propId": 1020,
- "weaponType": 0
- },
- {
- "id": 1023,
+ "id": 2001,
"goodsType": 2,
- "propId": 0,
- "weaponType": 3
+ "refId": 1001
},
{
- "id": 1024,
+ "id": 2002,
"goodsType": 2,
- "propId": 0,
- "weaponType": 4
+ "refId": 1002
},
{
- "id": 1025,
+ "id": 2003,
"goodsType": 2,
- "propId": 0,
- "weaponType": 5
+ "refId": 1003
+ },
+ {
+ "id": 2004,
+ "goodsType": 2,
+ "refId": 1004
+ },
+ {
+ "id": 2005,
+ "goodsType": 2,
+ "refId": 2001
+ },
+ {
+ "id": 2006,
+ "goodsType": 2,
+ "refId": 2002
+ },
+ {
+ "id": 2007,
+ "goodsType": 2,
+ "refId": 2003
+ },
+ {
+ "id": 2008,
+ "goodsType": 2,
+ "refId": 2004
+ },
+ {
+ "id": 2009,
+ "goodsType": 2,
+ "refId": 3001
+ },
+ {
+ "id": 2010,
+ "goodsType": 2,
+ "refId": 3002
+ },
+ {
+ "id": 2011,
+ "goodsType": 2,
+ "refId": 3003
+ },
+ {
+ "id": 2012,
+ "goodsType": 2,
+ "refId": 3004
+ },
+ {
+ "id": 2013,
+ "goodsType": 2,
+ "refId": 4001
+ },
+ {
+ "id": 2014,
+ "goodsType": 2,
+ "refId": 4002
+ },
+ {
+ "id": 2015,
+ "goodsType": 2,
+ "refId": 4003
+ },
+ {
+ "id": 2016,
+ "goodsType": 2,
+ "refId": 4004
+ },
+ {
+ "id": 2017,
+ "goodsType": 2,
+ "refId": 5001
+ },
+ {
+ "id": 2018,
+ "goodsType": 2,
+ "refId": 5002
+ },
+ {
+ "id": 2019,
+ "goodsType": 2,
+ "refId": 5003
+ },
+ {
+ "id": 2020,
+ "goodsType": 2,
+ "refId": 5004
}
]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbleveldropconfig.bytes b/Assets/GameMain/DataTables/tbleveldropconfig.bytes
index 7d0f5e7..14b31fb 100644
Binary files a/Assets/GameMain/DataTables/tbleveldropconfig.bytes and b/Assets/GameMain/DataTables/tbleveldropconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbleveldropconfig.json b/Assets/GameMain/DataTables/tbleveldropconfig.json
index 99ed61d..695a951 100644
--- a/Assets/GameMain/DataTables/tbleveldropconfig.json
+++ b/Assets/GameMain/DataTables/tbleveldropconfig.json
@@ -2,7 +2,6 @@
{
"Id": 1001,
"WhiteWeight": 75,
- "GreenWeight": 20,
"BlueWeight": 4,
"PurpleWeight": 1,
"RedWeight": 0
@@ -10,7 +9,6 @@
{
"Id": 1002,
"WhiteWeight": 75,
- "GreenWeight": 20,
"BlueWeight": 4,
"PurpleWeight": 1,
"RedWeight": 0
@@ -18,7 +16,6 @@
{
"Id": 1003,
"WhiteWeight": 75,
- "GreenWeight": 20,
"BlueWeight": 4,
"PurpleWeight": 1,
"RedWeight": 0
@@ -26,7 +23,6 @@
{
"Id": 1004,
"WhiteWeight": 30,
- "GreenWeight": 50,
"BlueWeight": 15,
"PurpleWeight": 4,
"RedWeight": 1
@@ -34,7 +30,6 @@
{
"Id": 1005,
"WhiteWeight": 30,
- "GreenWeight": 50,
"BlueWeight": 15,
"PurpleWeight": 4,
"RedWeight": 1
@@ -42,7 +37,6 @@
{
"Id": 1006,
"WhiteWeight": 10,
- "GreenWeight": 20,
"BlueWeight": 40,
"PurpleWeight": 20,
"RedWeight": 10
@@ -50,7 +44,6 @@
{
"Id": 1007,
"WhiteWeight": 10,
- "GreenWeight": 20,
"BlueWeight": 40,
"PurpleWeight": 20,
"RedWeight": 10
@@ -58,7 +51,6 @@
{
"Id": 1008,
"WhiteWeight": 10,
- "GreenWeight": 20,
"BlueWeight": 40,
"PurpleWeight": 20,
"RedWeight": 10
@@ -66,7 +58,6 @@
{
"Id": 1009,
"WhiteWeight": 10,
- "GreenWeight": 20,
"BlueWeight": 40,
"PurpleWeight": 20,
"RedWeight": 10
@@ -74,7 +65,6 @@
{
"Id": 1010,
"WhiteWeight": 10,
- "GreenWeight": 20,
"BlueWeight": 40,
"PurpleWeight": 20,
"RedWeight": 10
diff --git a/Assets/GameMain/DataTables/tbpropconfig.bytes b/Assets/GameMain/DataTables/tbpropconfig.bytes
index 965f711..04a2a1c 100644
Binary files a/Assets/GameMain/DataTables/tbpropconfig.bytes and b/Assets/GameMain/DataTables/tbpropconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbpropconfig.json b/Assets/GameMain/DataTables/tbpropconfig.json
index e2715f8..75ed0f0 100644
--- a/Assets/GameMain/DataTables/tbpropconfig.json
+++ b/Assets/GameMain/DataTables/tbpropconfig.json
@@ -69,7 +69,7 @@
{
"id": 1004,
"name": "泰坦壁垒",
- "rarity": 5,
+ "rarity": 4,
"price": 423,
"statModifierConfigs": [
{
@@ -140,7 +140,7 @@
{
"id": 1008,
"name": "暗影之刃",
- "rarity": 5,
+ "rarity": 4,
"price": 433,
"statModifierConfigs": [
{
@@ -211,7 +211,7 @@
{
"id": 1012,
"name": "不死鸟之心",
- "rarity": 5,
+ "rarity": 4,
"price": 443,
"statModifierConfigs": [
{
@@ -287,7 +287,7 @@
{
"id": 1016,
"name": "幻影斗篷",
- "rarity": 5,
+ "rarity": 4,
"price": 454,
"statModifierConfigs": [
{
@@ -368,7 +368,7 @@
{
"id": 1020,
"name": "战神勋章",
- "rarity": 5,
+ "rarity": 4,
"price": 464,
"statModifierConfigs": [
{
diff --git a/Assets/GameMain/DataTables/tbweaponconfig.bytes b/Assets/GameMain/DataTables/tbweaponconfig.bytes
index 897d199..21de38c 100644
Binary files a/Assets/GameMain/DataTables/tbweaponconfig.bytes and b/Assets/GameMain/DataTables/tbweaponconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbweaponconfig.json b/Assets/GameMain/DataTables/tbweaponconfig.json
index 4207145..ace2069 100644
--- a/Assets/GameMain/DataTables/tbweaponconfig.json
+++ b/Assets/GameMain/DataTables/tbweaponconfig.json
@@ -1,7 +1,15 @@
[
{
+ "id": 1001,
"weaponType": 1,
+ "weaponName": "小刀",
+ "tags": [
+ 1,
+ 2
+ ],
"logicType": "WeaponKnife",
+ "scalingStat": 5,
+ "scalingRatio": 0.2,
"rarity": 1,
"price": 120,
"attack": 100,
@@ -20,8 +28,99 @@
"sprite": "小刀"
},
{
+ "id": 1002,
+ "weaponType": 1,
+ "weaponName": "小刀",
+ "tags": [
+ 1,
+ 2
+ ],
+ "logicType": "WeaponKnife",
+ "scalingStat": 5,
+ "scalingRatio": 0.2,
+ "rarity": 2,
+ "price": 200,
+ "attack": 150,
+ "cooldown": 1.5,
+ "damageType": 1,
+ "attackRange": 5.2,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 1,
+ 2.2
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponKnife",
+ "sprite": "小刀"
+ },
+ {
+ "id": 1003,
+ "weaponType": 1,
+ "weaponName": "小刀",
+ "tags": [
+ 1,
+ 2
+ ],
+ "logicType": "WeaponKnife",
+ "scalingStat": 5,
+ "scalingRatio": 0.2,
+ "rarity": 3,
+ "price": 300,
+ "attack": 200,
+ "cooldown": 1.5,
+ "damageType": 1,
+ "attackRange": 5.4,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 1,
+ 2.4
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponKnife",
+ "sprite": "小刀"
+ },
+ {
+ "id": 1004,
+ "weaponType": 1,
+ "weaponName": "小刀",
+ "tags": [
+ 1,
+ 2
+ ],
+ "logicType": "WeaponKnife",
+ "scalingStat": 5,
+ "scalingRatio": 0.2,
+ "rarity": 4,
+ "price": 400,
+ "attack": 250,
+ "cooldown": 1.5,
+ "damageType": 1,
+ "attackRange": 5.5,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 1,
+ 2.5
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponKnife",
+ "sprite": "小刀"
+ },
+ {
+ "id": 2001,
"weaponType": 2,
+ "weaponName": "手枪",
+ "tags": [
+ 3
+ ],
"logicType": "WeaponHandgun",
+ "scalingStat": 8,
+ "scalingRatio": 0.5,
"rarity": 1,
"price": 130,
"attack": 120,
@@ -35,8 +134,82 @@
"sprite": "手枪"
},
{
+ "id": 2002,
+ "weaponType": 2,
+ "weaponName": "手枪",
+ "tags": [
+ 3
+ ],
+ "logicType": "WeaponHandgun",
+ "scalingStat": 8,
+ "scalingRatio": 0.5,
+ "rarity": 2,
+ "price": 150,
+ "attack": 130,
+ "cooldown": 1,
+ "damageType": 2,
+ "attackRange": 20,
+ "attackSoundId": 10000,
+ "parameters": [],
+ "statModifierConfigs": [],
+ "prefab": "WeaponHandgun",
+ "sprite": "手枪"
+ },
+ {
+ "id": 2003,
+ "weaponType": 2,
+ "weaponName": "手枪",
+ "tags": [
+ 3
+ ],
+ "logicType": "WeaponHandgun",
+ "scalingStat": 8,
+ "scalingRatio": 0.5,
+ "rarity": 3,
+ "price": 170,
+ "attack": 140,
+ "cooldown": 1,
+ "damageType": 2,
+ "attackRange": 23,
+ "attackSoundId": 10000,
+ "parameters": [],
+ "statModifierConfigs": [],
+ "prefab": "WeaponHandgun",
+ "sprite": "手枪"
+ },
+ {
+ "id": 2004,
+ "weaponType": 2,
+ "weaponName": "手枪",
+ "tags": [
+ 3
+ ],
+ "logicType": "WeaponHandgun",
+ "scalingStat": 8,
+ "scalingRatio": 0.5,
+ "rarity": 4,
+ "price": 200,
+ "attack": 150,
+ "cooldown": 1,
+ "damageType": 2,
+ "attackRange": 25,
+ "attackSoundId": 10000,
+ "parameters": [],
+ "statModifierConfigs": [],
+ "prefab": "WeaponHandgun",
+ "sprite": "手枪"
+ },
+ {
+ "id": 3001,
"weaponType": 3,
+ "weaponName": "斧头",
+ "tags": [
+ 1,
+ 5
+ ],
"logicType": "WeaponSlash",
+ "scalingStat": 5,
+ "scalingRatio": 0.8,
"rarity": 1,
"price": 100,
"attack": 150,
@@ -55,8 +228,99 @@
"sprite": "斧头"
},
{
+ "id": 3002,
+ "weaponType": 3,
+ "weaponName": "斧头",
+ "tags": [
+ 1,
+ 5
+ ],
+ "logicType": "WeaponSlash",
+ "scalingStat": 5,
+ "scalingRatio": 0.8,
+ "rarity": 2,
+ "price": 140,
+ "attack": 200,
+ "cooldown": 2,
+ "damageType": 1,
+ "attackRange": 5,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 2,
+ 120
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponSlash",
+ "sprite": "斧头"
+ },
+ {
+ "id": 3003,
+ "weaponType": 3,
+ "weaponName": "斧头",
+ "tags": [
+ 1,
+ 5
+ ],
+ "logicType": "WeaponSlash",
+ "scalingStat": 5,
+ "scalingRatio": 0.8,
+ "rarity": 3,
+ "price": 180,
+ "attack": 300,
+ "cooldown": 2,
+ "damageType": 1,
+ "attackRange": 5,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 2,
+ 120
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponSlash",
+ "sprite": "斧头"
+ },
+ {
+ "id": 3004,
+ "weaponType": 3,
+ "weaponName": "斧头",
+ "tags": [
+ 1,
+ 5
+ ],
+ "logicType": "WeaponSlash",
+ "scalingStat": 5,
+ "scalingRatio": 0.8,
+ "rarity": 4,
+ "price": 300,
+ "attack": 400,
+ "cooldown": 2,
+ "damageType": 1,
+ "attackRange": 5,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 2,
+ 120
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponSlash",
+ "sprite": "斧头"
+ },
+ {
+ "id": 4001,
"weaponType": 4,
+ "weaponName": "闪电",
+ "tags": [
+ 7
+ ],
"logicType": "WeaponLightning",
+ "scalingStat": 7,
+ "scalingRatio": 0.5,
"rarity": 1,
"price": 150,
"attack": 80,
@@ -75,8 +339,97 @@
"sprite": "闪电"
},
{
+ "id": 4002,
+ "weaponType": 4,
+ "weaponName": "闪电",
+ "tags": [
+ 7
+ ],
+ "logicType": "WeaponLightning",
+ "scalingStat": 7,
+ "scalingRatio": 0.5,
+ "rarity": 2,
+ "price": 180,
+ "attack": 80,
+ "cooldown": 2.8,
+ "damageType": 4,
+ "attackRange": 12,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 1,
+ 3
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponLightning",
+ "sprite": "闪电"
+ },
+ {
+ "id": 4003,
+ "weaponType": 4,
+ "weaponName": "闪电",
+ "tags": [
+ 7
+ ],
+ "logicType": "WeaponLightning",
+ "scalingStat": 7,
+ "scalingRatio": 0.5,
+ "rarity": 3,
+ "price": 200,
+ "attack": 80,
+ "cooldown": 2.7,
+ "damageType": 4,
+ "attackRange": 12,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 1,
+ 3
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponLightning",
+ "sprite": "闪电"
+ },
+ {
+ "id": 4004,
+ "weaponType": 4,
+ "weaponName": "闪电",
+ "tags": [
+ 7
+ ],
+ "logicType": "WeaponLightning",
+ "scalingStat": 7,
+ "scalingRatio": 0.5,
+ "rarity": 4,
+ "price": 250,
+ "attack": 80,
+ "cooldown": 2.5,
+ "damageType": 4,
+ "attackRange": 12,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 1,
+ 3
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponLightning",
+ "sprite": "闪电"
+ },
+ {
+ "id": 5001,
"weaponType": 5,
+ "weaponName": "长枪",
+ "tags": [
+ 1,
+ 6
+ ],
"logicType": "WeaponLance",
+ "scalingStat": 9,
+ "scalingRatio": 1,
"rarity": 1,
"price": 100,
"attack": 100,
@@ -88,14 +441,90 @@
[
3,
0.7
- ],
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponLance",
+ "sprite": "长枪"
+ },
+ {
+ "id": 5002,
+ "weaponType": 5,
+ "weaponName": "长枪",
+ "tags": [
+ 1,
+ 6
+ ],
+ "logicType": "WeaponLance",
+ "scalingStat": 9,
+ "scalingRatio": 1,
+ "rarity": 2,
+ "price": 200,
+ "attack": 100,
+ "cooldown": 1.5,
+ "damageType": 1,
+ "attackRange": 5,
+ "attackSoundId": 10000,
+ "parameters": [
[
- 4,
- 4.5
- ],
+ 3,
+ 0.7
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponLance",
+ "sprite": "长枪"
+ },
+ {
+ "id": 5003,
+ "weaponType": 5,
+ "weaponName": "长枪",
+ "tags": [
+ 1,
+ 6
+ ],
+ "logicType": "WeaponLance",
+ "scalingStat": 9,
+ "scalingRatio": 1,
+ "rarity": 3,
+ "price": 300,
+ "attack": 100,
+ "cooldown": 1.5,
+ "damageType": 1,
+ "attackRange": 5,
+ "attackSoundId": 10000,
+ "parameters": [
[
- 5,
- 0.5
+ 3,
+ 0.7
+ ]
+ ],
+ "statModifierConfigs": [],
+ "prefab": "WeaponLance",
+ "sprite": "长枪"
+ },
+ {
+ "id": 5004,
+ "weaponType": 5,
+ "weaponName": "长枪",
+ "tags": [
+ 1,
+ 6
+ ],
+ "logicType": "WeaponLance",
+ "scalingStat": 9,
+ "scalingRatio": 1,
+ "rarity": 4,
+ "price": 400,
+ "attack": 100,
+ "cooldown": 1.5,
+ "damageType": 1,
+ "attackRange": 5,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 3,
+ 0.7
]
],
"statModifierConfigs": [],
diff --git a/Assets/GameMain/DataTables/tbweapontagconfig.bytes b/Assets/GameMain/DataTables/tbweapontagconfig.bytes
new file mode 100644
index 0000000..e9a322c
Binary files /dev/null and b/Assets/GameMain/DataTables/tbweapontagconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbweapontagconfig.bytes.meta b/Assets/GameMain/DataTables/tbweapontagconfig.bytes.meta
new file mode 100644
index 0000000..da60a89
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbweapontagconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: aa0f76bdb9694ea45b17171cdb5aa41a
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbweapontagconfig.json b/Assets/GameMain/DataTables/tbweapontagconfig.json
new file mode 100644
index 0000000..391ff20
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbweapontagconfig.json
@@ -0,0 +1,259 @@
+[
+ {
+ "id": 101,
+ "tag": 1,
+ "requiredCount": 2,
+ "statModifierConfigs": [
+ {
+ "statType": 5,
+ "value": 1,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 102,
+ "tag": 1,
+ "requiredCount": 4,
+ "statModifierConfigs": [
+ {
+ "statType": 5,
+ "value": 3,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 103,
+ "tag": 1,
+ "requiredCount": 6,
+ "statModifierConfigs": [
+ {
+ "statType": 5,
+ "value": 8,
+ "modifierType": 100
+ },
+ {
+ "statType": 3,
+ "value": 0.05,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 201,
+ "tag": 2,
+ "requiredCount": 2,
+ "statModifierConfigs": [
+ {
+ "statType": 9,
+ "value": 0.03,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 202,
+ "tag": 2,
+ "requiredCount": 4,
+ "statModifierConfigs": [
+ {
+ "statType": 9,
+ "value": 0.08,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 203,
+ "tag": 2,
+ "requiredCount": 6,
+ "statModifierConfigs": [
+ {
+ "statType": 9,
+ "value": 0.15,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 301,
+ "tag": 3,
+ "requiredCount": 2,
+ "statModifierConfigs": [
+ {
+ "statType": 11,
+ "value": 10,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 302,
+ "tag": 3,
+ "requiredCount": 4,
+ "statModifierConfigs": [
+ {
+ "statType": 11,
+ "value": 25,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 303,
+ "tag": 3,
+ "requiredCount": 6,
+ "statModifierConfigs": [
+ {
+ "statType": 11,
+ "value": 50,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 401,
+ "tag": 4,
+ "requiredCount": 2,
+ "statModifierConfigs": [
+ {
+ "statType": 10,
+ "value": 2,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 402,
+ "tag": 4,
+ "requiredCount": 4,
+ "statModifierConfigs": [
+ {
+ "statType": 10,
+ "value": 5,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 403,
+ "tag": 4,
+ "requiredCount": 6,
+ "statModifierConfigs": [
+ {
+ "statType": 10,
+ "value": 10,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 501,
+ "tag": 5,
+ "requiredCount": 2,
+ "statModifierConfigs": [
+ {
+ "statType": 12,
+ "value": 1,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 502,
+ "tag": 5,
+ "requiredCount": 4,
+ "statModifierConfigs": [
+ {
+ "statType": 12,
+ "value": 3,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 503,
+ "tag": 5,
+ "requiredCount": 6,
+ "statModifierConfigs": [
+ {
+ "statType": 12,
+ "value": 6,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 601,
+ "tag": 6,
+ "requiredCount": 2,
+ "statModifierConfigs": [
+ {
+ "statType": 1,
+ "value": 3,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 602,
+ "tag": 6,
+ "requiredCount": 3,
+ "statModifierConfigs": [
+ {
+ "statType": 1,
+ "value": 6,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 603,
+ "tag": 6,
+ "requiredCount": 6,
+ "statModifierConfigs": [
+ {
+ "statType": 1,
+ "value": 15,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 701,
+ "tag": 7,
+ "requiredCount": 2,
+ "statModifierConfigs": [
+ {
+ "statType": 7,
+ "value": 1,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 702,
+ "tag": 7,
+ "requiredCount": 4,
+ "statModifierConfigs": [
+ {
+ "statType": 7,
+ "value": 3,
+ "modifierType": 100
+ }
+ ]
+ },
+ {
+ "id": 703,
+ "tag": 7,
+ "requiredCount": 6,
+ "statModifierConfigs": [
+ {
+ "statType": 7,
+ "value": 7,
+ "modifierType": 100
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbweapontagconfig.json.meta b/Assets/GameMain/DataTables/tbweapontagconfig.json.meta
new file mode 100644
index 0000000..fe4fa7f
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbweapontagconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 539ec5eae528e654dbaf3e4a48e227aa
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/EntityData/Weapon/WeaponData.cs b/Assets/GameMain/Scripts/Base/EntityData/Weapon/WeaponData.cs
index 9de83ad..300b9c5 100644
--- a/Assets/GameMain/Scripts/Base/EntityData/Weapon/WeaponData.cs
+++ b/Assets/GameMain/Scripts/Base/EntityData/Weapon/WeaponData.cs
@@ -24,7 +24,7 @@ namespace SepCore.Entity
public DamageType DamageType => Config.DamageType;
- public string Title => Config.WeaponType.ToString();
+ public string Title => Config.WeaponName;
public string Sprite => Config.Sprite;
diff --git a/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs b/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs
index 1fd4714..1930acb 100644
--- a/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs
+++ b/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs
@@ -18,9 +18,7 @@ public sealed partial class GoodsConfig : Luban.BeanBase
{
Id = _buf.ReadInt();
GoodsType = (GoodsType)_buf.ReadInt();
- PropId = _buf.ReadInt();
- PropId_Ref = null;
- WeaponType = (WeaponType)_buf.ReadInt();
+ RefId = _buf.ReadInt();
}
public static GoodsConfig DeserializeGoodsConfig(ByteBuf _buf)
@@ -37,14 +35,9 @@ public sealed partial class GoodsConfig : Luban.BeanBase
///
public readonly GoodsType GoodsType;
///
- /// 道具商品Id
+ /// 引用Id
///
- public readonly int PropId;
- public PropConfig PropId_Ref;
- ///
- /// 武器商品类型
- ///
- public readonly WeaponType WeaponType;
+ public readonly int RefId;
public const int __ID__ = 1358452248;
public override int GetTypeId() => __ID__;
@@ -53,7 +46,6 @@ public sealed partial class GoodsConfig : Luban.BeanBase
{
- PropId_Ref = tables.TbPropConfig.GetOrDefault(PropId);
}
@@ -62,8 +54,7 @@ public sealed partial class GoodsConfig : Luban.BeanBase
return "{ "
+ "id:" + Id + ","
+ "goodsType:" + GoodsType + ","
- + "propId:" + PropId + ","
- + "weaponType:" + WeaponType + ","
+ + "refId:" + RefId + ","
+ "}";
}
}
diff --git a/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs b/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs
index 1effb61..b5beaec 100644
--- a/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs
+++ b/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs
@@ -18,7 +18,6 @@ public sealed partial class LevelDropConfig : Luban.BeanBase
{
Id = _buf.ReadInt();
WhiteWeight = _buf.ReadFloat();
- GreenWeight = _buf.ReadFloat();
BlueWeight = _buf.ReadFloat();
PurpleWeight = _buf.ReadFloat();
RedWeight = _buf.ReadFloat();
@@ -38,10 +37,6 @@ public sealed partial class LevelDropConfig : Luban.BeanBase
///
public readonly float WhiteWeight;
///
- /// 绿色掉落率
- ///
- public readonly float GreenWeight;
- ///
/// 蓝色掉落率
///
public readonly float BlueWeight;
@@ -64,7 +59,6 @@ public sealed partial class LevelDropConfig : Luban.BeanBase
-
}
public override string ToString()
@@ -72,7 +66,6 @@ public sealed partial class LevelDropConfig : Luban.BeanBase
return "{ "
+ "Id:" + Id + ","
+ "WhiteWeight:" + WhiteWeight + ","
- + "GreenWeight:" + GreenWeight + ","
+ "BlueWeight:" + BlueWeight + ","
+ "PurpleWeight:" + PurpleWeight + ","
+ "RedWeight:" + RedWeight + ","
diff --git a/Assets/GameMain/Scripts/Base/Gen/Rarity.cs b/Assets/GameMain/Scripts/Base/Gen/Rarity.cs
index d12784c..783cf35 100644
--- a/Assets/GameMain/Scripts/Base/Gen/Rarity.cs
+++ b/Assets/GameMain/Scripts/Base/Gen/Rarity.cs
@@ -25,21 +25,17 @@ namespace SepCore.Definition
///
White = 1,
///
- /// 绿
- ///
- Green = 2,
- ///
/// 蓝
///
- Blue = 3,
+ Blue = 2,
///
/// 紫
///
- Purple = 4,
+ Purple = 3,
///
/// 红
///
- Red = 5,
+ Red = 4,
}
}
diff --git a/Assets/GameMain/Scripts/Base/Gen/Tables.cs b/Assets/GameMain/Scripts/Base/Gen/Tables.cs
index 43015bb..d4da348 100644
--- a/Assets/GameMain/Scripts/Base/Gen/Tables.cs
+++ b/Assets/GameMain/Scripts/Base/Gen/Tables.cs
@@ -65,6 +65,7 @@ public partial class Tables
/// 角色属性配置
///
public TbStatConfig TbStatConfig {get; }
+ public TbWeaponTagConfig TbWeaponTagConfig {get; }
public Tables(System.Func loader)
{
@@ -87,6 +88,7 @@ public partial class Tables
TbUISoundConfig = new TbUISoundConfig(loader("tbuisoundconfig"));
TbWeaponConfig = new TbWeaponConfig(loader("tbweaponconfig"));
TbStatConfig = new TbStatConfig(loader("tbstatconfig"));
+ TbWeaponTagConfig = new TbWeaponTagConfig(loader("tbweapontagconfig"));
ResolveRef();
}
@@ -111,6 +113,7 @@ public partial class Tables
TbUISoundConfig.ResolveRef(this);
TbWeaponConfig.ResolveRef(this);
TbStatConfig.ResolveRef(this);
+ TbWeaponTagConfig.ResolveRef(this);
}
}
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs
index 09544a6..1aa05be 100644
--- a/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs
+++ b/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs
@@ -17,12 +17,12 @@ namespace SepCore.Definition
///
public partial class TbWeaponConfig
{
- private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.Dictionary _dataMap;
private readonly System.Collections.Generic.List _dataList;
public TbWeaponConfig(ByteBuf _buf)
{
- _dataMap = new System.Collections.Generic.Dictionary();
+ _dataMap = new System.Collections.Generic.Dictionary();
_dataList = new System.Collections.Generic.List();
for(int n = _buf.ReadSize() ; n > 0 ; --n)
@@ -30,16 +30,16 @@ public partial class TbWeaponConfig
WeaponConfig _v;
_v = WeaponConfig.DeserializeWeaponConfig(_buf);
_dataList.Add(_v);
- _dataMap.Add(_v.WeaponType, _v);
+ _dataMap.Add(_v.Id, _v);
}
}
- public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
public System.Collections.Generic.List DataList => _dataList;
- public WeaponConfig GetOrDefault(WeaponType key) => _dataMap.TryGetValue(key, out var v) ? v : null;
- public WeaponConfig Get(WeaponType key) => _dataMap[key];
- public WeaponConfig this[WeaponType key] => _dataMap[key];
+ public WeaponConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public WeaponConfig Get(int key) => _dataMap[key];
+ public WeaponConfig this[int key] => _dataMap[key];
public void ResolveRef(Tables tables)
{
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbWeaponTagConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbWeaponTagConfig.cs
new file mode 100644
index 0000000..7762e8a
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbWeaponTagConfig.cs
@@ -0,0 +1,52 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public partial class TbWeaponTagConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbWeaponTagConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ WeaponTagConfig _v;
+ _v = WeaponTagConfig.DeserializeWeaponTagConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public WeaponTagConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public WeaponTagConfig Get(int key) => _dataMap[key];
+ public WeaponTagConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbWeaponTagConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbWeaponTagConfig.cs.meta
new file mode 100644
index 0000000..d2d49a0
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbWeaponTagConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2628c2be656a6c348a98ca6e01db6dde
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs b/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs
index 048cb72..b1ac70c 100644
--- a/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs
+++ b/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs
@@ -16,8 +16,13 @@ public sealed partial class WeaponConfig : Luban.BeanBase
{
public WeaponConfig(ByteBuf _buf)
{
+ Id = _buf.ReadInt();
WeaponType = (WeaponType)_buf.ReadInt();
+ WeaponName = _buf.ReadString();
+ {int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Tags = new System.Collections.Generic.List(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { WeaponTag _e0; _e0 = (WeaponTag)_buf.ReadInt(); Tags.Add(_e0);}}
LogicType = _buf.ReadString();
+ ScalingStat = (StatType)_buf.ReadInt();
+ ScalingRatio = _buf.ReadFloat();
Rarity = (Rarity)_buf.ReadInt();
Price = _buf.ReadInt();
Attack = _buf.ReadInt();
@@ -38,15 +43,35 @@ public sealed partial class WeaponConfig : Luban.BeanBase
return new WeaponConfig(_buf);
}
+ ///
+ /// 武器编号
+ ///
+ public readonly int Id;
///
/// 武器类型
///
public readonly WeaponType WeaponType;
///
+ /// 武器名
+ ///
+ public readonly string WeaponName;
+ ///
+ /// 武器标签列表
+ ///
+ public readonly System.Collections.Generic.List Tags;
+ ///
/// 逻辑类型
///
public readonly string LogicType;
///
+ /// 加成主属性
+ ///
+ public readonly StatType ScalingStat;
+ ///
+ /// 主属性加成系数
+ ///
+ public readonly float ScalingRatio;
+ ///
/// 道具品质
///
public readonly Rarity Rarity;
@@ -105,6 +130,11 @@ public sealed partial class WeaponConfig : Luban.BeanBase
+
+
+
+
+
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
@@ -113,8 +143,13 @@ public sealed partial class WeaponConfig : Luban.BeanBase
public override string ToString()
{
return "{ "
+ + "id:" + Id + ","
+ "weaponType:" + WeaponType + ","
+ + "weaponName:" + WeaponName + ","
+ + "tags:" + Luban.StringUtil.CollectionToString(Tags) + ","
+ "logicType:" + LogicType + ","
+ + "scalingStat:" + ScalingStat + ","
+ + "scalingRatio:" + ScalingRatio + ","
+ "rarity:" + Rarity + ","
+ "price:" + Price + ","
+ "attack:" + Attack + ","
diff --git a/Assets/GameMain/Scripts/Base/Gen/WeaponTag.cs b/Assets/GameMain/Scripts/Base/Gen/WeaponTag.cs
new file mode 100644
index 0000000..6e26808
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/WeaponTag.cs
@@ -0,0 +1,66 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+namespace SepCore.Definition
+{
+ ///
+ /// 武器tag
+ ///
+ public enum WeaponTag : byte
+ {
+ ///
+ /// 无
+ ///
+ None = 0,
+ ///
+ /// 刀剑
+ ///
+ Blade = 1,
+ ///
+ /// 精准
+ ///
+ Precise = 2,
+ ///
+ /// 枪械
+ ///
+ Gun = 3,
+ ///
+ /// 工程
+ ///
+ Engineering = 4,
+ ///
+ /// 钝器
+ ///
+ Blunt = 5,
+ ///
+ /// 原始
+ ///
+ Primitive = 6,
+ ///
+ /// 元素
+ ///
+ Elemental = 7,
+ ///
+ /// 徒手
+ ///
+ Unarmed = 8,
+ ///
+ /// 医疗
+ ///
+ Medical = 9,
+ ///
+ /// 重型
+ ///
+ Heavy = 10,
+ }
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/WeaponTag.cs.meta b/Assets/GameMain/Scripts/Base/Gen/WeaponTag.cs.meta
new file mode 100644
index 0000000..fcd0911
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/WeaponTag.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 67a3eb7a61baa114c936b306b55c6b7a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/WeaponTagConfig.cs b/Assets/GameMain/Scripts/Base/Gen/WeaponTagConfig.cs
new file mode 100644
index 0000000..6e9b3ea
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/WeaponTagConfig.cs
@@ -0,0 +1,66 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class WeaponTagConfig : Luban.BeanBase
+{
+ public WeaponTagConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ Tag = (WeaponTag)_buf.ReadInt();
+ RequiredCount = _buf.ReadInt();
+ {int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);StatModifierConfigs = new System.Collections.Generic.List(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.Add(_e0);}}
+ }
+
+ public static WeaponTagConfig DeserializeWeaponTagConfig(ByteBuf _buf)
+ {
+ return new WeaponTagConfig(_buf);
+ }
+
+ ///
+ /// 效果编号
+ ///
+ public readonly int Id;
+ ///
+ /// 标签
+ ///
+ public readonly WeaponTag Tag;
+ ///
+ /// 触发所需条件数
+ ///
+ public readonly int RequiredCount;
+ public readonly System.Collections.Generic.List StatModifierConfigs;
+
+ public const int __ID__ = -1372305248;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+ foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "tag:" + Tag + ","
+ + "requiredCount:" + RequiredCount + ","
+ + "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/WeaponTagConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/WeaponTagConfig.cs.meta
new file mode 100644
index 0000000..504fe67
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/WeaponTagConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: be6aa68432437fb49ac08b59f65b8c6b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Presentation/Common/View/IconArea.cs b/Assets/GameMain/Scripts/Presentation/Common/View/IconArea.cs
index e9fa4de..efb5073 100644
--- a/Assets/GameMain/Scripts/Presentation/Common/View/IconArea.cs
+++ b/Assets/GameMain/Scripts/Presentation/Common/View/IconArea.cs
@@ -26,7 +26,6 @@ namespace SepCore.UI
_board.color = rarity switch
{
Rarity.White => Color.white,
- Rarity.Green => Color.green,
Rarity.Blue => Color.blue,
Rarity.Purple => Color.magenta,
Rarity.Red => Color.red,
diff --git a/Assets/GameMain/Scripts/Presentation/ItemTooltip/ItemTooltipForm.Logic.cs b/Assets/GameMain/Scripts/Presentation/ItemTooltip/ItemTooltipForm.Logic.cs
index 07036e2..7dbb03b 100644
--- a/Assets/GameMain/Scripts/Presentation/ItemTooltip/ItemTooltipForm.Logic.cs
+++ b/Assets/GameMain/Scripts/Presentation/ItemTooltip/ItemTooltipForm.Logic.cs
@@ -13,11 +13,11 @@ namespace SepCore.UI
[SerializeField] private float _fixedTopHeight = 150f;
- [SerializeField] private float _fixedBottomHeight = 150f;
+ [SerializeField] private float _fixedBottomHeight = 250;
- [SerializeField] private float _fixedWidth = 300f;
+ [SerializeField] private float _fixedWidth = 600f;
- [SerializeField] private float _screenEdgePadding = 0f;
+ [SerializeField] private float _screenEdgePadding = 64f;
private ItemTooltipContext _context;
diff --git a/Assets/GameMain/Scripts/Presentation/Shop/GoodsItemContext.cs b/Assets/GameMain/Scripts/Presentation/Shop/GoodsItemContext.cs
index dfacb3c..2a98660 100644
--- a/Assets/GameMain/Scripts/Presentation/Shop/GoodsItemContext.cs
+++ b/Assets/GameMain/Scripts/Presentation/Shop/GoodsItemContext.cs
@@ -39,7 +39,7 @@ namespace SepCore.UI
DamageType damageType;
if (rawData.DataRow is WeaponConfig weaponConfig)
{
- Name = weaponConfig.WeaponType.ToString();
+ Name = weaponConfig.WeaponName;
Description = ItemDescUtility.CreateWeaponDescription(weaponConfig);
damageType = weaponConfig.DamageType;
}
diff --git a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/UIComponentExtension.cs b/Assets/GameMain/Scripts/Runtime/BuiltinComponent/UIComponentExtension.cs
index 8b27024..d8ff2e8 100644
--- a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/UIComponentExtension.cs
+++ b/Assets/GameMain/Scripts/Runtime/BuiltinComponent/UIComponentExtension.cs
@@ -84,11 +84,13 @@ namespace SepCore.UI
{
if (uiComponent.IsLoadingUIForm(assetName))
{
+ Log.Warning("UIComponentExtension.OpenUIForm() skipped '{0}' because it is already loading.", assetName);
return null;
}
if (uiComponent.HasUIForm(assetName))
{
+ Log.Warning("UIComponentExtension.OpenUIForm() skipped '{0}' because it is already open.", assetName);
return null;
}
}
diff --git a/Assets/GameMain/Scripts/Runtime/CustomComponent/Luban/LubanComponent.cs b/Assets/GameMain/Scripts/Runtime/CustomComponent/Luban/LubanComponent.cs
index 300cadb..f285413 100644
--- a/Assets/GameMain/Scripts/Runtime/CustomComponent/Luban/LubanComponent.cs
+++ b/Assets/GameMain/Scripts/Runtime/CustomComponent/Luban/LubanComponent.cs
@@ -36,7 +36,8 @@ namespace SepCore.CustomComponent
"tbuiformconfig",
"tbuisoundconfig",
"tbweaponconfig",
- "tbstatconfig"
+ "tbstatconfig",
+ "tbweapontagconfig"
};
private sealed class TableAccessor
@@ -131,7 +132,7 @@ namespace SepCore.CustomComponent
},
{
typeof(WeaponConfig),
- Accessor(tables => id => tables.TbWeaponConfig.GetOrDefault((WeaponType)id),
+ Accessor(tables => id => tables.TbWeaponConfig.GetOrDefault(id),
tables => tables.TbWeaponConfig.DataList)
},
{
@@ -139,6 +140,11 @@ namespace SepCore.CustomComponent
Accessor(tables => id => tables.TbStatConfig.GetOrDefault((StatType)id),
tables => tables.TbStatConfig.DataList)
},
+ {
+ typeof(WeaponTagConfig),
+ Accessor(tables => id => tables.TbWeaponTagConfig.GetOrDefault(id),
+ tables => tables.TbWeaponTagConfig.DataList)
+ },
};
private static TableAccessor Accessor(Func> rowGetterFactory,
diff --git a/Assets/GameMain/Scripts/Runtime/UIBase/Shop/ShopGoodsSelection.cs b/Assets/GameMain/Scripts/Runtime/UIBase/Shop/ShopGoodsSelection.cs
index f472fc0..40d45aa 100644
--- a/Assets/GameMain/Scripts/Runtime/UIBase/Shop/ShopGoodsSelection.cs
+++ b/Assets/GameMain/Scripts/Runtime/UIBase/Shop/ShopGoodsSelection.cs
@@ -5,8 +5,7 @@ namespace SepCore.UI
public class ShopGoodsSelection
{
public GoodsType GoodsType;
- public int PropId;
- public WeaponType WeaponType;
+ public int RefId;
public int Price;
}
}
diff --git a/Assets/GameMain/Scripts/Runtime/UIBase/Shop/ShopUseCase.cs b/Assets/GameMain/Scripts/Runtime/UIBase/Shop/ShopUseCase.cs
index 42e68f1..a226759 100644
--- a/Assets/GameMain/Scripts/Runtime/UIBase/Shop/ShopUseCase.cs
+++ b/Assets/GameMain/Scripts/Runtime/UIBase/Shop/ShopUseCase.cs
@@ -167,7 +167,7 @@ namespace SepCore.UI
if (goodsConfig.GoodsType == GoodsType.Prop)
{
- PropConfig propConfig = GameEntry.Luban.Get(goodsConfig.PropId);
+ PropConfig propConfig = GameEntry.Luban.Get(goodsConfig.RefId);
int basePrice = propConfig.Price;
price = CalculateRandomizedPrice(basePrice, priceRandomPercent);
@@ -177,7 +177,7 @@ namespace SepCore.UI
}
else if (goodsConfig.GoodsType == GoodsType.Weapon)
{
- WeaponConfig weaponConfig = GameEntry.Luban.Get((int)goodsConfig.WeaponType);
+ WeaponConfig weaponConfig = GameEntry.Luban.Get(goodsConfig.RefId);
int basePrice = weaponConfig.Price;
price = CalculateRandomizedPrice(basePrice, priceRandomPercent);
@@ -197,8 +197,7 @@ namespace SepCore.UI
_selections.Add(new ShopGoodsSelection
{
GoodsType = goodsConfig.GoodsType,
- PropId = goodsConfig.PropId,
- WeaponType = goodsConfig.WeaponType,
+ RefId = goodsConfig.RefId,
Price = price
});
@@ -253,14 +252,14 @@ namespace SepCore.UI
if (goods.GoodsType == GoodsType.Prop)
{
- PropConfig propConfig = GameEntry.Luban.Get(goods.PropId);
+ PropConfig propConfig = GameEntry.Luban.Get(goods.RefId);
rarity = propConfig.Rarity;
return true;
}
if (goods.GoodsType == GoodsType.Weapon)
{
- WeaponConfig weaponConfig = GameEntry.Luban.Get((int)goods.WeaponType);
+ WeaponConfig weaponConfig = GameEntry.Luban.Get(goods.RefId);
rarity = weaponConfig.Rarity;
return true;
}
@@ -285,7 +284,7 @@ namespace SepCore.UI
{
if (goods.GoodsType == GoodsType.Prop)
{
- PropConfig propConfig = GameEntry.Luban.Get(goods.PropId);
+ PropConfig propConfig = GameEntry.Luban.Get(goods.RefId);
_player.AddProp(new PropItem(propConfig));
return new DisplayItemRawData
{
@@ -303,7 +302,7 @@ namespace SepCore.UI
return null;
}
- WeaponConfig weaponConfig = GameEntry.Luban.Get((int)goods.WeaponType);
+ WeaponConfig weaponConfig = GameEntry.Luban.Get(goods.RefId);
int id = GameEntry.Entity.NextId();
var weaponData = EntityDataFactory.Create(id, weaponConfig, _player.Id, CampType.Player);
@@ -311,7 +310,7 @@ namespace SepCore.UI
if (weapon == null)
{
Log.Warning(
- $"ShopFormUseCase::ApplyGoodsPurchase: Show weapon failed, weapon type id = {goods.WeaponType}");
+ $"ShopFormUseCase::ApplyGoodsPurchase: Show weapon failed, weapon type id = {goods.RefId}");
return null;
}
diff --git a/Assets/GameMain/Scripts/Runtime/Utility/EntityDataFactory.cs b/Assets/GameMain/Scripts/Runtime/Utility/EntityDataFactory.cs
index 655e8ee..33478c6 100644
--- a/Assets/GameMain/Scripts/Runtime/Utility/EntityDataFactory.cs
+++ b/Assets/GameMain/Scripts/Runtime/Utility/EntityDataFactory.cs
@@ -17,9 +17,15 @@ namespace SepCore.CustomUtility
return new EnemyData(entityId, GetEnemyConfig(enemyType), level);
}
- public static WeaponData Create(int entityId, WeaponType weaponType, int ownerId, CampType ownerCamp)
+ public static WeaponData Create(int entityId, WeaponType weaponType, int ownerId, CampType ownerCamp, Rarity rarity = Rarity.White)
{
- var config = GameEntry.Luban.Get((int)weaponType);
+ var config = WeaponUtility.GetWeaponConfig(weaponType, rarity);
+ return new WeaponData(entityId, config, ownerId, ownerCamp);
+ }
+
+ public static WeaponData Create(int entityId, int weaponId, int ownerId, CampType ownerCamp)
+ {
+ var config = WeaponUtility.GetWeaponConfig(weaponId);
return new WeaponData(entityId, config, ownerId, ownerCamp);
}
diff --git a/Assets/GameMain/Scripts/Runtime/Utility/RarityUtility.cs b/Assets/GameMain/Scripts/Runtime/Utility/RarityUtility.cs
index 2c4c823..26e9085 100644
--- a/Assets/GameMain/Scripts/Runtime/Utility/RarityUtility.cs
+++ b/Assets/GameMain/Scripts/Runtime/Utility/RarityUtility.cs
@@ -15,7 +15,7 @@ namespace SepCore.CustomUtility
public static Rarity SelectRarity(LevelDropConfig dropConfig)
{
- float total = dropConfig.WhiteWeight + dropConfig.GreenWeight + dropConfig.BlueWeight + dropConfig.PurpleWeight + dropConfig.RedWeight;
+ float total = dropConfig.WhiteWeight + dropConfig.BlueWeight + dropConfig.PurpleWeight + dropConfig.RedWeight;
if (total <= 0f)
{
Log.Error("LevelDropConfig '{0}' has invalid total weight '{1}'.", dropConfig.Id, total);
@@ -25,8 +25,6 @@ namespace SepCore.CustomUtility
float roll = Random.Range(0f, total);
if (roll < dropConfig.WhiteWeight) return Rarity.White;
roll -= dropConfig.WhiteWeight;
- if (roll < dropConfig.GreenWeight) return Rarity.Green;
- roll -= dropConfig.GreenWeight;
if (roll < dropConfig.BlueWeight) return Rarity.Blue;
roll -= dropConfig.BlueWeight;
if (roll < dropConfig.PurpleWeight) return Rarity.Purple;
diff --git a/Assets/GameMain/Scripts/Runtime/Utility/WeaponUtility.cs b/Assets/GameMain/Scripts/Runtime/Utility/WeaponUtility.cs
new file mode 100644
index 0000000..580099b
--- /dev/null
+++ b/Assets/GameMain/Scripts/Runtime/Utility/WeaponUtility.cs
@@ -0,0 +1,83 @@
+using SepCore.Definition;
+
+namespace SepCore.CustomUtility
+{
+ public static class WeaponUtility
+ {
+ public const int IdMultiplier = 1000;
+
+ ///
+ /// 根据武器种类与品质换算武器配置编号。
+ ///
+ public static int GetWeaponId(WeaponType weaponType, Rarity rarity = Rarity.White)
+ {
+ return (int)weaponType * IdMultiplier + (int)rarity;
+ }
+
+ ///
+ /// 根据武器编号反推武器种类。
+ ///
+ public static WeaponType GetWeaponType(int weaponId)
+ {
+ return (WeaponType)(weaponId / IdMultiplier);
+ }
+
+ ///
+ /// 根据武器编号反推武器品质。
+ ///
+ public static Rarity GetRarity(int weaponId)
+ {
+ return (Rarity)(weaponId % IdMultiplier);
+ }
+
+ ///
+ /// 获取指定种类与品质的武器配置。
+ ///
+ public static WeaponConfig GetWeaponConfig(WeaponType weaponType, Rarity rarity = Rarity.White)
+ {
+ return GameEntry.Luban.Get(GetWeaponId(weaponType, rarity));
+ }
+
+ ///
+ /// 获取指定武器编号的武器配置。
+ ///
+ public static WeaponConfig GetWeaponConfig(int weaponId)
+ {
+ return GameEntry.Luban.Get(weaponId);
+ }
+
+ ///
+ /// 获取同种武器的下一阶品质配置(用于武器合成升阶)。
+ /// 若已达到最高品质(Red)则返回 false。
+ ///
+ public static bool TryGetNextTierConfig(WeaponConfig current, out WeaponConfig nextTierConfig)
+ {
+ if (current.Rarity >= Rarity.Red)
+ {
+ nextTierConfig = null;
+ return false;
+ }
+
+ int nextId = (int)current.WeaponType * IdMultiplier + ((int)current.Rarity + 1);
+ nextTierConfig = GameEntry.Luban.Get(nextId);
+ return nextTierConfig != null;
+ }
+
+ ///
+ /// 计算同种武器的下一阶品质武器编号。
+ /// 若已达到最高品质(Red)则返回 false。
+ ///
+ public static bool TryGetNextTierWeaponId(int currentWeaponId, out int nextWeaponId)
+ {
+ Rarity rarity = GetRarity(currentWeaponId);
+ if (rarity >= Rarity.Red)
+ {
+ nextWeaponId = 0;
+ return false;
+ }
+
+ nextWeaponId = currentWeaponId + 1;
+ return true;
+ }
+ }
+}
diff --git a/Assets/GameMain/Scripts/Runtime/Utility/WeaponUtility.cs.meta b/Assets/GameMain/Scripts/Runtime/Utility/WeaponUtility.cs.meta
new file mode 100644
index 0000000..917437b
--- /dev/null
+++ b/Assets/GameMain/Scripts/Runtime/Utility/WeaponUtility.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fff1b5f2bd835a748b998750d7d03154
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/UI/UIForms/ItemTooltipForm.prefab b/Assets/GameMain/UI/UIForms/ItemTooltipForm.prefab
index ef9ee0d..d795029 100644
--- a/Assets/GameMain/UI/UIForms/ItemTooltipForm.prefab
+++ b/Assets/GameMain/UI/UIForms/ItemTooltipForm.prefab
@@ -9,9 +9,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 6368625289863409235}
- - component: {fileID: 4303509830935515119}
- component: {fileID: 2236042990348165862}
- component: {fileID: 139036983684137330}
+ - component: {fileID: 3908421189656031064}
m_Layer: 5
m_Name: ItemTooltipForm
m_TagString: Untagged
@@ -39,24 +39,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &4303509830935515119
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 395929355422612576}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 32469245f20597240a3c51d2cd1fb0c5, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- _view: {fileID: 139036983684137330}
- _autoResizeHeight: 1
- _fixedTopHeight: 180
- _fixedBottomHeight: 300
- _fixedWidth: 600
- _screenEdgePadding: 0
--- !u!114 &2236042990348165862
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -99,6 +81,24 @@ MonoBehaviour:
recycleButton: {fileID: 7966632555814587605}
textFormatText: {fileID: 6269556444878685483}
cancelButton: {fileID: 6053195524865570449}
+--- !u!114 &3908421189656031064
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 395929355422612576}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 7489a7d3442947647bee8612880a3f83, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ _view: {fileID: 139036983684137330}
+ _autoResizeHeight: 1
+ _fixedTopHeight: 150
+ _fixedBottomHeight: 400
+ _fixedWidth: 600
+ _screenEdgePadding: 64
--- !u!1 &625540161254782982
GameObject:
m_ObjectHideFlags: 0
@@ -295,7 +295,7 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- - m_Target: {fileID: 4303509830935515119}
+ - m_Target: {fileID: 0}
m_TargetAssemblyTypeName: SepCore.UI.UGuiForm, SepCore.Runtime
m_MethodName: PlayUISound
m_Mode: 3
@@ -311,7 +311,7 @@ MonoBehaviour:
_onPointerEnterAction:
m_PersistentCalls:
m_Calls:
- - m_Target: {fileID: 4303509830935515119}
+ - m_Target: {fileID: 0}
m_TargetAssemblyTypeName: SepCore.UI.UGuiForm, SepCore.Runtime
m_MethodName: PlayUISound
m_Mode: 3
@@ -598,7 +598,7 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- - m_Target: {fileID: 4303509830935515119}
+ - m_Target: {fileID: 0}
m_TargetAssemblyTypeName: SepCore.UI.UGuiForm, SepCore.Runtime
m_MethodName: PlayUISound
m_Mode: 3
@@ -614,7 +614,7 @@ MonoBehaviour:
_onPointerEnterAction:
m_PersistentCalls:
m_Calls:
- - m_Target: {fileID: 4303509830935515119}
+ - m_Target: {fileID: 0}
m_TargetAssemblyTypeName: UI.UGuiForm, Assembly-CSharp
m_MethodName: PlayUISound
m_Mode: 3
diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset
index 9e6ab81..3a01328 100644
--- a/ProjectSettings/EditorSettings.asset
+++ b/ProjectSettings/EditorSettings.asset
@@ -24,7 +24,7 @@ EditorSettings:
m_EnableEditorAsyncCPUTextureLoading: 0
m_AsyncShaderCompilation: 1
m_PrefabModeAllowAutoSave: 1
- m_EnterPlayModeOptionsEnabled: 1
+ m_EnterPlayModeOptionsEnabled: 0
m_EnterPlayModeOptions: 3
m_GameObjectNamingDigits: 1
m_GameObjectNamingScheme: 0
diff --git a/数据表/Datas/GoodsConfig_商品配置.xlsx b/数据表/Datas/GoodsConfig_商品配置.xlsx
index 211cf17..35f9ce3 100644
Binary files a/数据表/Datas/GoodsConfig_商品配置.xlsx and b/数据表/Datas/GoodsConfig_商品配置.xlsx differ
diff --git a/数据表/Datas/LevelDropConfig_关卡爆率配置.xlsx b/数据表/Datas/LevelDropConfig_关卡爆率配置.xlsx
index 420b85e..419fb67 100644
Binary files a/数据表/Datas/LevelDropConfig_关卡爆率配置.xlsx and b/数据表/Datas/LevelDropConfig_关卡爆率配置.xlsx differ
diff --git a/数据表/Datas/LevelUpRewardConfig_升级奖励配置.xlsx b/数据表/Datas/LevelUpRewardConfig_升级奖励配置.xlsx
index 81a7d7f..f8afb98 100644
Binary files a/数据表/Datas/LevelUpRewardConfig_升级奖励配置.xlsx and b/数据表/Datas/LevelUpRewardConfig_升级奖励配置.xlsx differ
diff --git a/数据表/Datas/PropConfig_道具配置.xlsx b/数据表/Datas/PropConfig_道具配置.xlsx
index af04576..68505c9 100644
Binary files a/数据表/Datas/PropConfig_道具配置.xlsx and b/数据表/Datas/PropConfig_道具配置.xlsx differ
diff --git a/数据表/Datas/WeaponConfig_武器配置.xlsx b/数据表/Datas/WeaponConfig_武器配置.xlsx
index 7b466dc..d9aca97 100644
Binary files a/数据表/Datas/WeaponConfig_武器配置.xlsx and b/数据表/Datas/WeaponConfig_武器配置.xlsx differ
diff --git a/数据表/Datas/WeaponTagConfig_武器标签效果配置.xlsx b/数据表/Datas/WeaponTagConfig_武器标签效果配置.xlsx
new file mode 100644
index 0000000..6ca4b35
Binary files /dev/null and b/数据表/Datas/WeaponTagConfig_武器标签效果配置.xlsx differ
diff --git a/数据表/Datas/__enums__.xlsx b/数据表/Datas/__enums__.xlsx
index dff0a2e..79ec092 100644
Binary files a/数据表/Datas/__enums__.xlsx and b/数据表/Datas/__enums__.xlsx differ
diff --git a/数据表/Datas/__tables__.xlsx b/数据表/Datas/__tables__.xlsx
index 3798150..ac37697 100644
Binary files a/数据表/Datas/__tables__.xlsx and b/数据表/Datas/__tables__.xlsx differ