Add disarm attack lock tactic

This commit is contained in:
2026-06-18 10:32:32 +09:00
parent b15c5f6869
commit cbfc221782
11 changed files with 68 additions and 26 deletions

View File

@@ -1063,6 +1063,8 @@ func _unit_status_marker_color(marker_kind: String) -> Color:
return Color(0.44, 0.86, 1.0)
if marker_kind == "snare":
return Color(1.0, 0.64, 0.22)
if marker_kind == "disarm":
return Color(1.0, 0.48, 0.42)
return Color(0.72, 0.86, 1.0)
@@ -1123,6 +1125,8 @@ func _floating_text_color(kind: String) -> Color:
return Color(0.44, 0.86, 1.0)
if kind == "snare":
return Color(1.0, 0.64, 0.22)
if kind == "disarm":
return Color(1.0, 0.48, 0.42)
if kind == "miss" or kind == "fade":
return Color(0.82, 0.84, 0.90)
if kind == "defeat":
@@ -1182,6 +1186,8 @@ func _attack_target_preview_badge(selected: Dictionary, target: Dictionary) -> D
if preview.is_empty():
return {}
if bool(preview.get("attack_locked", false)):
return _make_target_preview_badge("DISARMED", "disarm")
if not bool(preview.get("in_range", false)):
return _make_target_preview_badge("OUT", "invalid")
@@ -1214,7 +1220,7 @@ func _skill_target_preview_badge(selected: Dictionary, target: Dictionary) -> Di
return _make_target_preview_badge("+%d HP" % heal, "heal")
if kind == "support":
var effect_text := str(preview.get("effect_text", "Support"))
var badge_kind := "snare" if effect_text.contains("Snare") else ("seal" if effect_text.contains("Seal") else ("poison" if effect_text.contains("Poison") else ("debuff" if effect_text.contains("-") else "support")))
var badge_kind := "disarm" if effect_text.contains("Disarm") else ("snare" if effect_text.contains("Snare") else ("seal" if effect_text.contains("Seal") else ("poison" if effect_text.contains("Poison") else ("debuff" if effect_text.contains("-") else "support"))))
return _make_target_preview_badge(_compact_support_preview_text(effect_text), badge_kind)
var result_text := "KO" if bool(preview.get("would_defeat", false)) else "-%d" % int(preview.get("damage", 0))
@@ -1293,6 +1299,8 @@ func _target_preview_badge_color(kind: String) -> Color:
return Color(0.44, 0.86, 1.0)
if kind == "snare":
return Color(1.0, 0.64, 0.22)
if kind == "disarm":
return Color(1.0, 0.48, 0.42)
return Color(0.78, 0.80, 0.86)
@@ -1461,6 +1469,10 @@ func _update_forecast() -> void:
forecast_label.text = "Forecast: -"
return
if bool(preview.get("attack_locked", false)):
forecast_label.text = "Forecast: disarmed.\nCannot use physical attacks."
return
var range_text := "ready" if preview["in_range"] else "out of range"
var defeat_text := " Defeat" if preview["would_defeat"] else ""
var counter_text := ""
@@ -3401,6 +3413,8 @@ func _action_lock_effect_label(action: String) -> String:
return "tactics"
if action == "move":
return "movement"
if action == "attack":
return "attacks"
return "action"