Add snare movement lock tactic
This commit is contained in:
@@ -1039,8 +1039,8 @@ func _unit_status_marker_kinds(unit: Dictionary) -> Array[String]:
|
||||
|
||||
func _unit_status_marker_kind(effect: Dictionary) -> String:
|
||||
var effect_type := str(effect.get("type", "stat_bonus"))
|
||||
if effect_type == "action_lock" and str(effect.get("action", "skill")) == "skill":
|
||||
return str(effect.get("status", "seal"))
|
||||
if effect_type == "action_lock":
|
||||
return str(effect.get("status", "status"))
|
||||
if effect_type == "damage_over_time" and int(effect.get("amount", 0)) > 0:
|
||||
return str(effect.get("status", "poison"))
|
||||
if effect_type == "stat_bonus":
|
||||
@@ -1061,6 +1061,8 @@ func _unit_status_marker_color(marker_kind: String) -> Color:
|
||||
return Color(0.54, 0.95, 0.36)
|
||||
if marker_kind == "seal":
|
||||
return Color(0.44, 0.86, 1.0)
|
||||
if marker_kind == "snare":
|
||||
return Color(1.0, 0.64, 0.22)
|
||||
return Color(0.72, 0.86, 1.0)
|
||||
|
||||
|
||||
@@ -1119,6 +1121,8 @@ func _floating_text_color(kind: String) -> Color:
|
||||
return Color(0.54, 0.95, 0.36)
|
||||
if kind == "seal":
|
||||
return Color(0.44, 0.86, 1.0)
|
||||
if kind == "snare":
|
||||
return Color(1.0, 0.64, 0.22)
|
||||
if kind == "miss" or kind == "fade":
|
||||
return Color(0.82, 0.84, 0.90)
|
||||
if kind == "defeat":
|
||||
@@ -1210,7 +1214,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 := "seal" if effect_text.contains("Seal") else ("poison" if effect_text.contains("Poison") else ("debuff" if effect_text.contains("-") else "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")))
|
||||
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))
|
||||
@@ -1287,6 +1291,8 @@ func _target_preview_badge_color(kind: String) -> Color:
|
||||
return Color(0.54, 0.95, 0.36)
|
||||
if kind == "seal":
|
||||
return Color(0.44, 0.86, 1.0)
|
||||
if kind == "snare":
|
||||
return Color(1.0, 0.64, 0.22)
|
||||
return Color(0.78, 0.80, 0.86)
|
||||
|
||||
|
||||
@@ -3367,8 +3373,11 @@ func _format_tactic_effect_text(skill: Dictionary) -> String:
|
||||
elif effect_type == "damage_over_time" and amount > 0:
|
||||
var status_name := str(effect.get("status", "status")).replace("_", " ").capitalize()
|
||||
parts.append("%s -%d" % [status_name, amount])
|
||||
elif effect_type == "action_lock" and str(effect.get("action", "skill")) == "skill":
|
||||
parts.append("%s tactics" % str(effect.get("status", "seal")).replace("_", " ").capitalize())
|
||||
elif effect_type == "action_lock":
|
||||
parts.append("%s %s" % [
|
||||
str(effect.get("status", "status")).replace("_", " ").capitalize(),
|
||||
_action_lock_effect_label(str(effect.get("action", "")))
|
||||
])
|
||||
if not parts.is_empty():
|
||||
return _join_strings(parts, ", ")
|
||||
return "P%d" % int(skill.get("power", 0))
|
||||
@@ -3387,6 +3396,14 @@ func _format_tactic_range_text(skill: Dictionary) -> String:
|
||||
return "1"
|
||||
|
||||
|
||||
func _action_lock_effect_label(action: String) -> String:
|
||||
if action == "skill":
|
||||
return "tactics"
|
||||
if action == "move":
|
||||
return "movement"
|
||||
return "action"
|
||||
|
||||
|
||||
func _on_tactic_skill_pressed(skill_id: String) -> void:
|
||||
_play_ui_confirm()
|
||||
selected_skill_id = skill_id
|
||||
|
||||
Reference in New Issue
Block a user