From 3ae184faa8708cdca092451f722db68a1cfd1575 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: Sun, 21 Sep 2025 16:17:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=BD=A9=E8=99=B9?= =?UTF-8?q?=E7=8C=AB=E5=AD=90=E5=BC=B9=E5=91=BD=E4=B8=AD=E6=95=88=E6=9E=9C?= =?UTF-8?q?=E5=92=8C=E6=AD=A6=E5=99=A8=E5=B9=B3=E8=A1=A1=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为彩虹猫子弹添加命中时的爆炸效果和随机旋转 - 调整多个武器的数值平衡,包括BigLaser、VectorStar、LGBT和Meowmere - 为子弹添加穿透伤害衰减属性 - 更新Meowmere武器的描述和数值 - 添加CatBoom特效场景 - 从Rooster角色中移除部分武器 - 为World场景添加纹理过滤设置 --- components/Characters/Rooster.tscn | 19 +------- components/Effects/CatBoom.tscn | 47 ++++++++++++++++++++ components/Scenes/World.tscn | 2 + components/Weapons/Meowmere.tscn | 14 +++--- scripts/Contents/Bullets/RainbowCat.gd | 3 ++ scripts/Contents/Weapons/BigLaser.gd | 2 +- scripts/Contents/Weapons/LGBTWeapon.gd | 2 +- scripts/Contents/Weapons/Meowmere.gd | 4 +- scripts/Contents/Weapons/VectorStarWeapon.gd | 2 +- scripts/Statemachine/BulletBase.gd | 2 + 10 files changed, 69 insertions(+), 28 deletions(-) create mode 100644 components/Effects/CatBoom.tscn diff --git a/components/Characters/Rooster.tscn b/components/Characters/Rooster.tscn index 52e1b06..ed88bf2 100644 --- a/components/Characters/Rooster.tscn +++ b/components/Characters/Rooster.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=21 format=3 uid="uid://bm7ymrri6pykb"] +[gd_scene load_steps=16 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" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"] @@ -7,17 +7,12 @@ [ext_resource type="Texture2D" uid="uid://ci2ik43ce82uy" path="res://resources/characters/cock/rooster-b.svg" id="3_b0fgx"] [ext_resource type="PackedScene" uid="uid://frwt0fgrpskb" path="res://components/Weapons/Meowmere.tscn" id="3_e2rag"] [ext_resource type="PackedScene" uid="uid://dlaks67h2osms" path="res://components/Weapons/ChainGun.tscn" id="3_fnlro"] -[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_ms5sq"] [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="PackedScene" uid="uid://wl8u5m52708w" path="res://components/Weapons/LGBT.tscn" id="4_pb8qn"] -[ext_resource type="PackedScene" uid="uid://cxabqjo7skxev" path="res://components/Weapons/BigLaser.tscn" id="4_plqwu"] [ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"] -[ext_resource type="PackedScene" uid="uid://bb1uh8k7gkhr7" path="res://components/Weapons/VectorStar.tscn" id="6_fvy5n"] [ext_resource type="AudioStream" uid="uid://4wuuf1osk0yv" path="res://resources/sounds/effect/Low Boing.wav" id="6_m5px1"] [ext_resource type="AudioStream" uid="uid://b10u6iir6uvqn" path="res://resources/sounds/effect/BigLaser.wav" id="8_7dhim"] [ext_resource type="PackedScene" uid="uid://dwsyn746hr25d" path="res://components/Weapons/MushroomPickaxe.tscn" id="9_85j0d"] -[ext_resource type="PackedScene" uid="uid://b2qhes4apaxsj" path="res://components/Weapons/NuclearBomb.tscn" id="10_ncj2v"] [sub_resource type="SpriteFrames" id="SpriteFrames_4v2ol"] animations = [{ @@ -61,18 +56,6 @@ offset_bottom = 315.0 offset_bottom = 315.0 debugRebuild = false -[node name="PurpleCrystal" parent="weaponStore" index="3" instance=ExtResource("3_ms5sq")] -debugRebuild = false - -[node name="VectorStar" parent="weaponStore" index="4" instance=ExtResource("6_fvy5n")] -debugRebuild = false - -[node name="LGBT" parent="weaponStore" index="5" instance=ExtResource("4_pb8qn")] - -[node name="BigLaser" parent="weaponStore" index="6" instance=ExtResource("4_plqwu")] - -[node name="NuclearBomb" parent="weaponStore" index="7" instance=ExtResource("10_ncj2v")] - [node name="sprint" parent="sounds" index="0"] stream = ExtResource("4_66s6c") diff --git a/components/Effects/CatBoom.tscn b/components/Effects/CatBoom.tscn new file mode 100644 index 0000000..fc19375 --- /dev/null +++ b/components/Effects/CatBoom.tscn @@ -0,0 +1,47 @@ +[gd_scene load_steps=9 format=3 uid="uid://b4y1kq7yger4h"] + +[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_fwc1i"] + +[sub_resource type="Curve" id="Curve_snh3o"] +_data = [Vector2(0.502092, 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_tr6r8"] +curve = SubResource("Curve_snh3o") + +[sub_resource type="Gradient" id="Gradient_v4pid"] +offsets = PackedFloat32Array(0, 0.16, 0.32, 0.48, 0.64, 0.8, 1) +colors = PackedColorArray(1, 0.75, 0.75, 1, 1, 0.8625, 0.75, 1, 1, 0.970833, 0.75, 1, 0.615, 0.82, 0.64575, 1, 0.75, 1, 0.966667, 1, 0.75, 0.883333, 1, 1, 0.858333, 0.75, 1, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_5ra8e"] +gradient = SubResource("Gradient_v4pid") + +[sub_resource type="Curve" id="Curve_a27b5"] +_data = [Vector2(0.497908, 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_sgxbq"] +curve = SubResource("Curve_a27b5") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_yytbm"] +particle_flag_disable_z = true +angle_min = 1.07288e-05 +angle_max = 360.0 +spread = 180.0 +initial_velocity_min = 80.0 +initial_velocity_max = 120.0 +gravity = Vector3(0, 0, 0) +damping_min = 50.0 +damping_max = 50.0 +scale_min = 3.0 +scale_max = 6.0 +scale_curve = SubResource("CurveTexture_sgxbq") +color_initial_ramp = SubResource("GradientTexture1D_5ra8e") +alpha_curve = SubResource("CurveTexture_tr6r8") + +[node name="CatBoom" instance=ExtResource("1_fwc1i")] + +[node name="particles" parent="." index="1"] +z_index = 1 +amount = 150 +process_material = SubResource("ParticleProcessMaterial_yytbm") diff --git a/components/Scenes/World.tscn b/components/Scenes/World.tscn index 73ff7af..69dd1ea 100644 --- a/components/Scenes/World.tscn +++ b/components/Scenes/World.tscn @@ -69,6 +69,7 @@ radius = 57.3149 [node name="world" type="Node2D"] y_sort_enabled = true +texture_filter = 1 script = ExtResource("1_lxsxj") metadata/_edit_vertical_guides_ = [-1.0, 57.0] @@ -94,6 +95,7 @@ metadata/_edit_lock_ = true z_index = -100 scale = Vector2(5, 5) texture = ExtResource("4_oy4jj") +metadata/_edit_lock_ = true [node name="star1" type="CollisionShape2D" parent="map"] position = Vector2(-2057, 1298) diff --git a/components/Weapons/Meowmere.tscn b/components/Weapons/Meowmere.tscn index 3f0ac6b..b409401 100644 --- a/components/Weapons/Meowmere.tscn +++ b/components/Weapons/Meowmere.tscn @@ -12,16 +12,18 @@ quality = 2 typeTopic = 3 costBeachball = 600 store = { -"atk": 10, -"childatk": 5, -"count": 1.0 +"atk": 15, +"childatk": 10, +"count": 1.0, +"reduce": 0.25 } storeType = { "atk": 1, "childatk": 1, -"count": 1.0 +"count": 1.0, +"reduce": 2 } -descriptionTemplate = "发射$count只造成$childatk点伤害的[b]彩虹猫[/b]的同时挥舞造成$atk点伤害。" +descriptionTemplate = "发射$count只伤害以$reduce衰减的造成$childatk点伤害的[b]彩虹猫[/b]的同时挥舞造成$atk点伤害。" cooldown = 200.0 [node name="avatar" parent="container/info" index="0"] @@ -36,4 +38,4 @@ quality = 2 typeTopic = 3 [node name="description" parent="container" index="2"] -text = "[center]发射[color=cyan]1[/color]→[color=yellow]1[/color]只造成[color=cyan]5[/color]→[color=yellow]3[/color]点伤害的[b]彩虹猫[/b]的同时挥舞造成[color=cyan]15[/color]→[color=yellow]22[/color]点伤害。[/center]" +text = "[center]发射[color=cyan]1[/color]→[color=yellow]1[/color]只伤害以[color=cyan]25%[/color]→[color=yellow]23%[/color]衰减的造成[color=cyan]5[/color]→[color=yellow]7[/color]点伤害的[b]彩虹猫[/b]的同时挥舞造成[color=cyan]10[/color]→[color=yellow]13[/color]点伤害。[/center]" diff --git a/scripts/Contents/Bullets/RainbowCat.gd b/scripts/Contents/Bullets/RainbowCat.gd index f5060ea..1b193ed 100644 --- a/scripts/Contents/Bullets/RainbowCat.gd +++ b/scripts/Contents/Bullets/RainbowCat.gd @@ -5,3 +5,6 @@ func register(): penerate = 1 func ai(): PresetBulletAI.forward(self, rotation) +func succeedToHit(_dmg: float, _entity: EntityBase): + EffectController.create(ComponentManager.getEffect("CatBoom"), position).shot() + rotation_degrees = randf_range(0, 360) diff --git a/scripts/Contents/Weapons/BigLaser.gd b/scripts/Contents/Weapons/BigLaser.gd index 67c28f4..5c34ad5 100644 --- a/scripts/Contents/Weapons/BigLaser.gd +++ b/scripts/Contents/Weapons/BigLaser.gd @@ -4,7 +4,7 @@ class_name BigLaserWeapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 5 * to * soulLevel - origin["time"] /= 1 + 0.02 * to * soulLevel + origin["time"] /= 1 + 0.05 * to * soulLevel return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") diff --git a/scripts/Contents/Weapons/LGBTWeapon.gd b/scripts/Contents/Weapons/LGBTWeapon.gd index 7bfb661..8a83a5f 100644 --- a/scripts/Contents/Weapons/LGBTWeapon.gd +++ b/scripts/Contents/Weapons/LGBTWeapon.gd @@ -7,7 +7,7 @@ func update(to: int, origin: Dictionary, _entity: EntityBase): origin["count"] += to * soulLevel origin["power"] += 0.05 * to * soulLevel origin["trace"] += 0.25 * to * soulLevel - origin["angle"] /= 1 + 0.02 * to * soulLevel + origin["angle"] /= 1 + 0.05 * to * soulLevel return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") diff --git a/scripts/Contents/Weapons/Meowmere.gd b/scripts/Contents/Weapons/Meowmere.gd index 2041455..ea7cae0 100644 --- a/scripts/Contents/Weapons/Meowmere.gd +++ b/scripts/Contents/Weapons/Meowmere.gd @@ -4,7 +4,8 @@ extends Weapon func update(to, origin, _entity): origin["atk"] += 3 * to * soulLevel origin["count"] = 1 * soulLevel - origin["childatk"] = 2 * to * soulLevel + origin["childatk"] += 2 * to * soulLevel + origin["reduce"] /= 1 + 0.05 * to * soulLevel return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") @@ -13,3 +14,4 @@ func attack(entity: EntityBase): for i in readStore("count"): for j in BulletBase.generate(ComponentManager.getBullet("RainbowCat"), entity, weaponPos, weaponPos.angle_to_point(get_global_mouse_position())): j.damage = readStore("childatk") + j.penerateDamageReduction = readStore("reduce") diff --git a/scripts/Contents/Weapons/VectorStarWeapon.gd b/scripts/Contents/Weapons/VectorStarWeapon.gd index 2e6ffde..147b06a 100644 --- a/scripts/Contents/Weapons/VectorStarWeapon.gd +++ b/scripts/Contents/Weapons/VectorStarWeapon.gd @@ -4,7 +4,7 @@ class_name VectorStarWeapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 5 * to * soulLevel - origin["forwardtime"] /= 1 + 0.02 * to * soulLevel + origin["forwardtime"] /= 1 + 0.05 * to * soulLevel origin["mincount"] += 0.5 * to * soulLevel origin["maxcount"] += 1.5 * to * soulLevel return origin diff --git a/scripts/Statemachine/BulletBase.gd b/scripts/Statemachine/BulletBase.gd index 2b93d09..cda4879 100644 --- a/scripts/Statemachine/BulletBase.gd +++ b/scripts/Statemachine/BulletBase.gd @@ -5,6 +5,7 @@ class_name BulletBase @export var speed: float = 10.0 @export var damage: float = 10.0 @export var penerate: float = 0.0 +@export var penerateDamageReduction: float = 0.0 @export var lifeDistance: float = -1 # -1表示无限距离 @export var lifeTime: float = -1 # -1表示无限时间 @export var indisDamage: bool = false # 是否无差别伤害(不区分敌我) @@ -88,6 +89,7 @@ func hit(target: Node): succeedToHit(resultDamage, entity) if MathTool.rate(fullPenerate()): penerate -= entity.fields[FieldStore.Entity.PENARATION_RESISTANCE] + damage *= 1.0 - penerateDamageReduction else: tryDestroy() func forward(direction: Vector2):