From 85db6b4232aa61c26c4a253b7981c52edcbb79d7 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, 6 Sep 2025 09:13:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=AD=A6=E5=99=A8):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=AD=A6=E5=99=A8=E5=B9=B3=E8=A1=A1=E6=80=A7=E5=92=8C=E4=BC=A4?= =?UTF-8?q?=E5=AE=B3=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 提高LGBT武器的能量消耗至50 - 为PurpleCrystal和BigLaser武器添加伤害值读取逻辑 - 增加BigLaser武器的伤害至40并优化dot时间计算 - 降低BigLaser的屏幕震动强度 - 优化BigLaser的伤害检测逻辑,防止跳帧 --- components/Weapons/BigLaser.tscn | 5 +++-- components/Weapons/LGBT.tscn | 2 +- scripts/Contents/Bullets/BigLaser.gd | 12 +++++++----- scripts/Contents/Weapons/BigLaser.gd | 5 ++++- scripts/Contents/Weapons/PurpleCrystal.gd | 3 ++- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/components/Weapons/BigLaser.tscn b/components/Weapons/BigLaser.tscn index 59e5f44..74a1598 100644 --- a/components/Weapons/BigLaser.tscn +++ b/components/Weapons/BigLaser.tscn @@ -14,7 +14,7 @@ typeTopic = 1 costs = Array[int]([0, 1]) costCounts = Array[int]([100, 50]) store = { -"atk": 35, +"atk": 40, "time": 0.1 } storeType = Array[int]([0, 0]) @@ -23,6 +23,7 @@ needEnergy = 100.0 cooldown = 6000.0 [node name="attack" parent="sounds" index="0"] +process_mode = 3 stream = ExtResource("4_cb5nh") [node name="avatar" parent="container/info" index="0"] @@ -37,4 +38,4 @@ quality = 2 typeTopic = 1 [node name="description" parent="container" index="2"] -text = "[center]每[color=cyan]0.1[/color]秒造成[color=cyan]35.0[/color]点伤害。[/center]" +text = "[center]每[color=cyan]0.1[/color]秒造成[color=cyan]40.0[/color]点伤害。[/center]" diff --git a/components/Weapons/LGBT.tscn b/components/Weapons/LGBT.tscn index 3730a01..34562e7 100644 --- a/components/Weapons/LGBT.tscn +++ b/components/Weapons/LGBT.tscn @@ -21,7 +21,7 @@ store = { } storeType = Array[int]([2, 0, 0, 1, 0]) descriptionTemplate = "发射$count条,每条间分隔$angle,可追踪$trace秒,效率为$power的带状彩虹,每条造成$atk点伤害。" -needEnergy = 10.0 +needEnergy = 50.0 cooldown = 500.0 [node name="avatar" parent="container/info" index="0"] diff --git a/scripts/Contents/Bullets/BigLaser.gd b/scripts/Contents/Bullets/BigLaser.gd index ca078c0..f0fb79a 100644 --- a/scripts/Contents/Bullets/BigLaser.gd +++ b/scripts/Contents/Bullets/BigLaser.gd @@ -1,12 +1,13 @@ extends BulletBase -class_name BigLaser # 这个子弹是玩家的超级武器,耗能高,dps也高 +class_name BigLaser + +var dotTime: float = 100 func register(): speed = 0 - damage = 35 penerate = 1 func spawn(): - CameraManager.shake(5000, 150) # 激光会运行5秒(5000毫秒),期间震屏超高强度 + CameraManager.shake(5000, 100) # 激光会运行5秒(5000毫秒),期间震屏超高强度 CameraManager.playAnimation("bigLaser") damage *= launcher.fields[FieldStore.Entity.ATTACK_SPEED] func ai(): @@ -14,7 +15,8 @@ func ai(): position = launcher.texture.global_position func applyDot(): hitbox.disabled = true - await TickTool.millseconds(100 / launcher.fields[FieldStore.Entity.ATTACK_SPEED]) + await TickTool.millseconds(dotTime / launcher.fields[FieldStore.Entity.ATTACK_SPEED]) hitbox.disabled = false - await TickTool.millseconds(100 / launcher.fields[FieldStore.Entity.ATTACK_SPEED]) + await TickTool.millseconds(dotTime / launcher.fields[FieldStore.Entity.ATTACK_SPEED]) + await TickTool.frame() # 等至少一帧,防止跳帧导致没检测到伤害 return true diff --git a/scripts/Contents/Weapons/BigLaser.gd b/scripts/Contents/Weapons/BigLaser.gd index f2145e9..9d99151 100644 --- a/scripts/Contents/Weapons/BigLaser.gd +++ b/scripts/Contents/Weapons/BigLaser.gd @@ -8,5 +8,8 @@ func update(to: int, origin: Dictionary, _entity: EntityBase): return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") - BulletBase.generate(preload("res://components/Bullets/BigLaser.tscn"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle()) + for bullet in BulletBase.generate(preload("res://components/Bullets/BigLaser.tscn"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle()): + var bigLaser: BigLaser = bullet + bigLaser.dotTime = readStore("time") * 1000 + bigLaser.damage = readStore("atk") return true diff --git a/scripts/Contents/Weapons/PurpleCrystal.gd b/scripts/Contents/Weapons/PurpleCrystal.gd index 0c05ec0..8062f36 100644 --- a/scripts/Contents/Weapons/PurpleCrystal.gd +++ b/scripts/Contents/Weapons/PurpleCrystal.gd @@ -7,5 +7,6 @@ func update(to: int, origin: Dictionary, _entity: EntityBase): return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") - BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle()) + for bullet in BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle()): + bullet.damage = readStore("atk") return true