mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-02 01:11:54 +08:00
feat(战斗系统): 调整KukeMC的攻击逻辑和紫水晶子弹
为KukeMC角色减少召唤子体数量但增加紫水晶子弹数量,优化战斗节奏 添加紫水晶子弹的显示名称 移除PurpleCrystal类名定义 在EntityBase中新增died信号
This commit is contained in:
@@ -19,6 +19,7 @@ animations = [{
|
||||
|
||||
[node name="PurpleCrystal" instance=ExtResource("1_45mh7")]
|
||||
script = ExtResource("2_4lnlm")
|
||||
displayName = "紫水晶"
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
sprite_frames = SubResource("SpriteFrames_r86b3")
|
||||
|
||||
@@ -26,12 +26,14 @@ animations = [{
|
||||
[node name="KukeChild" instance=ExtResource("1_3ohuq")]
|
||||
script = ExtResource("2_ywxbd")
|
||||
|
||||
[node name="collect" parent="sounds" index="4"]
|
||||
stream = null
|
||||
|
||||
[node name="texture" parent="." index="2"]
|
||||
sprite_frames = SubResource("SpriteFrames_5rcbd")
|
||||
animation = &"walk"
|
||||
|
||||
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
|
||||
position = Vector2(47, 11)
|
||||
|
||||
[node name="statebar" parent="." index="3"]
|
||||
position = Vector2(0, -125)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
extends BulletBase
|
||||
class_name PurpleCrystal
|
||||
|
||||
func ai():
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
|
||||
@@ -5,13 +5,15 @@ func register():
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = 2500
|
||||
fields[FieldStore.Entity.OFFSET_SHOOT] = 25
|
||||
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.5
|
||||
attackCooldownMap[0] = 8000
|
||||
attackCooldownMap[1] = 10000
|
||||
attackCooldownMap[0] = 4000
|
||||
attackCooldownMap[1] = 6000
|
||||
func spawn():
|
||||
for i in 5:
|
||||
var child = EntityBase.generate(preload("res://components/Characters/KukeChild.tscn"), position + MathTool.randv2_range(500))
|
||||
for i in 3:
|
||||
var child = EntityBase.generate(load("res://components/Characters/KukeChild.tscn"), position + MathTool.randv2_range(500))
|
||||
child.currentFocusedBoss = currentFocusedBoss
|
||||
child.masterMine = self
|
||||
for i in 20:
|
||||
BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), self, findWeaponAnchor("normal"), deg_to_rad(randf_range(0, 360)))
|
||||
func ai():
|
||||
PresetEntityAI.follow(self, currentFocusedBoss, 500)
|
||||
for bullet in get_tree().get_nodes_in_group("bullets"):
|
||||
|
||||
@@ -4,6 +4,7 @@ class_name EntityBase # 这是个抽象类
|
||||
signal hit(damage: float, bullet: BulletBase, crit: bool)
|
||||
signal healed(amount: float)
|
||||
signal healthChanged(health: float)
|
||||
signal died()
|
||||
|
||||
signal energyChanged(energy: float, dontChangeDirection: bool)
|
||||
|
||||
@@ -313,6 +314,7 @@ func tryDie(by: BulletBase = null):
|
||||
UIState.setPanel("GameOver", [displayName, by.launcher.displayName, by.displayName])
|
||||
EffectController.create(preload("res://components/Effects/DeadBlood.tscn"), texture.global_position).shot()
|
||||
await die()
|
||||
died.emit()
|
||||
queue_free()
|
||||
func tryHeal(count: float):
|
||||
if inventory[ItemStore.ItemType.APPLE] > 0 and health < fields.get(FieldStore.Entity.MAX_HEALTH):
|
||||
|
||||
Reference in New Issue
Block a user