version=2
@pokemon.cry(646)
@text.show(Haaahraaan!)
@battle.setvar(custombattlemusic,tao_legend_battle)
:if:<register.value(shinykyurem)>=true
	@battle.wild(646,70,1,tao_legend_battle_intro,12)
:else
	@battle.wild(646,70,0,tao_legend_battle_intro,12)
:endif
:if:<battle.caught>=true
	@register.register(caughtkyurem)
:endif
@npc.remove(0)
:if:<register.registered(taotriocomplete)>=false
	@player.turnto(0)
	@player.achieveemblem(tao)
	@player.warp(4,0,5)
	@level.update
	@npc.turn(1,0)
	@npc.move(1,1)
	@npc.turn(1,3)
	@player.turnto(1)
	@register.register(battlekyurem)
	@text.show(You faced the grey dragon~Kyurem and emerged victorious.*It takes a special trainer~to achieve that.~I congratulate you.*That Pokémon is capable of~far more than meets the eye.)
	:if:<battle.caught>=true
		@text.show(I heard some scientists of the~Pewter Museum of Science have~been studying its genetic~material.~Now that you have the real~thing, perhaps you could help~their research.)
	:endif
	@text.show(Well, it seems my journey~around these parts is over.*It was a pleasure to meet~someone like you.~We might meet again in the~future.*Until then, farewell!)
	@register.register(taotriocomplete)
	@screen.fadeout
	@player.warp(routes\route47\embtower\main2.dat)
	@level.update
	@screen.fadein
:endif
:end