Add Wuchao night battlefield background

This commit is contained in:
2026-06-18 20:31:34 +09:00
parent dfe410b3c0
commit c5d47021b4
3 changed files with 27 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

@@ -128,6 +128,7 @@
"map": {
"width": 17,
"height": 11,
"background": "res://art/backgrounds/wuchao_night_granary.png",
"terrain": [
"GGGGGHHGGGGGGGGGG",
"GGFFGHHGGGFFGGGGG",

View File

@@ -3,6 +3,8 @@ extends SceneTree
const BattleStateScript := preload("res://scripts/core/battle_state.gd")
const BattleSceneScript := preload("res://scripts/scenes/battle_scene.gd")
const WUCHAO_BACKGROUND_PATH := "res://art/backgrounds/wuchao_night_granary.png"
func _init() -> void:
var failures: Array[String] = []
@@ -45,6 +47,7 @@ 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")
_check_wuchao_background_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)
if unit.is_empty():
@@ -85,6 +88,18 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
_check_alpha_cutout_path(failures, icon_path, "item %s icon cutout" % item_id)
func _check_wuchao_background_data(failures: Array[String]) -> void:
var state = BattleStateScript.new()
if not state.load_battle("res://data/scenarios/013_wuchao_raid.json"):
failures.append("could not load Wuchao raid for background")
return
var background_path := state.get_map_background_path()
if background_path != WUCHAO_BACKGROUND_PATH:
failures.append("013 Wuchao should use its night granary background: %s" % background_path)
return
_check_image_path(failures, background_path, "013 Wuchao map background")
func _check_scene_texture_loading(failures: Array[String]) -> void:
var scene = BattleSceneScript.new()
if not scene.state.load_battle("res://data/scenarios/001_yellow_turbans.json"):
@@ -121,6 +136,17 @@ func _check_scene_texture_loading(failures: Array[String]) -> void:
failures.append("camp conversation button text should preview supply effect")
scene.free()
var wuchao_scene = BattleSceneScript.new()
if not wuchao_scene.state.load_battle("res://data/scenarios/013_wuchao_raid.json"):
failures.append("could not load Wuchao scene state")
wuchao_scene.free()
return
if wuchao_scene.state.get_map_background_path() == BattleSceneScript.DEFAULT_BATTLE_BACKGROUND_PATH:
failures.append("Wuchao scene should not rely on the default battlefield background")
if wuchao_scene._current_battle_background_texture() == null:
failures.append("battle scene should load Wuchao night granary background texture")
wuchao_scene.free()
func _check_hud_focus_text(failures: Array[String]) -> void:
var scene = BattleSceneScript.new()