mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
8ff063865e
将母鸡的最大生命值从75提升到100,移动速度从0.25增加到0.3,以平衡游戏难度
19 lines
576 B
GDScript
19 lines
576 B
GDScript
extends EntityBase
|
|
class_name Hen
|
|
|
|
func register():
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 100
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.3
|
|
fields[FieldStore.Entity.OFFSET_SHOOT] = 10
|
|
|
|
func ai():
|
|
attackCooldownMap[0] = randi_range(1500, 4000)
|
|
PresetEntityAI.follow(self, currentFocusedBoss, 300)
|
|
tryAttack(0)
|
|
func attack(type):
|
|
if type == 0:
|
|
var weaponPos = findWeaponAnchor("normal")
|
|
for i in randi_range(1, 4):
|
|
BulletBase.generate(preload("res://components/Bullets/Star.tscn"), self, weaponPos, (currentFocusedBoss.position - position).angle())
|
|
return true
|