feat: complete stairs exit interaction and verification
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user