mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-10 21:57:12 +08:00
feat(武器系统): 优化LGBT武器和召唤物行为
- 增加LGBT武器的冷却时间从0.1到1000 - 召唤物现在会继承召唤者位置 - 优化子弹追踪逻辑和生命周期 - 修复召唤物AI行为和玩家状态检测 - 调整召唤物属性和攻击冷却时间
This commit is contained in:
@@ -5,18 +5,20 @@ var maxTraceTime: float = 0
|
||||
var tracePower: float = 0
|
||||
|
||||
func register():
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = 100
|
||||
attackCooldownMap[0] = 500
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = 500
|
||||
attackCooldownMap[0] = 250
|
||||
func ai():
|
||||
tryAttack(0)
|
||||
func attack(type):
|
||||
if type == 0:
|
||||
var tracer = EntityTool.findClosetEntity(position, get_tree(), false, true)
|
||||
for bullet in BulletBase.generate(
|
||||
ComponentManager.getBullet("LGBTBullet"),
|
||||
self,
|
||||
findWeaponAnchor("normal"),
|
||||
position.angle_to_point(EntityTool.findClosetEntity(position, get_tree(), false, true).position)
|
||||
position.angle_to_point(tracer.position)
|
||||
):
|
||||
bullet.tracer = tracer
|
||||
bullet.damage = atk
|
||||
bullet.maxTraceTime = maxTraceTime
|
||||
bullet.tracePower = tracePower
|
||||
|
||||
@@ -8,7 +8,7 @@ func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||
origin["trace"] += 0.25 * to * soulLevel
|
||||
return origin
|
||||
func attack(entity: EntityBase):
|
||||
var summon = entity.summon(ComponentManager.getSummon("LGBTFlag"))
|
||||
var summon = entity.summon(ComponentManager.getSummon("LGBTFlag"), true)
|
||||
summon.atk = readStore("atk")
|
||||
summon.maxTraceTime = readStore("trace") * 1000
|
||||
summon.tracePower = readStore("power")
|
||||
|
||||
Reference in New Issue
Block a user