Explain directional attack bonuses

This commit is contained in:
2026-06-20 10:38:25 +09:00
parent afba4197b0
commit 416feaf2ae
2 changed files with 61 additions and 3 deletions

View File

@@ -195,12 +195,18 @@ func _check_scene_directional_attack_badges(failures: Array[String]) -> void:
var badge := scene._target_preview_badge()
if not str(badge.get("text", "")).contains("후+%d" % BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS):
failures.append("rear attack hover badge should expose compact rear bonus: %s" % str(badge))
if not str(badge.get("tooltip", "")).contains("후방 공격 +%d 피해" % BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS):
failures.append("rear attack hover badge should explain rear damage in tooltip: %s" % str(badge))
var marker_text := ""
var marker_tooltip := ""
for marker in scene._attack_target_marker_entries():
if str(marker.get("target_id", "")) == "yellow_turban_1":
marker_text = str(marker.get("text", ""))
marker_tooltip = str(marker.get("tooltip", ""))
if not marker_text.contains("후+%d" % BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS):
failures.append("rear attack target marker should expose compact rear bonus: %s" % marker_text)
if not marker_tooltip.contains("후방 공격 +%d 피해" % BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS):
failures.append("rear attack target marker should explain rear damage in tooltip: %s" % marker_tooltip)
attacker["pos"] = Vector2i(5, 8)
scene._refresh_ranges()
@@ -208,6 +214,8 @@ func _check_scene_directional_attack_badges(failures: Array[String]) -> void:
var side_badge: Dictionary = scene._target_preview_badge()
if not str(side_badge.get("text", "")).contains("측+%d" % BattleStateScript.DIRECTIONAL_SIDE_DAMAGE_BONUS):
failures.append("side attack hover badge should expose compact side bonus: %s" % str(side_badge))
if not str(side_badge.get("tooltip", "")).contains("측면 공격 +%d 피해" % BattleStateScript.DIRECTIONAL_SIDE_DAMAGE_BONUS):
failures.append("side attack hover badge should explain side damage in tooltip: %s" % str(side_badge))
attacker["pos"] = Vector2i(2, 9)
attacker["facing_x"] = -1
@@ -220,9 +228,16 @@ func _check_scene_directional_attack_badges(failures: Array[String]) -> void:
failures.append("auto-move attack hover badge should use a clear hint instead of jargon: %s" % str(auto_badge))
if not str(auto_badge.get("text", "")).contains("후+%d" % BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS):
failures.append("auto-move attack hover badge should expose compact rear bonus: %s" % str(auto_badge))
if not str(auto_badge.get("tooltip", "")).contains("후방 공격 +%d 피해" % BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS):
failures.append("auto-move attack hover badge should explain rear damage in tooltip: %s" % str(auto_badge))
if scene._compact_directional_badge_label(BattleStateScript.DIRECTIONAL_SIDE_ATTACK) != "":
failures.append("directional badge helper should compact side attacks")
if not scene._format_directional_forecast_text({
"directional_bonus": BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS,
"directional_label": "후방"
}, "directional_bonus", "directional_label").contains("후방 공격 +%d" % BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS):
failures.append("directional forecast helper should explain rear attack bonus")
if scene._format_directional_badge_suffix({
"directional_attack": BattleStateScript.DIRECTIONAL_FRONT_ATTACK,
"directional_bonus": 0,