From 803511523cd57bc72f3cdc9c2c7108dd5db89b71 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, 15 Nov 2025 19:53:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=AD=A6=E5=99=A8):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=81=AB=E5=B1=B1=E6=AD=A6=E5=99=A8=E8=AE=A1=E6=95=B0=E5=92=8C?= =?UTF-8?q?=E6=97=8B=E8=BD=AC=E9=80=9F=E5=BA=A6=E8=AE=A1=E7=AE=97=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改ChainGun、Meowmere和Volcano武器的count计算逻辑,从soulLevel改为(soulLevel - 1) 调整Volcano武器的旋转速度从0.25降至0.1,并添加生命周期参数 为Volcano子弹添加粒子特效和动画效果 更新武器描述文本以反映新的生命周期参数 --- components/Bullets/Volcano.tscn | 84 +++++++++++++++++++++++++++- components/Weapons/Volcano.tscn | 9 ++- scripts/Contents/Weapons/ChainGun.gd | 2 +- scripts/Contents/Weapons/Meowmere.gd | 2 +- scripts/Contents/Weapons/Volcano.gd | 6 +- 5 files changed, 93 insertions(+), 10 deletions(-) diff --git a/components/Bullets/Volcano.tscn b/components/Bullets/Volcano.tscn index a886751..938aa2e 100644 --- a/components/Bullets/Volcano.tscn +++ b/components/Bullets/Volcano.tscn @@ -1,9 +1,76 @@ -[gd_scene load_steps=5 format=3 uid="uid://8uepi7uql314"] +[gd_scene load_steps=19 format=3 uid="uid://8uepi7uql314"] [ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_gd3m7"] [ext_resource type="Script" uid="uid://ci5hswfhck5as" path="res://scripts/Contents/Bullets/Volcano.gd" id="2_w1utg"] [ext_resource type="Texture2D" uid="uid://ctmxadaowx5ps" path="res://resources/weapons/Volcano.webp" id="2_wwxm2"] +[sub_resource type="Animation" id="Animation_oinqg"] +resource_name = "destroy" +length = 0.5 +step = 0.1 + +[sub_resource type="Animation" id="Animation_ynxlt"] +resource_name = "loop" +loop_mode = 1 +step = 0.1 + +[sub_resource type="Animation" id="Animation_kmogx"] +resource_name = "spawn" + +[sub_resource type="Animation" id="Animation_w1utg"] +length = 0.001 + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_w1utg"] +_data = { +&"RESET": SubResource("Animation_w1utg"), +&"destroy": SubResource("Animation_oinqg"), +&"loop": SubResource("Animation_ynxlt"), +&"spawn": SubResource("Animation_kmogx") +} + +[sub_resource type="Curve" id="Curve_w1utg"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_o5h0y"] +curve = SubResource("Curve_w1utg") + +[sub_resource type="Curve" id="Curve_21ih7"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_6sp0s"] +curve = SubResource("Curve_21ih7") + +[sub_resource type="Gradient" id="Gradient_1sgli"] +colors = PackedColorArray(1, 0, 0, 1, 1, 0.9628792, 0.47369397, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_b5nxd"] +gradient = SubResource("Gradient_1sgli") + +[sub_resource type="Curve" id="Curve_o5h0y"] +_data = [Vector2(0.85, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_21ih7"] +curve = SubResource("Curve_o5h0y") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_xrrxo"] +particle_flag_disable_z = true +emission_shape = 3 +emission_box_extents = Vector3(37, 1, 1) +angle_min = 1.0728835e-05 +angle_max = 360.00003 +angle_curve = SubResource("CurveTexture_6sp0s") +spread = 180.0 +initial_velocity_max = 25.0 +gravity = Vector3(0, 0, 0) +scale_min = 3.0 +scale_max = 8.0 +scale_curve = SubResource("CurveTexture_21ih7") +color_initial_ramp = SubResource("GradientTexture1D_b5nxd") +alpha_curve = SubResource("CurveTexture_o5h0y") + [sub_resource type="RectangleShape2D" id="RectangleShape2D_w1utg"] size = Vector2(113, 34) @@ -12,10 +79,21 @@ script = ExtResource("2_w1utg") penerate = 1.0 lifeTime = 6000.0 +[node name="animator" parent="texture" index="0"] +libraries = { +&"": SubResource("AnimationLibrary_w1utg") +} + [node name="anchor" type="Node2D" parent="texture" index="1"] -[node name="texture" type="Sprite2D" parent="texture/anchor" index="0"] -position = Vector2(150, 0) +[node name="trail" type="GPUParticles2D" parent="texture/anchor" index="0"] +position = Vector2(167, 0) +scale = Vector2(1.4999999, 1.4999999) +amount = 100 +process_material = SubResource("ParticleProcessMaterial_xrrxo") + +[node name="texture" type="Sprite2D" parent="texture/anchor" index="1"] +position = Vector2(151.3249, 0) rotation = 0.7853982 scale = Vector2(1.5, 1.5) texture = ExtResource("2_wwxm2") diff --git a/components/Weapons/Volcano.tscn b/components/Weapons/Volcano.tscn index 4eb5874..6d59edb 100644 --- a/components/Weapons/Volcano.tscn +++ b/components/Weapons/Volcano.tscn @@ -12,16 +12,19 @@ quality = 3 typeTopic = 2 store = { "atk": 20, -"count": 2.0, +"count": 1.0, +"life": 5, "rotate": 2.0 } storeType = { "atk": 1, "count": 1, +"life": 0, "rotate": 3 } -descriptionTemplate = "召唤$count支[b]火山[/b],以$rotate的速度旋转,接触时造成$atk点伤害。" +descriptionTemplate = "召唤$count支[b]火山[/b],以$rotate的速度旋转,接触时造成$atk点伤害,在$life秒后停止。" cooldown = 7000.0 +debugRebuild = true [node name="avatar" parent="container/info" index="0"] texture = ExtResource("2_hh01t") @@ -38,4 +41,4 @@ quality = 3 typeTopic = 2 [node name="description" parent="container" index="2"] -text = "[center]召唤[color=cyan]2[/color]支[b]火山[/b],以[color=cyan]1.0°[/color]的速度旋转,接触时造成[color=cyan]15[/color]点伤害。[/center]" +text = "[center]召唤[color=cyan]1[/color]支[b]火山[/b],以[color=cyan]2.0°[/color]的速度旋转,接触时造成[color=cyan]20[/color]点伤害,在[color=cyan]5.00[/color]秒后停止。[/center]" diff --git a/scripts/Contents/Weapons/ChainGun.gd b/scripts/Contents/Weapons/ChainGun.gd index 7ea29fa..32657d5 100644 --- a/scripts/Contents/Weapons/ChainGun.gd +++ b/scripts/Contents/Weapons/ChainGun.gd @@ -3,7 +3,7 @@ extends Weapon func update(to, origin, _entity): origin["atk"] += 2 * to * soulLevel - origin["count"] = 1 * soulLevel + origin["count"] = 1 * (soulLevel - 1) origin["split"] /= 1 + 0.05 * to * soulLevel return origin func attack(entity: EntityBase): diff --git a/scripts/Contents/Weapons/Meowmere.gd b/scripts/Contents/Weapons/Meowmere.gd index 9281e8f..2cb6d88 100644 --- a/scripts/Contents/Weapons/Meowmere.gd +++ b/scripts/Contents/Weapons/Meowmere.gd @@ -3,7 +3,7 @@ extends Weapon func update(to, origin, _entity): origin["atk"] += 3 * to * soulLevel - origin["count"] = 1 * soulLevel + origin["count"] = 1 * (soulLevel - 1) origin["childatk"] += 1.25 * origin["atk"] origin["reduce"] /= 1 + 0.05 * to * soulLevel return origin diff --git a/scripts/Contents/Weapons/Volcano.gd b/scripts/Contents/Weapons/Volcano.gd index 5beb18e..01fdf3b 100644 --- a/scripts/Contents/Weapons/Volcano.gd +++ b/scripts/Contents/Weapons/Volcano.gd @@ -3,8 +3,9 @@ extends Weapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 5 * to * soulLevel - origin["count"] += 1 * soulLevel - origin["rotate"] += 0.25 * to * soulLevel + origin["count"] += 1 * (soulLevel - 1) + origin["rotate"] += 0.1 * to * soulLevel + origin["life"] += 0.05 * to * soulLevel return origin func attack(entity: EntityBase): for i in readStore("count"): @@ -12,3 +13,4 @@ func attack(entity: EntityBase): var bullet: Volcano = j bullet.damage = readStore("atk") bullet.rotates = readStore("rotate") + bullet.lifeTime = readStore("life") * 1000