require "Dialogs"

Arena.Resize(565, 130)
Player.sprite.alpha = 0

function Update()
	DialogUpdate()
	if Encounter.GetVar("vel") > -341 and not dialog then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Bubble("[noskip][font:papyrus][voice:papyrus][effect:shake][waittall:6]Sans... [w:20]Te extraño...[w:200] ", "rightwide", 490, 355, 40, 90, 1)
		elseif GetAlMightyGlobal("Idioma") == "Russian" then
			Bubble("[noskip][font:papyrus][voice:papyrus][effect:shake][waittall:6]Санс... [w:20]Я ску-\nчаю по тебе...[w:200] ", "rightwide", 490, 355, 40, 90, 1)
		else
			Bubble("[noskip][font:papyrus][voice:papyrus][effect:shake][waittall:6]Sans... [w:20]I miss you...[w:200] ", "rightwide", 490, 355, 40, 90, 1)
		end
		dialog = true
	elseif Encounter.GetVar("vel") > 0 and dialog then
		if string.sub(GetAlMightyGlobal("Archivimentazo"), 22, 22) == "0" then
			SetAlMightyGlobal("Archivimentazo", string.sub(GetAlMightyGlobal("Archivimentazo"), 1, 21).."1"..string.sub(GetAlMightyGlobal("Archivimentazo"), 23))
			Encounter["LogroDesbloqueado"] = {Timer = 0, Icon = 22}
		end
		Bubble("", "", "", "", "", "", 1)
		EndWave()
	end
end