From 2714e2c8bda1f1674313131adb42cce7930c8090 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: Sat, 18 Apr 2026 11:46:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(Bullets/MagicMissle):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=AD=94=E6=B3=95=E5=AF=BC=E5=BC=B9=E4=BC=A4=E5=AE=B3=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正当魔法导弹未加速时未造成伤害的问题,并优化销毁条件判断 --- scripts/Contents/Bullets/MagicMissle.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/Contents/Bullets/MagicMissle.gd b/scripts/Contents/Bullets/MagicMissle.gd index 4ce6b93..cdf70d2 100644 --- a/scripts/Contents/Bullets/MagicMissle.gd +++ b/scripts/Contents/Bullets/MagicMissle.gd @@ -12,14 +12,16 @@ func ai(): accelerating = false rotation = lerp_angle(rotation, position.angle_to_point(get_global_mouse_position()), 0.1) speedV2 += (get_global_mouse_position() - position).normalized() * 1 - elif baseDamage < 1: - tryDestroy() + elif speed < 1 || baseDamage < 1: + tryDestroy() speedV2 *= 0.995 speed = speedV2.length() PresetBulletAI.forward(self , speedV2.angle()) texture.rotation += deg_to_rad(sqrt(speed)) func succeedToHit(_dmg: float, entity: EntityBase): + if !accelerating: + entity.takeDamage(baseDamage, true) if powerScale > 0 && accelerating && roundBullets.count(self ) > 0: for i in randi_range(1, powerScale): for bullet in BulletBase.generate(