feat: complete playtest parity improvements
This commit is contained in:
@@ -36,6 +36,22 @@ func test_wall_and_closed_door_are_blocked_without_enemy_turn() -> void:
|
||||
assert_eq(door_results.size(), 1)
|
||||
assert_eq(door_results[0].kind, &"blocked")
|
||||
|
||||
func test_diagonal_movement_cannot_cut_the_corner_beside_a_closed_door() -> void:
|
||||
var map := GridMapState.new(Vector2i(5, 5), GridMapState.CellKind.WALL)
|
||||
var player_cell := Vector2i(2, 3)
|
||||
var destination := Vector2i(3, 2)
|
||||
map.set_cell(player_cell, GridMapState.CellKind.FLOOR)
|
||||
map.set_cell(destination, GridMapState.CellKind.FLOOR)
|
||||
map.set_cell(Vector2i(2, 2), GridMapState.CellKind.CLOSED_DOOR)
|
||||
map.set_cell(Vector2i(3, 3), GridMapState.CellKind.WALL)
|
||||
var state := GameState.new(map, ActorState.new(&"player", player_cell, 12, 3), {})
|
||||
|
||||
var results := state.try_player_action(Vector2i(1, -1))
|
||||
|
||||
assert_eq(results[0].kind, &"blocked")
|
||||
assert_eq(state.player.cell, player_cell)
|
||||
assert_eq(state.map.get_cell(Vector2i(2, 2)), GridMapState.CellKind.CLOSED_DOOR)
|
||||
|
||||
func test_melee_damages_adjacent_goblin_and_triggers_response() -> void:
|
||||
var state := make_state()
|
||||
state.try_player_action(Vector2i.RIGHT)
|
||||
|
||||
Reference in New Issue
Block a user