Add early battle backgrounds and unit class seals
This commit is contained in:
@@ -15,6 +15,21 @@ const SCENARIO_BACKGROUNDS := [
|
||||
"background_path": "res://art/backgrounds/sishui_gate_pass.png",
|
||||
"label": "002 Sishui Gate background"
|
||||
},
|
||||
{
|
||||
"scenario_path": "res://data/scenarios/003_xingyang_ambush.json",
|
||||
"background_path": "res://art/backgrounds/xingyang_forest_ambush.png",
|
||||
"label": "003 Xingyang forest ambush background"
|
||||
},
|
||||
{
|
||||
"scenario_path": "res://data/scenarios/004_qingzhou_campaign.json",
|
||||
"background_path": "res://art/backgrounds/qingzhou_village_road.png",
|
||||
"label": "004 Qingzhou village road background"
|
||||
},
|
||||
{
|
||||
"scenario_path": "res://data/scenarios/005_puyang_raid.json",
|
||||
"background_path": "res://art/backgrounds/puyang_raid_camp.png",
|
||||
"label": "005 Puyang raid camp background"
|
||||
},
|
||||
{
|
||||
"scenario_path": "res://data/scenarios/008_wan_castle_escape.json",
|
||||
"background_path": "res://art/backgrounds/wan_castle_escape.png",
|
||||
@@ -2464,7 +2479,7 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
).is_empty():
|
||||
failures.append("035 old Counterstroke setup flags should not expose doubt rations")
|
||||
|
||||
for item_id in ["bronze_sword", "training_spear", "short_bow", "hand_axe", "iron_armor", "panacea"]:
|
||||
for item_id in ["bronze_sword", "training_spear", "short_bow", "hand_axe", "iron_armor", "war_drum", "imperial_seal", "panacea"]:
|
||||
var item := state.get_item_def(item_id)
|
||||
if item.is_empty():
|
||||
failures.append("missing expected item: %s" % item_id)
|
||||
@@ -2625,9 +2640,30 @@ func _check_hud_focus_text(failures: Array[String]) -> void:
|
||||
failures.append("Enemy archer HUD focus should describe enemy control: %s" % archer_text)
|
||||
if not scene._unit_current_terrain_text(archer).contains("평지"):
|
||||
failures.append("Archer terrain text should reflect its current plain tile")
|
||||
_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", "武")
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_unit_class_mark(failures: Array[String], scene, unit_id: String, expected_family: String, expected_mark: 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)
|
||||
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)
|
||||
|
||||
|
||||
func _check_ancient_ui_theme(failures: Array[String]) -> void:
|
||||
var scene = BattleSceneScript.new()
|
||||
scene._create_hud()
|
||||
|
||||
Reference in New Issue
Block a user