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

fix: 调整伤害计算和能量存储逻辑,优化冲刺和受伤时的能量管理

This commit is contained in:
2025-08-27 20:00:21 +08:00
parent a688fe3b44
commit 27e45b4551
+3 -2
View File
@@ -99,11 +99,12 @@ 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.5)
storeEnergy(damage * 1.25)
damage = 0
else:
playSound("hurt")
bullet.launcher.storeEnergy(damage * 0.5)
bullet.launcher.storeEnergy(damage * 0.15)
storeEnergy(damage * -0.1)
health -= damage
DamageLabel.create(damage, crit, damageAnchor.global_position + MathTool.randv2_range(GameRule.damageLabelSpawnOffset))
if isBoss and bullet.launcher.isPlayer():