mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
d3cc2f94c1
- 为 ChickSprint 子弹添加 atk 属性并调整伤害计算 - 猫角色攻击时设置 ChickSprint 子弹的 atk 为 0.2 - 调整 Bow 子弹的生成延迟和角度计算精度 - 将 Bow 的箭矢数量从 1 增加到 2 - 增强 Arrow 子弹的速度、射程和视觉效果
21 lines
648 B
GDScript
21 lines
648 B
GDScript
extends EntityBase
|
|
class_name Maodie
|
|
|
|
func register():
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 75
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = randf_range(0.5, 0.8)
|
|
attackCooldownMap[0] = randi_range(2500, 6000)
|
|
sprintMultiplier = randf_range(10, 35)
|
|
func ai():
|
|
PresetEntityAI.follow(self, currentFocusedBoss)
|
|
tryAttack(0, true)
|
|
func attack(type: int):
|
|
if type == 0:
|
|
for bullet in BulletBase.generate(ComponentManager.getBullet("ChickSprint"), self, position, 0):
|
|
if bullet is ChickSprint:
|
|
bullet.atk = 0.2
|
|
trySprint()
|
|
return true
|
|
func sprint():
|
|
move((currentFocusedBoss.position - position).normalized() * sprintMultiplier, true)
|