From 747b057b224d2508c86c32004a06cbfe944d565a 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, 22 Dec 2025 15:37:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=AD=A6=E5=99=A8=E7=B3=BB=E7=BB=9F):?= =?UTF-8?q?=20=E9=87=8D=E6=9E=84VectorStar=E6=AD=A6=E5=99=A8=E5=92=8C?= =?UTF-8?q?=E5=AD=90=E5=BC=B9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整VectorStar子弹的移动逻辑,移除forwarded变量并优化速度计算 修改VectorStar武器的属性计算公式,调整基础值和成长系数 更新VectorStar场景配置,调整攻击力、冷却时间等参数 将Rooster角色的默认武器替换为VectorStar --- components/Bullets/VectorStar.tscn | 5 +++-- components/Characters/Rooster.tscn | 15 +++------------ components/Weapons/VectorStar.tscn | 15 ++++++++++----- scripts/Contents/Bullets/VectorStar.gd | 4 +--- scripts/Contents/Weapons/VectorStarWeapon.gd | 6 +++--- 5 files changed, 20 insertions(+), 25 deletions(-) diff --git a/components/Bullets/VectorStar.tscn b/components/Bullets/VectorStar.tscn index fe36cf7..d324947 100644 --- a/components/Bullets/VectorStar.tscn +++ b/components/Bullets/VectorStar.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=12 format=3 uid="uid://ro1df12asa6y"] [ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_fyvdf"] -[ext_resource type="Script" path="res://scripts/Contents/Bullets/VectorStar.gd" id="2_1u5ed"] +[ext_resource type="Script" uid="uid://cscu6wr43h3ky" path="res://scripts/Contents/Bullets/VectorStar.gd" id="2_1u5ed"] [ext_resource type="Texture2D" uid="uid://d2pndtow16635" path="res://resources/bullets/lgbt-bullet/造型2.svg" id="2_7b7fr"] [sub_resource type="SpriteFrames" id="SpriteFrames_jj20o"] @@ -54,6 +54,7 @@ alpha_curve = SubResource("CurveTexture_c22if") [node name="VectorStar" instance=ExtResource("1_fyvdf")] script = ExtResource("2_1u5ed") lifeDistance = 2000.0 +autoDestroyOnHitMap = false [node name="texture" parent="." index="0"] rotation = 0.0174533 @@ -61,5 +62,5 @@ sprite_frames = SubResource("SpriteFrames_jj20o") [node name="particles" type="GPUParticles2D" parent="." index="2"] amount = 20 -process_material = SubResource("ParticleProcessMaterial_bieyj") texture = ExtResource("2_7b7fr") +process_material = SubResource("ParticleProcessMaterial_bieyj") diff --git a/components/Characters/Rooster.tscn b/components/Characters/Rooster.tscn index 80c686d..a629d0f 100644 --- a/components/Characters/Rooster.tscn +++ b/components/Characters/Rooster.tscn @@ -1,10 +1,8 @@ -[gd_scene load_steps=14 format=3 uid="uid://bm7ymrri6pykb"] +[gd_scene load_steps=12 format=3 uid="uid://bm7ymrri6pykb"] [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"] [ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"] -[ext_resource type="PackedScene" uid="uid://dt8w2w816tsj0" path="res://components/Weapons/RedCrystal.tscn" id="3_0omr3"] -[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_jluqw"] -[ext_resource type="PackedScene" uid="uid://c3crr8r7y3oho" path="res://components/Weapons/BlueCrystal.tscn" id="4_0omr3"] +[ext_resource type="PackedScene" uid="uid://bb1uh8k7gkhr7" path="res://components/Weapons/VectorStar.tscn" id="3_s7kxe"] [ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"] [ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"] [ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"] @@ -56,14 +54,7 @@ metadata/_edit_vertical_guides_ = [71.0] [node name="weaponStore" parent="." index="1"] process_mode = 4 -[node name="RedCrystal" parent="weaponStore" index="0" instance=ExtResource("3_0omr3")] -offset_bottom = 374.0 - -[node name="PurpleCrystal" parent="weaponStore" index="1" instance=ExtResource("3_jluqw")] -offset_bottom = 350.0 -debugRebuild = false - -[node name="BlueCrystal" parent="weaponStore" index="2" instance=ExtResource("4_0omr3")] +[node name="VectorStar" parent="weaponStore" index="0" instance=ExtResource("3_s7kxe")] [node name="sprint" parent="sounds" index="0"] stream = ExtResource("4_66s6c") diff --git a/components/Weapons/VectorStar.tscn b/components/Weapons/VectorStar.tscn index 19f37de..21d09a1 100644 --- a/components/Weapons/VectorStar.tscn +++ b/components/Weapons/VectorStar.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://bb1uh8k7gkhr7"] [ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_tmgup"] -[ext_resource type="Script" path="res://scripts/Contents/Weapons/VectorStarWeapon.gd" id="2_1dfg4"] +[ext_resource type="Script" uid="uid://bqalhq6akgpoc" path="res://scripts/Contents/Weapons/VectorStarWeapon.gd" id="2_1dfg4"] [ext_resource type="Texture2D" uid="uid://d2pndtow16635" path="res://resources/bullets/lgbt-bullet/造型2.svg" id="3_wfty8"] [node name="VectorStar" instance=ExtResource("1_tmgup")] @@ -11,8 +11,8 @@ displayName = "矢量核心" quality = 2 costBeachball = 400 store = { -"atk": 7, -"forwardtime": 0.75, +"atk": 10, +"forwardtime": 1.0, "maxcount": 10, "mincount": 5 } @@ -24,16 +24,21 @@ storeType = { } descriptionTemplate = "发射$mincount~$maxcount个[b]无主的飞星[/b],在$forwardtime秒后向目标冲刺并造成$atk点伤害。" needEnergy = 5.0 -cooldown = 500.0 +cooldown = 750.0 +debugRebuild = true [node name="avatar" parent="container/info" index="0"] texture = ExtResource("3_wfty8") +[node name="energy" parent="container/info/infos/energyInfo" index="1"] +text = "5.0" +[node name="beachball" parent="container/info/infos" index="1"] +count = 400 [node name="name" parent="container/info" index="2"] displayName = "矢量核心" quality = 2 [node name="description" parent="container" index="2"] -text = "[center]发射[color=cyan]5[/color]→[color=yellow]5[/color]~[color=cyan]10[/color]→[color=yellow]11[/color]个[b]无主的飞星[/b],在[color=cyan]0.75[/color]→[color=yellow]0.71[/color]秒后向目标冲刺并造成[color=cyan]7[/color]→[color=yellow]12[/color]点伤害。[/center]" +text = "[center]发射[color=cyan]5[/color]~[color=cyan]10[/color]个[b]无主的飞星[/b],在[color=cyan]1.00[/color]秒后向目标冲刺并造成[color=cyan]10[/color]点伤害。[/center]" diff --git a/scripts/Contents/Bullets/VectorStar.gd b/scripts/Contents/Bullets/VectorStar.gd index b5cb10d..bf76832 100644 --- a/scripts/Contents/Bullets/VectorStar.gd +++ b/scripts/Contents/Bullets/VectorStar.gd @@ -12,9 +12,7 @@ func ai(): PresetBulletAI.forward(self, rotation) if timeLived() <= forwardTime: speed = 10 * ((forwardTime - timeLived()) / forwardTime) - elif forwarded: - speed = (timeLived() - forwardTime) / 30 else: - forwarded = true + speed = (timeLived() - forwardTime) / 30 if is_instance_valid(tracer): rotation = position.angle_to_point(tracer.getTrackingAnchor()) diff --git a/scripts/Contents/Weapons/VectorStarWeapon.gd b/scripts/Contents/Weapons/VectorStarWeapon.gd index b51cc56..0195ad6 100644 --- a/scripts/Contents/Weapons/VectorStarWeapon.gd +++ b/scripts/Contents/Weapons/VectorStarWeapon.gd @@ -4,9 +4,9 @@ class_name VectorStarWeapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 2 * to * soulLevel - origin["forwardtime"] /= 1 + 0.025 * to * soulLevel - origin["mincount"] += 0.05 * to * soulLevel - origin["maxcount"] += 0.1 * to * soulLevel + origin["forwardtime"] /= 1 + 0.01 * to * soulLevel + origin["mincount"] = 4 + 1 * soulLevel + origin["maxcount"] = 9 + 1 * soulLevel return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal")