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

feat(召唤物): 添加哈基米召唤物及相关功能

添加新的哈基米(HJM)召唤物,包括动画资源、攻击逻辑和武器配置。主要变更:
- 新增HJM召唤物脚本和场景,包含6帧动画
- 添加HJM专属子弹类型HJMAttack
- 修改SummonBase基类添加atk属性
- 调整武器系统支持召唤物攻击
- 优化子弹系统支持召唤者追踪
- 降低LGBT旗帜召唤物的生命值
This commit is contained in:
2025-11-08 20:19:24 +08:00
parent e2570491aa
commit 062219c5b9
29 changed files with 396 additions and 16 deletions
+4 -1
View File
@@ -1,6 +1,9 @@
class_name PresetBulletAI
static func lockLauncher(bullet: BulletBase, launcher: EntityBase, onTexture: bool = false):
static func lockLauncher(bullet: BulletBase, launcher: EntityBase, onTexture: bool = false, useSummoned: bool = false):
if useSummoned:
if is_instance_valid(bullet.launcherSummoned):
launcher = bullet.launcherSummoned
bullet.position = launcher.texture.global_position if onTexture else launcher.position
static func forward(bullet: BulletBase, rotation: float):
bullet.forward(Vector2.from_angle(rotation))
+4
View File
@@ -0,0 +1,4 @@
extends BulletBase
func ai():
PresetBulletAI.lockLauncher(self, launcher, true, true)
+1
View File
@@ -0,0 +1 @@
uid://ccmahaw065xaj
+26
View File
@@ -0,0 +1,26 @@
extends SummonBase
var attackTime: float = 0
var tracer: EntityBase = null
func register():
fields[FieldStore.Entity.MAX_HEALTH] = 75
fields[FieldStore.Entity.MOVEMENT_SPEED] = 2
await TickTool.frame()
attackCooldownMap[0] = attackTime
func spawn():
texture.play("walk")
func ai():
tryAttack(0)
if is_instance_valid(tracer):
PresetEntityAI.follow(self, tracer, 50)
else:
tracer = EntityTool.findClosetEntity(position, get_tree(), !isPlayer(), isPlayer())
func attack(type):
if type == 0:
BulletBase.generate(
ComponentManager.getBullet("HJMAttack"),
self,
findWeaponAnchor("normal"),
0
)
+1
View File
@@ -0,0 +1 @@
uid://bpu0sko7fthdk
+1 -2
View File
@@ -1,13 +1,12 @@
extends SummonBase
var atk: float = 0
var maxTraceTime: float = 0
var tracePower: float = 0
var count: int = 0
var angle: float = 0
func register():
fields[FieldStore.Entity.MAX_HEALTH] = 150
fields[FieldStore.Entity.MAX_HEALTH] = 50
attackCooldownMap[0] = 1000
func ai():
tryAttack(0)
+6
View File
@@ -4,3 +4,9 @@ extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["time"] /= 1 + 0.05 * to * soulLevel
origin["atk"] *= 2 * to * soulLevel
return origin
func attack(entity: EntityBase):
var summon = entity.summon(ComponentManager.getSummon("HJM"), true, false)
summon.atk = readStore("atk")
summon.attackTime = readStore("time") * 1000
return true
+1 -1
View File
@@ -10,7 +10,7 @@ func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["trace"] += 0.05 * to * soulLevel
return origin
func attack(entity: EntityBase):
var summon = entity.summon(ComponentManager.getSummon("LGBTFlag"), true)
var summon = entity.summon(ComponentManager.getSummon("LGBTFlag"), true, false)
summon.atk = readStore("atk")
summon.maxTraceTime = readStore("trace") * 1000
summon.tracePower = readStore("power")