Cambiados los aspectos visuales del juego a algo gotico
This commit is contained in:
1 parent
ec7e35ddf6
commit
967b3a286d
205 files changed
+7056
-1630
No files matched your search
@@ -5,7 +5,10 @@ Verifica recursos sin sustituir la inspeccion visual ni las pruebas del motor.
|
||||
from pathlib import Path
|
||||
import re
|
||||
import unittest
|
||||
from xml.etree import ElementTree
|
||||
try:
|
||||
from .art_asset_helpers import atlas_path, atlas_regions, region_hash, rgba_png
|
||||
except ImportError:
|
||||
from art_asset_helpers import atlas_path, atlas_regions, region_hash, rgba_png
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
LEVEL = (ROOT / "levels/level_02.tscn").read_text(encoding="utf-8")
|
||||
@@ -21,13 +24,24 @@ class Level02VisualResourceTests(unittest.TestCase):
|
||||
self.assertTrue((ROOT / resource).is_file(), resource)
|
||||
|
||||
def test_reaper_has_real_animation_frames_and_separate_weapon(self):
|
||||
atlas = ROOT / "assets/bosses/muerte/muerte_body_atlas.svg"
|
||||
scythe = ROOT / "assets/bosses/muerte/spectral_scythe.svg"
|
||||
for path in (atlas, scythe):
|
||||
root = ElementTree.parse(path).getroot()
|
||||
self.assertIn("viewBox", root.attrib)
|
||||
self.assertGreater(int(root.attrib["width"]), 90)
|
||||
frames = (ROOT / "assets/bosses/muerte/muerte_frames.tres").read_text()
|
||||
atlas = atlas_path(ROOT, frames)
|
||||
self.assertEqual(atlas.suffix, ".png")
|
||||
image = rgba_png(atlas)
|
||||
self.assertEqual(image[:2], (1536, 1536))
|
||||
self.assertEqual(min(image[2][3::4]), 0)
|
||||
self.assertGreaterEqual(max(image[2][3::4]), 250)
|
||||
regions = atlas_regions(frames)
|
||||
self.assertEqual(len(regions), 16)
|
||||
self.assertEqual(len({region_hash(image, region) for region in regions.values()}), 16)
|
||||
for x, y, width, height in regions.values():
|
||||
self.assertEqual((width, height), (384, 384))
|
||||
self.assertEqual((x % 384, y % 384), (0, 0))
|
||||
scythe = ROOT / "assets/ashen/bosses/spectral_scythe.png"
|
||||
weapon = rgba_png(scythe)
|
||||
self.assertEqual(weapon[:2], (192, 288))
|
||||
self.assertEqual(min(weapon[2][3::4]), 0)
|
||||
self.assertIn('path="res://assets/ashen/bosses/spectral_scythe.png"', BOSS)
|
||||
for animation in ("idle", "approach", "telegraph", "slash", "cast", "dash", "phase", "hurt", "death"):
|
||||
self.assertIn(f'"name": &"{animation}"', frames)
|
||||
self.assertIn('name="WeaponPivot"', BOSS)
|
||||
@@ -44,6 +58,7 @@ class Level02VisualResourceTests(unittest.TestCase):
|
||||
|
||||
def test_gate_uses_reusable_scene_and_opens_visibly(self):
|
||||
gate_scene = (ROOT / "world/triggers/kill_gate.tscn").read_text()
|
||||
gate_visual = (ROOT / "world/triggers/ossuary_gate_visual.tscn").read_text()
|
||||
gate_code = (ROOT / "world/triggers/kill_gate.gd").read_text()
|
||||
victory_code = (ROOT / "world/triggers/boss_victory.gd").read_text()
|
||||
self.assertIn('instance=ExtResource("gate")', LEVEL)
|
||||
@@ -55,9 +70,15 @@ class Level02VisualResourceTests(unittest.TestCase):
|
||||
self.assertIn('gate_visual.fully_open.connect(', gate_code)
|
||||
self.assertIn('gate_visual.set_unlocked(_open)', gate_code)
|
||||
self.assertIn('fully_open.emit()', GATE_CODE)
|
||||
self.assertIn('func _draw_skull(', GATE_CODE)
|
||||
self.assertIn('func _draw_leaf(', GATE_CODE)
|
||||
self.assertIn('name="Visual" type="Node2D"', gate_scene)
|
||||
self.assertIn('name="Visual" parent="." instance=ExtResource("visual")', gate_scene)
|
||||
for name in ("LeftLeaf", "RightLeaf", "Arch", "Seal"):
|
||||
self.assertIn(f'name="{name}" type="Sprite2D"', gate_visual)
|
||||
textures = re.findall(r'\[ext_resource type="Texture2D" path="res://([^\"]+)"', gate_visual)
|
||||
self.assertGreaterEqual(len(textures), 5)
|
||||
for path in textures:
|
||||
self.assertTrue((ROOT / path).is_file(), path)
|
||||
self.assertEqual(Path(path).suffix, ".png")
|
||||
self.assertIn('texture_filter = 1', gate_visual)
|
||||
self.assertIn('level.complete_level()', victory_code)
|
||||
self.assertNotIn('res://levels/level_02.gd', LEVEL)
|
||||
|
||||
|
||||
Reference in new issue
Block a user