From b9fe44dddf27964356eb646e90b326d64e06f995 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, 4 Feb 2026 22:42:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=AD=A6=E5=99=A8):=20=E4=B8=BAHXD?= =?UTF-8?q?=E6=AD=A6=E5=99=A8=E6=B7=BB=E5=8A=A0=E5=91=BD=E4=B8=ADBoss?= =?UTF-8?q?=E6=97=B6=E6=94=BB=E5=87=BB=E9=80=9F=E5=BA=A6=E5=8A=A0=E6=88=90?= =?UTF-8?q?=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改HXD子弹逻辑,命中Boss时增加5%攻击速度,子弹销毁时恢复 - 更新武器描述文本以反映新效果 - 调整测试环境初始波数为10 --- components/Weapons/HXD.tscn | 4 ++-- scripts/Contents/Bullets/HXD.gd | 7 +++++++ scripts/Contents/Wave.gd | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/Weapons/HXD.tscn b/components/Weapons/HXD.tscn index 71cf2c5..7e5fd5d 100644 --- a/components/Weapons/HXD.tscn +++ b/components/Weapons/HXD.tscn @@ -19,7 +19,7 @@ storeType = { "atk": 1, "count": 1 } -descriptionTemplate = "发射$count颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹$atk次,每次反弹对敌人造成$atk点伤害,有[color=yellow]1/4[/color]的概率反弹次数[color=yellow]+1[/color]。散射[color=red]+4°[/color],反弹时伤害[color=red]-4%[/color],命中同类敌人时额外造成一次[color=yellow]必定暴击[/color]的伤害。" +descriptionTemplate = "发射$count颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹$atk次,每次反弹对敌人造成$atk点伤害,有[color=yellow]1/4[/color]的概率反弹次数[color=yellow]+1[/color]。散射[color=red]+4°[/color],反弹时伤害[color=red]-4%[/color],命中同类敌人时额外造成一次[color=yellow]必定暴击[/color]的伤害,命中Boss时,[color=orange]攻击速度+5%[/color]直到当前茴香豆被销毁。" cooldown = 1000.0 debugRebuild = true @@ -35,4 +35,4 @@ quality = 3 typeTopic = 3 [node name="description" parent="container" index="2"] -text = "[center]发射[color=cyan]4[/color]颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹[color=cyan]4[/color]次,每次反弹对敌人造成[color=cyan]4[/color]点伤害,有[color=yellow]1/4[/color]的概率反弹次数[color=yellow]+1[/color]。散射[color=red]+4°[/color],反弹时伤害[color=red]-4%[/color],命中同类敌人时额外造成一次[color=yellow]必定暴击[/color]的伤害。[/center]" +text = "[center]发射[color=cyan]4[/color]颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹[color=cyan]4[/color]次,每次反弹对敌人造成[color=cyan]4[/color]点伤害,有[color=yellow]1/4[/color]的概率反弹次数[color=yellow]+1[/color]。散射[color=red]+4°[/color],反弹时伤害[color=red]-4%[/color],命中同类敌人时额外造成一次[color=yellow]必定暴击[/color]的伤害,命中Boss时,[color=orange]攻击速度+5%[/color]直到当前茴香豆被销毁。[/center]" diff --git a/scripts/Contents/Bullets/HXD.gd b/scripts/Contents/Bullets/HXD.gd index 2c57264..e04bd45 100644 --- a/scripts/Contents/Bullets/HXD.gd +++ b/scripts/Contents/Bullets/HXD.gd @@ -4,12 +4,19 @@ class_name HXDBullet var bouncedTime: int = 0 var maxBouncedTime: int = 0 var lastHit: EntityBase +var addTimes = 0 +var delta = 0.05 func spawn(): texture.play(str(randi_range(0, 2))) func ai(): PresetBulletAI.forward(self, rotation) +func destroy(_beacuseMap: bool): + launcher.fields[FieldStore.Entity.ATTACK_SPEED] -= addTimes * delta func succeedToHit(_dmg: float, entity: EntityBase): + if entity.isBoss: + launcher.fields[FieldStore.Entity.ATTACK_SPEED] += delta + addTimes += 1 if is_instance_valid(lastHit): if lastHit.get_class() == entity.get_class(): entity.bulletHit(self, true) diff --git a/scripts/Contents/Wave.gd b/scripts/Contents/Wave.gd index 8e4a8ac..2bdf352 100644 --- a/scripts/Contents/Wave.gd +++ b/scripts/Contents/Wave.gd @@ -22,7 +22,7 @@ func duplicate() -> Wave: wave.per = per return wave -static var current: int = startWith(1) if WorldManager.isRelease() else startWith(1) +static var current: int = startWith(1) if WorldManager.isRelease() else startWith(10) static var WAVE_NORMAL = [ Wave.create("Hen", 1, 3, false, 0, INF, 1), Wave.create("Cat", 1, 5, false, 0, INF, 1),