feat: complete stairs exit interaction and verification

This commit is contained in:
goose
2026-10-01 16:15:30 -04:00
parent b0ce464a38
commit c16f648ce8
7 changed files with 206 additions and 32 deletions
+6
View File
@@ -18,6 +18,12 @@ const TARGET_OFFSETS: Array[Vector2i] = [
static func resolve(state: GameState) -> Array[TurnResult]:
var results: Array[TurnResult] = []
if state.map.get_cell(state.player.cell) == GridMapState.CellKind.STAIRS and not state.exit_reached:
state.exit_reached = true
results.append(TurnResultType.new(state.player.id, &"stairs_used", state.player.cell, state.player.cell, &"", 0, "You descend the stairs."))
TurnResolverType.append_enemy_response(state, results)
return results
var door_cell := _find_closed_door(state)
if door_cell.x >= 0:
state.map.set_cell(door_cell, GridMapState.CellKind.FLOOR)