fix: keep stairs interaction read-only
This commit is contained in:
@@ -29,10 +29,9 @@ func test_real_game_exposes_door_and_stairs_prompts_with_help_and_event_log() ->
|
||||
|
||||
state.map.set_cell(Vector2i(2, 1), GridMapState.CellKind.FLOOR)
|
||||
state.player.cell = Vector2i(9, 7)
|
||||
var interact_results: Array[TurnResult] = game.submit_test_interact()
|
||||
assert_eq(interact_results[0].kind, &"stairs_used")
|
||||
assert_eq(hud.get_context_prompt(), "Sortie atteinte — prochain étage bientôt disponible")
|
||||
assert_eq(prompt_label.text, "Sortie atteinte — prochain étage bientôt disponible")
|
||||
game.submit_test_interact()
|
||||
assert_eq(hud.get_context_prompt(), "Espace — Descendre l’escalier")
|
||||
assert_eq(prompt_label.text, "Espace — Descendre l’escalier")
|
||||
|
||||
var results := game.submit_test_action(Vector2i.LEFT)
|
||||
assert_eq(results[0].kind, &"moved")
|
||||
|
||||
@@ -62,14 +62,3 @@ func test_opening_a_door_recalculates_fov_and_triggers_exactly_one_enemy_respons
|
||||
assert_eq(state.map.get_cell(door), GridMapState.CellKind.FLOOR)
|
||||
assert_true(state.visible_cells.has(revealed_cell))
|
||||
assert_eq(enemy_result_count, 1)
|
||||
|
||||
func test_stairs_below_the_player_take_priority_and_mark_the_exit_reached() -> void:
|
||||
var state := make_state()
|
||||
state.map.set_cell(state.player.cell, GridMapState.CellKind.STAIRS)
|
||||
state.map.set_cell(state.player.cell + Vector2i.UP, GridMapState.CellKind.CLOSED_DOOR)
|
||||
|
||||
var results: Array[TurnResult] = state.try_interact()
|
||||
|
||||
assert_true(state.exit_reached)
|
||||
assert_eq(results[0].kind, &"stairs_used")
|
||||
assert_eq(state.map.get_cell(state.player.cell + Vector2i.UP), GridMapState.CellKind.CLOSED_DOOR)
|
||||
|
||||
Reference in New Issue
Block a user