Gauntlet UI fixes and cleanser improvements

This commit is contained in:
2026-06-28 18:50:49 +08:00
parent f0ba6c2b54
commit 8b9efa1165
16 changed files with 585 additions and 105 deletions
+6 -4
View File
@@ -49,10 +49,11 @@ func test_cleanser_granted_after_two_missions():
assert_eq(manager.player_cleansers.get(7, 0), 1, "Cleanser granted after 2 missions")
func test_cleanser_inventory_capped_at_one():
# Four missions would be two grants, but inventory caps at 1 (not consumed).
# Four missions would be two grants. The new rule allows them to stack.
for i in range(4):
manager.player_mission_completions[7] = i + 1
manager._on_goal_count_updated(7, i + 1)
assert_eq(manager.player_cleansers.get(7, 0), 1, "Inventory never exceeds 1")
assert_eq(manager.player_cleansers.get(7, 0), 2, "Cleansers now stack")
# =============================================================================
# Activation / immunity lifecycle
@@ -96,11 +97,12 @@ func test_clear_sticky_cell_removes_and_protects():
# Safe-stop early termination (#072 acceptance: ends when stopping on safe cell)
# =============================================================================
func test_stop_on_safe_cell_ends_cleanser():
func test_stop_on_safe_cell_keeps_cleanser():
manager.cleanser_active[8] = true
manager.cleanser_cells_left[8] = 3
manager.notify_movement_stopped(8, Vector2i(5, 5)) # safe cell
assert_false(manager.is_cleanser_active(8), "Cleanser ends on safe-cell stop")
assert_true(manager.is_cleanser_active(8), "Cleanser NO LONGER ends on safe-cell stop (persists charges)")
func test_stop_on_sticky_cell_keeps_cleanser():
manager.sticky_cells[Vector2i(6, 6)] = true