mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-02 17:31:55 +08:00
feat(武器): 完善扶桑元神武器机制
- 调整格挡子弹的基础伤害为0 - 增加气力上限和格挡次数的可配置性 - 实现乾坤剑伤害随武器等级提升 - 更新武器描述文本以反映新机制 - 修复乾坤剑生命周期与生成速度的同步问题
This commit is contained in:
@@ -5,6 +5,8 @@ class_name ParrierBullet
|
||||
|
||||
var parryiedTimes: int = 0
|
||||
var maxParryTimes: int = 1
|
||||
var maxBallCount: int = 3
|
||||
var atk: float = 0
|
||||
|
||||
func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞
|
||||
if BulletTool.canDamage(bullet, launcher): # 其他子弹可以使当前子弹的发射者受伤吗?
|
||||
@@ -17,7 +19,7 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞
|
||||
# 摧毁其他子弹
|
||||
bullet.tryDestroy()
|
||||
var cycler = launcher.getOrCreateCycleTimer("parry", 2000, 100)
|
||||
if len(cycler.bullets) < 5: # 玩家最多只能拥有5点气
|
||||
if len(cycler.bullets) < maxBallCount: # 玩家最多只能拥有5点气
|
||||
for b in BulletBase.generate(
|
||||
ComponentManager.getBullet("ParryBall"), # 生成气的子弹
|
||||
launcher,
|
||||
@@ -25,4 +27,4 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞
|
||||
0
|
||||
):
|
||||
if b is ParryBallBullet:
|
||||
pass
|
||||
b.atk = atk
|
||||
|
||||
@@ -2,6 +2,7 @@ extends BulletBase
|
||||
class_name ParryBallBullet
|
||||
|
||||
var cycler: CycleTimer
|
||||
var atk: float = 0
|
||||
|
||||
func spawn():
|
||||
cycler = launcher.getOrCreateCycleTimer("parry")
|
||||
@@ -20,6 +21,7 @@ func succeedToHit(_dmg: float, entity: EntityBase): # 当撞到敌人时
|
||||
0
|
||||
):
|
||||
if bullet is QKSwordBullet:
|
||||
bullet.baseDamage = atk
|
||||
bullet.position = entity.texture.global_position + MathTool.sampleInRing(200, 500)
|
||||
bullet.tracer = entity
|
||||
bullet.look_at(entity.getTrackingAnchor()) # 生成的乾坤剑面向敌人
|
||||
|
||||
@@ -8,6 +8,7 @@ var spawnSpeed: float = 1
|
||||
func register():
|
||||
spawnSpeed = randf_range(0.25, 1.75)
|
||||
animator.speed_scale = spawnSpeed
|
||||
lifeTime /= spawnSpeed
|
||||
func ai():
|
||||
if is_instance_valid(tracer) && !attackedTracer:
|
||||
look_at(tracer.getTrackingAnchor())
|
||||
|
||||
Reference in New Issue
Block a user