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

refactor(武器系统): 重构VectorStar武器和子弹逻辑

调整VectorStar子弹的移动逻辑,移除forwarded变量并优化速度计算
修改VectorStar武器的属性计算公式,调整基础值和成长系数
更新VectorStar场景配置,调整攻击力、冷却时间等参数
将Rooster角色的默认武器替换为VectorStar
This commit is contained in:
2025-12-22 15:37:24 +08:00
parent 92cedf08b6
commit 747b057b22
5 changed files with 20 additions and 25 deletions
+3 -2
View File
@@ -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")
+3 -12
View File
@@ -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")
+10 -5
View File
@@ -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]"
+1 -3
View File
@@ -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())
+3 -3
View File
@@ -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")