Reorganize into role-based folders and consolidate art
Move every script and scene into role-based directories (actors/, systems/, ui/, levels/, props/) and all raw art under art/ (grouped by role, snake_case, Extract-Textures GLBs), dropping Blender version-suffix noise. Filenames are snake_case (PascalCase reserved for class_name) to avoid case-insensitive filesystem aliasing on the web/macOS targets. Routes the bull's hits through the typed DamageEvent pipeline and wires the bull's abilities to the Fx library. Updates CLAUDE.md's folder-layout overview to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CCyaJPTHCH9EDthpf4A5Sj
This commit is contained in:
+3
-58
@@ -30,7 +30,6 @@ func _run() -> void:
|
||||
test_kick_spread()
|
||||
test_gait_phase_crossing()
|
||||
test_tail_verlet_constraint()
|
||||
test_run_map()
|
||||
|
||||
print("=" .repeat(60))
|
||||
print("Results: %d passed, %d failed" % [_passed, _failed])
|
||||
@@ -172,60 +171,6 @@ func test_tail_verlet_constraint() -> void:
|
||||
_assert_in_range(damping_factor, 0.85, 1.0, "tail damping factor is reasonable")
|
||||
|
||||
|
||||
# ── Run map (Slay-the-Spire progression) ──────────────────────────────────────
|
||||
|
||||
func test_run_map() -> void:
|
||||
print("\n-- test_run_map --")
|
||||
var run: Node = root.get_node_or_null("/root/Run")
|
||||
if run == null:
|
||||
_assert_true(false, "Run autoload should exist")
|
||||
return
|
||||
|
||||
run.start_new_run()
|
||||
_assert_true(run.has_run(), "start_new_run builds a map")
|
||||
_assert_true(run.map.size() >= 2, "map has multiple rows")
|
||||
|
||||
# Final row is a single boss node the map funnels toward.
|
||||
var last: Array = run.map[run.map.size() - 1]
|
||||
_assert_eq(last.size(), 1, "final row is a single boss node")
|
||||
_assert_true(last[0].level.is_boss, "final node is a boss level")
|
||||
|
||||
# Connectivity: every node links forward, and every next-row node has a parent.
|
||||
for r: int in run.map.size() - 1:
|
||||
var nxt: Array = run.map[r + 1]
|
||||
var reached := {}
|
||||
for from_node in run.map[r]:
|
||||
_assert_true(from_node.links.size() >= 1, "row %d node links forward" % r)
|
||||
for c: int in from_node.links:
|
||||
_assert_true(c >= 0 and c < nxt.size(), "link column in range")
|
||||
reached[c] = true
|
||||
for c: int in nxt.size():
|
||||
_assert_true(reached.has(c), "row %d col %d has a parent" % [r + 1, c])
|
||||
|
||||
# From the start gate the whole first row is the frontier.
|
||||
_assert_eq(run.reachable().size(), run.map[0].size(), "start frontier is row 0")
|
||||
|
||||
# Advancing follows the chosen node's links.
|
||||
var first = run.map[0][0]
|
||||
run.select_node(first)
|
||||
run.complete_current_level()
|
||||
_assert_eq(run.player_row, 0, "player advanced to row 0")
|
||||
_assert_true(first.cleared, "cleared node is flagged")
|
||||
_assert_eq(run.reachable().size(), first.links.size(),
|
||||
"frontier follows the chosen node's links")
|
||||
|
||||
# Walking to a boss node latches run completion.
|
||||
var guard := 0
|
||||
while not run.run_complete() and guard < 64:
|
||||
var opts: Array = run.reachable()
|
||||
if opts.is_empty():
|
||||
break
|
||||
run.select_node(opts[0])
|
||||
run.complete_current_level()
|
||||
guard += 1
|
||||
_assert_true(run.run_complete(), "reaching a boss node completes the run")
|
||||
|
||||
|
||||
# ── Shared helpers ────────────────────────────────────────────────────────────
|
||||
|
||||
func _assert_in_range(val: float, lo: float, hi: float, desc: String) -> void:
|
||||
@@ -245,8 +190,8 @@ func test_debug_params_defaults() -> void:
|
||||
"mat_walk_speed default in valid range")
|
||||
_assert_in_range(dp.f("mat_wander_radius"), 5.0, 50.0,
|
||||
"mat_wander_radius default in valid range")
|
||||
_assert_in_range(dp.f("mat_spawn_count"), 1.0, 30.0,
|
||||
"mat_spawn_count default in valid range")
|
||||
_assert_in_range(dp.f("mat_wave_size"), 1.0, 50.0,
|
||||
"mat_wave_size default in valid range")
|
||||
_assert_in_range(dp.f("mat_hit_threshold"), 1.0, 30.0,
|
||||
"mat_hit_threshold default in valid range")
|
||||
_assert_in_range(dp.f("mat_ragdoll_impulse"), 1.0, 50.0,
|
||||
@@ -377,7 +322,7 @@ func test_matador_state_transitions() -> void:
|
||||
print("\n-- test_matador_state_transitions --")
|
||||
# Verify that the State enum values match expected constants
|
||||
# Load the matador scene to check its script
|
||||
var matador_scene := load("res://Matador.tscn")
|
||||
var matador_scene := load("res://actors/matador/matador.tscn")
|
||||
if matador_scene == null:
|
||||
_assert_true(false, "Matador.tscn should load")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user