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

feat(战斗系统): 增强激光武器效果并添加击退机制

- 增加BigLaser的伤害值和能量消耗
- 为子弹添加击退效果和生成后自动释放功能
- 修改LaserPluse的动画参数并添加锁定发射器脚本
- 调整敌人受击时的能量获取和击退效果
- 更新波次生成配置
This commit is contained in:
2025-08-28 12:34:41 +08:00
parent 19a484643d
commit 31426987a2
7 changed files with 51 additions and 11 deletions
+4 -3
View File
@@ -148,12 +148,13 @@ func takeDamage(bullet: BulletBase, crit: bool):
var damage = baseDamage + baseDamage * int(crit) * fields.get(FieldStore.Entity.CRIT_DAMAGE)
if sprinting:
playSound("miss")
storeEnergy(damage * 1.25)
storeEnergy(damage * 0.5)
damage = 0
else:
playSound("hurt")
bullet.launcher.storeEnergy(damage * 0.05)
storeEnergy(damage * -0.1)
storeEnergy(damage * -0.25)
position += Vector2.from_angle(bullet.position.angle_to_point(position)) * bullet.knockback
hit.emit(damage, bullet, crit)
healthChanged.emit(health)
health -= damage
@@ -162,7 +163,7 @@ func takeDamage(bullet: BulletBase, crit: bool):
bullet.launcher.setBoss(self)
if health <= 0:
if isBoss:
bullet.launcher.storeEnergy(energy)
bullet.launcher.storeEnergy(energy * 0.5)
bullet.launcher.setBoss(null)
tryDie(bullet)
func storeEnergy(value: float):