From 698b5a5618e96ada41aaa96dd77bafd30227ebc8 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, 13 Dec 2025 08:24:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(Bullets/Diamond2):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=92=BB=E7=9F=B3=E5=AD=90=E5=BC=B9=E5=8A=A8=E7=94=BB=E5=92=8C?= =?UTF-8?q?=E7=A2=B0=E6=92=9E=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整钻石子弹的静态精灵位置和缩放,添加碰撞形状 修复当父节点无效时动画停止逻辑 ``` ```msg feat(Weapons/BlueCrystal): 调整蓝水晶武器属性 增加子弹环绕数量计算公式 降低基础攻击力并增加冷却时间 更新描述文本移除逃逸时间说明 --- components/Bullets/Diamond2.tscn | 15 +++++++++------ components/Weapons/BlueCrystal.tscn | 6 +++--- scripts/Contents/Bullets/Diamond2.gd | 6 ++++++ scripts/Contents/Weapons/BlueCrystal.gd | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/components/Bullets/Diamond2.tscn b/components/Bullets/Diamond2.tscn index f63bcfa..6fcc409 100644 --- a/components/Bullets/Diamond2.tscn +++ b/components/Bullets/Diamond2.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://chqclu0q4ew46"] +[gd_scene load_steps=9 format=3 uid="uid://chqclu0q4ew46"] [ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_slk7q"] [ext_resource type="Script" uid="uid://c1ywds8xwerm3" path="res://scripts/Contents/Bullets/Diamond2.gd" id="2_i4qda"] @@ -46,24 +46,27 @@ _data = { &"spawn": SubResource("Animation_pkqnc") } +[sub_resource type="CircleShape2D" id="CircleShape2D_cusqp"] +radius = 6.0827627 + [node name="Diamond2" instance=ExtResource("1_slk7q")] script = ExtResource("2_i4qda") displayName = "钻石" lifeTime = 5000.0 autoLoopAnimation = true -[node name="texture" parent="." index="0"] -scale = Vector2(0.6, 0.6) - [node name="animator" parent="texture" index="0"] libraries = { &"": SubResource("AnimationLibrary_v5jve") } [node name="static" type="Sprite2D" parent="texture" index="1"] -position = Vector2(70, 0) +unique_name_in_owner = true +position = Vector2(25, 0) rotation = 1.5707964 +scale = Vector2(0.7, 0.7) texture = ExtResource("3_pkqnc") [node name="hitbox" parent="." index="1"] -position = Vector2(43, 0) +position = Vector2(25, 0) +shape = SubResource("CircleShape2D_cusqp") diff --git a/components/Weapons/BlueCrystal.tscn b/components/Weapons/BlueCrystal.tscn index 22aad19..4ba43fe 100644 --- a/components/Weapons/BlueCrystal.tscn +++ b/components/Weapons/BlueCrystal.tscn @@ -10,7 +10,7 @@ avatarTexture = ExtResource("2_4qqa7") displayName = "蓝水晶簇" quality = 2 store = { -"atk": 5, +"atk": 3, "count": 2.0 } storeType = { @@ -19,7 +19,7 @@ storeType = { "distance": 0 } descriptionTemplate = "发射[b]蓝水晶[/b],可无限追踪,命中造成$atk点伤害,飞行过程中有$count颗[b]钻石[/b]环绕。" -cooldown = 175.0 +cooldown = 200.0 [node name="avatar" parent="container/info" index="0"] modulate = Color(0.828, 1.53, 1.549, 1) @@ -36,4 +36,4 @@ displayName = "蓝水晶簇" quality = 2 [node name="description" parent="container" index="2"] -text = "[center]发射[b]蓝水晶[/b],可无限追踪,命中造成[color=cyan]5[/color]点伤害,飞行过程中有[color=cyan]2[/color]颗[b]钻石[/b]环绕,在运动$distance秒后逃逸。[/center]" +text = "[center]发射[b]蓝水晶[/b],可无限追踪,命中造成[color=cyan]5[/color]点伤害,飞行过程中有[color=cyan]2[/color]颗[b]钻石[/b]环绕。[/center]" diff --git a/scripts/Contents/Bullets/Diamond2.gd b/scripts/Contents/Bullets/Diamond2.gd index 0957f76..423ae1b 100644 --- a/scripts/Contents/Bullets/Diamond2.gd +++ b/scripts/Contents/Bullets/Diamond2.gd @@ -1,6 +1,12 @@ extends BulletBase class_name Diamond2Bullet +@onready var staticSprite: Sprite2D = $%static + func ai(): if is_instance_valid(parent): position = parent.position + else: + if animator.is_playing(): + animator.stop(true) + PresetBulletAI.forward(self, staticSprite.global_rotation) diff --git a/scripts/Contents/Weapons/BlueCrystal.gd b/scripts/Contents/Weapons/BlueCrystal.gd index 6dc6a96..540d822 100644 --- a/scripts/Contents/Weapons/BlueCrystal.gd +++ b/scripts/Contents/Weapons/BlueCrystal.gd @@ -3,7 +3,7 @@ extends Weapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 1 * to * soulLevel - origin["count"] = 1 * soulLevel + origin["count"] = 1 + 1 * soulLevel return origin func attack(entity: EntityBase): for i in BulletBase.generate(ComponentManager.getBullet("BlueCrystal"), entity, entity.findWeaponAnchor("normal"), deg_to_rad(randf_range(0, 360))):