function main()
  dink.playsound(58, 0, 0, current_sprite, true)
  current_sprite.touch_damage = -1
end

function hit()
  if math.random(2) == 1 then
    player:say("Some gold came out!")
    global.gold = global.gold + math.random(2)
  else
    player:say("Ow my hand!")
    player:hurt(1)
  end
end

function push()
  player:say("I don't think it'll be easy to steal")
end

function talk()
  local talks = { "A fountain", "It's flowing with water", "Looks dumb" }
  -- Say a random line from the above. math.random will return 1 to 3
  player:say(talks[math.random(3)])
end

function touch()
  current_sprite.touch_damage = 0

  if global.life < global.lifemax then
    global.life = global.lifemax
    player:say("The fountain water is healing me")
  else
    player:say("I'm at full HP!")
  end

  dink.wait(1000)
  current_sprite.touch_damage = -1
end
