mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
feat(武器): 为HXD武器添加命中Boss时攻击速度加成效果
- 修改HXD子弹逻辑,命中Boss时增加5%攻击速度,子弹销毁时恢复 - 更新武器描述文本以反映新效果 - 调整测试环境初始波数为10
This commit is contained in:
@@ -4,12 +4,19 @@ class_name HXDBullet
|
||||
var bouncedTime: int = 0
|
||||
var maxBouncedTime: int = 0
|
||||
var lastHit: EntityBase
|
||||
var addTimes = 0
|
||||
var delta = 0.05
|
||||
|
||||
func spawn():
|
||||
texture.play(str(randi_range(0, 2)))
|
||||
func ai():
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
func destroy(_beacuseMap: bool):
|
||||
launcher.fields[FieldStore.Entity.ATTACK_SPEED] -= addTimes * delta
|
||||
func succeedToHit(_dmg: float, entity: EntityBase):
|
||||
if entity.isBoss:
|
||||
launcher.fields[FieldStore.Entity.ATTACK_SPEED] += delta
|
||||
addTimes += 1
|
||||
if is_instance_valid(lastHit):
|
||||
if lastHit.get_class() == entity.get_class():
|
||||
entity.bulletHit(self, true)
|
||||
|
||||
Reference in New Issue
Block a user