From 22b437948ed5aefd543f5d84c37506e78bcc2129 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Tue, 28 Dec 2010 01:17:48 +0000
Subject: [PATCH] Can not avoid one of the possible outcomes of the endgame

git-svn-id: http://svn.net-core.org/repos/t-engine4@2200 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/dialogs/DeathDialog.lua | 24 ++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/game/modules/tome/dialogs/DeathDialog.lua b/game/modules/tome/dialogs/DeathDialog.lua
index 7962735fb4..d1a7fcc9ad 100644
--- a/game/modules/tome/dialogs/DeathDialog.lua
+++ b/game/modules/tome/dialogs/DeathDialog.lua
@@ -166,17 +166,19 @@ function _M:generateList()
 	local list = {}
 
 	if config.settings.cheat then list[#list+1] = {name="Resurrect by cheating", action="cheat"} end
-	if self.actor:attr("easy_mode_lifes") then list[#list+1] = {name=("Resurrect with easy mode (%d left)"):format(self.actor.easy_mode_lifes), action="easy_mode"} end
-	if self.actor:attr("blood_life") and not self.actor:attr("undead") then list[#list+1] = {name="Resurrect with the Blood of Life", action="blood_life"} end
-	if self.actor:getTalentLevelRaw(self.actor.T_SKELETON_REASSEMBLE) >= 5 and not self.actor:attr("re-assembled") then list[#list+1] = {name="Re-assemble your bones and resurrect (Skeleton ability)", action="skeleton"} end
-
-	local consumenb = 1
-	self.actor:inventoryApplyAll(function(inven, item, o)
-		if o.one_shot_life_saving and (not o.slot or inven.worn) then
-			list[#list+1] = {name="Resurrect by consuming "..o:getName{do_colour=true}, action="consume"..consumenb, inven=inven, item=item, object=o}
-			consumenb = consumenb + 1
-		end
-	end)
+	if not self.actor.no_resurrect then
+		if self.actor:attr("easy_mode_lifes") then list[#list+1] = {name=("Resurrect with easy mode (%d left)"):format(self.actor.easy_mode_lifes), action="easy_mode"} end
+		if self.actor:attr("blood_life") and not self.actor:attr("undead") then list[#list+1] = {name="Resurrect with the Blood of Life", action="blood_life"} end
+		if self.actor:getTalentLevelRaw(self.actor.T_SKELETON_REASSEMBLE) >= 5 and not self.actor:attr("re-assembled") then list[#list+1] = {name="Re-assemble your bones and resurrect (Skeleton ability)", action="skeleton"} end
+
+		local consumenb = 1
+		self.actor:inventoryApplyAll(function(inven, item, o)
+			if o.one_shot_life_saving and (not o.slot or inven.worn) then
+				list[#list+1] = {name="Resurrect by consuming "..o:getName{do_colour=true}, action="consume"..consumenb, inven=inven, item=item, object=o}
+				consumenb = consumenb + 1
+			end
+		end)
+	end
 
 	list[#list+1] = {name="Character dump", action="dump"}
 	list[#list+1] = {name="Restart the same character", action="exit", subaction="restart"}
-- 
GitLab