Clarify combat feedback audio cues
This commit is contained in:
@@ -13171,6 +13171,11 @@ func _on_dialogue_requested(lines: Array) -> void:
|
||||
|
||||
|
||||
func _on_combat_feedback_requested(unit_id: String, text: String, kind: String) -> void:
|
||||
if _should_suppress_floating_feedback_text(text, kind):
|
||||
var quiet_sfx_key := _combat_feedback_sfx_key(text, kind)
|
||||
if not quiet_sfx_key.is_empty():
|
||||
_play_sfx(quiet_sfx_key)
|
||||
return
|
||||
var unit := state.get_unit(unit_id)
|
||||
if unit.is_empty():
|
||||
return
|
||||
@@ -13185,7 +13190,7 @@ func _on_combat_feedback_requested(unit_id: String, text: String, kind: String)
|
||||
floating_texts.append({
|
||||
"text": text,
|
||||
"kind": kind,
|
||||
"pos": _floating_text_origin(cell) + Vector2(jitter, 0),
|
||||
"pos": _floating_text_origin(cell) + Vector2(jitter, 0) + _floating_text_kind_offset(kind),
|
||||
"age": -delay,
|
||||
"duration": FLOATING_TEXT_LIFETIME,
|
||||
"focus_cell": cell,
|
||||
@@ -13200,6 +13205,10 @@ func _on_combat_feedback_requested(unit_id: String, text: String, kind: String)
|
||||
queue_redraw()
|
||||
|
||||
|
||||
func _should_suppress_floating_feedback_text(text: String, kind: String) -> bool:
|
||||
return kind == "progress" and text.strip_edges().begins_with("공적 +")
|
||||
|
||||
|
||||
func _on_combat_result_reported(report: Dictionary) -> void:
|
||||
if report.is_empty():
|
||||
return
|
||||
@@ -13382,9 +13391,33 @@ func _format_combat_progress_line(progress_value, fallback_name: String, fallbac
|
||||
func _combat_feedback_sfx_key(text: String, kind: String) -> String:
|
||||
if kind == "reinforcement" or text == "증원":
|
||||
return "footstep"
|
||||
if kind == "damage" or text.begins_with("-"):
|
||||
return "hit_heavy"
|
||||
if kind == "miss" or text == "헛침":
|
||||
return "guard_block"
|
||||
if kind == "defeat" or kind == "fade" or text == "퇴각":
|
||||
return "defeat_sting"
|
||||
if kind == "heal" or kind == "mp" or kind == "support":
|
||||
return "skill_cast"
|
||||
if kind == "item" or kind == "gold":
|
||||
return "item_pickup"
|
||||
if kind == "progress":
|
||||
return "menu_confirm"
|
||||
return ""
|
||||
|
||||
|
||||
func _floating_text_kind_offset(kind: String) -> Vector2:
|
||||
if kind == "progress":
|
||||
return Vector2(-30.0, 22.0)
|
||||
if kind == "heal" or kind == "mp" or kind == "support" or kind == "item" or kind == "gold":
|
||||
return Vector2(0.0, 18.0)
|
||||
if kind == "miss" or kind == "defeat" or kind == "fade":
|
||||
return Vector2(0.0, -12.0)
|
||||
if kind == "reinforcement" or kind == "priority":
|
||||
return Vector2(0.0, -18.0)
|
||||
return Vector2.ZERO
|
||||
|
||||
|
||||
func _on_unit_motion_requested(unit_id: String, from_cell: Vector2i, to_cell: Vector2i) -> void:
|
||||
if unit_id.is_empty() or from_cell == to_cell:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user