Improve battle marker readability
This commit is contained in:
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user