From 873b1b06a9e67dafa6a0e559724ed337c683167b 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: Wed, 11 Feb 2026 16:06:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=AD=A6=E5=99=A8):=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E9=92=A2=E7=AE=A1=E6=AD=A6=E5=99=A8=E7=9A=84=E4=BC=A4?= =?UTF-8?q?=E5=AE=B3=E8=AE=A1=E7=AE=97=E5=92=8C=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改钢管武器的伤害计算公式,使用平方根函数替代线性增长 移除蓄力倍率属性,改为固定值0.1 更新武器描述文本以反映新的伤害机制 --- components/Weapons/Pipe.tscn | 14 +++----------- scripts/Contents/Weapons/Pipe.gd | 3 +-- scripts/Structs/Weapon.gd | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/components/Weapons/Pipe.tscn b/components/Weapons/Pipe.tscn index fa60ad5..37848d7 100644 --- a/components/Weapons/Pipe.tscn +++ b/components/Weapons/Pipe.tscn @@ -11,18 +11,11 @@ displayName = "钢管" costBeachball = 350 chargable = true store = { -"atk": 5, -"charge": 0.1 +"atk": 5 } -storeType = { -"atk": 1, -"charge": 2 -} -descriptionTemplate = "按住蓄力扔出钢管,蓄力越久伤害越高,发射钢管后继续按住鼠标可继续蓄力。 -基础伤害:$atk,蓄力倍率:$charge" +descriptionTemplate = "按住蓄力扔出钢管,蓄力越久伤害越高,至少造成$atk点伤害,发射钢管后继续按住鼠标可进行连续发射。" needEnergy = 2.0 cooldown = 3000.0 -debugRebuild = true [node name="avatar" parent="container/info" index="0"] texture = ExtResource("2_mmtf8") @@ -37,5 +30,4 @@ count = 350 displayName = "钢管" [node name="description" parent="container" index="2"] -text = "[center]按住蓄力扔出钢管,蓄力越久伤害越高,发射钢管后继续按住鼠标可继续蓄力。 -基础伤害:[color=cyan]5[/color],蓄力倍率:[color=cyan]10.0%[/color][/center]" +text = "[center]按住蓄力扔出钢管,蓄力越久伤害越高,至少造成[color=cyan]5[/color]点伤害,发射钢管后继续按住鼠标可进行连续发射。[/center]" diff --git a/scripts/Contents/Weapons/Pipe.gd b/scripts/Contents/Weapons/Pipe.gd index 88a6ed7..16c484e 100644 --- a/scripts/Contents/Weapons/Pipe.gd +++ b/scripts/Contents/Weapons/Pipe.gd @@ -3,7 +3,6 @@ extends Weapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 1 * to * soulLevel - origin["charge"] += 0.05 * (soulLevel - 1) return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") @@ -14,7 +13,7 @@ func attack(entity: EntityBase): weaponPos.angle_to_point(get_global_mouse_position()) ): if bullet is PipeBullet: - var e = charged(readStore("atk"), readStore("charge")) + var e = charged(readStore("atk"), 0.1) bullet.baseDamage = e bullet.energy = e bullet.speed = e diff --git a/scripts/Structs/Weapon.gd b/scripts/Structs/Weapon.gd index 10838e0..60f2b3b 100644 --- a/scripts/Structs/Weapon.gd +++ b/scripts/Structs/Weapon.gd @@ -177,7 +177,7 @@ func tryAttack(entity: EntityBase): entity.useEnergy(needEnergy) return result func charged(base: float, percent: float): - return base * (1 + chargedTime / 75 * percent) + return base * sqrt(1 + chargedTime / 20 * percent) # 抽象 func update(_to: int, origin: Dictionary, _entity: EntityBase):