Improve battle marker readability

This commit is contained in:
2026-06-19 13:06:05 +09:00
parent 8ba83cc985
commit 761e571901
2 changed files with 121 additions and 4 deletions

View File

@@ -97,6 +97,7 @@ func _init() -> void:
_check_hover_intent_badges(failures)
_check_action_button_disabled_reasons(failures)
_check_terrain_and_unit_presentation(failures)
_check_objective_and_status_marker_helpers(failures)
_check_attack_motion_profiles(failures)
_check_attack_motion_signal(failures)
@@ -3596,6 +3597,40 @@ func _check_terrain_and_unit_presentation(failures: Array[String]) -> void:
scene.free()
func _check_objective_and_status_marker_helpers(failures: Array[String]) -> void:
var scene = BattleSceneScript.new()
if not scene.state.load_battle("res://data/scenarios/001_yellow_turbans.json"):
failures.append("could not load battle scene state for objective/status markers")
scene.free()
return
if scene.state.get_objective_cells().is_empty():
failures.append("opening battle should expose objective cells for foreground markers")
var glyphs := {
"support": "",
"debuff": "",
"poison": "",
"seal": "",
"snare": "",
"disarm": ""
}
for marker_kind in glyphs.keys():
if scene._unit_status_marker_glyph(str(marker_kind)) != str(glyphs[marker_kind]):
failures.append("status marker glyph mismatch for %s" % str(marker_kind))
var unit := {
"status_effects": [
{"type": "stat_bonus", "stat": "def", "amount": 2, "remaining_phases": 2},
{"type": "stat_bonus", "stat": "def", "amount": -2, "remaining_phases": 2},
{"type": "damage_over_time", "status": "poison", "amount": 4, "remaining_phases": 2},
{"type": "action_lock", "status": "seal", "action": "skill", "remaining_phases": 2}
]
}
var marker_kinds := scene._unit_status_marker_kinds(unit)
for expected in ["support", "debuff", "poison", "seal"]:
if not marker_kinds.has(expected):
failures.append("status marker kinds should include %s: %s" % [expected, str(marker_kinds)])
scene.free()
func _check_attack_motion_profiles(failures: Array[String]) -> void:
var scene = BattleSceneScript.new()
if not scene.state.load_battle("res://data/scenarios/001_yellow_turbans.json"):