mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
feat(战斗系统): 添加小鸡冲刺攻击技能及相关特效
实现小鸡的冲刺攻击能力,包括: 1. 新增ChickSprint子弹类型及场景 2. 为EntityBase添加拖尾粒子效果 3. 添加攻击蓄力特效和音效 4. 调整小鸡的攻击冷却时间和冲刺倍率 5. 优化TickTool工具类添加until方法 6. 修改世界背景z-index避免遮挡 调整战斗平衡性: 1. 降低默认冲刺倍率 2. 修改测试波次配置 3. 增加新的攻击方式选项
This commit is contained in:
@@ -8,9 +8,11 @@ const laserCount = 4
|
||||
func register():
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = 2000
|
||||
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.35
|
||||
attackCooldownMap[0] = 2000
|
||||
attackCooldownMap[0] = 500
|
||||
attackCooldownMap[1] = 6000
|
||||
attackCooldownMap[2] = 100
|
||||
attackCooldownMap[3] = 500
|
||||
sprintMultiplier = 60
|
||||
func spawn():
|
||||
texture.play("walk")
|
||||
|
||||
@@ -21,7 +23,8 @@ func ai():
|
||||
elif currentFocusedBoss.position.distance_to(position) < 700:
|
||||
tryAttack(1)
|
||||
else:
|
||||
tryAttack(0)
|
||||
var method = MathTool.randc_from([0, 3])
|
||||
tryAttack(method, method == 3)
|
||||
func attack(type):
|
||||
if type == 0:
|
||||
var weaponPos = findWeaponAnchor("normal")
|
||||
@@ -36,4 +39,11 @@ func attack(type):
|
||||
firepot.global_rotation = target
|
||||
firepot.shot()
|
||||
BulletBase.generate(preload("res://components/Bullets/FireScan.tscn"), self, weaponPos, target)
|
||||
elif type == 3:
|
||||
trailing = true
|
||||
BulletBase.generate(preload("res://components/Bullets/ChickSprint.tscn"), self, position, 0)
|
||||
await trySprint()
|
||||
trailing = false
|
||||
return true
|
||||
func sprint():
|
||||
move((currentFocusedBoss.position - position).normalized() * sprintMultiplier, true)
|
||||
|
||||
Reference in New Issue
Block a user