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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user