From 1f8e0a3e5ae26f8e413da5d947fbf41419d898b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Tue, 9 Sep 2025 22:32:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(Weapons):=20=E8=B0=83=E6=95=B4=E6=AD=A6?= =?UTF-8?q?=E5=99=A8=E5=8D=87=E7=BA=A7=E6=B6=88=E8=80=97=E5=92=8C=E8=83=BD?= =?UTF-8?q?=E9=87=8F=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改武器升级后的棒球消耗和能量需求计算方式,使用GameRule中的全局变量控制倍数 移除VectorStar的debugRebuild标志并调整其能量需求 --- components/Weapons/VectorStar.tscn | 3 +-- scripts/Structs/Weapon.gd | 3 ++- scripts/Tools/GameRule.gd | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/Weapons/VectorStar.tscn b/components/Weapons/VectorStar.tscn index 86a5c4e..3457ee6 100644 --- a/components/Weapons/VectorStar.tscn +++ b/components/Weapons/VectorStar.tscn @@ -22,9 +22,8 @@ storeType = { "mincount": 1.0 } descriptionTemplate = "发射$mincount~$maxcount个[b]无主[/b]的矢量星,在$forwardtime秒后向目标冲刺并造成$atk点伤害。" -needEnergy = 10.0 +needEnergy = 25.0 cooldown = 500.0 -debugRebuild = true [node name="avatar" parent="container/info" index="0"] texture = ExtResource("3_wfty8") diff --git a/scripts/Structs/Weapon.gd b/scripts/Structs/Weapon.gd index 4ad80ab..f43e484 100644 --- a/scripts/Structs/Weapon.gd +++ b/scripts/Structs/Weapon.gd @@ -54,7 +54,8 @@ func apply(entity: EntityBase): level += 1 entity.inventory[ItemStore.ItemType.BEACHBALL] -= costBeachball store = update(level, originalStore.duplicate(), entity) - costBeachball *= 2 + costBeachball = floor(GameRule.weaponUpdateCost * costBeachball) + needEnergy = GameRule.weaponUpdateEnergy * needEnergy rebuildInfo() return allHave func multipiler() -> float: diff --git a/scripts/Tools/GameRule.gd b/scripts/Tools/GameRule.gd index 9266dda..6df2451 100644 --- a/scripts/Tools/GameRule.gd +++ b/scripts/Tools/GameRule.gd @@ -28,3 +28,5 @@ static var appleDropRateInfluenceByLuckValue: float = MathTool.percent(2) # 幸 static var critRateInfluenceByLuckValue: float = MathTool.percent(2.5) # 幸运值对暴击率的影响 static var penerateRateInfluenceByLuckValue: float = MathTool.percent(3) # 幸运值对穿透率的影响 static var detainTime: float = 1000 # 血量如果在这个时间内没有改变才会开始播放降低动画 +static var weaponUpdateCost: float = 1.5 # 武器升级后消耗的棒球数量倍数 +static var weaponUpdateEnergy: float = 1.25 # 武器升级后消耗的能量倍数