From 3eb1f84a21d85ad05662a1e995cef4ac8fff59f5 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: Fri, 23 Jan 2026 23:44:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=AD=A6=E5=99=A8):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=85=B8=E8=9A=80=E9=A3=8E=E6=9A=B4=E6=AD=A6=E5=99=A8=E5=8F=8A?= =?UTF-8?q?=E4=BA=94=E7=A7=8D=E9=85=B8=E6=B6=B2=E5=AD=90=E5=BC=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实现酸蚀风暴武器系统,包含五种不同类型的酸液子弹: 1. 硫酸:命中时溅射1~3滴酸液 2. 硝酸:造成额外伤害 3. 盐酸:降低敌人移动和攻击速度 4. 碳酸:可无限穿透并逐渐扩大 5. 磷酸:增加敌人散射角 同时调整武器数值平衡,更新VSCode配置中的Godot引擎路径 --- .vscode/settings.json | 2 +- components/Bullets/AcidBulletBase.tscn | 28 +++++++++ components/Bullets/AcidC.tscn | 13 ++++ components/Bullets/AcidCl.tscn | 10 +++ components/Bullets/AcidN.tscn | 10 +++ components/Bullets/AcidP.tscn | 10 +++ components/Bullets/AcidS.tscn | 10 +++ components/Characters/Rooster.tscn | 4 +- components/Weapons/AcidWind.tscn | 34 +++++----- components/Weapons/AcidWind2.tscn | 58 ------------------ resources/bullets/acids/template.png | Bin 0 -> 409 bytes resources/bullets/acids/template.png.import | 40 ++++++++++++ scripts/Contents/Bullets/AcidBulletBase.gd | 17 +++++ .../Contents/Bullets/AcidBulletBase.gd.uid | 1 + scripts/Contents/Bullets/AcidC.gd | 7 +++ scripts/Contents/Bullets/AcidC.gd.uid | 1 + scripts/Contents/Bullets/AcidCl.gd | 6 ++ scripts/Contents/Bullets/AcidCl.gd.uid | 1 + scripts/Contents/Bullets/AcidN.gd | 5 ++ scripts/Contents/Bullets/AcidN.gd.uid | 1 + scripts/Contents/Bullets/AcidP.gd | 5 ++ scripts/Contents/Bullets/AcidP.gd.uid | 1 + scripts/Contents/Bullets/AcidS.gd | 8 +++ scripts/Contents/Bullets/AcidS.gd.uid | 1 + scripts/Contents/Weapons/AcidWind.gd | 38 ++++++++++++ scripts/Contents/Weapons/AcidWind.gd.uid | 1 + scripts/Structs/Weapon.gd | 2 +- 27 files changed, 236 insertions(+), 78 deletions(-) create mode 100644 components/Bullets/AcidBulletBase.tscn create mode 100644 components/Bullets/AcidC.tscn create mode 100644 components/Bullets/AcidCl.tscn create mode 100644 components/Bullets/AcidN.tscn create mode 100644 components/Bullets/AcidP.tscn create mode 100644 components/Bullets/AcidS.tscn delete mode 100644 components/Weapons/AcidWind2.tscn create mode 100644 resources/bullets/acids/template.png create mode 100644 resources/bullets/acids/template.png.import create mode 100644 scripts/Contents/Bullets/AcidBulletBase.gd create mode 100644 scripts/Contents/Bullets/AcidBulletBase.gd.uid create mode 100644 scripts/Contents/Bullets/AcidC.gd create mode 100644 scripts/Contents/Bullets/AcidC.gd.uid create mode 100644 scripts/Contents/Bullets/AcidCl.gd create mode 100644 scripts/Contents/Bullets/AcidCl.gd.uid create mode 100644 scripts/Contents/Bullets/AcidN.gd create mode 100644 scripts/Contents/Bullets/AcidN.gd.uid create mode 100644 scripts/Contents/Bullets/AcidP.gd create mode 100644 scripts/Contents/Bullets/AcidP.gd.uid create mode 100644 scripts/Contents/Bullets/AcidS.gd create mode 100644 scripts/Contents/Bullets/AcidS.gd.uid create mode 100644 scripts/Contents/Weapons/AcidWind.gd create mode 100644 scripts/Contents/Weapons/AcidWind.gd.uid diff --git a/.vscode/settings.json b/.vscode/settings.json index bf6850f..06f80e2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "godotTools.editorPath.godot4": "d:\\Program Files\\Godot\\godot43.exe" + "godotTools.editorPath.godot4": "d:\\Program Files\\godot\\godot45.exe" } \ No newline at end of file diff --git a/components/Bullets/AcidBulletBase.tscn b/components/Bullets/AcidBulletBase.tscn new file mode 100644 index 0000000..2ac7d10 --- /dev/null +++ b/components/Bullets/AcidBulletBase.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=5 format=3 uid="uid://qx8h1dcbyy1j"] + +[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_hfsul"] +[ext_resource type="Script" uid="uid://wt1fn2vjtlen" path="res://scripts/Contents/Bullets/AcidBulletBase.gd" id="2_y4hkm"] +[ext_resource type="Texture2D" uid="uid://b47ixncbxcs4u" path="res://resources/bullets/acids/template.png" id="3_rku1t"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_3gf7s"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("3_rku1t") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] + +[node name="AcidBulletBase" instance=ExtResource("1_hfsul")] +script = ExtResource("2_y4hkm") +acidType = 0 +displayName = "酸液" +lifeTime = 2000.0 + +[node name="texture" parent="." index="0"] +sprite_frames = SubResource("SpriteFrames_3gf7s") + +[node name="hitbox" parent="." index="1"] +visible = false diff --git a/components/Bullets/AcidC.tscn b/components/Bullets/AcidC.tscn new file mode 100644 index 0000000..329d881 --- /dev/null +++ b/components/Bullets/AcidC.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=3 format=3 uid="uid://d1pjay8rhvwap"] + +[ext_resource type="PackedScene" uid="uid://qx8h1dcbyy1j" path="res://components/Bullets/AcidBulletBase.tscn" id="1_l70ci"] +[ext_resource type="Script" uid="uid://8h8e35gwre27" path="res://scripts/Contents/Bullets/AcidC.gd" id="2_nxpf5"] + +[node name="AcidC" instance=ExtResource("1_l70ci")] +script = ExtResource("2_nxpf5") +speed = 5.0 +penerate = 1.0 +lifeTime = 4000.0 + +[node name="texture" parent="." index="0"] +modulate = Color(1, 0.7075234, 0.6972954, 1) diff --git a/components/Bullets/AcidCl.tscn b/components/Bullets/AcidCl.tscn new file mode 100644 index 0000000..85b74c6 --- /dev/null +++ b/components/Bullets/AcidCl.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=3 uid="uid://basg7o28xjlli"] + +[ext_resource type="PackedScene" uid="uid://qx8h1dcbyy1j" path="res://components/Bullets/AcidBulletBase.tscn" id="1_cxued"] +[ext_resource type="Script" uid="uid://dp8e5samuurdn" path="res://scripts/Contents/Bullets/AcidCl.gd" id="2_2nyoy"] + +[node name="AcidCl" instance=ExtResource("1_cxued")] +script = ExtResource("2_2nyoy") + +[node name="texture" parent="." index="0"] +modulate = Color(0.95498145, 1, 0.5526121, 1) diff --git a/components/Bullets/AcidN.tscn b/components/Bullets/AcidN.tscn new file mode 100644 index 0000000..19262b6 --- /dev/null +++ b/components/Bullets/AcidN.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=3 uid="uid://cwfguraet2bsc"] + +[ext_resource type="PackedScene" uid="uid://qx8h1dcbyy1j" path="res://components/Bullets/AcidBulletBase.tscn" id="1_6376o"] +[ext_resource type="Script" uid="uid://ccjdi34ney8kl" path="res://scripts/Contents/Bullets/AcidN.gd" id="2_87vas"] + +[node name="AcidN" instance=ExtResource("1_6376o")] +script = ExtResource("2_87vas") + +[node name="texture" parent="." index="0"] +modulate = Color(0.56576514, 1, 0.9533231, 1) diff --git a/components/Bullets/AcidP.tscn b/components/Bullets/AcidP.tscn new file mode 100644 index 0000000..22fbf49 --- /dev/null +++ b/components/Bullets/AcidP.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=3 uid="uid://do52uadx856ys"] + +[ext_resource type="PackedScene" uid="uid://qx8h1dcbyy1j" path="res://components/Bullets/AcidBulletBase.tscn" id="1_y3as2"] +[ext_resource type="Script" uid="uid://bef6n4hwn1niu" path="res://scripts/Contents/Bullets/AcidP.gd" id="2_yx8yh"] + +[node name="AcidP" instance=ExtResource("1_y3as2")] +script = ExtResource("2_yx8yh") + +[node name="texture" parent="." index="0"] +modulate = Color(1, 0.59425545, 0, 1) diff --git a/components/Bullets/AcidS.tscn b/components/Bullets/AcidS.tscn new file mode 100644 index 0000000..9c03177 --- /dev/null +++ b/components/Bullets/AcidS.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=3 uid="uid://dofhep8hma20k"] + +[ext_resource type="PackedScene" uid="uid://qx8h1dcbyy1j" path="res://components/Bullets/AcidBulletBase.tscn" id="1_h2wny"] +[ext_resource type="Script" uid="uid://dm4hwimsk8tx2" path="res://scripts/Contents/Bullets/AcidS.gd" id="2_m04ix"] + +[node name="AcidS" instance=ExtResource("1_h2wny")] +script = ExtResource("2_m04ix") + +[node name="texture" parent="." index="0"] +modulate = Color(0.31764707, 1, 0, 1) diff --git a/components/Characters/Rooster.tscn b/components/Characters/Rooster.tscn index 794dd4d..9792d84 100644 --- a/components/Characters/Rooster.tscn +++ b/components/Characters/Rooster.tscn @@ -2,7 +2,7 @@ [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://dwsyn746hr25d" path="res://components/Weapons/MushroomPickaxe.tscn" id="3_da2ca"] +[ext_resource type="PackedScene" uid="uid://yq7vmijwvgx1" path="res://components/Weapons/AcidWind.tscn" id="3_da2ca"] [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"] @@ -58,7 +58,7 @@ metadata/_edit_vertical_guides_ = [71.0] [node name="weaponStore" parent="." index="1"] process_mode = 4 -[node name="MushroomPickaxe" parent="weaponStore" index="0" instance=ExtResource("3_da2ca")] +[node name="AcidWind" parent="weaponStore" index="0" instance=ExtResource("3_da2ca")] debugRebuild = false [node name="sprint" parent="sounds" index="0"] diff --git a/components/Weapons/AcidWind.tscn b/components/Weapons/AcidWind.tscn index c91d1e7..c1178e6 100644 --- a/components/Weapons/AcidWind.tscn +++ b/components/Weapons/AcidWind.tscn @@ -1,41 +1,43 @@ -[gd_scene load_steps=3 format=3 uid="uid://yq7vmijwvgx1"] +[gd_scene load_steps=4 format=3 uid="uid://yq7vmijwvgx1"] [ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_pyyxv"] +[ext_resource type="Script" uid="uid://bxa5hc7aokisg" path="res://scripts/Contents/Weapons/AcidWind.gd" id="2_1j38u"] [ext_resource type="Texture2D" uid="uid://ckr8tw7fsa7qx" path="res://resources/weapons/AcidWind.png" id="2_pnd3r"] [node name="AcidWind" instance=ExtResource("1_pyyxv")] +script = ExtResource("2_1j38u") avatarTexture = ExtResource("2_pnd3r") displayName = "酸蚀风暴" quality = 4 typeTopic = 3 costBeachball = 200 store = { -"atk": 5, +"atk": 0.5, "c-atk": 1.0, -"cl-atkspeed": 0.02, -"cl-speed": 0.03, -"n-atk": 5.0, -"p-offset": 2.0, +"cl-atkspeed": 0.001, +"cl-speed": 0.001, +"n-atk": 1.0, +"p-offset": 0.1, "s-count-max": 3.0, -"weakatk": 1.0 +"weakatk": 0.25 } storeType = { -"atk": 1, +"atk": 0, "c-atk": 1, "cl-atkspeed": 2, "cl-speed": 2, "n-atk": 1, "p-offset": 3, "s-count-max": 1, -"weakatk": 1 +"weakatk": 0 } descriptionTemplate = "高速随机喷射以下五种[b]酸[/b]之一,强酸可造成$atk点伤害,弱酸造成$weakatk点伤害。 [color=green][b]硫酸[/b][/color]:命中时溅射1~$s-count-max滴[b]硫酸[/b]。 [color=lightblue][b]硝酸[/b][/color]:额外造成$n-atk点伤害。 [color=lightyellow][b]盐酸[/b][/color]:使敌人 [i]移动速度[/i] 降低$cl-speed,[i]攻击速度[/i] 降低$cl-atkspeed。 -[color=pink][b]碳酸[/b][/color]:命中时挥发为气体向前扩散,敌人接触造成$c-atk点伤害,可无限穿透。 +[color=pink][b]碳酸[/b][/color]:可无限穿透,碰撞体积会越来越大,但飞行速度稍慢且有额外散射。 [color=orange][b]磷酸[/b][/color]:使敌人 [i]散射角[/i] 增加$p-offset。" -cooldown = 10.0 +cooldown = 0.0 debugRebuild = true [node name="avatar" parent="container/info" index="0"] @@ -50,9 +52,9 @@ quality = 4 typeTopic = 3 [node name="description" parent="container" index="2"] -text = "[center]高速随机喷射以下五种[b]酸[/b]之一,强酸可造成[color=cyan]5[/color]点伤害,弱酸造成[color=cyan]1[/color]点伤害。 +text = "[center]高速随机喷射以下五种[b]酸[/b]之一,强酸可造成[color=cyan]0.50[/color]点伤害,弱酸造成[color=cyan]0.25[/color]点伤害。 [color=green][b]硫酸[/b][/color]:命中时溅射1~[color=cyan]3[/color]滴[b]硫酸[/b]。 -[color=lightblue][b]硝酸[/b][/color]:额外造成[color=cyan]5[/color]点伤害。 -[color=lightyellow][b]盐酸[/b][/color]:使敌人 [i]移动速度[/i] 降低[color=cyan]3%[/color],[i]攻击速度[/i] 降低[color=cyan]2%[/color]。 -[color=pink][b]碳酸[/b][/color]:命中时挥发为气体向前扩散,敌人接触造成[color=cyan]1[/color]点伤害,可无限穿透。 -[color=orange][b]磷酸[/b][/color]:使敌人 [i]散射角[/i] 增加[color=cyan]2.0°[/color]。[/center]" +[color=lightblue][b]硝酸[/b][/color]:额外造成[color=cyan]1[/color]点伤害。 +[color=lightyellow][b]盐酸[/b][/color]:使敌人 [i]移动速度[/i] 降低[color=cyan]0.1%[/color],[i]攻击速度[/i] 降低[color=cyan]0.1%[/color]。 +[color=pink][b]碳酸[/b][/color]:可无限穿透,碰撞体积会越来越大,但飞行速度稍慢且有额外散射。 +[color=orange][b]磷酸[/b][/color]:使敌人 [i]散射角[/i] 增加[color=cyan]0.1°[/color]。[/center]" diff --git a/components/Weapons/AcidWind2.tscn b/components/Weapons/AcidWind2.tscn deleted file mode 100644 index c10d505..0000000 --- a/components/Weapons/AcidWind2.tscn +++ /dev/null @@ -1,58 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://di00g0wvglc8f"] - -[ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_oxen4"] -[ext_resource type="Texture2D" uid="uid://ckr8tw7fsa7qx" path="res://resources/weapons/AcidWind.png" id="2_nvjyi"] - -[node name="AcidWind" instance=ExtResource("1_oxen4")] -avatarTexture = ExtResource("2_nvjyi") -displayName = "酸蚀风暴" -quality = 4 -typeTopic = 3 -costBeachball = 200 -store = { -"atk": 5, -"c-atk": 1.0, -"cl-atkspeed": 0.02, -"cl-speed": 0.03, -"n-atk": 5.0, -"p-offset": 2.0, -"s-count-max": 3.0, -"weakatk": 1.0 -} -storeType = { -"atk": 1, -"c-atk": 1, -"cl-atkspeed": 2, -"cl-speed": 2, -"n-atk": 1, -"p-offset": 3, -"s-count-max": 1, -"weakatk": 1 -} -descriptionTemplate = "高速随机喷射以下五种[b]酸[/b]之一,强酸可造成$atk点伤害,弱酸造成$weakatk点伤害。 -[color=green][b]硫酸[/b][/color]:命中时溅射1~$s-count-max滴[b]硫酸[/b]。 -[color=lightblue][b]硝酸[/b][/color]:额外造成$n-atk点伤害。 -[color=lightyellow][b]盐酸[/b][/color]:使敌人 [i]移动速度[/i] 降低$cl-speed,[i]攻击速度[/i] 降低$cl-atkspeed。 -[color=pink][b]碳酸[/b][/color]:命中时挥发为气体向前扩散,敌人接触造成$c-atk点伤害,可无限穿透。 -[color=orange][b]磷酸[/b][/color]:使敌人 [i]散射角[/i] 增加$p-offset。" -cooldown = 10.0 -debugRebuild = true - -[node name="avatar" parent="container/info" index="0"] -texture = ExtResource("2_nvjyi") - -[node name="beachball" parent="container/info/infos" index="1"] -count = 200 - -[node name="name" parent="container/info" index="2"] -displayName = "酸蚀风暴" -quality = 4 -typeTopic = 3 - -[node name="description" parent="container" index="2"] -text = "[center]高速随机喷射以下五种[b]酸[/b]之一,强酸可造成[color=cyan]5[/color]点伤害,弱酸造成[color=cyan]1[/color]点伤害。 -[color=green][b]硫酸[/b][/color]:命中时溅射1~[color=cyan]3[/color]滴[b]硫酸[/b]。 -[color=lightblue][b]硝酸[/b][/color]:额外造成[color=cyan]5[/color]点伤害。 -[color=lightyellow][b]盐酸[/b][/color]:使敌人 [i]移动速度[/i] 降低[color=cyan]3%[/color],[i]攻击速度[/i] 降低[color=cyan]2%[/color]。 -[color=pink][b]碳酸[/b][/color]:命中时挥发为气体向前扩散,敌人接触造成[color=cyan]1[/color]点伤害,可无限穿透。 -[color=orange][b]磷酸[/b][/color]:使敌人 [i]散射角[/i] 增加[color=cyan]2.0°[/color]。[/center]" diff --git a/resources/bullets/acids/template.png b/resources/bullets/acids/template.png new file mode 100644 index 0000000000000000000000000000000000000000..79620b4343853fd2d463f5cb216e115c92d9c6b0 GIT binary patch literal 409 zcmeAS@N?(olHy`uVBq!ia0vp^B0$W;!3HFgc;@~FQjEnx?oNz1PwLbIIV|apzK#qG z8~eHcB(ehe3dtTpz6=aiY77hwEes65fI|H(?D8gCb5n0T@z%2~Ij105pNB{-dOFVsD*N3f=W| zaSYKozxL8buckzi_K(kfO9T$J6--iSk&3w^!!v!|f{W1^83m`k1NL+sSb5f(p!|pS47&DuL@Ch}ECn6R1*+Z}F`!#dH>I^qWU54onvO9iOF~7{} zyybV%Gv?X-x$xk21iyxd52>*{ktN&Z String: elif type == FieldStore.DataType.INTEGER: return "%d" % value elif type == FieldStore.DataType.PERCENT: - return ("%d" % (value * 100)) + "%" + return ("%.1f" % (value * 100)) + "%" elif type == FieldStore.DataType.ANGLE: return "%.1f°" % value elif type == FieldStore.DataType.FREQUENCY: