From e581a4e38156fc1fdc66154257ca1c29807133e3 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: Mon, 2 Feb 2026 11:52:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=AD=A6=E5=99=A8):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=8C=B4=E9=A6=99=E8=B1=86=E6=AD=A6=E5=99=A8=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改茴香豆武器的散射角度从40°降低到20° 添加反弹伤害衰减20%的机制 当特效纹理ID为1时不计入反弹次数 更新武器描述模板和数值计算 移除不再使用的HXDBoom特效脚本 --- components/Bullets/HXD.tscn | 1 + components/Effects/HXDBoom.tscn | 4 +--- components/Weapons/HXD.tscn | 4 ++-- scripts/Contents/Bullets/HXD.gd | 7 ++++++- scripts/Contents/Effects/.gitkeep | 0 scripts/Contents/Effects/HXDBoom.gd | 4 ---- scripts/Contents/Effects/HXDBoom.gd.uid | 1 - scripts/Contents/Weapons/HXD.gd | 4 ++-- 8 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 scripts/Contents/Effects/.gitkeep delete mode 100644 scripts/Contents/Effects/HXDBoom.gd delete mode 100644 scripts/Contents/Effects/HXDBoom.gd.uid diff --git a/components/Bullets/HXD.tscn b/components/Bullets/HXD.tscn index 1d71291..4c9b65e 100644 --- a/components/Bullets/HXD.tscn +++ b/components/Bullets/HXD.tscn @@ -40,6 +40,7 @@ size = Vector2(32, 20) script = ExtResource("2_4lnkm") displayName = "茴香豆" penerate = 1.0 +penerateDamageReduction = 0.2 lifeTime = 5000.0 [node name="texture" parent="." index="0"] diff --git a/components/Effects/HXDBoom.tscn b/components/Effects/HXDBoom.tscn index 2e32c20..c26fbc4 100644 --- a/components/Effects/HXDBoom.tscn +++ b/components/Effects/HXDBoom.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=9 format=3 uid="uid://c0oppv5v8grnu"] +[gd_scene load_steps=8 format=3 uid="uid://c0oppv5v8grnu"] [ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_41cv2"] -[ext_resource type="Script" uid="uid://bxvgpyb3fyko1" path="res://scripts/Contents/Effects/HXDBoom.gd" id="2_uo6a0"] [ext_resource type="Texture2D" uid="uid://ctvlwl62ieuu6" path="res://resources/bullets/HXD/effect/4.png" id="3_4u6cx"] [sub_resource type="Curve" id="Curve_4u6cx"] @@ -28,7 +27,6 @@ scale_curve = SubResource("CurveTexture_tkfx4") alpha_curve = SubResource("CurveTexture_rt83h") [node name="HXDBoom" instance=ExtResource("1_41cv2")] -script = ExtResource("2_uo6a0") [node name="particles" parent="." index="1"] amount = 1 diff --git a/components/Weapons/HXD.tscn b/components/Weapons/HXD.tscn index 9a9eca6..4dae9c6 100644 --- a/components/Weapons/HXD.tscn +++ b/components/Weapons/HXD.tscn @@ -14,7 +14,7 @@ costBeachball = 4000 store = { "atk": 4 } -descriptionTemplate = "发射$atk颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹$atk次,每次反弹对敌人造成$atk点伤害。散射+40°" +descriptionTemplate = "发射$atk颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹$atk次,每次反弹对敌人造成$atk点伤害,有20%概率不计入反弹总次数。散射+20°,茴香豆每次反弹伤害-20%" cooldown = 1000.0 debugRebuild = true @@ -30,4 +30,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]点伤害。散射+40°[/center]" +text = "[center]发射[color=cyan]4[/color]颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹[color=cyan]4[/color]次,每次反弹对敌人造成[color=cyan]4[/color]点伤害,有20%概率不计入反弹总次数。散射+20°,茴香豆每次反弹伤害-20%[/center]" diff --git a/scripts/Contents/Bullets/HXD.gd b/scripts/Contents/Bullets/HXD.gd index 20884fb..3dca681 100644 --- a/scripts/Contents/Bullets/HXD.gd +++ b/scripts/Contents/Bullets/HXD.gd @@ -14,7 +14,12 @@ func succeedToHit(_dmg: float, entity: EntityBase): if is_instance_valid(newEntity): look_at(newEntity.position) bouncedTime += 1 - EffectController.create(ComponentManager.getEffect("HXDBoom"), position).shot() + var effect = EffectController.create(ComponentManager.getEffect("HXDBoom"), position) + var textureId = randi_range(0, 4) + if textureId == 1: + bouncedTime -= 1 + effect.particles.texture = load("res://resources/bullets/HXD/effect/%d.png" % textureId) + effect.shot() func split(newBullet: BulletBase, _index: int, _total: int, _lastBullet: float): if newBullet is HXDBullet: newBullet.bouncedTime = 0 diff --git a/scripts/Contents/Effects/.gitkeep b/scripts/Contents/Effects/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scripts/Contents/Effects/HXDBoom.gd b/scripts/Contents/Effects/HXDBoom.gd deleted file mode 100644 index 19bfa06..0000000 --- a/scripts/Contents/Effects/HXDBoom.gd +++ /dev/null @@ -1,4 +0,0 @@ -extends EffectController - -func register(): - particles.texture = load("res://resources/bullets/HXD/effect/%d.png" % randi_range(0, 4)) diff --git a/scripts/Contents/Effects/HXDBoom.gd.uid b/scripts/Contents/Effects/HXDBoom.gd.uid deleted file mode 100644 index 80bf291..0000000 --- a/scripts/Contents/Effects/HXDBoom.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bxvgpyb3fyko1 diff --git a/scripts/Contents/Weapons/HXD.gd b/scripts/Contents/Weapons/HXD.gd index 6bab0e4..0d4c24a 100644 --- a/scripts/Contents/Weapons/HXD.gd +++ b/scripts/Contents/Weapons/HXD.gd @@ -2,7 +2,7 @@ extends Weapon func update(to: int, origin: Dictionary, _entity: EntityBase): - origin["atk"] += 1.5 * to * soulLevel + origin["atk"] += 1 * to * soulLevel return origin func attack(entity: EntityBase): for i in readStore("atk"): @@ -10,7 +10,7 @@ func attack(entity: EntityBase): ComponentManager.getBullet("HXD"), entity, entity.findWeaponAnchor("normal"), - entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()) + deg_to_rad(randf_range(-1, 1) * 40) + entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()) + deg_to_rad(randf_range(-1, 1) * 20) ): if bullet is HXDBullet: bullet.maxBouncedTime = readStore("atk")