1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 00:11:54 +08:00

feat(子弹): 重构小鸡激光攻击并优化子弹行为

- 替换原有Laser为ChickLaser,实现更华丽的激光效果
- 调整FireScan子弹速度和伤害值
- 优化Diamond子弹追踪逻辑和持续时间
- 新增PresetsAI.lockLauncher方法用于固定子弹位置
- 调整Chick角色的攻击冷却时间和攻击距离判定
This commit is contained in:
2025-08-29 11:17:02 +08:00
parent 187100f500
commit 5c16dcc294
10 changed files with 268 additions and 68 deletions
+3 -3
View File
@@ -9,14 +9,14 @@ func register():
fields[FieldStore.Entity.MAX_HEALTH] = 2000
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.35
attackCooldownMap[0] = 2000
attackCooldownMap[1] = 3000
attackCooldownMap[1] = 6000
attackCooldownMap[2] = 100
func ai():
move(currentFocusedBoss.position - position)
if currentFocusedBoss.position.distance_to(position) < 200:
tryAttack(2)
elif currentFocusedBoss.position.distance_to(position) < 400:
elif currentFocusedBoss.position.distance_to(position) < 500:
tryAttack(1)
else:
tryAttack(0)
@@ -27,7 +27,7 @@ func attack(type):
BulletBase.generate(preload("res://components/Bullets/Diamond.tscn"), self, weaponPos + MathTool.randv2_range(20), rotation + deg_to_rad(randf_range(-90, 90)))
elif type == 1:
for i in range(laserCount):
BulletBase.generate(preload("res://components/Bullets/Laser.tscn"), self, texture.global_position, deg_to_rad(90 * i))
BulletBase.generate(preload("res://components/Bullets/ChickLaser.tscn"), self, texture.global_position, deg_to_rad(90 * i))
elif type == 2:
var weaponPos = findWeaponAnchor("normal")
var target = weaponPos.angle_to_point(currentFocusedBoss.position)