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

local exploded_count = 0
local regenerated = false

function explosive_pot:on_exploded()
  exploded_count = exploded_count + 1
end

function explosive_pot:on_regenerating()
  regenerated = true
end

function map:on_opening_transition_finished()
  hero:start_bow()

  -- Wait long enough for the arrow to hit, the explosion to play,
  -- and regeneration to start (10 second delay + some margin).
  sol.timer.start(map, 12000, function()
    assert_equal(exploded_count, 1)
    assert(regenerated)
    sol.main.exit()
  end)
end
