1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00

feat(武器): 添加河豚刺针武器及其相关资源

新增河豚刺针武器,包含以下内容:
- 添加河豚武器图标和音效资源
- 实现Needle子弹类及其反弹逻辑
- 创建Hetun武器类实现散射攻击
- 添加子弹特效和碰撞检测
- 更新公鸡角色默认武器配置
This commit is contained in:
2026-03-14 19:09:55 +08:00
parent 06413d204c
commit ff9273ca29
15 changed files with 338 additions and 8 deletions
+92
View File
@@ -0,0 +1,92 @@
[gd_scene load_steps=14 format=3 uid="uid://bhnhfefm4m87i"]
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_yrddj"]
[ext_resource type="Texture2D" uid="uid://d4h0i65n0dveo" path="res://resources/bullets/needle/1.svg" id="2_enod1"]
[ext_resource type="Script" uid="uid://whqgw065ifss" path="res://scripts/Contents/Bullets/Needle.gd" id="2_mjqpl"]
[sub_resource type="SpriteFrames" id="SpriteFrames_mjqpl"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_enod1")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="Curve" id="Curve_kvg2u"]
_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_n2a3y"]
curve = SubResource("Curve_kvg2u")
[sub_resource type="Gradient" id="Gradient_ux5gl"]
colors = PackedColorArray(1, 0.47012484, 0, 1, 1, 0.9023062, 0.70387197, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_ikerd"]
gradient = SubResource("Gradient_ux5gl")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_3yvym"]
particle_flag_disable_z = true
emission_shape = 3
emission_box_extents = Vector3(1, 40, 1)
angle_min = 1.0728835e-05
angle_max = 360.00003
spread = 15.0
initial_velocity_min = -50.0
initial_velocity_max = 50.0
gravity = Vector3(0, 200, 0)
scale_max = 5.0
color_initial_ramp = SubResource("GradientTexture1D_ikerd")
alpha_curve = SubResource("CurveTexture_n2a3y")
[sub_resource type="Curve" id="Curve_enod1"]
_data = [Vector2(0, 0.4), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_mjqpl"]
curve = SubResource("Curve_enod1")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_enod1"]
particle_flag_disable_z = true
direction = Vector3(0, 1, 0)
spread = 0.0
initial_velocity_min = 150.0
initial_velocity_max = 150.0
gravity = Vector3(0, 0, 0)
scale_min = 0.79999995
scale_max = 0.79999995
alpha_curve = SubResource("CurveTexture_mjqpl")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_enod1"]
size = Vector2(138, 8.765)
[node name="Needle" instance=ExtResource("1_yrddj")]
script = ExtResource("2_mjqpl")
penerate = 1.0
lifeTime = 4000.0
[node name="texture" parent="." index="0"]
position = Vector2(73, 0)
rotation = 1.5707964
sprite_frames = SubResource("SpriteFrames_mjqpl")
[node name="light" type="GPUParticles2D" parent="texture" index="1"]
z_index = -1
position = Vector2(0, 34)
amount = 50
preprocess = 1.0
local_coords = true
process_material = SubResource("ParticleProcessMaterial_3yvym")
[node name="trail" type="GPUParticles2D" parent="texture" index="2"]
z_index = -1
texture = ExtResource("2_enod1")
local_coords = true
process_material = SubResource("ParticleProcessMaterial_enod1")
[node name="hitbox" parent="." index="1"]
position = Vector2(67, 0)
shape = SubResource("RectangleShape2D_enod1")
+3 -7
View File
@@ -1,11 +1,10 @@
[gd_scene load_steps=21 format=3 uid="uid://dky8574uqc18r"]
[gd_scene load_steps=20 format=3 uid="uid://dky8574uqc18r"]
[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://b5ebx8duvgtt5" path="res://components/Weapons/Oxygener.tscn" id="3_0omr3"]
[ext_resource type="PackedScene" uid="uid://c65tbxm3tclw0" path="res://components/Weapons/Hetun.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="PackedScene" uid="uid://cxabqjo7skxev" path="res://components/Weapons/BigLaser.tscn" id="5_joj4g"]
[ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"]
[ext_resource type="AudioStream" uid="uid://4wuuf1osk0yv" path="res://resources/sounds/effect/Low Boing.wav" id="6_m5px1"]
[ext_resource type="Texture2D" uid="uid://fn8qx72clh38" path="res://resources/characters/cock/rooster-a.svg" id="8_da2ca"]
@@ -102,12 +101,9 @@ process_material = SubResource("ParticleProcessMaterial_joj4g")
[node name="weaponStore" parent="." index="2"]
process_mode = 4
[node name="Oxygener" parent="weaponStore" index="0" instance=ExtResource("3_0omr3")]
offset_bottom = 446.0
[node name="Hetun" parent="weaponStore" index="0" instance=ExtResource("3_da2ca")]
debugRebuild = false
[node name="BigLaser" parent="weaponStore" index="1" instance=ExtResource("5_joj4g")]
[node name="sprint" parent="sounds" index="0"]
stream = ExtResource("4_66s6c")
+57
View File
@@ -0,0 +1,57 @@
[gd_scene load_steps=12 format=3 uid="uid://bu0uy17pacv6n"]
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_1cfxs"]
[ext_resource type="AudioStream" uid="uid://dfn8gusfga5m0" path="res://resources/sounds/effect/Low Squeak.wav" id="2_30wog"]
[sub_resource type="Curve" id="Curve_1cfxs"]
_data = [Vector2(0.8, 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_30wog"]
curve = SubResource("Curve_1cfxs")
[sub_resource type="Gradient" id="Gradient_1cfxs"]
colors = PackedColorArray(1, 0.47012484, 0, 1, 1, 0.9023062, 0.70387197, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_30wog"]
gradient = SubResource("Gradient_1cfxs")
[sub_resource type="Curve" id="Curve_30wog"]
_limits = [0.0, 100.0, 0.0, 1.0]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 100), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_nreia"]
curve = SubResource("Curve_30wog")
[sub_resource type="Curve" id="Curve_nreia"]
_data = [Vector2(0.8, 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_j1fl3"]
curve = SubResource("Curve_nreia")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_tcn64"]
particle_flag_disable_z = true
angle_min = 1.0728835e-05
angle_max = 360.00003
direction = Vector3(-1, 0, 0)
spread = 15.0
initial_velocity_max = 100.0
gravity = Vector3(0, 0, 0)
damping_curve = SubResource("CurveTexture_nreia")
scale_max = 4.0
scale_curve = SubResource("CurveTexture_j1fl3")
color_initial_ramp = SubResource("GradientTexture1D_30wog")
alpha_curve = SubResource("CurveTexture_30wog")
[node name="Dustdown" instance=ExtResource("1_1cfxs")]
spawnSound = "spawn"
[node name="spawn" parent="sounds" index="0"]
stream = ExtResource("2_30wog")
[node name="particles" parent="." index="1"]
lifetime = 2.0
local_coords = true
process_material = SubResource("ParticleProcessMaterial_tcn64")
+34
View File
@@ -0,0 +1,34 @@
[gd_scene load_steps=4 format=3 uid="uid://c65tbxm3tclw0"]
[ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_021hd"]
[ext_resource type="Script" uid="uid://tfptal3sgfmy" path="res://scripts/Contents/Weapons/Hetun.gd" id="2_t2ywh"]
[ext_resource type="Texture2D" uid="uid://c1xrf8255jafi" path="res://resources/weapons/hetun.png" id="2_y0xe1"]
[node name="Hetun" instance=ExtResource("1_021hd")]
script = ExtResource("2_t2ywh")
avatarTexture = ExtResource("2_y0xe1")
displayName = "河豚"
quality = 0
store = {
"atk": 15,
"count": 10,
"penerate": 0.2
}
storeType = {
"atk": 1,
"count": 1,
"penerate": 2
}
descriptionTemplate = "散射5~$count针[b]河豚刺针[/b],每根针造成$atk点伤害,撞上敌人后有$penerate概率反弹。"
cooldown = 2000.0
debugRebuild = true
[node name="avatar" parent="container/info" index="0"]
texture = ExtResource("2_y0xe1")
[node name="name" parent="container/info" index="2"]
displayName = "河豚"
quality = 0
[node name="description" parent="container" index="2"]
text = "[center]散射5~[color=cyan]10[/color]针[b]河豚刺针[/b],每根针造成[color=cyan]15[/color]点伤害,撞上敌人后有[color=cyan]20.0%[/color]概率反弹。[/center]"
+1
View File
@@ -0,0 +1 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10.21088" height="147.52712" viewBox="0,0,10.21088,147.52712"><g transform="translate(-220.89456,-100.2385)"><g stroke="#cc9300" stroke-width="0" stroke-linecap="round" stroke-miterlimit="10"><g><path d="M226.0001,100.23851l5.10534,147.5l-10.21088,0.02299l5.10534,-147.5" fill="#805c00"/><path d="M226.04563,138.76964l3.77203,108.979l-7.54422,0.01699l3.77204,-108.979" fill="#ffb800"/><path d="M226.05478,163.26668l2.92324,84.45619l-5.84659,0.01316l2.92324,-84.45619" fill="#ffdb80"/><path d="M226.09683,190.70098l1.97382,57.02618l-3.94771,0.00889l1.97382,-57.02618" fill="#ffffff"/></g></g></g></svg><!--rotationCenter:19.105439999999987:79.761495-->

After

Width:  |  Height:  |  Size: 755 B

+43
View File
@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d4h0i65n0dveo"
path="res://.godot/imported/1.svg-7d7231bb3b71752d763553e1d0f756c7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/bullets/needle/1.svg"
dest_files=["res://.godot/imported/1.svg-7d7231bb3b71752d763553e1d0f756c7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
Binary file not shown.
@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://dfn8gusfga5m0"
path="res://.godot/imported/Low Squeak.wav-332cc0edb9200255d263350379684613.sample"
[deps]
source_file="res://resources/sounds/effect/Low Squeak.wav"
dest_files=["res://.godot/imported/Low Squeak.wav-332cc0edb9200255d263350379684613.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2
Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1xrf8255jafi"
path="res://.godot/imported/hetun.png-d33a239147dba03814e779bbbde3d40e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/weapons/hetun.png"
dest_files=["res://.godot/imported/hetun.png-d33a239147dba03814e779bbbde3d40e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
+21
View File
@@ -0,0 +1,21 @@
extends BulletBase
class_name NeedleBullet
var forwarding: bool = false
func spawn():
hitbox.disabled = true
func ai():
PresetBulletAI.forward(self , rotation)
if forwarding:
speed += 0.5
else:
speed -= 0.25
if speed <= 0:
forwarding = true
hitbox.disabled = false
func succeedToHit(_dmg: float, entity: EntityBase):
var effect = EffectController.create(ComponentManager.getEffect("Dustdown"), entity.position)
effect.rotation = rotation
effect.shot()
rotation = Vector2.from_angle(rotation).bounce((entity.position - position).normalized()).angle()
+1
View File
@@ -0,0 +1 @@
uid://whqgw065ifss
+1 -1
View File
@@ -16,7 +16,7 @@ func spawn():
anchor.global_rotation = 0
func ai():
speed *= 0.99
PresetBulletAI.forward(self, rotation)
PresetBulletAI.forward(self , rotation)
if timeLived() > countdown:
tryDestroy()
else:
+20
View File
@@ -0,0 +1,20 @@
@tool
extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 3 * to * soulLevel
origin["count"] += 5 * (soulLevel - 1)
origin["penerate"] += 0.1 * (soulLevel - 1)
return origin
func attack(entity: EntityBase):
for i in readStore("count"):
for bullet in BulletBase.generate(
ComponentManager.getBullet("Needle"),
entity,
entity.findWeaponAnchor("normal"),
entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()) + deg_to_rad(randf_range(-1, 1) * 30)
):
if bullet is NeedleBullet:
bullet.baseDamage = readStore("atk")
bullet.penerate = readStore("penerate")
return true
+1
View File
@@ -0,0 +1 @@
uid://tfptal3sgfmy