mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 00:11:54 +08:00
feat(战斗系统): 添加完美闪避窗口并本地化伤害标签
添加完美闪避窗口参数,用于调整触发完美闪避的速度阈值 将伤害标签中的"MISS"和"PERFECT MISS"本地化为中文"闪避"和"完美闪避"
This commit is contained in:
@@ -24,10 +24,10 @@ func _ready():
|
||||
else:
|
||||
if crit:
|
||||
label.label_settings.font_color = color4
|
||||
label.text = "PERFECT MISS"
|
||||
label.text = "完美闪避"
|
||||
else:
|
||||
label.label_settings.font_color = color3
|
||||
label.text = "MISS"
|
||||
label.text = "闪避"
|
||||
animator.play("show")
|
||||
await animator.animation_finished
|
||||
queue_free()
|
||||
|
||||
@@ -20,6 +20,7 @@ var fields = {
|
||||
FieldStore.Entity.SAVE_ENERGY: 1,
|
||||
FieldStore.Entity.ENERGY_MULTIPILER: 1,
|
||||
FieldStore.Entity.ENERGY_REGENERATION: 1,
|
||||
FieldStore.Entity.PERFECT_MISS_WINDOW: 0.15,
|
||||
"子弹": TITLE_FLAG,
|
||||
FieldStore.Entity.OFFSET_SHOOT: 3,
|
||||
FieldStore.Entity.PENERATE: 0,
|
||||
@@ -176,7 +177,7 @@ func takeDamage(bullet: BulletBase, crit: bool):
|
||||
var perfectMiss = false
|
||||
if sprinting:
|
||||
playSound("miss")
|
||||
if velocity.length() > (displace(velocity, true) * sprintMultiplier * 0.9).length():
|
||||
if velocity.length() > (displace(velocity, true) * sprintMultiplier * (1 - fields.get(FieldStore.Entity.PERFECT_MISS_WINDOW))).length():
|
||||
perfectMiss = true
|
||||
if perfectMiss:
|
||||
storeEnergy(damage * 2)
|
||||
|
||||
Reference in New Issue
Block a user