#textdomain wesnoth-utbs
# This file contains message to display when heroes die
# It is used until Scenario 6, when player get troll/dwarf ally hero

#!***Conditionalised -> allows scraping of deaths3.cfg***

#ifdef ALL_LOSE

# Kaleh death
[event]
name=die
	[filter]
	description=Kaleh
	[/filter]

	[message]
	speaker=unit
	message= _ "I'm too young to die. What will happen to my people?"
	[/message]

	[endlevel]
	result=defeat
	[/endlevel]

[/event]

[event]
name=die

	[filter]
	description=Nym
	[/filter]

	[message]
	speaker=unit
	message= _ "Save me Kaleh, I'm dying..."
	[/message]

	[endlevel]
	result=defeat
	[/endlevel]

[/event]

# Zhul death
[event]
name=die
	[filter]
	description=Zhul
	[/filter]

	[message]
	speaker=unit
	message= _ "Eloh protect us, I have fallen."
	[/message]

	[endlevel]
	result=defeat
	[/endlevel]

[/event]

# Garak death
[event]
	name=die

	[filter]
	description=Garak
	[/filter]

	[message]
	speaker=unit
	message= _ "Aaaargh! Curse you!"
	[/message]

	[endlevel]
	result=defeat
	[/endlevel]

[/event]

#!***Conditionalised -> Keeps event from featuring in first scenario***

#ifdef ELYSSA_FEATURING
# Elyssa death
[event]
name=die

	[filter]
	description=Elyssa
	[/filter]

	[message]
	speaker=unit
	message= _ "This can't be the end, I have too much left to see."
	[/message]

	[message]
	description=Kaleh
	message= _ "How could we have let her die? I've never seen fire magic like that before. She will be sorely missed."
	[/message]

[/event]
#endif

#!***Moved to -> allows scraping of death2.cfg***
#ifdef ALLY_FEATURING
# Dwarf/Troll ally death
[event]
	name=die

	[filter]
	description=$ally_name
	[/filter]

		[if]
			[variable]
			name=ally_race
			equals=Dwarf
			[/variable]

			[then]

			[message]
			description=$ally_name
			message= _ "I go now to join my forefathers..."
			[/message]

			[/then]

			[else]

			[message]
			description=$ally_name
			message= _ "No, $ally_name can't die now!"
			[/message]

			[/else]
		[/if]

		[if]
			[variable]
			name=ally_must_live
			numerical_equals=1
			[/variable]

			[then]

			[message]
			description=Kaleh
			message= _ "Without his guidance, how can we escape from these infernal caves? We are lost without him!"
			[/message]

			[endlevel]
			result=defeat
			[/endlevel]

			[/then]

			[else]

			[message]
			description=Kaleh
			message= _ "He was a brave warrior and a true ally. He will be missed."
			[/message]

			[/else]
		[/if]

		[set_variable]
			name=ally_dead
			value=1
		[/set_variable]

[/event]

# Esanoo's death

[event]
name=die
	[filter]
	description=Esanoo
	[/filter]

	[message]
	speaker=unit
	message= _ "Farewell Nym, I go to the sea god. You elves must go on without me."
	[/message]

	[message]
	description=Nym
	message= _ "Farewell Esanoo. You were my favorite of the merfolk."
	[/message]
[/event]

# Kromph's death

[event]
name=die
	[filter]
	description=Kromph
	[/filter]

	[message]
	speaker=unit
	message= _ "Aaauurrrgghhh!!!"
	[/message]
[/event]

#endif

#!***Moved to -> allows scraping of death3.cfg***

#else

# Kaleh death
[event]
name=die
	[filter]
		description=Kaleh
	[/filter]

	[message]
		speaker=unit
		message= _ "To die on the cusp of victory. Oh the irony!"
	[/message]

	[endlevel]
		result=defeat
	[/endlevel]

[/event]

# Nym death
[event]
name=die
	[filter]
		description=Nym
	[/filter]

	[message]
		speaker=unit
		message= _ "Save me Kaleh, I'm dying..."
	[/message]

	[set_variable]
		name=allies_killed
		add=1
	[/set_variable]

	[set_variable]
		name=nym_dead
		value=1
	[/set_variable]

[/event]

# Zhul death
[event]
name=die
	[filter]
		description=Zhul
	[/filter]

	[message]
		speaker=unit
		message= _ "Eloh protect us, I have fallen."
	[/message]

	[set_variable]
		name=allies_killed
		add=1
	[/set_variable]

	[set_variable]
		name=zhul_dead
		value=1
	[/set_variable]

[/event]

# Dwarf/Troll ally death
[event]
	name=die

	[filter]
		description=$ally_name
	[/filter]

	[if]
		[variable]
			name=ally_race
			equals=Dwarf
		[/variable]

		[then]

		[message]
			description=$ally_name
			message= _ "By Moradin, I have fallen!"
		[/message]

		[/then]

		[else]

		[message]
			description=$ally_name
			message= _ "No, $ally_name can't die now!"
		[/message]

		[/else]
	[/if]

	[set_variable]
		name=allies_killed
		add=1
	[/set_variable]

	[set_variable]
		name=ally_dead
		value=1
	[/set_variable]

[/event]

#endif
