local map = ...
local hero = map:get_hero()
local game = map:get_game()

function map:on_opening_transition_finished()

  local state = sol.state.create()
  state:set_can_traverse("crystal_block", true)
  hero:start_state(state)

  local crystal_block = map:get_entity("crystal_block")
  local x, y, layer = crystal_block:get_position()
  hero:set_position(x, y, layer)

  -- The custom state explicitly allows traversing the raised crystal
  -- block: its collision notification must not push the hero away.
  assert_equal(hero:get_state(), "custom")
  assert_equal_position(hero, x, y, layer)

  sol.main.exit()
end
