Menu de inicio, nuevo nivel y ajustes en objetos
This commit is contained in:
1 parent
cd9f31c8c1
commit
827e16cf50
61 files changed
+2685
-3553
No files matched your search
@@ -6,7 +6,7 @@ import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
VARIANTS = ROOT / 'enemies/variants'
|
||||
LEVEL = (ROOT / 'levels/level_02.tscn').read_text(encoding='utf-8')
|
||||
LEVEL = (ROOT / 'levels/level_00.tscn').read_text(encoding='utf-8')
|
||||
|
||||
|
||||
def properties(text):
|
||||
@@ -86,9 +86,12 @@ class EnemyProfileTests(unittest.TestCase):
|
||||
phases = p['attack_windup_duration'] + p.get('attack_duration', 0.22) + p.get('attack_recovery_duration', 0.30)
|
||||
self.assertLess(phases, p['attack_interval'], name)
|
||||
|
||||
def test_lab_keeps_its_small_leash(self):
|
||||
lab = (ROOT / 'levels/level_01.gd').read_text(encoding='utf-8')
|
||||
self.assertIn('enemy.set("chase_radius", 135.0)', lab)
|
||||
def test_vertical_level_uses_local_encounters(self):
|
||||
vertical = (ROOT / 'levels/level_01.tscn').read_text(encoding='utf-8')
|
||||
radii = re.findall(r'^chase_radius = ([\d.]+)', vertical, re.M)
|
||||
self.assertEqual(len(radii), 12)
|
||||
self.assertTrue(all(100 <= float(radius) <= 240 for radius in radii))
|
||||
self.assertNotIn('patrol_distance =', vertical)
|
||||
|
||||
def test_damage_api_keeps_old_callers_compatible(self):
|
||||
player = (ROOT / 'player/player.gd').read_text(encoding='utf-8')
|
||||
|
||||
Reference in new issue
Block a user