Improve opening battle presentation
This commit is contained in:
@@ -6,9 +6,9 @@ const BattleSceneScript := preload("res://scripts/scenes/battle_scene.gd")
|
||||
const SCENARIO_BACKGROUNDS := [
|
||||
{
|
||||
"scenario_path": "res://data/scenarios/001_yellow_turbans.json",
|
||||
"background_path": "res://art/backgrounds/battlefield_frontier.png",
|
||||
"background_path": "res://art/backgrounds/yingchuan_opening_battlefield.png",
|
||||
"label": "001 opening field background",
|
||||
"allow_default": true
|
||||
"allow_default": false
|
||||
},
|
||||
{
|
||||
"scenario_path": "res://data/scenarios/002_sishui_gate.json",
|
||||
@@ -141,6 +141,8 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
failures.append("001 shop should expose merchant lines")
|
||||
|
||||
_check_image_path(failures, state.get_map_background_path(), "001 map background")
|
||||
if state.get_map_background_path() != "res://art/backgrounds/yingchuan_opening_battlefield.png":
|
||||
failures.append("001 should use a dedicated Yingchuan battlefield background")
|
||||
_check_scenario_backgrounds_data(failures)
|
||||
for unit_id in ["cao_cao", "xiahou_dun", "yellow_turban_1", "yellow_turban_2", "yellow_turban_3"]:
|
||||
var unit := state.get_unit(unit_id)
|
||||
@@ -3193,28 +3195,25 @@ func _check_hud_focus_text(failures: Array[String]) -> void:
|
||||
facing_points_inside = false
|
||||
if not facing_points_inside:
|
||||
failures.append("Unit facing marker should stay anchored inside its tile: %s" % str(facing_marker_points))
|
||||
_check_unit_class_mark(failures, scene, "cao_cao", "tactic", "책")
|
||||
_check_unit_class_mark(failures, scene, "xiahou_dun", "cavalry", "기")
|
||||
_check_unit_class_mark(failures, scene, "yellow_turban_2", "infantry", "보")
|
||||
_check_unit_class_mark(failures, scene, "yellow_turban_3", "ranged", "궁")
|
||||
_check_unit_class_mark(failures, scene, "yellow_turban_1", "heavy", "무")
|
||||
_check_unit_class_family(failures, scene, "cao_cao", "tactic")
|
||||
_check_unit_class_family(failures, scene, "xiahou_dun", "cavalry")
|
||||
_check_unit_class_family(failures, scene, "yellow_turban_2", "infantry")
|
||||
_check_unit_class_family(failures, scene, "yellow_turban_3", "ranged")
|
||||
_check_unit_class_family(failures, scene, "yellow_turban_1", "heavy")
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_unit_class_mark(failures: Array[String], scene, unit_id: String, expected_family: String, expected_mark: String) -> void:
|
||||
func _check_unit_class_family(failures: Array[String], scene, unit_id: String, expected_family: String) -> void:
|
||||
var unit: Dictionary = scene.state.get_unit(unit_id)
|
||||
if unit.is_empty():
|
||||
failures.append("missing unit for class mark check: %s" % unit_id)
|
||||
failures.append("missing unit for class family check: %s" % unit_id)
|
||||
return
|
||||
var family := str(scene._unit_class_family(unit))
|
||||
var mark := str(scene._unit_class_abbrev(unit))
|
||||
if family != expected_family:
|
||||
failures.append("%s class family should be %s, got %s" % [unit_id, expected_family, family])
|
||||
if mark != expected_mark:
|
||||
failures.append("%s class mark should be %s, got %s" % [unit_id, expected_mark, mark])
|
||||
var color: Color = scene._unit_class_badge_color(unit, Color(0.20, 0.42, 0.82))
|
||||
if color.a <= 0.0:
|
||||
failures.append("%s class badge color should be visible" % unit_id)
|
||||
failures.append("%s class silhouette color should be visible" % unit_id)
|
||||
|
||||
|
||||
func _check_ancient_ui_theme(failures: Array[String]) -> void:
|
||||
|
||||
Reference in New Issue
Block a user