# Don't remove this scenario until the next release after 1.1.1 is made
[scenario]
	id=23_valley_statue
	#textdomain wesnoth-httt
	name= _ "The Valley of Statues"
	map_data="{campaigns/Heir_To_The_Throne/maps/Valley_of_Statues}"
	{SCENARIO_MUSIC "wesnoth-1.ogg"}
	turns=45
	next_scenario=24_return_to_wesnoth

	[event]
	name=prestart
		[objectives]
		side=1
			[objective]
				description= _ "Defeat all enemies"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Konrad, or having him turned to stone"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Delfador, or having him turned to stone"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Li'sar"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Kalenz"
				condition=lose
			[/objective]
		[/objectives]
	[/event]

	{DAWN}
	{MORNING}
	{AFTERNOON}
	{DUSK}
	{FIRST_WATCH}
	{SECOND_WATCH}

	{BIGMAP_VALLEY_OF_STATUES}

	# Monster in cave
	{PLACE_IMAGE misc/mine.png 7 33}

	[event]
	name=moveto
	[filter]
	side=1
	x=3-12
	y=30-36
	[/filter]

	{UNIT (Yeti) (A Yeti) ( _ "A Yeti") 3 7 33}
	[/event]

	# Warning to player
	{ITM_MONOLITH1 4 23}
	[event]
	name=moveto
	[filter]
	side=1
	x=4
	y=23
	[/filter]
	[message]
	speaker=narrator
	image=items/monolith1.png
	message= _ "Be warned, a great monster lives in the hills ahead."
	[/message]
	[/event]

	[side]
	type=Fighter
	description=Konrad
	user_description= _ "Konrad"
	unrenamable=yes
	side=1
	canrecruit=1
	controller=human
	hitpoints=80
	gold=20
	team_name=good
	[/side]

	[side]
	type=Red Mage
	description=Krestrad
	user_description= _ "Krestrad"
	side=2
	controller=ai
	canrecruit=1
		[ai]
		recruitment_pattern=fighter,scout
		{NO_SCOUTS}
		recruitment_ignore_bad_combat=yes
		recruitment_ignore_bad_movement=yes
		caution=0.25
		aggression=0.75
		[/ai]
	recruit=Cockatrice,Vampire Bat
	gold=100
	{INCOME 10 20 30}
	team_name=bad
	[/side]

	[side]
	type=Arch Mage
	description=Traskan
	user_description= _ "Traskan"
	side=3
	controller=ai
	canrecruit=1
		[ai]
		{ATTACK_DEPTH 5 5 6}
		recruitment_pattern=fighter,scout
		{NO_SCOUTS}
		recruitment_ignore_bad_combat=yes
		recruitment_ignore_bad_movement=yes
		caution=0.25
		aggression=0.75
		[/ai]
	recruit=Cockatrice,Gryphon
	{GOLD 160 220 280}
	{INCOME 8 12 16}
	team_name=bad
	[/side]

#define TURNED_TO_STONE
	[status]
	stone=on
	[/status]
#enddef

	[side]
	type=Orcish Warlord
	description=Urug-Halaki
	user_description= _ "Urug-Halaki"
	side=4
	controller=ai
	canrecruit=1
	{GOLD 60 120 180}
	team=orcs
	{TURNED_TO_STONE}

#define STONE_GRUNT X Y
	[unit]
	description=Orcish Grunt
	generate_description=yes
	side=4
	type=Orcish Grunt
	x={X}
	y={Y}
	[status]
		stone=on
	[/status]
	[modifications]
		{TRAIT_LOYAL}
	[/modifications]
	[/unit]
#enddef

#define STONE_GOBLIN_KNIGHT X Y
	[unit]
	description=Goblin Knight
	generate_description=yes
	side=4
	type=Goblin Knight
	x={X}
	y={Y}
	[status]
		stone=on
	[/status]
	[modifications]
		{TRAIT_LOYAL}
	[/modifications]
	[/unit]
#enddef

#define STONE_TROLL X Y
	[unit]
	description=Troll
	generate_description=yes
	side=4
	type=Troll
	x={X}
	y={Y}
	[status]
		stone=on
	[/status]
	[modifications]
		{TRAIT_LOYAL}
	[/modifications]
	[/unit]
#enddef

	#stone units around the castle
	{STONE_GOBLIN_KNIGHT 25 34}
	{STONE_GOBLIN_KNIGHT 26 34}
	{STONE_GRUNT 25 36}
	{STONE_TROLL 26 35}

	#stone units near the player
	{STONE_TROLL 9 13}
	{STONE_GRUNT 13 6}
	{STONE_GRUNT 16 6}
	{STONE_GOBLIN_KNIGHT 15 8}
	{STONE_TROLL 15 13}
	{STONE_GRUNT 7 15}
	{STONE_TROLL 12 25}
	{STONE_GOBLIN_KNIGHT 14 51}

		[ai]
		{ATTACK_DEPTH 5 5 6}
		[/ai]
	[/side]


	[event]
	name=start
		[recall]
		description=Delfador
		[/recall]
		[recall]
		description=Li'sar
		[/recall]
		[recall]
		description=Kalenz
		[/recall]

		[message]
		description=Konrad
		message= _ "Look ahead of us, orcs and trolls!"
		[/message]
		[message]
		description=Li'sar
		message= _ "But they look strange -- look, they're just statues!"
		[/message]
		[message]
		description=Konrad
		message= _ "That's very strange, why would someone make statues of such foul creatures?"
		[/message]
		[message]
		description=Traskan
		message= _ "Who are these that approach our valley, my apprentice?"
		[/message]
		[message]
		description=Krestrad
		message= _ "Halt! You will not pass by this way!"
		[/message]
		[message]
		description=Konrad
		message= _ "We seek only free passage through your valley. We mean no harm."
		[/message]
		[message]
		description=Krestrad
		message= _ "No-one passes by us. We rule this valley, and you cannot defeat us!"
		[/message]
		[message]
		description=Li'sar
		message= _ "If you do not let us through, we will pierce you with sword and bow! Come, let us take up arms against them!"
		[/message]
		[message]
		description=Traskan
		message= _ "Do you really think by mere force of arms you can defeat us? Some orcs were once foolish enough to think that as well..."
		[/message]
		[message]
		description=Konrad
		message= _ "Does he mean that these who stand in front of us were once live orcs?"
		[/message]
		[message]
		description=Delfador
		message= _ "Careful, I have heard of such things. We must proceed with caution, and try to discover the nature of the power these wizards wield."
		[/message]
		[message]
		description=Konrad
		message= _ "This place feels eerie. Is there no other way?"
		[/message]
		[message]
		description=Li'sar
		message= _ "I for one am not afraid of these who would oppose us. I feel certain that once a sword is driven through them, they will threaten us no more."
		[/message]
		[message]
		description=Delfador
		message= _ "There is no other way, but it is carefully that we shall proceed."
		[/message]
	[/event]

	#Where the player has to move to to undo the cockatrice's power

	{PLACE_IMAGE misc/temple.png 25 56}

	[event]
	name=moveto
		[filter]
		side=1
		x=25
		y=56
		[/filter]
		[message]
		speaker=unit
		message= _ "All I can see in here is a large mirror!"
		[/message]
		[message]
		description=Delfador
		message= _ "I have heard of such things. Perhaps the power of the Cockatrices is tied to it!"
		[/message]
		[message]
		speaker=unit
		message= _ "Very well, I'll smash it!"
		[/message]
		[kill]
		type=Cockatrice
		[/kill]
		[message]
		description=Traskan
		message= _ "No! The power of my creations is destroyed!"
		[/message]
		[unstone]
		[/unstone]
		[message]
		description=Urug-Halaki
		image=portraits/James_Woo/orc-warlord.png
		message= _ "Free from this prison of stone at last! Now we will gain revenge!"
		[/message]
		[message]
		description=Li'sar
		message= _ "First we have to fight these silly birds, and now bothersome orcs!"
		[/message]
		[message]
		description=Konrad
		message= _ "Fall on them men!"
		[/message]

		[disallow_recruit]
		side=2
		type=Cockatrice
		[/disallow_recruit]

		[disallow_recruit]
		side=3
		type=Cockatrice
		[/disallow_recruit]
	[/event]

	[event]
	name=stone
		[filter]
		description=Konrad
		[/filter]
		[message]
		description=Delfador
		message= _ "With Konrad turned into a statue, surely all is lost!"
		[/message]
		[endlevel]
		result=defeat
		[/endlevel]
	[/event]

	[event]
	name=stone
		[filter]
		description=Delfador
		[/filter]
		[message]
		description=Konrad
		message= _ "No! Delfador has been turned to stone! Without him we have no chance of unmaking the wizard's spell. All is lost!"
		[/message]
		[endlevel]
		result=defeat
		[/endlevel]
	[/event]

	[event]
	name=stone
		[message]
		description=Konrad
		message= _ "What happened there?"
		[/message]
		[message]
		description=Delfador
		message= _ "These Cockatrices will turn all our troops to stone, as they have the orcs, if we cannot find a way to undo their power!"
		[/message]
	[/event]

{campaigns/Heir_To_The_Throne/utils/deaths.cfg}

[/scenario]
