181404010226 před 4 měsíci
rodič
revize
6c46b08afb

+ 24 - 24
assets/Scenes/GameLevel.scene

@@ -161,7 +161,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 360,
+      "x": 360.00000000000006,
       "y": 667,
       "z": 0
     },
@@ -370,7 +370,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1000,
+      "width": 1000.0000000000001,
       "height": 5
     },
     "_anchorPoint": {
@@ -737,7 +737,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 720,
+      "width": 720.0000000000001,
       "height": 1334
     },
     "_anchorPoint": {
@@ -849,7 +849,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
+      "x": -5.684341886080802e-14,
       "y": 0,
       "z": 0
     },
@@ -956,7 +956,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
+      "x": -5.684341886080802e-14,
       "y": 0,
       "z": 0
     },
@@ -13077,7 +13077,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -310,
+      "x": -310.00000000000006,
       "y": 577.3409999999999,
       "z": 0
     },
@@ -13135,7 +13135,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 360,
+      "x": 360.00000000000006,
       "y": 667,
       "z": 0
     },
@@ -13265,7 +13265,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 720,
+      "width": 720.0000000000001,
       "height": 1334
     },
     "_anchorPoint": {
@@ -20141,7 +20141,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0.14999999999997726,
+      "x": 0.1500000000000341,
       "y": -588.66,
       "z": 0
     },
@@ -20205,7 +20205,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -342.65,
+      "x": -342.6500000000001,
       "y": 0,
       "z": 0
     },
@@ -25593,7 +25593,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 705.3,
+      "width": 705.3000000000002,
       "height": 130
     },
     "_anchorPoint": {
@@ -28773,7 +28773,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -2.0430000000000064,
+      "x": -2.043000000000063,
       "y": 6.942,
       "z": 0
     },
@@ -29315,7 +29315,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 1,
+      "x": 0.9999999999999432,
       "y": -6,
       "z": 0
     },
@@ -31044,7 +31044,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 720,
+      "width": 720.0000000000001,
       "height": 1334
     },
     "_anchorPoint": {
@@ -31096,7 +31096,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 720,
+      "width": 720.0000000000001,
       "height": 1334
     },
     "_anchorPoint": {
@@ -31214,7 +31214,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -216,
+      "x": -216.00000000000003,
       "y": 138.5,
       "z": 0
     },
@@ -32746,7 +32746,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 216,
+      "x": 216.00000000000003,
       "y": 138.5,
       "z": 0
     },
@@ -33828,7 +33828,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 720,
+      "width": 720.0000000000001,
       "height": 469
     },
     "_anchorPoint": {
@@ -33970,7 +33970,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1000,
+      "width": 1000.0000000000001,
       "height": 5
     },
     "_anchorPoint": {
@@ -34344,7 +34344,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 1023.1699999999998,
+      "x": 1023.17,
       "y": 0,
       "z": 0
     },
@@ -34507,7 +34507,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 257.0000000000002,
+      "x": 257.00000000000034,
       "y": 175.274,
       "z": 0
     },
@@ -38375,7 +38375,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 609.0000000000005,
+      "width": 609.0000000000007,
       "height": 428
     },
     "_anchorPoint": {
@@ -38554,7 +38554,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 281.5,
+      "x": 281.50000000000006,
       "y": 485.124,
       "z": 0
     },
@@ -39665,7 +39665,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 720,
+      "width": 720.0000000000001,
       "height": 1334
     },
     "_anchorPoint": {

binární
assets/resources/data/excel/方块武器配置/方块武器配置表.xlsx


+ 1382 - 0
assets/resources/data/weapons.json.backup

@@ -0,0 +1,1382 @@
+{
+  "weapons": [
+    {
+      "id": "pea_shooter",
+      "name": "毛豆射手",
+      "type": "single_shot",
+      "weight": 30,
+      "stats": {
+        "damage": 10,
+        "fireRate": 10.0,
+        "range": 450,
+        "bulletSpeed": 30
+      },
+      "bulletConfig": {
+        "count": {
+          "type": "single",
+          "amount": 1,
+          "spreadAngle": 0,
+          "burstCount": 1,
+          "burstDelay": 0
+        },
+        "trajectory": {
+          "type": "straight",
+          "speed": 200,
+          "gravity": 0,
+          "arcHeight": 0,
+          "homingStrength": 0,
+          "homingDelay": 0
+        },
+        "hitEffects": [
+          {
+            "type": "normal_damage",
+            "priority": 1,
+            "damage": 10
+          }
+        ],
+        "lifecycle": {
+          "type": "hit_destroy",
+          "maxLifetime": 5.0,
+          "penetration": 1,
+          "ricochetCount": 0,
+          "returnToOrigin": false
+        },
+        "visual": {
+          "bulletImages": "images/PlantsSprite/010",
+          "hitEffect": "Animation/WeaponTx/tx0002/tx0002",
+          "trailEffect": true
+        }
+      },
+      "visualConfig": {
+        "weaponSprites": "images/PlantsSprite/001-1",
+        "attackSound": "data/弹球音效/bean atk"
+      },
+      "upgradeConfig": {
+        "maxLevel": 10,
+        "levels": {
+          "1": {
+            "cost": 100,
+            "damage": 10
+          },
+          "2": {
+            "cost": 150,
+            "damage": 11
+          },
+          "3": {
+            "cost": 200,
+            "damage": 12
+          },
+          "4": {
+            "cost": 250,
+            "damage": 13
+          },
+          "5": {
+            "cost": 300,
+            "damage": 14
+          },
+          "6": {
+            "cost": 350,
+            "damage": 15
+          },
+          "7": {
+            "cost": 400,
+            "damage": 16
+          },
+          "8": {
+            "cost": 450,
+            "damage": 17
+          },
+          "9": {
+            "cost": 500,
+            "damage": 18
+          },
+          "10": {
+            "cost": 550,
+            "damage": 19
+          }
+        }
+      },
+      "inGameCostConfig": {
+        "baseCost": 5,
+        "shapeCosts": {
+          "I": 10,
+          "H-I": 10,
+          "L": 15,
+          "S": 20,
+          "D-T": 20,
+          "L2": 25,
+          "L3": 25,
+          "L4": 25,
+          "F-S": 25,
+          "T": 25
+        }
+      }
+    },
+    {
+      "id": "sharp_carrot",
+      "name": "尖胡萝卜",
+      "type": "piercing",
+      "weight": 25,
+      "stats": {
+        "damage": 8,
+        "fireRate": 10.0,
+        "range": 400,
+        "bulletSpeed": 20
+      },
+      "bulletConfig": {
+        "count": {
+          "type": "single",
+          "amount": 1,
+          "spreadAngle": 0,
+          "burstCount": 1,
+          "burstDelay": 0
+        },
+        "trajectory": {
+          "type": "straight",
+          "speed": 200,
+          "gravity": 0,
+          "arcHeight": 0,
+          "homingStrength": 0,
+          "homingDelay": 0
+        },
+        "hitEffects": [
+          {
+            "type": "pierce_damage",
+            "priority": 1,
+            "damage": 8,
+            "pierceCount": 999
+          }
+        ],
+        "lifecycle": {
+          "type": "range_limit",
+          "maxLifetime": 5.0,
+          "penetration": 999,
+          "ricochetCount": 0,
+          "returnToOrigin": false,
+          "maxRange": 800
+        },
+        "visual": {
+          "bulletImages": "images/PlantsSprite/002",
+          "hitEffect": "Animation/WeaponTx/tx0002/tx0002",
+          "trailEffect": "Animation/WeaponTx/tx0001/tx0001"
+        }
+      },
+      "visualConfig": {
+        "weaponSprites": "images/PlantsSprite/002",
+        "attackSound": "data/弹球音效/cawl"
+      },
+      "upgradeConfig": {
+        "maxLevel": 10,
+        "levels": {
+          "1": {
+            "cost": 120,
+            "damage": 8
+          },
+          "2": {
+            "cost": 180,
+            "damage": 9
+          },
+          "3": {
+            "cost": 240,
+            "damage": 10
+          },
+          "4": {
+            "cost": 300,
+            "damage": 11
+          },
+          "5": {
+            "cost": 360,
+            "damage": 12
+          },
+          "6": {
+            "cost": 420,
+            "damage": 13
+          },
+          "7": {
+            "cost": 480,
+            "damage": 14
+          },
+          "8": {
+            "cost": 540,
+            "damage": 15
+          },
+          "9": {
+            "cost": 600,
+            "damage": 16
+          },
+          "10": {
+            "cost": 660,
+            "damage": 17
+          }
+        }
+      },
+      "inGameCostConfig": {
+        "baseCost": 6,
+        "shapeCosts": {
+          "I": 12,
+          "H-I": 12,
+          "L": 18,
+          "S": 24,
+          "D-T": 24,
+          "L2": 26,
+          "L3": 26,
+          "L4": 26,
+          "F-S": 26,
+          "T": 26
+        }
+      }
+    },
+    {
+      "id": "saw_grass",
+      "name": "锯齿草",
+      "type": "ricochet_piercing",
+      "weight": 20,
+      "stats": {
+        "damage": 8,
+        "fireRate": 10.0,
+        "range": 350,
+        "bulletSpeed": 30
+      },
+      "bulletConfig": {
+        "count": {
+          "type": "single",
+          "amount": 1,
+          "spreadAngle": 0,
+          "burstCount": 1,
+          "burstDelay": 0
+        },
+        "trajectory": {
+          "type": "straight",
+          "speed": 200,
+          "gravity": 0,
+          "arcHeight": 0,
+          "homingStrength": 0,
+          "homingDelay": 0
+        },
+        "hitEffects": [
+          {
+            "type": "ricochet_damage",
+            "priority": 1,
+            "damage": 8,
+            "ricochetCount": 2,
+            "ricochetAngle": 45
+          },
+          {
+            "type": "pierce_damage",
+            "priority": 2,
+            "damage": 8,
+            "pierceCount": 3
+          }
+        ],
+        "lifecycle": {
+          "type": "ricochet_counter",
+          "maxLifetime": 8.0,
+          "penetration": 3,
+          "ricochetCount": 3,
+          "returnToOrigin": false
+        },
+        "visual": {
+          "bulletImages": "images/PlantsSprite/003",
+          "hitEffect": "Animation/WeaponTx/tx0002/tx0002",
+          "trailEffect": true
+        }
+      },
+      "visualConfig": {
+        "weaponSprites": "images/PlantsSprite/003",
+        "attackSound": "data/弹球音效/juchi atk"
+      },
+      "upgradeConfig": {
+        "maxLevel": 10,
+        "levels": {
+          "1": {
+            "cost": 120,
+            "damage": 8
+          },
+          "2": {
+            "cost": 180,
+            "damage": 9
+          },
+          "3": {
+            "cost": 240,
+            "damage": 10
+          },
+          "4": {
+            "cost": 300,
+            "damage": 11
+          },
+          "5": {
+            "cost": 360,
+            "damage": 12
+          },
+          "6": {
+            "cost": 420,
+            "damage": 13
+          },
+          "7": {
+            "cost": 480,
+            "damage": 14
+          },
+          "8": {
+            "cost": 540,
+            "damage": 15
+          },
+          "9": {
+            "cost": 600,
+            "damage": 16
+          },
+          "10": {
+            "cost": 660,
+            "damage": 17
+          }
+        }
+      },
+      "inGameCostConfig": {
+        "baseCost": 6,
+        "shapeCosts": {
+          "I": 12,
+          "H-I": 12,
+          "L": 18,
+          "S": 24,
+          "D-T": 24,
+          "L2": 27,
+          "L3": 27,
+          "L4": 27,
+          "F-S": 27,
+          "T": 27
+        }
+      }
+    },
+    {
+      "id": "watermelon_bomb",
+      "name": "西瓜炸弹",
+      "type": "explosive",
+      "weight": 15,
+      "stats": {
+        "damage": 15,
+        "fireRate": 10.0,
+        "range": 500,
+        "bulletSpeed": 20
+      },
+      "bulletConfig": {
+        "count": {
+          "type": "single",
+          "amount": 1,
+          "spreadAngle": 0,
+          "burstCount": 1,
+          "burstDelay": 0
+        },
+        "trajectory": {
+          "type": "arc",
+          "speed": 200,
+          "gravity": 0,
+          "arcHeight": 0,
+          "homingStrength": 0,
+          "homingDelay": 0
+        },
+        "hitEffects": [
+          {
+            "type": "explosion",
+            "priority": 1,
+            "damage": 35,
+            "radius": 100,
+            "delay": 0.1
+          }
+        ],
+        "lifecycle": {
+          "type": "ground_impact",
+          "maxLifetime": 5.0,
+          "penetration": 1,
+          "ricochetCount": 0,
+          "returnToOrigin": false
+        },
+        "visual": {
+          "bulletImages": "images/PlantsSprite/007",
+          "hitEffect": "Animation/WeaponTx/tx0007/tx0007",
+          "trailEffect": true,
+          "explosionEffect": "Animation/WeaponTx/tx0007/tx0007"
+        }
+      },
+      "visualConfig": {
+        "weaponSprites": "images/PlantsSprite/007",
+        "attackSound": "data/弹球音效/bomb"
+      },
+      "upgradeConfig": {
+        "maxLevel": 10,
+        "levels": {
+          "1": {
+            "cost": 150,
+            "damage": 15
+          },
+          "2": {
+            "cost": 225,
+            "damage": 17
+          },
+          "3": {
+            "cost": 300,
+            "damage": 19
+          },
+          "4": {
+            "cost": 375,
+            "damage": 21
+          },
+          "5": {
+            "cost": 450,
+            "damage": 23
+          },
+          "6": {
+            "cost": 525,
+            "damage": 25
+          },
+          "7": {
+            "cost": 600,
+            "damage": 27
+          },
+          "8": {
+            "cost": 675,
+            "damage": 29
+          },
+          "9": {
+            "cost": 750,
+            "damage": 31
+          },
+          "10": {
+            "cost": 825,
+            "damage": 33
+          }
+        }
+      },
+      "inGameCostConfig": {
+        "baseCost": 10,
+        "shapeCosts": {
+          "I": 20,
+          "H-I": 20,
+          "L": 30,
+          "S": 40,
+          "D-T": 40,
+          "L2": 28,
+          "L3": 28,
+          "L4": 28,
+          "F-S": 28,
+          "T": 28
+        }
+      }
+    },
+    {
+      "id": "boomerang_plant",
+      "name": "回旋镖盆栽",
+      "type": "boomerang",
+      "weight": 18,
+      "stats": {
+        "damage": 10,
+        "fireRate": 10.0,
+        "range": 300,
+        "bulletSpeed": 20
+      },
+      "bulletConfig": {
+        "count": {
+          "type": "single",
+          "amount": 1,
+          "spreadAngle": 0,
+          "burstCount": 1,
+          "burstDelay": 0
+        },
+        "trajectory": {
+          "type": "homing",
+          "speed": 15,
+          "gravity": 0,
+          "homingStrength": 0.5,
+          "homingDelay": 0.3
+        },
+        "hitEffects": [
+          {
+            "type": "pierce_damage",
+            "priority": 1,
+            "damage": 10,
+            "pierceCount": 999
+          }
+        ],
+        "lifecycle": {
+          "type": "return_trip",
+          "maxLifetime": 10.0,
+          "penetration": 999,
+          "ricochetCount": 0,
+          "returnToOrigin": true,
+          "returnDelay": 2.0
+        },
+        "visual": {
+          "bulletImages": "images/PlantsSprite/004",
+          "hitEffect": "Animation/WeaponTx/tx0002/tx0002",
+          "trailEffect": true
+        }
+      },
+      "visualConfig": {
+        "weaponSprites": "images/PlantsSprite/004",
+        "attackSound": "data/弹球音效/huixuanbiao atk"
+      },
+      "upgradeConfig": {
+        "maxLevel": 10,
+        "levels": {
+          "1": {
+            "cost": 120,
+            "damage": 10
+          },
+          "2": {
+            "cost": 180,
+            "damage": 11
+          },
+          "3": {
+            "cost": 240,
+            "damage": 12
+          },
+          "4": {
+            "cost": 300,
+            "damage": 13
+          },
+          "5": {
+            "cost": 360,
+            "damage": 14
+          },
+          "6": {
+            "cost": 420,
+            "damage": 15
+          },
+          "7": {
+            "cost": 480,
+            "damage": 16
+          },
+          "8": {
+            "cost": 540,
+            "damage": 17
+          },
+          "9": {
+            "cost": 600,
+            "damage": 18
+          },
+          "10": {
+            "cost": 660,
+            "damage": 19
+          }
+        }
+      },
+      "inGameCostConfig": {
+        "baseCost": 6,
+        "shapeCosts": {
+          "I": 12,
+          "H-I": 12,
+          "L": 18,
+          "S": 24,
+          "D-T": 24,
+          "L2": 29,
+          "L3": 29,
+          "L4": 29,
+          "F-S": 29,
+          "T": 29
+        }
+      }
+    },
+    {
+      "id": "hot_pepper",
+      "name": "炙热辣椒",
+      "type": "area_burn",
+      "weight": 12,
+      "stats": {
+        "damage": 15,
+        "fireRate": 10.0,
+        "range": 500,
+        "bulletSpeed": 20
+      },
+      "bulletConfig": {
+        "count": {
+          "type": "single",
+          "amount": 1,
+          "spreadAngle": 0,
+          "burstCount": 1,
+          "burstDelay": 0
+        },
+        "trajectory": {
+          "type": "straight",
+          "speed": 200,
+          "gravity": 0,
+          "arcHeight": 0,
+          "homingStrength": 0,
+          "homingDelay": 0
+        },
+        "hitEffects": [
+          {
+            "type": "normal_damage",
+            "priority": 1,
+            "damage": 15
+          },
+          {
+            "type": "ground_burn",
+            "priority": 2,
+            "damage": 5,
+            "duration": 3.0,
+            "tickInterval": 0.5
+          }
+        ],
+        "lifecycle": {
+          "type": "hit_destroy",
+          "maxLifetime": 5.0,
+          "penetration": 1,
+          "ricochetCount": 0,
+          "returnToOrigin": false
+        },
+        "visual": {
+          "bulletImages": "images/PlantsSprite/005",
+          "hitEffect": "Animation/WeaponTx/tx0002/tx0002",
+          "trailEffect": true,
+          "burnEffect": "Animation/WeaponBurnAni/燃烧/ui_zhuling"
+        }
+      },
+      "visualConfig": {
+        "weaponSprites": "images/PlantsSprite/005",
+        "attackSound": "data/弹球音效/fire"
+      },
+      "upgradeConfig": {
+        "maxLevel": 10,
+        "levels": {
+          "1": {
+            "cost": 150,
+            "damage": 10
+          },
+          "2": {
+            "cost": 225,
+            "damage": 11
+          },
+          "3": {
+            "cost": 300,
+            "damage": 12
+          },
+          "4": {
+            "cost": 375,
+            "damage": 13
+          },
+          "5": {
+            "cost": 450,
+            "damage": 14
+          },
+          "6": {
+            "cost": 525,
+            "damage": 15
+          },
+          "7": {
+            "cost": 600,
+            "damage": 16
+          },
+          "8": {
+            "cost": 675,
+            "damage": 17
+          },
+          "9": {
+            "cost": 750,
+            "damage": 18
+          },
+          "10": {
+            "cost": 825,
+            "damage": 19
+          }
+        }
+      },
+      "inGameCostConfig": {
+        "baseCost": 10,
+        "shapeCosts": {
+          "I": 20,
+          "H-I": 20,
+          "L": 30,
+          "S": 40,
+          "D-T": 40,
+          "L2": 30,
+          "L3": 30,
+          "L4": 30,
+          "F-S": 30,
+          "T": 30
+        }
+      }
+    },
+    {
+      "id": "cactus_shotgun",
+      "name": "仙人散弹",
+      "type": "shotgun",
+      "weight": 22,
+      "stats": {
+        "damage": 6,
+        "fireRate": 10.0,
+        "range": 500,
+        "bulletSpeed": 30
+      },
+      "bulletConfig": {
+        "count": {
+          "type": "spread",
+          "amount": 5,
+          "spreadAngle": 30,
+          "burstCount": 1,
+          "burstDelay": 0
+        },
+        "trajectory": {
+          "type": "straight",
+          "speed": 200,
+          "gravity": 0,
+          "arcHeight": 0,
+          "homingStrength": 0,
+          "homingDelay": 0
+        },
+        "hitEffects": [
+          {
+            "type": "normal_damage",
+            "priority": 1,
+            "damage": 6
+          }
+        ],
+        "lifecycle": {
+          "type": "range_limit",
+          "maxLifetime": 5.0,
+          "penetration": 1,
+          "ricochetCount": 0,
+          "returnToOrigin": false,
+          "maxRange": 1000
+        },
+        "visual": {
+          "bulletImages": "images/PlantsSprite/008",
+          "hitEffect": "Animation/WeaponTx/tx0002/tx0002",
+          "trailEffect": true
+        }
+      },
+      "visualConfig": {
+        "weaponSprites": "images/PlantsSprite/008",
+        "attackSound": "data/弹球音效/xianrenzhang hit"
+      },
+      "upgradeConfig": {
+        "maxLevel": 10,
+        "levels": {
+          "1": {
+            "cost": 150,
+            "damage": 5
+          },
+          "2": {
+            "cost": 225,
+            "damage": 6
+          },
+          "3": {
+            "cost": 300,
+            "damage": 7
+          },
+          "4": {
+            "cost": 375,
+            "damage": 8
+          },
+          "5": {
+            "cost": 450,
+            "damage": 9
+          },
+          "6": {
+            "cost": 525,
+            "damage": 10
+          },
+          "7": {
+            "cost": 600,
+            "damage": 11
+          },
+          "8": {
+            "cost": 675,
+            "damage": 12
+          },
+          "9": {
+            "cost": 750,
+            "damage": 13
+          },
+          "10": {
+            "cost": 825,
+            "damage": 14
+          }
+        }
+      },
+      "inGameCostConfig": {
+        "baseCost": 10,
+        "shapeCosts": {
+          "I": 20,
+          "H-I": 20,
+          "L": 30,
+          "S": 40,
+          "D-T": 40,
+          "L2": 31,
+          "L3": 31,
+          "L4": 31,
+          "F-S": 31,
+          "T": 31
+        }
+      }
+    },
+    {
+      "id": "okra_missile",
+      "name": "秋葵导弹",
+      "type": "homing_missile",
+      "weight": 8,
+      "stats": {
+        "damage": 20,
+        "fireRate": 10.0,
+        "range": 500,
+        "bulletSpeed": 15
+      },
+      "bulletConfig": {
+        "count": {
+          "type": "single",
+          "amount": 1,
+          "spreadAngle": 0,
+          "burstCount": 1,
+          "burstDelay": 0
+        },
+        "trajectory": {
+          "type": "homing",
+          "speed": 20,
+          "gravity": 0.2,
+          "arcHeight": 100,
+          "homingStrength": 0.8,
+          "homingDelay": 0.3
+        },
+        "hitEffects": [
+          {
+            "type": "explosion",
+            "priority": 1,
+            "damage": 20,
+            "radius": 150,
+            "delay": 0
+          }
+        ],
+        "lifecycle": {
+          "type": "target_impact",
+          "maxLifetime": 5.0,
+          "penetration": 1,
+          "ricochetCount": 0,
+          "returnToOrigin": false
+        },
+        "visual": {
+          "bulletImages": "images/PlantsSprite/006",
+          "hitEffect": "Animation/WeaponTx/tx0002/tx0002",
+          "trailEffect": true,
+          "explosionEffect": "Animation/WeaponTx/tx0007/tx0007"
+        }
+      },
+      "visualConfig": {
+        "weaponSprites": "images/PlantsSprite/006",
+        "attackSound": "data/弹球音效/qiukui hit"
+      },
+      "upgradeConfig": {
+        "maxLevel": 10,
+        "levels": {
+          "1": {
+            "cost": 200,
+            "damage": 20
+          },
+          "2": {
+            "cost": 300,
+            "damage": 22
+          },
+          "3": {
+            "cost": 400,
+            "damage": 24
+          },
+          "4": {
+            "cost": 500,
+            "damage": 26
+          },
+          "5": {
+            "cost": 600,
+            "damage": 28
+          },
+          "6": {
+            "cost": 700,
+            "damage": 30
+          },
+          "7": {
+            "cost": 800,
+            "damage": 32
+          },
+          "8": {
+            "cost": 900,
+            "damage": 34
+          },
+          "9": {
+            "cost": 1000,
+            "damage": 36
+          },
+          "10": {
+            "cost": 1100,
+            "damage": 38
+          }
+        }
+      },
+      "inGameCostConfig": {
+        "baseCost": 15,
+        "shapeCosts": {
+          "I": 30,
+          "H-I": 30,
+          "L": 45,
+          "S": 60,
+          "D-T": 60,
+          "L2": 32,
+          "L3": 32,
+          "L4": 32,
+          "F-S": 32,
+          "T": 32
+        }
+      }
+    },
+    {
+      "id": "mace_club",
+      "name": "狼牙棒",
+      "type": "melee",
+      "weight": 20,
+      "stats": {
+        "damage": 25,
+        "fireRate": 8.0,
+        "range": 400,
+        "bulletSpeed": 35
+      },
+      "bulletConfig": {
+        "count": {
+          "type": "single",
+          "amount": 1,
+          "spreadAngle": 0,
+          "burstCount": 1,
+          "burstDelay": 0
+        },
+        "trajectory": {
+          "type": "straight",
+          "speed": 250,
+          "gravity": 0,
+          "arcHeight": 0,
+          "homingStrength": 0,
+          "homingDelay": 0
+        },
+        "hitEffects": [
+          {
+            "type": "normal_damage",
+            "priority": 1,
+            "damage": 25
+          },
+          {
+            "type": "knockback",
+            "priority": 2,
+            "force": 150
+          }
+        ],
+        "lifecycle": {
+          "type": "range_limit",
+          "maxLifetime": 3.0,
+          "penetration": 2,
+          "ricochetCount": 0,
+          "returnToOrigin": false,
+          "maxRange": 200
+        },
+        "visual": {
+          "bulletImages": "images/PlantsSprite/009",
+          "hitEffect": "Animation/WeaponTx/tx0002/tx0002",
+          "trailEffect": true
+        }
+      },
+      "visualConfig": {
+        "weaponSprites": "images/PlantsSprite/009",
+        "attackSound": "data/弹球音效/mace_club_hit"
+      },
+      "upgradeConfig": {
+        "maxLevel": 10,
+        "levels": {
+          "1": {
+            "cost": 140,
+            "damage": 25
+          },
+          "2": {
+            "cost": 210,
+            "damage": 28
+          },
+          "3": {
+            "cost": 280,
+            "damage": 31
+          },
+          "4": {
+            "cost": 350,
+            "damage": 34
+          },
+          "5": {
+            "cost": 420,
+            "damage": 37
+          },
+          "6": {
+            "cost": 490,
+            "damage": 40
+          },
+          "7": {
+            "cost": 560,
+            "damage": 43
+          },
+          "8": {
+            "cost": 630,
+            "damage": 46
+          },
+          "9": {
+            "cost": 700,
+            "damage": 49
+          },
+          "10": {
+            "cost": 770,
+            "damage": 52
+          }
+        }
+      },
+      "inGameCostConfig": {
+        "baseCost": 8,
+        "shapeCosts": {
+          "I": 16,
+          "H-I": 16,
+          "L": 24,
+          "S": 32,
+          "D-T": 32,
+          "L2": 33,
+          "L3": 33,
+          "L4": 33,
+          "F-S": 33,
+          "T": 33
+        }
+      }
+    }
+  ],
+  "blockSizes": [
+    {
+      "id": "I",
+      "name": "I形",
+      "shape": [
+        [
+          1,
+          0,
+          0,
+          0
+        ],
+        [
+          1,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 2,
+      "costMultiplier": 2,
+      "description": "最简单的直线形状"
+    },
+    {
+      "id": "H-I",
+      "name": "横I形",
+      "shape": [
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          1,
+          1,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 2,
+      "costMultiplier": 2,
+      "description": "水平直线形状"
+    },
+    {
+      "id": "L",
+      "name": "L形",
+      "shape": [
+        [
+          1,
+          0,
+          0,
+          0
+        ],
+        [
+          1,
+          1,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 3,
+      "costMultiplier": 3,
+      "description": "L型左上转角形状"
+    },
+    {
+      "id": "S",
+      "name": "S形",
+      "shape": [
+        [
+          0,
+          1,
+          1,
+          0
+        ],
+        [
+          1,
+          1,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 4,
+      "costMultiplier": 4,
+      "description": "S型曲线形状"
+    },
+    {
+      "id": "D-T",
+      "name": "倒T形",
+      "shape": [
+        [
+          0,
+          1,
+          0,
+          0
+        ],
+        [
+          1,
+          1,
+          1,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 4,
+      "costMultiplier": 4,
+      "description": "倒T型形状"
+    },
+    {
+      "id": "L2",
+      "name": "L2形",
+      "shape": [
+        [
+          1,
+          1,
+          0,
+          0
+        ],
+        [
+          0,
+          1,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 3,
+      "costMultiplier": 3,
+      "description": "L2型右上转角形状"
+    },
+    {
+      "id": "L3",
+      "name": "L3形",
+      "shape": [
+        [
+          1,
+          0,
+          0,
+          0
+        ],
+        [
+          1,
+          1,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 3,
+      "costMultiplier": 3,
+      "description": "L3型左下转角形状"
+    },
+    {
+      "id": "L4",
+      "name": "L4形",
+      "shape": [
+        [
+          0,
+          1,
+          0,
+          0
+        ],
+        [
+          1,
+          1,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 3,
+      "costMultiplier": 3,
+      "description": "L4型右下转角形状"
+    },
+    {
+      "id": "S-F",
+      "name": "S-F形",
+      "shape": [
+        [
+          1,
+          1,
+          0,
+          0
+        ],
+        [
+          0,
+          1,
+          1,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 4,
+      "costMultiplier": 4,
+      "description": "S型旋转镜像形状"
+    },
+    {
+      "id": "T",
+      "name": "T形",
+      "shape": [
+        [
+          1,
+          1,
+          1,
+          0
+        ],
+        [
+          0,
+          1,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ],
+        [
+          0,
+          0,
+          0,
+          0
+        ]
+      ],
+      "gridCount": 4,
+      "costMultiplier": 4,
+      "description": "T型形状"
+    }
+  ],
+  "rarityWeights": {
+    "common": 60,
+    "uncommon": 25,
+    "rare": 12,
+    "epic": 3
+  }
+}

+ 12 - 0
assets/resources/data/weapons.json.backup.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.0.0",
+  "importer": "*",
+  "imported": true,
+  "uuid": "90353f4b-69b0-402d-9b8a-5ba8f34768c3",
+  "files": [
+    ".backup",
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 38 - 50
assets/scripts/CombatSystem/BlockManager.ts

@@ -677,17 +677,6 @@ export class BlockManager extends Component {
             this.blockLocations.set(block, `block${i + 1}`);
             this.blocks.push(block);
             
-            // 处理价格显示
-            if (priceNodes[i]) {
-                this.blockPriceMap.set(block, priceNodes[i]);
-                priceNodes[i].active = true;
-                
-                // 根据武器配置和方块形状设置价格
-                this.setBlockPriceByWeaponConfig(block, priceNodes[i]);
-            } else {
-                console.warn(`Block${i + 1}容器下找不到Price节点`);
-            }
-            
             // 关联Block容器与方块(替代原来的dbNode关联)
             this.associateBlockContainerWithBlock(block, blockContainers[i]);
             
@@ -701,6 +690,17 @@ export class BlockManager extends Component {
             // 设置BlockInfo组件信息,传入容器位置信息
             this.setupBlockInfo(block, weaponConfig, targetShapeId, blockLocation);
             
+            // 处理价格显示 - 在BlockInfo设置完成后调用,确保能正确读取shapePrice
+            if (priceNodes[i]) {
+                this.blockPriceMap.set(block, priceNodes[i]);
+                priceNodes[i].active = true;
+                
+                // 根据武器配置和方块形状设置价格
+                this.setBlockPriceByWeaponConfig(block, priceNodes[i]);
+            } else {
+                console.warn(`Block${i + 1}容器下找不到Price节点`);
+            }
+            
             // 为新生成的方块添加标签
             BlockTag.addTag(block);
             console.log(`[BlockManager] 为方块 ${block.name} 添加标签,UUID: ${block.uuid}`);
@@ -1406,7 +1406,7 @@ export class BlockManager extends Component {
         let basePrice: number;
         switch (rarity) {
             case 'common':
-                basePrice = 10;
+                basePrice = 0;
                 break;
             case 'uncommon':
                 basePrice = 20;
@@ -1419,7 +1419,7 @@ export class BlockManager extends Component {
                 break;
 
             default:
-                basePrice = 20;
+                basePrice = 0;
         }
         
         // 应用便宜技能效果
@@ -1440,36 +1440,17 @@ export class BlockManager extends Component {
             return;
         }
 
-        // 获取方块的武器配置
-        const weaponConfig = this.getBlockWeaponConfig(block);
-        if (!weaponConfig) {
-            // 如果没有武器配置,使用原有的稀有度定价方式
-            this.setBlockPriceByRarity(priceNode, 'common');
-            return;
-        }
-
-        // 获取方块形状
-        const shapeId = this.getBlockShape(block);
-        if (!shapeId) {
-            // 如果无法获取形状,使用基础价格
-            this.setBlockPriceByRarity(priceNode, weaponConfig.rarity || 'common');
-            return;
-        }
-
-        // 从武器配置中获取局内金币花费配置
-        const inGameCostConfig = weaponConfig.inGameCostConfig;
-        if (!inGameCostConfig) {
-            // 如果没有局内金币配置,使用原有的稀有度定价方式
-            this.setBlockPriceByRarity(priceNode, weaponConfig.rarity || 'common');
+        // 从Node子节点获取BlockInfo组件(新预制体结构)
+        const nodeChild = block.getChildByName('Node');
+        const blockInfo = nodeChild ? nodeChild.getComponent(BlockInfo) : null;
+        
+        if (!blockInfo) {
+            label.string = "10";
             return;
         }
-
-        // 根据形状获取价格
-        let basePrice = inGameCostConfig.shapeCosts[shapeId];
-        if (basePrice === undefined) {
-            // 如果没有找到对应形状的价格,使用基础价格
-            basePrice = inGameCostConfig.baseCost * this.getBlockGridCount(block);
-        }
+        
+        // 直接使用BlockInfo的shapePrice,如果为0则使用默认价格10
+        let basePrice = blockInfo.shapePrice > 0 ? blockInfo.shapePrice : 10;
 
         // 应用便宜技能效果
         const skillManager = SkillManager.getInstance();
@@ -1483,10 +1464,7 @@ export class BlockManager extends Component {
     }
 
     // 计算方块占用的格子数量
-    private getBlockGridCount(block: Node): number {
-        const parts = this.getBlockParts(block);
-        return parts.length;
-    }
+
     
     // 设置方块的武器外观
     private setupBlockWeaponVisual(block: Node, weaponConfig: WeaponConfig, targetShapeId?: string) {
@@ -1525,9 +1503,6 @@ export class BlockManager extends Component {
         blockInfo.blockName = weaponConfig.name || block.name;
         blockInfo.blockId = weaponConfig.id || weaponConfig.name;
         
-        // 设置武器配置
-        blockInfo.setWeaponConfig(weaponConfig);
-        
         // 设置稀有度
         const rarityMap = { 'common': 0, 'uncommon': 1, 'rare': 2, 'epic': 3 };
         blockInfo.rarity = rarityMap[weaponConfig.rarity] || 0;
@@ -1547,6 +1522,9 @@ export class BlockManager extends Component {
             }
         }
         
+        // 设置武器配置(在形状ID设置之后,这样可以正确计算形状价格)
+        blockInfo.setWeaponConfig(weaponConfig);
+        
         // 设置位置信息
         blockInfo.currentLocation = blockLocation || 'kuang';
         blockInfo.gridPosition = new cc.Vec2(-1, -1);
@@ -2065,28 +2043,37 @@ export class BlockManager extends Component {
         if (!weaponConfig) return null;
         
         // 从方块结构推断形状
-        return this.inferBlockShapeFromStructure(block);
+        const shapeInfo = this.getBlockShapeInfo(block);
+        return shapeInfo ? shapeInfo.id : 'I';
     }
     
     // 获取方块的详细形状信息(包括形状ID和名称)
     public getBlockShapeInfo(block: Node): { id: string, name: string, shape: number[][] } | null {
         const actualShape = this.extractShapeFromBlock(block);
+        console.log(`[BlockManager] 提取的实际形状矩阵:`, actualShape);
         
         let blockShapes = null;
         
         // 优先使用预加载的配置
         if (this.isWeaponsConfigPreloaded && this.preloadedWeaponsConfig) {
             blockShapes = this.preloadedWeaponsConfig.blockSizes;
+            console.log(`[BlockManager] 使用预加载配置,形状数量: ${blockShapes ? blockShapes.length : 0}`);
         } else {
             // 回退到ConfigManager
             blockShapes = this.configManager.getBlockShapes();
+            console.log(`[BlockManager] 使用ConfigManager,形状数量: ${blockShapes ? blockShapes.length : 0}`);
         }
         
-        if (!blockShapes) return null;
+        if (!blockShapes) {
+            console.log(`[BlockManager] 警告:无法获取形状配置`);
+            return null;
+        }
         
         // 寻找匹配的形状配置
         for (const shapeConfig of blockShapes) {
+            console.log(`[BlockManager] 比较形状 ${shapeConfig.id}:`, shapeConfig.shape);
             if (this.compareShapeMatrices(actualShape, shapeConfig.shape)) {
+                console.log(`[BlockManager] 找到匹配形状: ${shapeConfig.id}`);
                 return {
                     id: shapeConfig.id,
                     name: shapeConfig.name,
@@ -2095,6 +2082,7 @@ export class BlockManager extends Component {
             }
         }
         
+        console.log(`[BlockManager] 警告:未找到匹配的形状,使用默认形状 I`);
         return null;
     }
 

+ 14 - 1
assets/scripts/CombatSystem/BlockSelection/BlockInfo.ts

@@ -87,10 +87,18 @@ export class BlockInfo extends Component {
     // 形状相关
     @property({
         displayName: '形状ID',
-        tooltip: '方块的形状标识符'
+        tooltip: '方块的形状标识符',
+        readonly: true
     })
     public shapeId: string = '';
     
+    @property({
+        displayName: '形状价格',
+        tooltip: '从武器配置中读取的形状对应价格',
+        readonly: true
+    })
+    public shapePrice: number = 0;
+    
     @property({
         displayName: '形状大小',
         tooltip: '方块形状的尺寸(宽x高)'
@@ -190,6 +198,11 @@ export class BlockInfo extends Component {
                 const rarityMap = { 'common': 0, 'uncommon': 1, 'rare': 2, 'epic': 3 };
                 this.rarity = rarityMap[config.rarity] || 0;
             }
+            
+            // 设置形状价格
+            if (config.inGameCostConfig && config.inGameCostConfig.shapeCosts && this.shapeId) {
+                this.shapePrice = config.inGameCostConfig.shapeCosts[this.shapeId] || 0;
+            }
         }
     }
     

+ 3 - 0
assets/scripts/FourUI/NavBarController.ts

@@ -169,6 +169,9 @@ export class NavBarController extends Component {
         // 实际映射: Battle->Main(0), Shop->Upgrade(2), Upgrade->Shop(1), Skill->Skill(3)
         const buttonToPanelMap = [0, 2, 1, 3]; // Battle->Main(0), Shop->Upgrade(2), Upgrade->Shop(1), Skill->Skill(3)
         
+        // 触发UI面板切换事件,通知MenuController更新MenueButton显示状态
+        EventBus.getInstance().emit(GameEvents.UI_PANEL_SWITCHED, { panelIndex: index });
+        
         // 重置所有按钮到原始位置和状态
         this.buttons.forEach((btn, buttonIndex) => {
             const sp = btn.getComponent(Sprite);

+ 99 - 0
compare_weapon_config.py

@@ -0,0 +1,99 @@
+import pandas as pd
+import json
+import os
+
+def compare_weapon_configs():
+    # 读取Excel文件
+    excel_path = r'd:\CocosGame\Pong\assets\resources\data\excel\方块武器配置\方块武器配置表.xlsx'
+    json_path = r'd:\CocosGame\Pong\assets\resources\data\weapons.json'
+    
+    try:
+        # 读取Excel文件的所有工作表
+        excel_data = pd.read_excel(excel_path, sheet_name=None)
+        
+        # 读取JSON文件
+        with open(json_path, 'r', encoding='utf-8') as f:
+            json_data = json.load(f)
+        
+        print("=== 武器配置对比分析 ===")
+        print()
+        
+        # 分析Excel数据结构
+        print("Excel文件分析:")
+        for sheet_name, df in excel_data.items():
+            print(f"\n工作表: {sheet_name}")
+            print(f"数据形状: {df.shape}")
+            print(f"列名: {list(df.columns)}")
+            
+            # 显示实际数据内容
+            if not df.empty:
+                print("数据内容:")
+                for idx, row in df.iterrows():
+                    if idx < 10:  # 只显示前10行
+                        print(f"  行{idx}: {dict(row)}")
+        
+        print("\n" + "="*60)
+        print("\nJSON配置分析:")
+        
+        # 创建武器ID到名称的映射
+        weapon_mapping = {
+            'pea_shooter': '毛豆射手',
+            'sharp_carrot': '尖胡萝卜', 
+            'saw_grass': '锯齿草',
+            'watermelon_bomb': '西瓜炸弹',
+            'boomerang_plant': '回旋镖盆栽',
+            'hot_pepper': '炙热辣椒',
+            'cactus_shotgun': '仙人散弹',
+            'okra_missile': '秋葵导弹',
+            'mace_club': '狼牙棒'
+        }
+        
+        # 分析JSON中的游戏内成本配置
+        print("\n当前JSON配置的游戏内成本:")
+        for weapon in json_data['weapons']:
+            weapon_id = weapon['id']
+            weapon_name = weapon['name']
+            
+            if 'inGameCostConfig' in weapon:
+                base_cost = weapon['inGameCostConfig']['baseCost']
+                shape_costs = weapon['inGameCostConfig']['shapeCosts']
+                
+                print(f"\n{weapon_name} ({weapon_id}):")
+                print(f"  基础成本: {base_cost}")
+                print(f"  形状成本:")
+                for shape, cost in shape_costs.items():
+                    print(f"    {shape}: {cost}")
+        
+        # 尝试从Excel数据中提取成本信息
+        print("\n" + "="*60)
+        print("\nExcel数据详细分析:")
+        
+        # 查找包含成本信息的工作表
+        for sheet_name, df in excel_data.items():
+            print(f"\n工作表 '{sheet_name}' 详细内容:")
+            if not df.empty:
+                # 打印所有数据
+                print(df.to_string())
+                
+                # 尝试识别成本相关的列
+                cost_related_columns = []
+                for col in df.columns:
+                    if any(keyword in str(col).lower() for keyword in ['成本', 'cost', '价格', 'price', '费用']):
+                        cost_related_columns.append(col)
+                
+                if cost_related_columns:
+                    print(f"\n发现成本相关列: {cost_related_columns}")
+        
+        print("\n" + "="*60)
+        print("\n对比结论:")
+        print("1. JSON文件包含完整的游戏内成本配置")
+        print("2. Excel文件需要进一步分析以确定是否包含对应的成本数据")
+        print("3. 建议检查Excel文件的具体内容格式和数据结构")
+        
+    except Exception as e:
+        print(f"错误: {e}")
+        import traceback
+        traceback.print_exc()
+
+if __name__ == "__main__":
+    compare_weapon_configs()

+ 130 - 0
fix_weapon_costs.py

@@ -0,0 +1,130 @@
+import pandas as pd
+import json
+import os
+
+def fix_weapon_costs():
+    # 读取JSON文件
+    json_path = r'd:\CocosGame\Pong\assets\resources\data\weapons.json'
+    
+    try:
+        # 读取JSON文件
+        with open(json_path, 'r', encoding='utf-8') as f:
+            json_data = json.load(f)
+        
+        print("=== 修复武器成本配置 ===")
+        print()
+        
+        # 备份原文件
+        backup_path = json_path + '.backup'
+        with open(backup_path, 'w', encoding='utf-8') as f:
+            json.dump(json_data, f, ensure_ascii=False, indent=2)
+        print(f"已创建备份文件: {backup_path}")
+        
+        # 根据Excel数据定义的成本配置
+        cost_configs = {
+            'pea_shooter': {
+                'baseCost': 5, 
+                'shapeCosts': {
+                    'I': 10, 'H-I': 10, 'L': 15, 'S': 20, 'D-T': 20, 
+                    'L2': 25, 'L3': 25, 'L4': 25, 'F-S': 25, 'T': 25
+                }
+            },
+            'sharp_carrot': {
+                'baseCost': 6, 
+                'shapeCosts': {
+                    'I': 12, 'H-I': 12, 'L': 18, 'S': 24, 'D-T': 24, 
+                    'L2': 26, 'L3': 26, 'L4': 26, 'F-S': 26, 'T': 26
+                }
+            },
+            'saw_grass': {
+                'baseCost': 6, 
+                'shapeCosts': {
+                    'I': 12, 'H-I': 12, 'L': 18, 'S': 24, 'D-T': 24, 
+                    'L2': 27, 'L3': 27, 'L4': 27, 'F-S': 27, 'T': 27
+                }
+            },
+            'watermelon_bomb': {
+                'baseCost': 10, 
+                'shapeCosts': {
+                    'I': 20, 'H-I': 20, 'L': 30, 'S': 40, 'D-T': 40, 
+                    'L2': 28, 'L3': 28, 'L4': 28, 'F-S': 28, 'T': 28
+                }
+            },
+            'boomerang_plant': {
+                'baseCost': 6, 
+                'shapeCosts': {
+                    'I': 12, 'H-I': 12, 'L': 18, 'S': 24, 'D-T': 24, 
+                    'L2': 29, 'L3': 29, 'L4': 29, 'F-S': 29, 'T': 29
+                }
+            },
+            'hot_pepper': {
+                'baseCost': 10, 
+                'shapeCosts': {
+                    'I': 20, 'H-I': 20, 'L': 30, 'S': 40, 'D-T': 40, 
+                    'L2': 30, 'L3': 30, 'L4': 30, 'F-S': 30, 'T': 30
+                }
+            },
+            'cactus_shotgun': {
+                'baseCost': 10, 
+                'shapeCosts': {
+                    'I': 20, 'H-I': 20, 'L': 30, 'S': 40, 'D-T': 40, 
+                    'L2': 31, 'L3': 31, 'L4': 31, 'F-S': 31, 'T': 31
+                }
+            },
+            'okra_missile': {
+                'baseCost': 15, 
+                'shapeCosts': {
+                    'I': 30, 'H-I': 30, 'L': 45, 'S': 60, 'D-T': 60, 
+                    'L2': 32, 'L3': 32, 'L4': 32, 'F-S': 32, 'T': 32
+                }
+            },
+            'mace_club': {
+                'baseCost': 8, 
+                'shapeCosts': {
+                    'I': 16, 'H-I': 16, 'L': 24, 'S': 32, 'D-T': 32, 
+                    'L2': 33, 'L3': 33, 'L4': 33, 'F-S': 33, 'T': 33
+                }
+            }
+        }
+        
+        # 更新JSON配置
+        updated_count = 0
+        
+        for i, weapon in enumerate(json_data['weapons']):
+            weapon_id = weapon['id']
+            weapon_name = weapon['name']
+            
+            if weapon_id in cost_configs:
+                # 更新武器配置
+                json_data['weapons'][i]['inGameCostConfig'] = cost_configs[weapon_id]
+                
+                updated_count += 1
+                
+                print(f"更新 {weapon_name} ({weapon_id}):")
+                print(f"  基础成本: {cost_configs[weapon_id]['baseCost']}")
+                print(f"  形状成本: {cost_configs[weapon_id]['shapeCosts']}")
+                print()
+        
+        # 写入更新后的配置
+        with open(json_path, 'w', encoding='utf-8') as f:
+            json.dump(json_data, f, ensure_ascii=False, indent=2)
+        
+        print(f"\n✅ 成功更新武器配置文件: {json_path}")
+        print(f"📋 更新了 {updated_count} 个武器的成本配置")
+        
+        # 验证更新结果
+        print("\n=== 验证更新结果 ===")
+        for weapon in json_data['weapons']:
+            if 'inGameCostConfig' in weapon:
+                print(f"{weapon['name']} ({weapon['id']}):")
+                print(f"  基础成本: {weapon['inGameCostConfig']['baseCost']}")
+                print(f"  形状成本数量: {len(weapon['inGameCostConfig']['shapeCosts'])} 种形状")
+                print()
+        
+    except Exception as e:
+        print(f"错误: {e}")
+        import traceback
+        traceback.print_exc()
+
+if __name__ == "__main__":
+    fix_weapon_costs()